Topology (Munkres)
Standard Library: Cardinality
$X$ is finite iff $X$ is empty or there exists $k \class{latex-symbol-tip latex-symbol-id-in}{\in} \naturalsPlus$ such that there exists a bijection from $\initialSegment{k}$ to $X$.
LaTeX source
\begin{definition}
\label{finite}
$X$ is finite iff $X$ is empty or there exists $k \in \naturalsPlus$ such that
there exists a bijection from $\initialSegment{k}$ to $X$.
\end{definition}
$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ is finite.
LaTeX source
\begin{lemma}
\label{emptyset_is_finite}
$\emptyset$ is finite.
\end{lemma}
Proof
Follows by Axiom 2, Definition 89.
LaTeX source
\begin{proof}
Follows by \cref{finite,emptyset}.
\end{proof}
$\initialSegment{1} = \{1\}$.
LaTeX source
\begin{lemma}
\label{initial_segment_one_library}
$\initialSegment{1} = \{1\}$.
\end{lemma}
Proof
Follows by Axiom 1 [Set extensionality], Axiom 41, Axiom 42, Axiom 43, Definition 1, Definition 84, Lemma 25, Proposition 22.
LaTeX source
\begin{proof}
Follows by \cref{setext,initial_segment_naturalsplus,singleton_iff,real_one_in_naturals,real_one_leq_naturalsplus,real_naturals_subset_reals,subseteq,real_leq_antisym}.
\end{proof}
Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Then $\initialSegment{n+1} = \cons{n+1}{\initialSegment{n}}$.
LaTeX source
\begin{lemma}
\label{initial_segment_succ}
Suppose $n\in\naturalsPlus$.
Then $\initialSegment{n+1} = \cons{n+1}{\initialSegment{n}}$.
\end{lemma}
Proof
Follows by Axiom 3, Axiom 16, Axiom 17, Axiom 37, Axiom 41, Axiom 42, Axiom 44, Axiom 45, Definition 1, Definition 84, Lemma 23, Proposition 3, Proposition 123, Proposition 462.
LaTeX source
\begin{proof}
Follows by \cref{real_one_in_naturals,real_naturals_subset_reals,subseteq,real_zero_lt_one,real_add_ident,real_add_comm,real_lt_add,cons_subseteq_intro,initial_segment_naturalsplus,real_naturals_closed_succ,real_leq_trans,real_succ_discrete,cons_iff,subseteq_antisymmetric}.
\end{proof}
Suppose $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\bijections{A}{B}$.
Suppose $a\class{latex-symbol-tip latex-symbol-id-notin}{\notin} A$ and $b\class{latex-symbol-tip latex-symbol-id-notin}{\notin} B$.
Then $\cons{(a,b)}{f}\class{latex-symbol-tip latex-symbol-id-in}{\in}\bijections{\cons{a}{A}}{\cons{b}{B}}$.
LaTeX source
\begin{lemma}
\label{bijection_cons}
Suppose $f\in\bijections{A}{B}$.
Suppose $a\notin A$ and $b\notin B$.
Then $\cons{(a,b)}{f}\in\bijections{\cons{a}{A}}{\cons{b}{B}}$.
\end{lemma}
Proof
Follows by Axiom 3, Axiom 6, Definition 12, Definition 50, Definition 51, Definition 58, Proposition 200, Proposition 204, Proposition 209, Proposition 213, Proposition 345, Proposition 348, Proposition 358, Proposition 390, Proposition 391, Corollary 7, Corollary 8.
LaTeX source
\begin{proof}
Follows by \cref{bijections_dom,dom_intro,bijection_is_function,relation,cons_iff,rightunique,pair_eq_iff,function_rightunique,ran_of_surj,dom_cons,ran_cons,function_apply_elim,ran_intro,funs_intro,funs_surj_iff,injective,bijections}.
\end{proof}
Suppose $X$ is finite.
Then $\cons{x}{X}$ is finite.
LaTeX source
\begin{lemma}
\label{finite_cons}
Suppose $X$ is finite.
Then $\cons{x}{X}$ is finite.
\end{lemma}
Proof
Follows by Axiom 2, Axiom 16, Axiom 17, Axiom 35, Axiom 37, Axiom 39, Axiom 41, Axiom 42, Axiom 45, Definition 1, Definition 84, Definition 89, Lemma 36, Lemma 37, Lemma 38, Proposition 10, Proposition 134, Proposition 408, Proposition 462.
LaTeX source
\begin{proof}
Follows by \cref{cons_absorb,id_elem_bijections,emptyset,bijection_cons,initial_segment_one_library,real_one_in_naturals,finite,nonempty_inhabited,real_naturals_subset_reals,subseteq,real_zero_lt_one,real_add_ident,real_add_comm,real_lt_add,real_lt_irreflexive,initial_segment_naturalsplus,real_naturals_closed_succ,real_lt_asym,initial_segment_succ}.
\end{proof}
Assume that $x$ is a set and assume that $y$ is a set.
Then $\{x,y\}$ is finite.
LaTeX source
\begin{lemma}
\label{pair_is_finite}
Assume that $x$ is a set and assume that $y$ is a set.
Then $\{x,y\}$ is finite.
\end{lemma}
Proof
Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Then $n+1\class{latex-symbol-tip latex-symbol-id-notin}{\notin}\initialSegment{n}$.
LaTeX source
\begin{lemma}
\label{initial_segment_last_fresh}
Suppose $n\in\naturalsPlus$.
Then $n+1\notin\initialSegment{n}$.
\end{lemma}
Proof
Follows by Axiom 16, Axiom 17, Axiom 35, Axiom 37, Axiom 39, Axiom 41, Axiom 42, Axiom 45, Definition 1, Definition 84, Proposition 462.
LaTeX source
\begin{proof}
Follows by \cref{real_naturals_subset_reals,subseteq,real_one_in_naturals,real_zero_lt_one,real_add_ident,real_add_comm,real_lt_add,real_lt_irreflexive,initial_segment_naturalsplus,real_naturals_closed_succ,real_lt_asym}.
\end{proof}
Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$.
Suppose $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\bijections{\initialSegment{n+1}}{Y}$.
Then $\restrl{f}{\initialSegment{n}}\class{latex-symbol-tip latex-symbol-id-in}{\in}\bijections{\initialSegment{n}}{Y\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\{f(n+1)\}}$.
LaTeX source
\begin{lemma}
\label{bijection_remove_last}
Suppose $n\in\naturalsPlus$.
Suppose $f\in\bijections{\initialSegment{n+1}}{Y}$.
Then $\restrl{f}{\initialSegment{n}}\in\bijections{\initialSegment{n}}{Y\setminus\{f(n+1)\}}$.
\end{lemma}
Proof
Let $g=\restrl{f}{\initialSegment{n}}$.
$f$ is a function by Proposition 390.
$f$ is injective by Definition 58.
$\dom{f}=\initialSegment{n+1}$ by Proposition 391.
$\ran{f}=Y$ by Definition 58, Corollary 7.
$g$ is a function by Proposition 383, Proposition 390.
$\dom{g}=\initialSegment{n}$ by Lemma 37, Proposition 70, Proposition 390, Proposition 391, Corollary 1, Corollary 3.
$\ran{g}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} Y\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\{f(n+1)\}$ by Definition 1, Definition 50, Lemma 37, Lemma 41, Proposition 14, Proposition 22, Proposition 85, Proposition 208, Proposition 209, Proposition 262, Proposition 348.
$Y\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus}\{f(n+1)\}\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\ran{g}$ by Axiom 3, Definition 1, Lemma 37, Proposition 22, Proposition 86, Proposition 87, Proposition 209, Proposition 262, Proposition 348, Proposition 352.
Follows by Definition 58, Proposition 3, Proposition 209, Proposition 340, Proposition 348, Proposition 358, Corollary 8.
LaTeX source
\begin{proof}
Let $g=\restrl{f}{\initialSegment{n}}$.
$f$ is a function by \cref{bijection_is_function}.
$f$ is injective by \cref{bijections}.
$\dom{f}=\initialSegment{n+1}$ by \cref{bijections_dom}.
$\ran{f}=Y$ by \cref{bijections,ran_of_surj}.
$g$ is a function by \cref{bijection_is_function,restrl_of_function_is_function}.
$\dom{g}=\initialSegment{n}$ by \cref{bijection_is_function,bijections_dom,initial_segment_succ,subseteq_cons_self,dom_of_restrl_eq_inter,inter_absorb_supseteq_left}.
$\ran{g}\subseteq Y\setminus\{f(n+1)\}$ by \cref{subseteq,ran_iff,restrl_iff,ran_intro,initial_segment_succ,cons_left,function_apply_elim,injective,initial_segment_last_fresh,setminus_intro,singleton_iff}.
$Y\setminus\{f(n+1)\}\subseteq\ran{g}$ by \cref{subseteq,setminus_elim_right,singleton_iff,setminus_elim_left,fun_ran_iff,initial_segment_succ,cons_iff,function_apply_elim,restrl_iff,ran_intro}.
Follows by \cref{subseteq_antisymmetric,function_apply_elim,ran_intro,funs_intro,funs_surj_iff,restrl_injective,bijections}.
\end{proof}
Suppose $X$ is finite.
Suppose $\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Suppose for all $Y,y$ such that $Y\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ and $y\class{latex-symbol-tip latex-symbol-id-in}{\in} X$ we have $\cons{y}{Y}\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Then $X\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
LaTeX source
\begin{lemma}
\label{finite_induction}
Suppose $X$ is finite.
Suppose $\emptyset\in C$.
Suppose for all $Y,y$ such that $Y\in C$ and $y\in X$ we have $\cons{y}{Y}\in C$.
Then $X\in C$.
\end{lemma}
Proof
Then $X\class{latex-symbol-tip latex-symbol-id-in}{\in} C$.
Let $S=\{n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus\mid \text{for all $Y,f$ such that $Y\subseteq X$ and $f\in\bijections{\initialSegment{n}}{Y}$ we have $Y\in C$}\}$.
For all $n\class{latex-symbol-tip latex-symbol-id-in}{\in} S$ we have $n+1\class{latex-symbol-tip latex-symbol-id-in}{\in} S$ by Axiom 45, Definition 58, Lemma 37, Lemma 42, Proposition 4, Proposition 6, Proposition 14, Proposition 97, Proposition 135, Proposition 209, Proposition 348, Proposition 390, Proposition 391, Corollary 7.
Take $n,f$ such that $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus$ and $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\bijections{\initialSegment{n}}{X}$ by Definition 89, Proposition 10.
Thus $X\class{latex-symbol-tip latex-symbol-id-in}{\in} C$ by Axiom 42, Definition 1, Definition 58, Lemma 36, Proposition 2, Proposition 4, Proposition 20, Proposition 22, Proposition 24, Proposition 209, Proposition 348, Proposition 352, Proposition 390, Proposition 391, Proposition 445, Corollary 7.
LaTeX source
\begin{byCase}
\caseOf{$X=\emptyset$.}
Then $X\in C$.
\caseOf{$X\neq\emptyset$.}
Let $S=\{n\in\naturalsPlus\mid \text{for all $Y,f$ such that $Y\subseteq X$ and $f\in\bijections{\initialSegment{n}}{Y}$ we have $Y\in C$}\}$.
For all $n\in S$ we have $n+1\in S$ by \cref{bijection_is_function,bijections_dom,bijections,ran_of_surj,initial_segment_succ,cons_left,function_apply_elim,ran_intro,elem_subseteq,bijection_remove_last,setminus_subseteq,subseteq_transitive,cons_remove,real_naturals_closed_succ}.
Take $n,f$ such that $n\in\naturalsPlus$ and $f\in\bijections{\initialSegment{n}}{X}$ by \cref{nonempty_inhabited,finite}.
Thus $X\in C$ by \cref{real_one_in_naturals,bijection_is_function,bijections_dom,bijections,ran_of_surj,initial_segment_one_library,singleton_intro,function_apply_elim,ran_intro,elem_subseteq,fun_ran_iff,singleton_iff,singleton_iff_inhabited_subsingleton,real_naturals_induction,subseteq,subseteq_refl}.
\end{byCase}
LaTeX source
\begin{proof}
\begin{byCase}
\caseOf{$X=\emptyset$.}
Then $X\in C$.
\caseOf{$X\neq\emptyset$.}
Let $S=\{n\in\naturalsPlus\mid \text{for all $Y,f$ such that $Y\subseteq X$ and $f\in\bijections{\initialSegment{n}}{Y}$ we have $Y\in C$}\}$.
For all $n\in S$ we have $n+1\in S$ by \cref{bijection_is_function,bijections_dom,bijections,ran_of_surj,initial_segment_succ,cons_left,function_apply_elim,ran_intro,elem_subseteq,bijection_remove_last,setminus_subseteq,subseteq_transitive,cons_remove,real_naturals_closed_succ}.
Take $n,f$ such that $n\in\naturalsPlus$ and $f\in\bijections{\initialSegment{n}}{X}$ by \cref{nonempty_inhabited,finite}.
Thus $X\in C$ by \cref{real_one_in_naturals,bijection_is_function,bijections_dom,bijections,ran_of_surj,initial_segment_one_library,singleton_intro,function_apply_elim,ran_intro,elem_subseteq,fun_ran_iff,singleton_iff,singleton_iff_inhabited_subsingleton,real_naturals_induction,subseteq,subseteq_refl}.
\end{byCase}
\end{proof}
Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Suppose $B$ is finite.
Then $A$ is finite.
LaTeX source
\begin{lemma}
\label{subseteq_finite_is_finite}
Suppose $A\subseteq B$.
Suppose $B$ is finite.
Then $A$ is finite.
\end{lemma}
Proof
Let $C=\{Y\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{B}\mid \text{for all $D$ such that $D\subseteq Y$ we have $D$ is finite}\}$.
Thus $A$ is finite by Lemma 35, Lemma 39, Lemma 43, Proposition 12, Proposition 123, Proposition 129, Proposition 135, Proposition 155, Proposition 156, Proposition 157.
LaTeX source
\begin{proof}
Let $C=\{Y\in\pow{B}\mid \text{for all $D$ such that $D\subseteq Y$ we have $D$ is finite}\}$.
Thus $A$ is finite by \cref{powerset_bottom,subseteq_emptyset_iff,emptyset_is_finite,powerset_elim,cons_subseteq_intro,powerset_intro,subseteq_cons_elim,finite_cons,cons_remove,finite_induction}.
\end{proof}
Suppose $A$ is finite and $B$ is finite.
Then $A\union B$ is finite.
LaTeX source
\begin{lemma}
\label{union_of_finite_is_finite}
Suppose $A$ is finite and $B$ is finite.
Then $A\union B$ is finite.
\end{lemma}
Proof
Let $C=\{Y\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{A}\mid \text{$Y\union B$ is finite}\}$.
Thus $A\union B$ is finite by Lemma 39, Lemma 43, Proposition 41 [Commutativity of union], Proposition 49, Proposition 57, Proposition 123, Proposition 155, Proposition 156, Proposition 157.
LaTeX source
\begin{proof}
Let $C=\{Y\in\pow{A}\mid \text{$Y\union B$ is finite}\}$.
Thus $A\union B$ is finite by \cref{powerset_bottom,union_comm,union_emptyset,powerset_elim,cons_subseteq_intro,powerset_intro,finite_cons,union_cons,finite_induction}.
\end{proof}
$X$ is infinite iff $X$ is not finite.
LaTeX source
\begin{abbreviation}
\label{infinite}
$X$ is infinite iff $X$ is not finite.
\end{abbreviation}
Suppose $Y\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$.
Suppose $m$ is a maximum of $Y$.
Suppose $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Then there exists $p\class{latex-symbol-tip latex-symbol-id-in}{\in}\cons{x}{Y}$ such that $p$ is a maximum of $\cons{x}{Y}$.
LaTeX source
\begin{lemma}
\label{maximum_cons}
Suppose $Y\subseteq\reals$.
Suppose $m$ is a maximum of $Y$.
Suppose $x\in\reals$.
Then there exists $p\in\cons{x}{Y}$ such that $p$ is a maximum of $\cons{x}{Y}$.
\end{lemma}
Proof
Follows by Axiom 3, Axiom 34, Definition 73, Lemma 23, Proposition 4, Proposition 14, Proposition 15.
LaTeX source
\begin{proof}
Follows by \cref{real_maximum,elem_subseteq,cons_right,cons_iff,real_lt_trichotomy,cons_left,real_leq_trans}.
\end{proof}
Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$.
Suppose $A$ is finite.
Suppose $A\class{latex-symbol-tip latex-symbol-id-neq}{\neq} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then there exists $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $m$ is a maximum of $A$.
LaTeX source
\begin{lemma}
\label{finite_real_maximum}
Suppose $A\subseteq\reals$.
Suppose $A$ is finite.
Suppose $A\neq \emptyset$.
Then there exists $m\in A$ such that $m$ is a maximum of $A$.
\end{lemma}
Proof
Let $C=\{Y\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{A}\mid \text{$Y=\emptyset$ or there exists $m\in Y$ such that $m$ is a maximum of $Y$}\}$.
Thus there exists $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $m$ is a maximum of $A$ by Definition 73, Lemma 43, Lemma 46, Proposition 4, Proposition 6, Proposition 14, Proposition 22, Proposition 123, Proposition 155, Proposition 156, Proposition 157.
LaTeX source
\begin{proof}
Let $C=\{Y\in\pow{A}\mid \text{$Y=\emptyset$ or there exists $m\in Y$ such that $m$ is a maximum of $Y$}\}$.
Thus there exists $m\in A$ such that $m$ is a maximum of $A$ by \cref{powerset_bottom,powerset_elim,cons_subseteq_intro,powerset_intro,elem_subseteq,cons_left,singleton_iff,real_maximum,subseteq_transitive,maximum_cons,finite_induction}.
\end{proof}
Suppose $Y\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$.
Suppose $m$ is a minimum of $Y$.
Suppose $x\class{latex-symbol-tip latex-symbol-id-in}{\in}\reals$.
Then there exists $p\class{latex-symbol-tip latex-symbol-id-in}{\in}\cons{x}{Y}$ such that $p$ is a minimum of $\cons{x}{Y}$.
LaTeX source
\begin{lemma}
\label{minimum_cons}
Suppose $Y\subseteq\reals$.
Suppose $m$ is a minimum of $Y$.
Suppose $x\in\reals$.
Then there exists $p\in\cons{x}{Y}$ such that $p$ is a minimum of $\cons{x}{Y}$.
\end{lemma}
Proof
Follows by Axiom 3, Axiom 34, Definition 74, Lemma 23, Proposition 4, Proposition 14, Proposition 15.
LaTeX source
\begin{proof}
Follows by \cref{real_minimum,elem_subseteq,cons_right,cons_iff,real_lt_trichotomy,cons_left,real_leq_trans}.
\end{proof}
Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$.
Suppose $A$ is finite.
Suppose $A\class{latex-symbol-tip latex-symbol-id-neq}{\neq} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then there exists $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $m$ is a minimum of $A$.
LaTeX source
\begin{lemma}
\label{finite_real_minimum}
Suppose $A\subseteq\reals$.
Suppose $A$ is finite.
Suppose $A\neq \emptyset$.
Then there exists $m\in A$ such that $m$ is a minimum of $A$.
\end{lemma}
Proof
Let $C=\{Y\class{latex-symbol-tip latex-symbol-id-in}{\in}\pow{A}\mid \text{$Y=\emptyset$ or there exists $m\in Y$ such that $m$ is a minimum of $Y$}\}$.
Thus there exists $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that $m$ is a minimum of $A$ by Definition 74, Lemma 43, Lemma 48, Proposition 4, Proposition 6, Proposition 14, Proposition 22, Proposition 123, Proposition 155, Proposition 156, Proposition 157.
LaTeX source
\begin{proof}
Let $C=\{Y\in\pow{A}\mid \text{$Y=\emptyset$ or there exists $m\in Y$ such that $m$ is a minimum of $Y$}\}$.
Thus there exists $m\in A$ such that $m$ is a minimum of $A$ by \cref{powerset_bottom,powerset_elim,cons_subseteq_intro,powerset_intro,elem_subseteq,cons_left,singleton_iff,real_minimum,subseteq_transitive,minimum_cons,finite_induction}.
\end{proof}
Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\naturalsPlus$.
Suppose $A$ is finite.
Suppose $A\class{latex-symbol-tip latex-symbol-id-neq}{\neq} \class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then there exists $m\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ such that for all $a\class{latex-symbol-tip latex-symbol-id-in}{\in} A$ we have $a \class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$.
LaTeX source
\begin{lemma}
\label{finite_naturals_maximum}
Suppose $A\subseteq\naturalsPlus$.
Suppose $A$ is finite.
Suppose $A\neq \emptyset$.
Then there exists $m\in A$ such that for all $a\in A$ we have $a \leq m$.
\end{lemma}
Proof
Follows by Axiom 41, Definition 73, Lemma 47, Proposition 6.
LaTeX source
\begin{proof}
Follows by \cref{finite_real_maximum,real_maximum,real_naturals_subset_reals,subseteq_transitive}.
\end{proof}
$X$ is countable iff there exists $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{X}{\naturals}$.
LaTeX source
\begin{definition}
\label{countable}
$X$ is countable iff there exists $f\in\inj{X}{\naturals}$.
\end{definition}
$\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ is countable.
LaTeX source
\begin{lemma}
\label{emptyset_is_countable}
$\emptyset$ is countable.
\end{lemma}
Proof
Follows by Axiom 2, Definition 56, Definition 90, Proposition 201, Proposition 358, Proposition 370.
LaTeX source
\begin{proof}
Follows by \cref{codom_of_emptyset_can_be_anything,dom_emptyset,funs_intro,inj,emptyset,countable}.
\end{proof}
Suppose $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{B}{C}$.
Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Then $\restrl{f}{A}\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{A}{C}$.
LaTeX source
\begin{lemma}
\label{inj_restrl}
Suppose $f\in\inj{B}{C}$.
Suppose $A\subseteq B$.
Then $\restrl{f}{A}\in\inj{A}{C}$.
\end{lemma}
Proof
Follows by Definition 55, Definition 56, Proposition 4, Proposition 70, Proposition 269, Proposition 340, Proposition 356, Proposition 358, Proposition 361, Proposition 383, Proposition 384, Proposition 386, Corollary 3.
LaTeX source
\begin{proof}
Follows by \cref{inj,funs_is_function,funs,restrl_of_function_is_function,dom_of_restrl_eq_inter,inter_absorb_supseteq_left,restrl_dom,elem_subseteq,restrl_of_function_apply,funs_type_apply,funs_intro,injective_function,restrl_injective}.
\end{proof}
Suppose $A\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq} B$.
Suppose $B$ is countable.
Then $A$ is countable.
LaTeX source
\begin{lemma}
\label{subseteq_countable_is_countable}
Suppose $A\subseteq B$.
Suppose $B$ is countable.
Then $A$ is countable.
\end{lemma}
Proof
Follows by Definition 90, Lemma 52.
LaTeX source
\begin{proof}
Follows by \cref{countable,inj_restrl}.
\end{proof}
$\naturals\class{latex-symbol-tip latex-symbol-id-subseteq}{\subseteq}\reals$.
LaTeX source
\begin{lemma}
\label{naturals_subset_reals}
$\naturals\subseteq\reals$.
\end{lemma}
Proof
Follows by Axiom 5, Axiom 17, Axiom 41, Definition 1, Definition 81, Proposition 22.
LaTeX source
\begin{proof}
Follows by \cref{naturals,union_iff,singleton_iff,real_naturals_subset_reals,subseteq,real_add_ident}.
\end{proof}
Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Then $2\rmul n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
LaTeX source
\begin{lemma}
\label{double_natural}
Suppose $n\in\naturals$.
Then $2\rmul n\in\naturals$.
\end{lemma}
Proof
Let $S=\{k\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturalsPlus\mid \text{$2\rmul k\in\naturalsPlus$}\}$.
For all $k\class{latex-symbol-tip latex-symbol-id-in}{\in} S$ we have $k+1\class{latex-symbol-tip latex-symbol-id-in}{\in} S$ by Axiom 13, Axiom 15, Axiom 20, Axiom 21, Axiom 23, Axiom 24, Axiom 41, Axiom 42, Axiom 45, Proposition 4.
Thus $2\rmul n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ by Axiom 5, Axiom 13, Axiom 17, Axiom 20, Axiom 21, Axiom 24, Axiom 41, Axiom 42, Axiom 45, Definition 1, Definition 81, Proposition 4, Proposition 22, Proposition 439, Proposition 445.
LaTeX source
\begin{proof}
Let $S=\{k\in\naturalsPlus\mid \text{$2\rmul k\in\naturalsPlus$}\}$.
For all $k\in S$ we have $k+1\in S$ by \cref{real_naturals_closed_succ,real_naturals_subset_reals,elem_subseteq,def_of_2,real_one_in_naturals,real_add_closed,real_distrib,real_mul_ident,real_mul_comm,real_add_assoc}.
Thus $2\rmul n\in\naturals$ by \cref{real_one_in_naturals,real_naturals_closed_succ,real_naturals_subset_reals,elem_subseteq,def_of_2,real_mul_comm,real_mul_ident,real_naturals_induction,subseteq,real_add_closed,real_add_ident,real_mul_zero,naturals,union_iff,singleton_iff}.
\end{proof}
Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Then $(2\rmul n)+1\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
LaTeX source
\begin{lemma}
\label{double_succ_natural}
Suppose $n\in\naturals$.
Then $(2\rmul n)+1\in\naturals$.
\end{lemma}
Proof
Follows by Axiom 5, Axiom 16, Axiom 17, Axiom 21, Axiom 42, Axiom 45, Definition 81, Lemma 55, Proposition 22.
LaTeX source
\begin{proof}
Follows by \cref{double_natural,real_add_ident,real_add_comm,real_mul_ident,real_one_in_naturals,naturals,union_iff,singleton_iff,real_naturals_closed_succ}.
\end{proof}
Suppose $m,n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Suppose $2\rmul m=2\rmul n$.
Then $m=n$.
LaTeX source
\begin{lemma}
\label{double_injective}
Suppose $m,n\in\naturals$.
Suppose $2\rmul m=2\rmul n$.
Then $m=n$.
\end{lemma}
Proof
Follows by Axiom 13, Axiom 17, Axiom 21, Axiom 24, Axiom 36, Axiom 37, Lemma 20, Lemma 54, Proposition 4, Proposition 443, Proposition 462.
LaTeX source
\begin{proof}
Follows by \cref{naturals_subset_reals,elem_subseteq,def_of_2,real_zero_lt_one,real_add_ident,real_mul_ident,real_lt_add,real_add_closed,real_lt_trans,real_pos_nonzero,real_mul_cancel}.
\end{proof}
Suppose $n,m\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Suppose $n < m$.
Then $n+1\class{latex-symbol-tip latex-symbol-id-leq}{\leq} m$.
LaTeX source
\begin{lemma}
\label{natural_succ_leq}
Suppose $n,m\in\naturals$.
Suppose $n < m$.
Then $n+1\leq m$.
\end{lemma}
Proof
Follows by Axiom 5, Axiom 17, Axiom 21, Axiom 34, Axiom 35, Axiom 36, Axiom 39, Axiom 41, Axiom 43, Axiom 44, Axiom 45, Definition 81, Lemma 20, Lemma 54, Proposition 4, Proposition 22, Proposition 462.
LaTeX source
\begin{proof}
Follows by \cref{naturals_subset_reals,elem_subseteq,real_add_ident,real_mul_ident,real_lt_irreflexive,naturals,union_iff,singleton_iff,real_one_leq_naturalsplus,real_zero_lt_one,real_naturals_subset_reals,real_lt_trans,real_pos_nonzero,real_naturals_closed_succ,real_lt_trichotomy,real_succ_discrete,real_lt_asym}.
\end{proof}
Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Then $(2\rmul n)+1 < 2\rmul(n+1)$.
LaTeX source
\begin{lemma}
\label{double_succ_lt_next_double}
Suppose $n\in\naturals$.
Then $(2\rmul n)+1 < 2\rmul(n+1)$.
\end{lemma}
Proof
Follows by Axiom 13, Axiom 14, Axiom 15, Axiom 16, Axiom 17, Axiom 20, Axiom 21, Axiom 23, Axiom 24, Axiom 37, Lemma 54, Proposition 4, Proposition 462.
LaTeX source
\begin{proof}
Follows by \cref{naturals_subset_reals,elem_subseteq,def_of_2,real_mul_ident,real_add_closed,real_mul_closed,real_zero_lt_one,real_add_ident,real_lt_add,real_add_comm,real_distrib,real_mul_comm,real_add_assoc}.
\end{proof}
Suppose $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Then $2\rmul n < (2\rmul n)+1$.
LaTeX source
\begin{lemma}
\label{double_lt_double_succ}
Suppose $n\in\naturals$.
Then $2\rmul n < (2\rmul n)+1$.
\end{lemma}
Proof
Follows by Axiom 13, Axiom 14, Axiom 16, Axiom 17, Axiom 21, Axiom 24, Axiom 37, Lemma 54, Proposition 4, Proposition 462.
LaTeX source
\begin{proof}
Follows by \cref{naturals_subset_reals,elem_subseteq,def_of_2,real_mul_ident,real_add_closed,real_mul_closed,real_zero_lt_one,real_add_ident,real_lt_add,real_add_comm}.
\end{proof}
Suppose $m,n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$.
Then $2\rmul m\class{latex-symbol-tip latex-symbol-id-neq}{\neq}(2\rmul n)+1$.
LaTeX source
\begin{lemma}
\label{double_neq_double_succ}
Suppose $m,n\in\naturals$.
Then $2\rmul m\neq(2\rmul n)+1$.
\end{lemma}
Proof
Follows by Axiom 13, Axiom 14, Axiom 17, Axiom 20, Axiom 21, Axiom 24, Axiom 34, Axiom 36, Axiom 37, Axiom 38, Axiom 39, Lemma 54, Lemma 58, Lemma 59, Lemma 60, Proposition 4, Proposition 462.
LaTeX source
\begin{proof}
Follows by \cref{naturals_subset_reals,elem_subseteq,def_of_2,real_mul_ident,real_add_closed,real_zero_lt_one,real_add_ident,real_lt_add,real_lt_trans,double_lt_double_succ,real_mul_closed,real_lt_irreflexive,real_lt_trichotomy,real_lt_mul_pos,real_mul_comm,natural_succ_leq,double_succ_lt_next_double}.
\end{proof}
There exists $e\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{\naturals}{\naturals}$ such that for all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $e(n)=2\rmul n$.
LaTeX source
\begin{lemma}
\label{even_code_injection}
There exists $e\in\inj{\naturals}{\naturals}$ such that
for all $n\in\naturals$ we have $e(n)=2\rmul n$.
\end{lemma}
Proof
Let $e=\{(n,2\rmul n)\mid n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals\}$.
Hence there exists $q\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{\naturals}{\naturals}$ such that for all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $q(n)=2\rmul n$ by Axiom 6, Definition 1, Definition 12, Definition 51, Definition 56, Lemma 55, Lemma 57, Proposition 3, Proposition 199, Proposition 200, Proposition 346, Proposition 358.
LaTeX source
\begin{proof}
Let $e=\{(n,2\rmul n)\mid n\in\naturals\}$.
Hence there exists $q\in\inj{\naturals}{\naturals}$ such that
for all $n\in\naturals$ we have $q(n)=2\rmul n$ by \cref{relation,rightunique,pair_eq_iff,subseteq,dom_intro,dom_iff,subseteq_antisymmetric,function_apply_intro,double_natural,funs_intro,double_injective,inj}.
\end{proof}
There exists $o\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{\naturals}{\naturals}$ such that for all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $o(n)=(2\rmul n)+1$.
LaTeX source
\begin{lemma}
\label{odd_code_injection}
There exists $o\in\inj{\naturals}{\naturals}$ such that
for all $n\in\naturals$ we have $o(n)=(2\rmul n)+1$.
\end{lemma}
Proof
Let $o=\{(n,(2\rmul n)+1)\mid n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals\}$.
$o$ is a function by Axiom 6, Definition 12, Definition 51.
Hence there exists $q\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{\naturals}{\naturals}$ such that for all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $q(n)=(2\rmul n)+1$ by Axiom 6, Axiom 13, Axiom 14, Axiom 21, Axiom 24, Definition 1, Definition 56, Lemma 54, Lemma 56, Lemma 57, Proposition 3, Proposition 4, Proposition 199, Proposition 200, Proposition 346, Proposition 358, Proposition 438.
LaTeX source
\begin{proof}
Let $o=\{(n,(2\rmul n)+1)\mid n\in\naturals\}$.
$o$ is a function by \cref{relation,rightunique,pair_eq_iff}.
Hence there exists $q\in\inj{\naturals}{\naturals}$ such that
for all $n\in\naturals$ we have $q(n)=(2\rmul n)+1$ by \cref{subseteq,dom_intro,dom_iff,pair_eq_iff,subseteq_antisymmetric,function_apply_intro,double_succ_natural,funs_intro,naturals_subset_reals,elem_subseteq,def_of_2,real_mul_ident,real_add_closed,real_mul_closed,real_add_cancel,double_injective,inj}.
\end{proof}
Suppose $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{A}{C}$ and $g\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{B}{C}$.
Suppose $A\inter B=\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ and $\ran{f}\inter\ran{g}=\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$.
Then $f\union g\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{A\union B}{C}$.
LaTeX source
\begin{lemma}
\label{union_inj_disjoint}
Suppose $f\in\inj{A}{C}$ and $g\in\inj{B}{C}$.
Suppose $A\inter B=\emptyset$ and $\ran{f}\inter\ran{g}=\emptyset$.
Then $f\union g\in\inj{A\union B}{C}$.
\end{lemma}
Proof
$f$ and $g$ are functions by Definition 56, Proposition 356.
$\dom{f}=A$ and $\dom{g}=B$ by Definition 55, Definition 56.
$f$ and $g$ are injective by Definition 56, Proposition 386.
Let $h=f\union g$.
$h$ is a function by Axiom 2, Axiom 5, Definition 51, Proposition 61, Proposition 180, Proposition 200.
Hence $h\class{latex-symbol-tip latex-symbol-id-in}{\in}\funs{A\union B}{C}$ by Axiom 5, Definition 1, Definition 56, Proposition 4, Proposition 205, Proposition 209, Proposition 214, Proposition 348, Proposition 358, Proposition 363.
$h$ is injective by Axiom 2, Axiom 5, Definition 50, Proposition 61, Proposition 209.
Thus $h\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{A\union B}{C}$ by Definition 55, Definition 56, Proposition 386.
LaTeX source
\begin{proof}
$f$ and $g$ are functions by \cref{inj,funs_is_function}.
$\dom{f}=A$ and $\dom{g}=B$ by \cref{inj,funs}.
$f$ and $g$ are injective by \cref{inj,injective_function}.
Let $h=f\union g$.
$h$ is a function by \cref{union_relations_is_relation,rightunique,union_iff,dom_intro,inter_intro,emptyset}.
Hence $h\in\funs{A\union B}{C}$ by \cref{dom_union,inj,funs_ran,subseteq,ran_union,union_iff,elem_subseteq,function_apply_elim,ran_intro,funs_intro}.
$h$ is injective by \cref{injective,union_iff,ran_intro,inter_intro,emptyset}.
Thus $h\in\inj{A\union B}{C}$ by \cref{funs,inj,injective_function}.
\end{proof}
Suppose $A$ is countable and $B$ is countable.
Then $A\union B$ is countable.
LaTeX source
\begin{lemma}
\label{union_of_countable_is_countable}
Suppose $A$ is countable and $B$ is countable.
Then $A\union B$ is countable.
\end{lemma}
Proof
Take $f,g$ such that $f\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{A}{\naturals}$ and $g\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{B}{\naturals}$ by Definition 90.
Take $e\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{\naturals}{\naturals}$ such that for all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $e(n)=2\rmul n$ by Lemma 62.
Take $o\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{\naturals}{\naturals}$ such that for all $n\class{latex-symbol-tip latex-symbol-id-in}{\in}\naturals$ we have $o(n)=(2\rmul n)+1$ by Lemma 63.
Let $r=\restrl{g}{B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A}$.
$r\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A}{\naturals}$ by Lemma 52, Proposition 97.
Let $F=e\class{latex-symbol-tip latex-symbol-id-circ}{\circ} f$.
Let $G=o\class{latex-symbol-tip latex-symbol-id-circ}{\circ} r$.
$F\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{A}{\naturals}$ and $G\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A}{\naturals}$ by Proposition 387.
$\ran{F}\inter\ran{G}=\class{latex-symbol-tip latex-symbol-id-emptyset}{\emptyset}$ by Axiom 1 [Set extensionality], Axiom 2, Definition 55, Definition 56, Lemma 61, Proposition 62, Proposition 63, Proposition 352, Proposition 356, Proposition 361, Proposition 363, Proposition 373.
Thus $F\union G\class{latex-symbol-tip latex-symbol-id-in}{\in}\inj{A\union(B\class{latex-symbol-tip latex-symbol-id-setminus}{\setminus} A)}{\naturals}$ by Lemma 64, Proposition 106.
Follows by Axiom 1 [Set extensionality], Axiom 5, Definition 6, Definition 90.
LaTeX source
\begin{proof}
Take $f,g$ such that $f\in\inj{A}{\naturals}$ and $g\in\inj{B}{\naturals}$ by \cref{countable}.
Take $e\in\inj{\naturals}{\naturals}$ such that
for all $n\in\naturals$ we have $e(n)=2\rmul n$ by \cref{even_code_injection}.
Take $o\in\inj{\naturals}{\naturals}$ such that
for all $n\in\naturals$ we have $o(n)=(2\rmul n)+1$ by \cref{odd_code_injection}.
Let $r=\restrl{g}{B\setminus A}$.
$r\in\inj{B\setminus A}{\naturals}$ by \cref{setminus_subseteq,inj_restrl}.
Let $F=e\circ f$.
Let $G=o\circ r$.
$F\in\inj{A}{\naturals}$ and $G\in\inj{B\setminus A}{\naturals}$ by \cref{inj_circ}.
$\ran{F}\inter\ran{G}=\emptyset$ by \cref{setext,emptyset,inter_elim_left,inter_elim_right,fun_ran_iff,inj,funs,funs_is_function,funs_ran,funs_type_apply,circ_apply,double_neq_double_succ}.
Thus $F\union G\in\inj{A\union(B\setminus A)}{\naturals}$ by \cref{setminus_disjoint,union_inj_disjoint}.
Follows by \cref{setext,union_iff,setminus,countable}.
\end{proof}