Definition:Operation/Arity

From ProofWiki
Jump to: navigation, search

Definition

The arity of an operator is the number of operands it uses.


The arity of an operator may be, in general, any number.

It may even be infinite.


Unary

A unary operation is the special case of an operation where the operation has exactly one operand.

Thus, a unary operation on a set $S$ is a mapping whose domain and codomain are both $S$.


Binary

A binary operation is the special case of an operation where the operation has exactly two operands.


A binary operation is a mapping $\circ$ from the Cartesian product of two sets $S \times T$ to a universe $\mathbb U$:

$\circ: S \times T \to \mathbb U: \circ \tuple {s, t} = y \in \mathbb U$

If $S = T$, then $\circ$ can be referred to as a binary operation on $S$.


Ternary

A ternary operator (or three-place operator) is an operator which takes three operands.

That is, its arity is $3$.


And so on.


$n$-ary

Let $S_1, S_2, \dots, S_n$ be sets.

Let $\circ: S_1 \times S_2 \times \ldots \times S_n \to \mathbb U$ be a mapping from the cartesian product $S_1 \times S_2 \times \ldots \times S_n$ to a universal set $\mathbb U$:

That is, suppose that:

$\circ: S_1 \times S_2 \times \ldots \times S_n \to \mathbb U: \forall \left({s_1, s_2, \ldots, s_n}\right) \in S_1 \times S_2 \times \ldots \times S_n: \circ \left({s_1, s_2, \ldots, s_n}\right) \in \mathbb U$


Then $\circ$ is an $n$-ary operation.


Multiary

Certain types of operator have a variable number of operands.

An operator which does not have a fixed arity is called multiary.


Finitary

A finitary operator is an operator which takes a finite number of operands.


Arity of Zero

It is possible to conceive of an operator which takes no operands.

A constant can be considered as an operator which takes no operands.

That is, it has an arity of zero.


Linguistic Note

The term arity is a neologism generated from the -ary suffix of the specific terms unary, binary and so on.


Also known as

An older term for arity that can sometimes be seen is valency, which may be considered more acceptable to those who prefer linguistic purity.


Sources