2.1. \triangleright How many different bijections are there between a set SS with nn elements and itself? §II2.1\S \mathrm{II}2.1
Solution
n!n! of course :3 As there are nn choices as to where to send the first element, n1n - 1 choices for the second element, etc. \square


2.2. \triangleright Prove statement (2) in Proposition 2.1. You may assume that given a family of disjoint nonempty subsets of a set, there is a way to choose one element in each member of the family. [§2.5,V.3.3][\S 2.5, \mathrm{V}. 3.3]
Solution
Assume AA \neq \emptyset and let f:ABf: A \to B be a function. Statement (2) in Proposition 2.1 asks us to prove that ff has a right-inverse if and only if it is surjective.
(    )(\implies) Assume that ff has a right inverse. This means that we have some g:BAg: B \to A such that fg=idBf \circ g = \text{id}_B. Let bBb \in B. To show that ff is surjective it is sufficient to find aAa \in A such that f(a)=bf(a) = b. By our assumption f(g(b))=(fg)(b)=idB(b)=bf(g(b)) = (f \circ g) (b) = \text{id}_B(b) = b. Hence, g(b)Ag(b) \in A is our desired aa.
(    )(\impliedby) Assume that ff is surjective. We need to construct some g:BAg: B \to A such that fg=idBf \circ g = \text{id}_B. For each bBb \in B, since ff is surjective there exists aAa \in A such that f(a)=bf(a) = b. So we define g(b)=ag(b) = a with the axiom of choice, clearly fg=idBf \circ g = \text{id}_B as desired. \square


2.4. \triangleright Prove that 'isomorphism' is an equivalence relation (on any set of sets). [§4.1][\S 4.1]
Solution
Let SS be a set of sets and A,B,CSA, B, C \in S. Define \sim as XY    f:XYX \sim Y \iff \exists f: X \to Y, ff bijective. We now check that the properties of an equivalence relation apply.


