The arity of a finitary algebraic operation is the number of its input positions. An operation of arity on is a function . 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 . 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 .
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.
Arity is a concept that refers to the number of arguments or operands that a function or operation takes. It's commonly used in mathematics and programming to describe how many inputs a function requires to produce an output. For example: - A function with an arity of 0 takes no arguments (often referred to as a constant function). - A function with an arity of 1 takes one argument (e.g., a unary function).
New to topics? Read the docs here!