What are nullary operations? In Algebra and Mathematical Logic it is said that "nullary operations act as constants". How and why do nullary operations act as constants? The following conceptual path is taken to answer this question:
Arithmetic \(\rightarrow\) Laws of Composition \(\rightarrow\) Binary Operations \(\rightarrow\) \(n\)-ary Operations \(\rightarrow\) Nullary Operations
From Arithmetic to Laws of Composition
Vaguely, Algebra is the study of calculating with algebraic operations, the most familiar of which are the elementary arithmetic operations of addition, subtraction, multiplication, and division. Each of these laws relates a pair of numbers to another number called their sum, difference, product, and quotient, respectively. Thus the sum, difference, product, and quotient of \(6\) and \(2\) is \(8\), \(4\), \(12\), and \(3\), in the order given.
Since the difference of \(3\) and \(2\) is \(1\) but the difference of \(2\) and \(3\) is \(-1\) the order in which the pairs of numbers are composed matters. Thus a law of composition must act on an ordered pair of numbers rather than just a pair of numbers (that is, ordered pairs account for this difference in differences). Again, to calculate the difference of \(5\) and \(4\) is to subtract \(4\) from \(5\) giving \(1\) where as to subtract \(5\) from \(4\) gives \(-1\).
A critical feature of these elementary laws of composition is that each ordered pair of numbers relates to a unique number e.g. the sum of \(2\) and \(3\) is \(5\) and there is not a number distinct from \(5\) which is also the sum of \(2\) and \(3\). The choice is made to fix this property when considering general laws of composition for objects other than natural numbers.
Definition. A (general) law of composition for a collection of objects \(A\) associates with each ordered pair of objects from \(A\) a unique object in \(A\).Notice that an additional constraint has been placed on this definition which has not been explicitly mentioned: it is required here that each ordered pair of objects from \(A\) be associated with a unique object in \(A\). A further generalization of a law of composition is a partial law of composition which associates some ordered pairs of objects from \(A\) with a unique object in \(A\).
For instance, the difference of an ordered pair of natural numbers (where the natural numbers are 0, 1, 2, 3, etc.) may be a negative number, which is not a natural number. Thus not every ordered pair of natural numbers has a difference which is itself a natural number. In fact, this only occurs when the number to be subtracted is smaller than the number from which the subtraction is performed. So, the law of subtraction is a partial law of composition for the collection of natural numbers.
But, if the collection of objects on which subtraction is performed is expanded to include not just the natural numbers, but also the negative numbers, this joint collection being called the Integers, then subtraction becomes a law of composition for the integers. Thus two components of the concept of a law of composition are relevant: the rule which dictates how an ordered pair of objects are to be combined, and the collection of objects to which the rule may be meaningfully applied.
From Laws of Composition to Binary Operations
As is common in any mathematical investigation, once a new concept has been introduced it is prudent to compare it to common mathematical concepts. Often, after some time and critical reflection, certain mathematical concepts are seen as key to understanding others. Such a development is expedited with this question: how are laws of composition related to functions?
Functions may be seen as generalizations of elementary actions in arithmetic such as "add one" or "multiply by 2". Thus the act of adding one to \(2\) gives \(3\) and there is no other number which results from adding one to \(2\).
Definition. A function from a collection of objects \(A\) to a collection of objects \(B\) is a rule which associates to each object in \(A\) a unique object in \(B\).From the wording of this definition and the identification of the relevant features at the end of the previous section it is obvious that there is an interesting relationship between laws of composition and functions. Let \(A \times A\) denote the set of all ordered pairs of objects from the collection \(A\).
Proposition. A function from \(A \times A\) to \(A\) is a law of composition for \(A\).Functions which are themselves laws of composition are given a special name: binary operations. The reason for this is that a function from a set of ordered pairs is said to be a function of two variables which operates on the two variables by some rule to give the value of the function.
From Binary Operations to \(n\)-ary OperationsBy considering ordered triples or ordered quadruples of objects from \(A\) a binary operation is generalized to an \(3\)-ary operation, being a function from \(A \times A \times A\) to \(A\), or a \(4\)-ary operation, being a function from \(A \times A \times A \times A\) to \(A\). Let \(A^n\) denote the collection of all ordered \(n\)-tuples.
Definition. An \(n\)-ary operation on \(A\) is a function from \(A^n\) to \(A\).It is possible to return to the discussion of laws of composition and generalize them to \(n\)-ary laws of composition and then to show that an \(n\)-ary operation is an \(n\)-ary law of composition. An example of a \(3\)-ary law of composition is given by the rule which returns the sum of all three entries from an ordered triple of numbers e.g. under this rule \(1\), \(2\), and \(3\) gives \(6\).
From \(n\)-ary Operations to Nullary Operations
A special case of the definition of \(n\)-ary operation given is when \(n\) is taken to be \(0\). A \(0\)-ary, or nullary, operation is a function from \(A^0\) to \(A\).
What is \(A^0\)? Since \(A^2\) is the collection of all ordered \(2\)-tuples, or pairs, of objects from \(A\), and \(A^1\) is the collection of all ordered \(1\)-tuples from \(A\), then \(A^0\) should be considered as the collection of all \(0\)-tuples of objects from \(A\). Note, an ordered pair, or ordered \(2\)-tuple, has two parts, a first entry and a second entry. Similarly an ordered \(1\)-tuple has only a first entry. Thus an ordered \(0\)-tuple has no entries and is consequently empty. It is common for \(\emptyset\) to denote the ordered \(0\)-tuple. Furthermore, \(\emptyset\) is also just called the empty set as any two collections of things which both contain nothing are empty and consequently equal to each other. Said another way, the empty set is that unique collection of things which has no objects within it (much like an empty bag).
Finally, since \(A^0\) is, as has been said, the collection of all \(0\)-tuples, of which their is only one namely \(\emptyset\), then \(A^0\) is that collection which contains only \(\emptyset\). Said another way, \(A^0\) is a collection containing one object, and that object is the \(0\)-tuple, which is \(\emptyset\). Thus, a nullary operation on \(A\) is a function from a set containing one object, the empty set, to \(A\). Thus a nullary operation is determined by specifying to which object it sends the empty set.
For example a nullary operation on the set of natural numbers is a function from the collection containing exactly the empty set to the collection of all natural numbers. So a nullary operation is only meaningfully applied to the empty set to give some natural number, such as \(2\). That is, for each natural number \(n\) there is exactly one nullary operation which when applied to \(\emptyset\), the only meaningful thing to which it can be applied, it gives \(n\). Furthermore, all nullary operations are obtained in this way. Thus, a nullary operation is equivalent to the value which it takes on. In the case of nullary operations on the natural numbers this means that each natural number may be seen as a unary operation on the set of natural numbers which takes on that natural number as its only value.
But does it make sense?
No, in the context given it seems that to use a nullary operation is a pointless act of generalization mixed with a dose of nonsensical empty set arguments. This is the reaction had by most who follow this sequence of concepts in order to build up the idea of a unary operation. What this explanation demands is a suitable context where nullary operations are self evident and do not result from a random act of generalization. Such a context may be found in the development of set theory from category theory.
The standard development of set theory from category theory defines the theory of sets as an elementary topos with a natural number object where each epimorphism has a right inverse, and which is well pointed. The purpose of being well pointed is to assure that two functions may be distinguished if they do not agree for some argument, as a consequence each classical element of a set must be identified as a nullary operation. From this perspective, though it is currently seen as unfashionable, it is reasonable to desire that distinct functions be distinguished by a difference in their value at a single point, from which it follows that single points must be identified as nullary operations. It has yet to be seen if there is anything fundamentally significant about this equivalence, for now most treat it as nothing more than a matter of convenience.