# HoTT/book

lots more about ordinals

 @@ -1,4 +1,6 @@ \newcommand{\card}{\ensuremath{\mathsf{Card}}\xspace} +\newcommand{\ord}{\ensuremath{\mathsf{Ord}}\xspace} +\newcommand{\ordsl}[2]{{#1}_{/#2}} \newcommand{\cd}[1]{\left|#1\right|} \newcommand{\inj}{\ensuremath{\mathsf{inj}}} @@ -234,15 +236,15 @@ \section{Ordinal numbers} $g : \mathcal{P}B \to B$ Then if $<$ is a well-founded relation on $A$, there is a function $f:A\to B$ such that for all $a:A$ we have \begin{equation*} - f(a) = g\Big(\big\{ f(a') \;\big|\; a'a$. + Thus,$A'$is itself an ordinal. + + Finally, since \ord is an ordinal, we can take$A\defeq\ord$. + Let$X'$be the image of$g_\ord':\ord' \to X$; then the inverse of$g_\ord'$yields an injection$H:X'\to \ord$. + By \autoref{thm:ordunion}, there is an ordinal$C$such that$Hx\le C$for all$x:X'$. + Then by \autoref{thm:ordsucc}, there is a further ordinal$D$such that$C
 @@ -1,6 +1,29 @@ \chapter{Set-level mathematics} \label{cha:set-math} +\section{Subsets and power sets} +\label{sec:subsets} + +For a set $X$, we speak of predicates $Y:X\to \prop$ equivalently as \textbf{subsets} of $X$, and sometimes write $x\in Y$ to mean $Y(x)$. +We will also use the set-builder notation for such subsets: +$\setof{x:X | P } \defeq \lambda x.P$ +Univalence for \prop, plus function extensionality, implies that such subsets are \emph{extensional} in the usual sense of set theory: +$(Y_1 = Y_2) \leftrightarrow \Big(\prd{x:X} (x\in Y_1) \leftrightarrow (x\in Y_2)\Big)$ +Note that both sides of this equivalence are mere propositions. + +We define the \textbf{power set} of $X$ to be +\begin{align*} + \mathcal{P} X &\defeq X\to \prop +\end{align*} +Likewise, we define the subset of inhabited subsets in $X$ to be +\begin{align*} + \mathcal{P}_+ X &\defeq \setof{P:X\to \prop | \brck{(\exists x:X), P(x)}} +\end{align*} +Assuming excluded middle, we have $\mathcal{P}_+ X \cong \setof{P:X\to \prop | P \neq (\lambda x.\bot)}$ and also $\mathcal{P} X \cong \mathcal{P}_+ X + \unit$. + +For $Y:\mathcal{P}X$, we write $X\setminus Y \defeq \setof{x:X | x\notin Y}$. +Similarly, we have unions $Y_1 \cup Y_2$, intersections $Y_1 \cap Y_2$, and so on. + \input{ordcard}