Exercise 2.3.12

For sets and , consider a partial function from to to be a pair where and is a normal function . This captures the notion that the partial function is only 'defined' on . Let be the category of sets with maps being partial functions. Let be the category of sets with distinguished elements, with maps being functions that preserve distinguished elements.

Theorem:

T(S,f) = a \mapsto \left{ \begin{array}{lr} f(s) & a \in S \ \bot_B & \text{otherwise} \end{array} \right.

\varepsilon{(B, y)} \circ TN(f) = f \circ \varepsilon{(A,x)} : TN(A,x) \rightarrow (B,y)

TN(f) = a \mapsto \left{ \begin{array}{lr} f(a) & f(a) \neq y \ \bot_B & \text{otherwise} \end{array} \right.

$$

Let . We will consider where is sent by the left-hand side and the right-hand side by considering cases. First suppose , and . Then the right-hand side sends to , and the left-hand side sends . Suppose and . Then the right-hand side sends to , and so does the left. Finally, suppose . Then the right-hand side sends . The left-hand side sends . So the left and right-hand side are identical in all cases, so they must represent the same map. Then, we have naturality. Furthermore, and are certainly equal cardinality, so they are in bijection and all components of are isomorphisms. Thus is a natural isomorphism.

So, we have shown an equivalence between and .