Proving that powerset is a power object in category of sets and functions I've been trying to prove that powerset is a power object in the category $\mathbf{Set}$. (using an isomorphism $\mathcal{P}X \to 2^X$, mapping each subset  to its characteristic function).
I got to the point where I've proven that, form the definition (https://ncatlab.org/nlab/show/power+object), if we take the morphism $\chi_r (d):c \to 2$, such that $\chi_r (y) (x) = 1 \text{ iff } (x,y) \in r$ (for all $x \in c, y \in d$). Then I've shown that for every other $r'$, for which the digram commutes, and that there is a unique morphism $r' \to r$. What remains is to show that $\chi_R$ is the unique such morphism, so we assume there is another, different function $\chi$, for which the diagram commutes (and try to get a contradiction). I've split it in 2 cases:

*

*There is $(x_0,y_0) \in r$ such that $\chi(y_0) (x_0) = 0$, for some $x_0 \in c$ and $y_0 \in d$


*There is $(x_0,y_0) \notin r$ such that $\chi(y_0) (x_0) = 1$, for some $x_0 \in c$ and $y_0 \in d$
The first case, I've shown that the diagram doesn't commute, so we got a contradiction. However, the second case, I can't do. I've tried to assume that there is a $r'$ with morphisms to $c \times d$ and $\in_c$ such that diagram commutes and I've tried to find 2 morphisms $r' \to r$, which are not unique up to composition with an isomorphism (so we wouldn't have a pullback), but I failed to do so. I've also tried to show that the diagram can't commute, but I was unable to do it either.
 A: For my convenience, I am going to do the problem with the slightly different construction that the required power object of $c$ is $\mathcal{P} c$, the set of subsets of $c$; and ${\in}_c := \{ (x, S) \in c \times \mathcal{P} c \mid x \in S \}$ with the map to $c \times \mathcal{P} c$ being the inclusion map.  Hopefully, it should be straightforward to translate this proof to your construction of the power object being ${}^c 2$.
Now, to show the uniqueness of the function $\chi_r$: first, suppose we have $(x, y) \in c \times d$ is in the image of $r \to c\times d$.  Then the commutative diagram gives that $(x, \chi_r(y)) \in {\in}_c$, so $x \in \chi_r(y)$.  Conversely, suppose $x\in \chi_r(y)$.  Then we have a map $\{ * \} \to c \times d, * \mapsto (x, y)$ and a map $\{ * \} \to {\in}_c, * \mapsto (x, \chi_r(y))$ which have compatible compositions $\{ * \} \to c \times \mathcal{P}c, * \mapsto (x, \chi_r(y))$.  Since $r$ is a pullback of the two maps, there exists a function $\{ * \} \to r$ such that the composition with $r\to c\times d$ is $* \mapsto (x, y)$.  This implies that $(x, y)$ is in the image of $r \to c\times d$.
We have thus shown that for every $x\in c, y\in d$, we have $x\in \chi_r(y)$ if and only if $(x, y)$ is in the image of $r\to c\times d$.  Therefore, in fact we must have $\chi_r(y) = \{ x \in X \mid (x, y) \in \operatorname{im}(r\to c\times d) \}$ for all $y\in d$, which pins down $\chi_r$ to only one possibility.
