What is A Set Raised to the 0 Power? (In Relation to the Definition of a Nullary Operation)

(I'm going to link to this Stackexchange post concerning Nullary Operations: why is a nullary operation a special element, usually 0 or 1?)

In general an operation is a function $f:S^n \to S$, where $n$ denotes the arity of the operation, and a nullary operation is a function $f:S^0 \to S$.

It is clear that $S^n=S \times S \times \cdots \times S$ denotes the Cartesian product of a set with itself ($n$ times), however $S^0$ makes little sense to me.

One might define $S^0=\emptyset$. At first glance, that seems like a good choice. However then a nullary operation makes no sense, since it must be a function $f: A \to B$ where $A$ and $B$ are two sets representing the domain and codomain of the function. And note a function is defined in terms of relation, where a relation is a subset of the Cartesian product $A \times B$. So when we think of $A=S^0=\emptyset$ and $B=S$, so that we have a nullary operation $f:\emptyset \to S$, what is a a subset of $\emptyset \times S$? What even is $\emptyset \times S$? By definition of the Cartesian product, \begin{equation} \emptyset \times S = \{(a,b):a \in \emptyset\textrm{ and }b \in S\}. \end{equation} But there exists no $a \in \emptyset$! Therefore there exist no ordered pairs in our Cartesian product! Therefore $\emptyset \times S = \emptyset !$. Remember a function is a relation which is a subset of the Cartesian product. Therefore our relation is the empty set, and therefore also $f=\emptyset$.


Edit: We got the definition sorted out in the comments. Thanks especially to Hayden and Christoff for their great help. In summary, we figured out that $S^0=\{()\}$, the set containing only one element, the "empty $n$-tuple". Then if taking $S=\{1,2,...,k\}$, then a nullary operation $f:S^0 \to S$ is a function, i.e. some subset of $S^0 \times S = \{()\} \times S$. Looking at $\{()\} \times S$, this equals $\{((),1),((),2),...,((),k)\}$. Then a function is a special subset of this, so that each element of the domain (and there is only one element, namely $()$) is paired with exactly one element of the codomain. Therefore a function would have the form $f=\{((),a)\}$ where $a$ is one of $1,2,...,k$. Thank you for your help.


Solution 1:

In set theory, $A^B$ usually means the set of all functions from $B$ to $A$. In that sense, you can see $A^n$ as the set of all functions from $n$ to $A$ where $n$ is the von Neumann ordinal $\{0,1,2,\dots,n-1\}$ (which is a set with $n$ elements). In that sense, an $n$-tuple of elements of $A$ and a function from $n$ to $A$ are just two different ways of interpreting the same thing.

So, $A^0$ would then just be the set of all functions from the von Neumann ordinal $0$ (which is the empty set $\emptyset$) to $A$. And there's only one such function which is $\emptyset$, so $A^0$ must be $\{\emptyset\}$ - a set with one element.

This all fits perfectly. It seems you have no issues with, say, $2^0$ being defined as $1$. This is a similar construction. Actually, $A^0=A^\emptyset=\{\emptyset\}$ not only has cardinality $1$ but is $1$ in the von Neumann sense.

(And this interpretation makes a $0$-ary function a constant, BTW.)