# why is a nullary operation a special element, usually 0 or 1?

Does a nullary operation mean an operation not taking any argument?

Then why is a nullary operation a special element, usually 0 or 1, in an algebraic structure?

Thanks!

-

An operation $\lambda$ with $n$ arguments, that is a $n$-ary operation, on the set $S$ is a function $S^n\to S$. Now we can view an element $x$ of $S^n$ either as an $n$-tuple or as a function $x:\{1,2,\ldots,n\}\to S$. Specializing to the case $n=0$, an element of $S^0$ can be seen as a function $x:\emptyset\to S$. There is exactly one such function that trivialy maps all elements of the empty set to elements of $S$. So $S^0$ has only one element. In the usual set-theoretic way of identifying a function with its graph, we have $S^0=\{\emptyset\}=\{0\}$.

So a nullary operation $\lambda:S^0\to S$ is determined by the value $\lambda(\emptyset)$, a single element of $S$. For convenience, we sometimes treat the nullary operation as if it would be this element $\lambda(\emptyset)$, and in this sense a nullary operation is a constant.

-
Are you sure you meant to write "the empty function that maps no element ... to some element"? Surely, the empty function does not map to any element. –  Ittay Weiss Jan 9 '13 at 10:20
@Ittay The empty function maps all elements of the empty set to elements of $S$. Since the emptyset has no elements, this amounts to mapping no element of the emptyset to an element of $S$. –  Michael Greinecker Jan 9 '13 at 10:22
This makes it sound as if for every choice of element in S you get a different function from the empty set. –  Ittay Weiss Jan 9 '13 at 10:30
@IttayWeiss No, I get differnt choices from different functions from $S^0\to S$. Namely, $S^{S^0}=S^{\{f|f:\emptyset\to S\}}=S^{\{\emptyset\}}\approx S$. –  Michael Greinecker Jan 9 '13 at 10:35
@IttayWeiss Okay, I rewrote it to make things a bit more explicit. –  Michael Greinecker Jan 9 '13 at 10:46

Yes, a nullary operation is an operation that accepts zero arguments. Such an operation in the context of an algebraic structure on a set $A$ must thus produce, for every choice of no arguments, an element in $A$. Since there is precisely one choice of no arguments a nullary operation boils down to a choice of an element from $A$. In many algebraic systems common 'names' for such elements are $0$, and $1$ (or $e$) but it can be anything at all.

It is helpful to consider constants as nullary operations particularly in the context of universal algebra simply since it unifies the things: An algebraic system in universal algebra is a set together with a bunch of operations (of various arities) satisfying axioms.

-
Also in certain computer languages you can have functions like these: nullary f(), unary g(x), binary h(x,y), ternary k(x,y,z), etc. –  GEdgar Jan 9 '13 at 14:25
@GEdgar: Thanks for the information. What languages are they? –  Tim Jan 9 '13 at 15:34
@Tim: Almost any programming language has functions of arbitrary arity. For nullary functions some languages require empty parentheses when calling them, and some omit them (so the function call looks like a constant). For instance languages of C heritage (C,C++,java,...) fall in the former category, languages of Algol heritage (Pascal, Ada, ...) in the latter (if my memory serves). However, regardless of the syntax, there is a difference with math: even called without arguments, functions can return different values (a random number for instance) on each call, while in math they cannot. –  Marc van Leeuwen Jan 10 '13 at 8:55
@MarcvanLeeuwen: Thanks, nice to know! –  Tim Jan 10 '13 at 12:57

It is often customary to give operations of various arity special notations.

For example, the theory of Abelian groups has operations $z, n, p$ of arity 0, 1, and 2 respectively. But rather than write $p(x,y)$, we usually use the notation $x + y$ instead. Rather than write $n(x)$, we use the notation $-x$. And rather than write $z()$, we use the notation $0$.

-
This value does not have to be a special element. But there is hardly a point of introducing an operation in the language of a type of algebraic structure, be it a nullary operation or one of nonzero arity, if there aren't any axioms relating to the operation. So in practice there will invariably be, for any operation in the language of the structure, at least one axiom of the structure in which the operation is mentioned; in the case of a nullary operation this axiom endows the element designated by that operation with a special property. It is this property that makes this element special. Calling the element $0$ or $1$ just is an aid to remembering what kind of special property this element is endowed with.