In the category $\mathbf{Set}$ is "the product of an empty set of sets a one-element set"?

What the exercise is saying is the following: let $\mathcal{C}$ be an empty family of sets (awkward, but $\mathcal{C}$ is just isomorphic to $\emptyset$). Then, $\prod\,\mathcal{C}=\prod\limits_{C\in\mathcal{C}}\,C$ has one element. Simply put, $$\prod\,\emptyset=\prod_{C\in\emptyset}\,C$$ has exactly one element. This is the same situation that gives rise to $a^0=1$. The real question is where on heaven this element comes from, and what exactly it is.

You can interpret $\prod\,\emptyset$ as the set of all functions from $\emptyset$ to itself. The only function there is the empty function $\emptyset$. Therefore, $\prod\,\emptyset=\{\emptyset\}$.


If the interpretation is $X^0$ then the answer is obvious. If this is not obvious look at the end of this answer.

It's just the question of what the set $X^0$ is which is the set of functions mapping nothing (the empty set) to a set $X$ which obviously is only the function that does "nothing" (the single element in the set "1"). Formally $X^0 = \{ f \mid f : \emptyset \to X \} $ (the set of functions from the empty set to $X$) now what we want to figure out is what "this set really is". First we recall that a function is simply a relation defined by the graph of $f$ i.e. $f \subseteq A \times B$ such that $f := \{ (a,b) \in A \times B : \forall a \in A, \exists b \in B \}$. In other words, a function just tells you how to pair the elements of the domain $A$ with the elements in the codomain $B$ via $(a,f(a))$ where $f(a) = b$ for some $b \in B$ in the codomain. In this case we have $A = \emptyset$ so all this actually become the following:

$$X^0 = \{ f \mid f : \emptyset \to X \} = [\emptyset \to X] = \{ f \subseteq A \times B \mid f: \emptyset \to X \} $$ which is equal to:

$$ \{ f \subseteq A \times B \mid f: \emptyset \to X \} = \{ \{ (a,b) \in A \times B : \forall a \in \emptyset , \exists b \in B \} \} = \{ \emptyset \} $$

so,

$$ X^0 = \{ \emptyset \}$$

the key is realizing that $f = \{ (a,b) \in A \times B : \forall a \in \emptyset , \exists b \in B \} = \emptyset$ because if we try to form a set of pairs where the first element of the pair comes from the empty set, then of course we won't form any pair becuase $a \in \emptyset$ is false.

To make it really clear, recall the graph (i.e. relation set) of a function $f$ is the set of pairs $ f = \{ (a,b) \in A \times B : \forall a \in A, \exists b \in B \} $ which is why we get as a final answer the empty set inside a set (since a function is really just a relation saying how we pair up the first element to the second element and $f$ induces this pairing/relation). In the end $X^0$ is just the set of all function from the empty set to $B$ but a function is a set of "pairs". This set of pairs ends up being empty because we can never select elements for its first location since we are trying to select things form the empty set.


One comment on what $X^0$ should mean. I realized that perhaps its not entirely obvious what $X^0$ should mean. Recall:

$$ X^1 = \{ f \mid f : \{ 1 \} \to X \}$$ $$ X^2 = \{ f \mid f : \{ 1,2 \} \to X \}$$ $$ X^3 = \{ f \mid f: \{ 1,2,3 \} \to X \}$$ $$ \vdots $$ $$ X^n = \{ f \mid f : \{ 1,2,3,\dots,n\} \to X \}$$ $$ \vdots $$ sho what should $X^0$? Well, $X^n$ is really short hand for $X^{ \{1,\dots,n \} }$ so when $n=0$ the set should start at 1 and reach zero. But no set in this context does that, so what we really mean is the empty set. So $X^0$ is short hand for $X^{\emptyset}$ i.e.

$$ X^{0} = X^{\emptyset} = \{ f \mid f \emptyset \to X \} $$

by definition.


Alternatively with the sequence notation $A^n = \{ (a_1,\dots,a_n) \mid a_1 \in A , \dots, a_n \in A \}$ we have:

$$ $A^1 = \{ (a_1) \mid a_1 \in A \}$ $$ $$A^2 = \{ (a_1,a_2) \mid a_1 \in A , a_2 \in A \}$$ $$A^2 = \{ (a_1,a_2,a_3) \mid a_1 \in A , a_2 \in A, a_3 \in A \}$$ $$ \vdots $$ $$A^n = \{ (a_1,\dots,a_n) \mid a_1 \in A , \dots, a_n \in A \}$$ $$ \vdots $$ we wonder how to interpret $A^0$? Basically says:

The set of sequences of size zero from elements from A.

which is just the empty sequence $\{ () \}$. Since no element are there (hand waving a little) it's isomorphic to the empty set $() \cong \emptyset$ (ok this last part would be nice to make more formal).


A product $\Pi_{i\in I} A_i$ of objects in a category is an object $B$ and a collection of morphisms $\pi_i: B\to A_i$ such that for any object $C$ and collection of morphisms $d_i:C\to A_i,$ there is a unique morphism $f:C\to B$ such that $d_i=\pi_i\circ f.$ Note such a $(B,\pi_i)$ may not exist and is generally not unique, although if $(B,\pi_i)$ and $(B',\pi_i')$ both satisfy the condition, there is a canonical isomorphism between $B$ and $B'$. If $I$ is empty, then there are no $\pi_i$ and the definition reduces to an object $B$ such that for any $C$ there is a unique $f:C\to B$ (i.e. $B$ is a terminal object).

Specifying to the category Set, the sets that have a unique map into them from any set are exactly the singletons (if the set had more than one element there would be multiple maps into it from any nonempty set; if it had zero elements, there would be none). So any singleton is a nullary product, and as promised, any two singletons have a canonical bijection between them. In a set theoretical sense, one may define the nullary cartesian product to be $\{\phi\}$ for the sake of having a well-defined operation (just as one defines the binary cartesian product as the set of ordered pairs), but from a category theory perspective these are best thought of as nice representatives of a whole collection of product objects, which are all isomorphic to one another.