Formally, a signature can be defined as a triple σ =, where Sfunc and Srel are disjoint sets not containing any other basic logical symbols, called respectively
function symbols and
relation symbols or predicates,
and a function ar: SfuncSrel → which assigns a natural number called arity to every function or relation symbol. A function or relation symbol is called n-ary if its arity is n. A nullary function symbol is called a constant symbol.
A signature with no function symbols is called a relational signature, and a signature with no relation symbols is called an algebraic signature. A finite signature is a signature such that Sfunc and Srel are finite. More generally, the cardinality of a signature σ = is defined as |σ| = |Sfunc| + |Srel|. The language of a signature is the set of all well formed sentences built from the symbols in that signature together with the symbols in the logical system.
Other conventions
In universal algebra the wordtype or similarity type is often used as a synonym for "signature". In model theory, a signature σ is often called a vocabulary, or identified with the languageL to which it provides the non-logical symbols. However, the cardinality of the language L will always be infinite; if σ is finite then |L| will be ℵ0. As the formal definition is inconvenient for everyday use, the definition of a specific signature is often abbreviated in an informal way, as in: Sometimes an algebraic signature is regarded as just a list of arities, as in: Formally this would define the function symbols of the signature as something like f0 , f1 and f2 , but in reality the usual names are used even in connection with this convention. In mathematical logic, very often symbols are not allowed to be nullary, so that constant symbols must be treated separately rather than as nullary function symbols. They form a set Sconst disjoint from Sfunc, on which the arity function ar is not defined. However, this only serves to complicate matters, especially in proofs by induction over the structure of a formula, where an additional case must be considered. Any nullary relation symbol, which is also not allowed under such a definition, can be emulated by a unary relation symbol together with a sentence expressing that its value is the same for all elements. This translation fails only for empty structures. If nullary symbols are allowed, then every formula of propositional logic is also a formula of first-order logic. An example for an infinite signature uses Sfunc = ∪ and Srel = to formalize expressions and equations about a vector space over an infinite scalar fieldF, where each fa denotes the unary operation of scalar multiplication by a. This way, the signature and the logic can be kept single-sorted, with vectors being the only sort.
Use of signatures in logic and algebra
In the context of first-order logic, the symbols in a signature are also known as the non-logical symbols, because together with the logical symbols they form the underlying alphabet over which two formal languages are inductively defined: The set of terms over the signature and the set of formulas over the signature. In a structure, an interpretation ties the function and relation symbols to mathematical objects that justify their names: The interpretation of an n-ary function symbol f in a structure A with domainA is a function fA: An → A, and the interpretation of an n-ary relation symbol is a relation RA ⊆ An. Here An = A × A ×... × A denotes the n-fold cartesian product of the domain A with itself, and so f is in fact an n-ary function, and R an n-ary relation.
Many-sorted signatures
For many-sorted logic and for many-sorted structures signatures must encode information about the sorts. The most straightforward way of doing this is via symbol types that play the role of generalized arities.
Symbol types
Let S be a set not containing the symbols × or →. The symbol types over S are certain words over the alphabet : the relational symbol types s1 × … × sn, and the functional symbol types s1 × … × sn→s′, for non-negative integersn and.