Lecture 18: surjections, injections, choice, and enumerability [00M6]
- January 31, 2024
- Jon Sterling, with contributions from Marcelo Fiore
These lecture notes were prepared by Jon Sterling using Marcelo Fiore’s lectures as source material. Any mistakes were introduced by Jon Sterling. Generative AI was not used to write these lecture notes.
Theorem Logical characterisation of isomorphisms [00M7]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
For a function f\colon A\to B, the following are equivalent:
- the function f\colon A \to B is invertible;
- we have \forall b:B\mathpunct {.} \exists ! a:A\mathpunct {.} f{\mathopen {}\left (a\right )\mathclose {}}=b;
- we have both \forall b:B\mathpunct {.} \exists a:A\mathpunct {.} f{\mathopen {}\left (a\right )\mathclose {}}=b and \forall a_1,a_2:A\mathpunct {.} f{\mathopen {}\left (a_1\right )\mathclose {}}=f{\mathopen {}\left (a_2\right )\mathclose {}}\implies a_1=a_2.
Proof.
- January 29, 2024
- Jon Sterling
We first prove that f\colon A\to B is invertible if and only if we have \forall b:B\mathpunct {.} \exists ! a:A\mathpunct {.} f{\mathopen {}\left (a\right )\mathclose {}}=b.
- Indeed, suppose that f is an isomorphism and fix b:B to check that there exists some unique a:A such that f{\mathopen {}\left (a\right )\mathclose {}}=b. We let a = f^{-1}{\mathopen {}\left (b\right )\mathclose {}} and we do indeed have f{\mathopen {}\left (a\right )\mathclose {}}=f{\mathopen {}\left (f^{-1}{\mathopen {}\left (b\right )\mathclose {}}\right )\mathclose {}}=b; to see that a is unique with this property, we fix a_1,a_2:A such that f{\mathopen {}\left (a_1\right )\mathclose {}}=b and f{\mathopen {}\left (a_2\right )\mathclose {}}=b. We have a_1=f^{-1}{\mathopen {}\left (f{\mathopen {}\left (a_1\right )\mathclose {}}\right )\mathclose {}}=f^{-1}{\mathopen {}\left (b\right )\mathclose {}}=f^{-1}{\mathopen {}\left (f{\mathopen {}\left (a_2\right )\mathclose {}}\right )\mathclose {}}=a_2.
- Conversely, suppose that \forall b:B\mathpunct {.} \exists ! a:A\mathpunct {.} f{\mathopen {}\left (a\right )\mathclose {}}=b; then we may define an inverse function f^{-1}\colon B\to A sending b:B to the unique element a:A such that f{\mathopen {}\left (a\right )\mathclose {}}=b. We therefore have f{\mathopen {}\left (f^{-1}{\mathopen {}\left (b\right )\mathclose {}}\right )\mathclose {}}=b by definition and f^{-1}{\mathopen {}\left (f{\mathopen {}\left (a\right )\mathclose {}}\right )\mathclose {}} is defined to be the unique element a':A such that f{\mathopen {}\left (a'\right )\mathclose {}} = f{\mathopen {}\left (a\right )\mathclose {}}; as a' is assumed unique with this property and we clearly have f{\mathopen {}\left (a\right )\mathclose {}}=f{\mathopen {}\left (a\right )\mathclose {}}, we may conclude that a'=a and so f^{-1}{\mathopen {}\left (f{\mathopen {}\left (a\right )\mathclose {}}\right )\mathclose {}}=a.
Next, we show that we have \forall b:B\mathpunct {.} \exists ! a:A\mathpunct {.} f{\mathopen {}\left (a\right )\mathclose {}}=b if and only if we have both \forall b:B\mathpunct {.} \exists a:A\mathpunct {.} f{\mathopen {}\left (a\right )\mathclose {}}=b and \forall a_1,a_2:A\mathpunct {.} f{\mathopen {}\left (a_1\right )\mathclose {}}=f{\mathopen {}\left (a_2\right )\mathclose {}}\implies a_1=a_2. In fact, this holds immediately by unfolding the definition of unique existence and the distribution of universal quantification over conjunction.
Surjective functions [00MF]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Definition Surjection [00M8]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
A function f\colon A\to B is said to be surjective or asurjection when for we have \forall b:B\mathpunct {.} \exists a:A\mathpunct {.} f{\mathopen {}\left (a\right )\mathclose {}}=b. A function satisfying this condition is written f\colon A\twoheadrightarrow B.
Corollary Isomorphisms are surjective [00M9]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Any isomorphism f\colon A\to B is surjective.
Proof.
- January 29, 2024
- Jon Sterling
Example Non-empty sets and surjections [00MA]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The unique function !_A\colon A\to {\mathopen {}\left [1\right ]\mathclose {}} is surjective if and only if A \not =\varnothing .
Proof.
- January 29, 2024
- Jon Sterling
Suppose that A is nonempty, so that we have some a:A. We must show that for every i:{\mathopen {}\left [1\right ]\mathclose {}}, there exists some x:A such that !_A{\mathopen {}\left (x\right )\mathclose {}}=i. Letting i=0 be the unique element of {\mathopen {}\left [1\right ]\mathclose {}}, we may set x:= a.
Conversely, if !_A\colon A\to {\mathopen {}\left [1\right ]\mathclose {}} is surjective, we know that there exists some a:A such that !_A=0; therefore, A is nonempty.
Example Quotients and surjections [00MB]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Let E be an equivalence relation on a set A, and let q\colon A\to A/E be the quotient function that sends a:A to its equivalence class {\mathopen {}\left [a\right ]\mathclose {}}_{E}. Then q\colon A\to A/E is surjective.
Proof.
- January 29, 2024
- Jon Sterling
We must show that for every equivalence class u:A/E there exists an element a:A such that q{\mathopen {}\left (a\right )\mathclose {}}=u. By definition u={\mathopen {}\left [a\right ]\mathclose {}}_{E}=q{\mathopen {}\left (a\right )\mathclose {}} for some a:A.
Example Projection functions and surjections [00MC]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The projection function \pi _1\colon A\times B\to A sending {\mathopen {}\left (a,b\right )\mathclose {}} to a is surjective if and only if either B \not =\varnothing or A=\varnothing .
Proof.
- January 29, 2024
- Jon Sterling
Suppose that \pi _1\colon A\times B\to A is surjective. We proceed by cases on whether A is empty:
- If A is empty, we are done.
- If A is inhabited by some a:A, then by assumption there exists u:A\times B such that \pi _1{\mathopen {}\left (u\right )\mathclose {}}=a. Thus B is inhabited by \pi _2{\mathopen {}\left (u\right )\mathclose {}}.
Conversely, suppose that either B\not =\varnothing or A=\varnothing . Fixing a:A, we must show that there exists u:A\times B such that \pi _1{\mathopen {}\left (u\right )\mathclose {}}=a. If A=\varnothing , then we have a contradiction already; on the other hand, if there exists any b:B, we may define u:={\mathopen {}\left (a,b\right )\mathclose {}} and we are done.
Theorem Closure of surjections under identity and composition [00MD]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The identity function is a surjection and the composition of surjections yields a surjection.
Proof.
- January 29, 2024
- Jon Sterling
For the identity function on a set A, we must check that for all a:A, there exists an element a':A such that a'=a. Of course, we choose a' := a.
Let f\colon A\twoheadrightarrow B and g\colon B\twoheadrightarrow C be two surjections. To show that g\circ f\colon A\to C is a surjection, we fix c:C to exhibit some a:A such that g{\mathopen {}\left (f{\mathopen {}\left (a\right )\mathclose {}}\right )\mathclose {}} = c. Because g\colon B\twoheadrightarrow C is surjective, there exists b:B such that g{\mathopen {}\left (b\right )\mathclose {}} = c. Because f\colon A\twoheadrightarrow B is surjective, there exists a:A such that f{\mathopen {}\left (a\right )\mathclose {}} = b. Thus we have g{\mathopen {}\left (f{\mathopen {}\left (a\right )\mathclose {}}\right )\mathclose {}}=g{\mathopen {}\left (b\right )\mathclose {}}=c.
Enumerability and countability [00MG]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Definition Enumerable set [00ME]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
A set A is said to be enumerable whenever there exists a surjection \mathbb {N}\twoheadrightarrow A, referred to as an enumeration.
In an enumeration e\colon \mathbb {N}\twoheadrightarrow A of a set A, we think of n:\mathbb {N} as a “code” for a:A when e{\mathopen {}\left (n\right )\mathclose {}}=a; these “codes” are not unique unless e is an isomorphism. By virtue of the viewpoint of quotients as surjections developed in Example [00MB], enumerability expresses when a given set can be built up from the natural numbers by quotienting (i.e. identifying codes that are taken to the same element by the enumeration).
Definition Countable set [00MH]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
A countable set is one that is either empty or enumerable.
Lemma Alternative definition of countability [00MI]
- January 29, 2024
- Jon Sterling
A set A is countable if and only if the disjoint union A+{\mathopen {}\left [1\right ]\mathclose {}} is enumerable.
Proof.
- January 29, 2024
- Jon Sterling
Suppose that A is countable. We must find a surjection \mathbb {N}\twoheadrightarrow A+{\mathopen {}\left [1\right ]\mathclose {}}; if A is empty, this is the same as to find a surjection \mathbb {N}\to {\mathopen {}\left [1\right ]\mathclose {}}, which we have by Example [00MA]. On the other hand, if we have an enumeration e\colon \mathbb {N}\twoheadrightarrow {A}, we may define an enumeration e'\colon \mathbb {N}\twoheadrightarrow A+{\mathopen {}\left [1\right ]\mathclose {}} as follows:
\begin {aligned} e'{\mathopen {}\left (0\right )\mathclose {}} &= 0\\ e'{\mathopen {}\left (n+1\right )\mathclose {}} &= e{\mathopen {}\left (n\right )\mathclose {}} \end {aligned}Conversely, suppose that A+{\mathopen {}\left [1\right ]\mathclose {}} is enumerable by e\colon \mathbb {N}\twoheadrightarrow A+{\mathopen {}\left [1\right ]\mathclose {}}. If A is empty, we are done. If to the contrary A is inhabited by some a_0, we let define e'\colon \mathbb {N}\twoheadrightarrow A as follows:
e'{\mathopen {}\left (i\right )\mathclose {}} = \begin {cases} e{\mathopen {}\left (i\right )\mathclose {}} &\text {when } e{\mathopen {}\left (i\right )\mathclose {}}:A\\ a_0 &\text {otherwise} \end {cases}Example An invertible enumeration of the integers [00MJ]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
We can define a bijective enumeration of the integers by “zigzagging” between the positive and the negative following the pattern{\mathopen {}\left (0, -1, 1,-2,2,-3,3,\ldots \right )\mathclose {}}:
\begin {aligned} e&\colon \mathbb {N}\twoheadrightarrow \mathbb {Z}\\ e{\mathopen {}\left (i\right )\mathclose {}} &= \begin {cases} 0 &\text {when } i=0\\ i\div 2 &\text {when } i > 0 \land 2\mid i\\ -{\mathopen {}\left (i+1\right )\mathclose {}}\div 2 &\text {when } i > 0 \land \lnot {\mathopen {}\left (2\mid i\right )\mathclose {}} \end {cases} \end {aligned}Lemma Non-empty subsets of enumerable sets are enumerable [00MK]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Any non-empty subset of an enumerable set is enumerable.
Proof.
- January 29, 2024
- Jon Sterling
We will use the same method as in our proof of Lemma [00MI].
Let S\subseteq A be a non-empty subset of an enumerable set A, so that we have some s\in S and a surjection e\colon \mathbb {N}\twoheadrightarrow A. We define e'\colon \mathbb {N}\twoheadrightarrow {S} to send i:\mathbb {N} to e{\mathopen {}\left (i\right )\mathclose {}} if e{\mathopen {}\left (i\right )\mathclose {}}\in S and to s otherwise.
Lemma Cartesian product of countable sets [00ML]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The product of countable sets is countable.
Proof.
- January 29, 2024
- Jon Sterling
Let A and B be countable sets. If either A or B is empty, then A\times B is empty and thus countable. Otherwise, let e_A\colon \mathbb {N}\twoheadrightarrow A and e_B\colon \mathbb {N}\twoheadrightarrow B be enumerations of A and B respectively. Then the function e_A\times e_B\colon \mathbb {N}\times \mathbb {N}\to A\times B can be seen to be surjective; letting f\colon \mathbb {N}\twoheadrightarrow \mathbb {N}\times \mathbb {N} be any enumeration of \mathbb {N}\times \mathbb {N}, can compose to obtain a surjection {\mathopen {}\left (e_A\times e_B\right )\mathclose {}}\circ f\colon \mathbb {N}\twoheadrightarrow A\times B by Theorem [00MD].
Axiom The axiom of choice [00MM]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Every surjection has a section.
Injective functions [00MN]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Definition Injection [00MO]
- January 29, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Example Sections are injective [00N1]
- January 30, 2024
- Jon Sterling, with contributions from Marcelo Fiore
Proof.
- January 30, 2024
- Jon Sterling
Let s\colon B\to A be a section of r\colon A \to B. Fixing b_1,b_2:B such that s{\mathopen {}\left (b_1\right )\mathclose {}}=s{\mathopen {}\left (b_2\right )\mathclose {}}, we must show that b_1=b_2. We have r{\mathopen {}\left (s{\mathopen {}\left (b_1\right )\mathclose {}}\right )\mathclose {}}=r{\mathopen {}\left (s{\mathopen {}\left (b_2\right )\mathclose {}}\right )\mathclose {}} by assumption, and thus b_1=r{\mathopen {}\left (s{\mathopen {}\left (b_1\right )\mathclose {}}\right )\mathclose {}}=r{\mathopen {}\left (s{\mathopen {}\left (b_2\right )\mathclose {}}\right )\mathclose {}}=b_2.
Example Subset inclusion are injective [00N2]
- January 30, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The function i_S\colon S\to A including a subset S\subseteq A into A is injective.
Proof.
- January 30, 2024
- Jon Sterling
Immediate: the inclusion maps a given element to itself!
Theorem Closure of injections under identity and composition [00N3]
- January 30, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The identity function is an injection and the composition of injections yields a injection.
Proof.
- January 30, 2024
- Jon Sterling
The identity function is clearly injective, as a_0=a_1 implies a_0=a_1.
Let f\colon A\rightarrowtail B and g\colon B\rightarrowtail C be injections. To show that the composite function g\circ f\colon A\to C is injective, we fix a_0,a_1:A to check that g{\mathopen {}\left (f{\mathopen {}\left (a_0\right )\mathclose {}}\right )\mathclose {}} = g{\mathopen {}\left (f{\mathopen {}\left (a_1\right )\mathclose {}}\right )\mathclose {}} implies a_0=a_1. Because g is injective, we have f{\mathopen {}\left (a_0\right )\mathclose {}}=f{\mathopen {}\left (a_1\right )\mathclose {}}; therefore, because f is injective, we have a_0=a_1 as desired.
Now that we have enough definitions in hand to see it, the import of Theorem [00M7] is then to state that a function is invertible if and only if it is both injective and surjective.
Proposition Counting injections between finite sets [00N4]
- January 30, 2024
- Jon Sterling, with contributions from Marcelo Fiore
For finite sets A and B, we can describe number of injections from A to B as follows:
\mathord {\#}{\mathrm {Inj}{\mathopen {}\left (A,B\right )\mathclose {}}} = \begin {cases} {\mathord {\#}{B}\choose \mathord {\#}{A}}\cdot {\mathopen {}\left (\mathord {\#}{A}\right )\mathclose {}}! &\text {when } \mathord {\#}{A}\leq \mathord {\#}{B} \\ 0 &\text {otherwise} \end {cases}Proof.
- January 30, 2024
- Jon Sterling
We will argue from a combinatoric perspective.
An injection f from A to B associates no more than one a:A to the same b:B. Thus if we consider the subset U\subseteq B spanned by elements of the form f{\mathopen {}\left (a\right )\mathclose {}}, we should then get an isomorphism from A to U as each b\in U comes from a unique a:A.
Therefore, choosing an injection amounts to making two independent choices: first we choose a subset of B that is in isomorphism with A, and then we choose a specific isomorphism from A to that subset. The number of such subsets is precisely \mathord {\#}{B}\choose \mathord {\#}{A}, and we have already seen in Proposition [00KT] that the number of such bijections is the factorial {\mathopen {}\left (\mathord {\#}{A}!\right )\mathclose {}}.
Of course, if there is no subset of B equinumerous with A, then there can be no injection.