Solution (source code)

= Solution

The <universal property of Cartesian products> constructs the desired map pointwise:
$$
\boxed{g(y)=(f_1(y),f_2(y)).}
$$
Its coordinate <projection maps> are $f_1$ and $f_2$. Any other map with those <projection maps> must have the same two coordinates at every $y$, and hence must equal $g$. This also covers $Y=\varnothing$.

For <joint injectivity of a pair of functions>, equality $g(y)=g(y')$ means equality of both coordinate images. If either coordinate <function> is <injective>, it follows that $y=y'$, so $g$ is <injective>. The converse fails: take $Y=\{a,b,c\}$ and map these points to $(0,0),(0,1),(1,0)$ in $\{0,1\}^2$. The paired map is <injective>, but the first coordinate identifies $a,b$ and the second identifies $a,c$.

There is an empty-factor defect in the printed surjectivity implication. If both $X_1$ and $X_2$ are nonempty and $g$ is <surjective>, every element of either factor can be completed to a pair and then lifted through $g$. Hence both $f_i$ are <surjective>. If both factors are empty, existence of the $f_i$ forces $Y$ to be empty and both coordinate maps are again <surjective>. But take
$$
Y=X_2=\varnothing,\qquad X_1=\{0\}.
$$
Then $g:\varnothing\to X_1\times X_2=\varnothing$ is <surjective>, while $f_1:\varnothing\to\{0\}$ is not. \b[Without a nonempty-factor assumption, the printed implication is false.] This is exactly the exception found for the <projection maps> in part (ii).

Even when both factors are nonempty, the reverse implication fails. For $Y=X_1=X_2=\{0,1\}$, let $f_1(y)=f_2(y)=y$. Both coordinate maps are <surjective>, but $g(y)=(y,y)$ misses $(0,1)$ and $(1,0)$. Thus \b[coordinate surjectivity does not guarantee that every pair is attained].