2.5. \triangleright Formulate a notion of epimorphism, in the style of the notion of monomorphism seen in §2.6\S 2.6, and prove a result analogous to Proposition 2.3, for epimorphisms and surjections. [§2.6,§4.2][\S 2.6, \S 4.2]
Solution
Define a function f:ABf: A \to B to be a epimorphism (or epic) if for all sets ZZ and all functions α,α:BZ\alpha', \alpha'' : B \to Z we have αf=αf    α=α\alpha' \circ f = \alpha'' \circ f \implies \alpha' = \alpha''. We propose that ff is surjective if and only if it is epic.
(    )\left(\implies\right) We are given that ff is surjective. By Problem 2.2 we get a right inverse g:BAg: B \to A, i.e. fg=idBf \circ g = \text{id}_B. Let α,α:BZ\alpha', \alpha'' : B \to Z satisfy
αf=αf.\alpha' \circ f = \alpha'' \circ f.
Compose on the right by gg, and use associativity of composition:
α(fg)=(αf)g=(αf)g=α(fg);\alpha' \circ (f \circ g) = (\alpha' \circ f) \circ g = (\alpha'' \circ f) \circ g = \alpha'' \circ (f \circ g);
since gg is a right-inverse of ff, this says
αidB=αidB,\alpha' \circ \text{id}_B = \alpha'' \circ \text{id}_B,
and therefore
α=α,\alpha' = \alpha'',
as needed to conclude that ff is an epimorphism.
(    )\left(\impliedby\right) We are given that ff is an epimorphism. Let Z={0,1}Z = \{0, 1\}. We define α:BZ\alpha': B \to Z piecewise:
α(b)={1if bIm(f)0otherwise \alpha'(b) = \begin{cases} 1 &\text{if } b \in \text{Im}(f) \\ 0 &\text{otherwise } \end{cases}
Next, we define α:BZ\alpha'': B \to Z more simply, taking α(b)=1\alpha''(b) = 1 for all bBb \in B. It is obvious that
αf=αf\alpha' \circ f = \alpha'' \circ f
as both functions map every element of BB to 11. By the definition of an epimorphism we conclude that
α=α.\alpha' = \alpha''.
Now let bBb \in B. If bIm(f)b \notin \text{Im}(f) then α(b)=0\alpha'(b) = 0, but this is a contradiction as α=α\alpha'' = \alpha' and α(b)=1\alpha''(b) = 1 by its definition. So we must have bIm(f)b \in \text{Im}(f) for each bBb \in B. We conclude that ff is surjective. \square


2.9. \triangleright Show that if AAA' \cong A'' and BBB' \cong B'', and further AB=A' \cap B' = \emptyset and AB=A'' \cap B'' = \emptyset, then ABABA' \cup B' \cong A'' \cup B''. Conclude that the operation A⨿BA \amalg B (as described in §1.4\S 1.4) is well-defined up to isomorphism (cf. §2.9\S 2.9). [§2.9,5.7]\left[\S2.9, 5.7\right]
Solution
We are given bijections f:AAf: A' \to A'' and g:BBg: B' \to B''. Define h:ABABh: A' \cup B' \to A'' \cup B'' piecewise:
h(x)={f(x)if xAg(x)if xBh(x) = \begin{cases} f(x) &\text{if } x \in A' \\ g(x) &\text{if } x \in B' \end{cases}
Since AB=A' \cap B' = \emptyset it is evident that hh is well-defined, so it is sufficient to prove that it is a bijection.
First let's show injectivity. Let h(x)=h(x)h(x') = h(x''). Since AB=A'' \cap B'' = \emptyset we have either h(x)=h(x)Ah(x') = h(x'') \in A'' or h(x)=h(x)Bh(x') = h(x'') \in B'', but not both. We start by assuming the former, that is h(x)=h(x)Ah(x') = h(x'') \in A''. If we were to have x{x,x}x \in \{x', x''\} such that xBx \in B' then h(x)Bh(x) \in B'', contradicting AB=A'' \cap B'' = \emptyset. We conclude that x,xAx', x'' \in A'. Thus, h(x)=h(x)=f(x)=f(x)h(x') = h(x'') = f(x') = f(x''). Since ff is a bijection it is injective, so we conclude that x=xx' = x''. The other case, that is h(x)=h(x)Bh(x') = h(x'') \in B'', is handled by extremely similar reasoning.
Next we show surjectivity, which is even easier. Let yABy \in A'' \cup B''. If yAy \in A'' then we get xAx \in A' such that f(x)=yf(x) = y by ff's surjectivity. If yBy \in B'' then we get xBx \in B' such that g(x)=yg(x) = y by gg's surjectivity. Either way h(x)=yh(x) = y, so we conclude that hh is surjective.
Since hh is well-defined, and both injective and surjective and hence a bijection, we can conclude that ABABA' \cup B' \cong A'' \cup B'' and that A⨿BA \amalg B is well-defined up to isomorphism. \square


2.10. \triangleright Show that if AA and BB are finite sets, then BA=BA|B^A| = |B|^{|A|}. [§2.1,2.11,§II.4.1]\left[\S2.1, 2.11, \S \mathrm{II}.4.1\right]
Solution
Recall that BAB^A is defined as the set of all functions f:ABf: A \to B. For each aAa \in A it could be sent to any of the bBb \in B by ff, hence there are B|B| possibilities. So you multiply B|B| by itself A|A| times (once for each aA)a \in A) to get BA|B|^{|A|}. \square


2.11 \triangleright In view of Exercise 2.10, it is not unreasonable to use 2A2^A to denote the set of functions from an arbitrary set AA to a set with 22 elements (say {0,1}\{0, 1\}). Prove that there is a bijection between 2A2^A and the power set of AA (c.f. §1.2\S 1.2). [§1.2,III.2.3]\left[\S 1.2, \mathrm{III}.2.3\right]
Solution
Define f:2AP(A)f: 2^A \to \mathscr{P}(A) as af(g)a \in f(g) if g(a)=1g(a) = 1 for g:A{0,1}g: A \to \{0, 1\} (this is the same as g2Ag \in 2^A) and aAa \in A. We need to show that ff is a bijection. First we show injectivity. Take g,g:A{0,1}g', g'' : A \to \{0,1\} such that f(g)=f(g)f(g') = f(g''). Let aAa \in A. We have two possibilities: af(g)=f(g)a \in f(g') = f(g''), or af(g)=f(g)a \notin f(g') = f(g''). First examine that case of the former, that is af(g)=f(g)a \in f(g') = f(g''). By the definition of ff we have g(a)=g(a)=1g'(a) = g''(a) = 1. Next examine that latter case, that is af(g)=f(g)a \notin f(g') = f(g''). By the definition of ff we have g(a)=g(a)=0g'(a) = g''(a) = 0. We conclude that f(g)=f(g)    g=gf(g') = f(g'') \implies g' = g'', so ff is injective.
Next we show surjectivity. Let BP(A)B \in \mathscr{P}(A), so BAB \subseteq A. Define g:A{0,1}g: A \to \{0, 1\} piecewise
g(a)={1if aB0otherwiseg(a) = \begin{cases} 1 &\text{if } a \in B \\ 0 &\text{otherwise} \end{cases}
It is evident by our construction of ff that f(g)=Bf(g) = B. In detail, if af(g)a \in f(g) then aBa \in B by definition of gg, and if aBa \in B then g(a)=1g(a) = 1 by the definition of gg and then by the definition of ff we have af(g)a \in f(g). \square

\\