Arity (source code)
= Arity
{title2=$n$}
The arity of a finitary <algebraic operation> is the number $n$ of its input positions. An operation of arity $n$ on $S$ is a <function> $S^n\to S$. A <nullary operation> chooses a constant, a <unary operation> takes one input, and a <binary operation> takes two.
For example, addition on the <integers> is binary even though repeated addition allows an expression such as $a+b+c$. That expression composes two binary operations; associativity is what makes its parenthesization irrelevant. A symbol taking arbitrarily many inputs would need a different specification, such as one operation for each $n$.
A fixed arity is part of an algebraic signature and determines how terms are built and which inputs a <homomorphism> must preserve. Operations of the same arity can nevertheless satisfy completely different identities.
Back to article page