How is it that a function from $m \times m + 1 \to m$ is the same as a function from $m \times m \to m$ and another $1 \to m$?

64 Views Asked by At

I got this assertion from the book "Category Theory for Programmer", but I think it is just a set-theory interpretation. So, the idea is the following, consider a set $m$ with $\times$ as the Cartesian product and $+$ as the disjoint union. Also, take $1:=\{a\}$ as a singleton set. Now, the book claims that a function $f\colon m \times m + 1 \to m$ is the same as defining two functions, one $\mu\colon m \times m \to m$ and another $\eta\colon 1 \to m$.

This might seem silly, but I haven't been able to figure out why this is the case... From what I understand: $$ m \times m + 1 := \{(x, a) \mid x \in m, a \in 1 \} $$ Hence, a function $f\colon m\times m +1 \to m$ would be pretty much the same as a function from $m \times m \to m$... What am I missing?

3

There are 3 best solutions below

0
On BEST ANSWER

The set $m \times m + 1$ defined in this manner is not the set in your question, but rather the set $$m \times m + 1 = \{\,(x,y) \mid x, y\in m\,\} \sqcup \{a\}\text{ .}$$

What the authors are noting is that the restriction of $f$ to $m \times m$ is $f\rvert_{m \times m} = \mu$, and the restriction of $f$ to $1$ is $f\rvert_1 = \eta$, so that $f = \mu \sqcup \eta$.

0
On

Isn't it just because $$f(x) = \begin{cases} \mu(x), & x \in m\times m\\ \eta(x), & x \in 1 \end{cases}$$ since $m\times m$ and $a$ are disjoint?

Said differently, $\left.f\right|_{m\times m} = \mu$ and $\left.f\right|_{1} = \eta$.

0
On

Just to add to the already present and good answers with some more background details :

This is the universal property of the sum/disjoint union, i.e. when defining $+$ (also sometimes denoted $\coprod$), we have an isomorphism $Hom(\coprod_iX_i,Y)\simeq \prod_i Hom(X_i,Y)$, hence specifying a map $\coprod_iX_i \to Y$ is the same as specifying a sequence of maps $f_i:X_i\to Y$. In your example this translates to, as others have pointed out, giving a map $m\times m \to m$ and a map $1\to m$.