\documentclass[a4paper,twoside,11pt,openany]{book}
\usepackage[polutonikogreek,english]{babel}
%\usepackage[oxonia]{psgreek}
%\usepackage{pifont} % used for \ding
\usepackage{flafter} % floats after they appear in the file
\usepackage{upref}  % AMS-LaTeX for upright references always
\usepackage{bm}     % bold math
\usepackage{pstricks,pst-node,pst-tree,graphics,multido}
\usepackage{undertilde} % for the command \utilde
\usepackage{stmaryrd}   % for \shortrightarrow and \binampersand
%\usepackage{txfonts}    % for \omegaup; but this font caused problems
\usepackage{upgreek}     % for \upomega
\usepackage[mathscr]{euscript}
\usepackage{amssymb,amsmath,amsthm}
%\usepackage{amscd}     % commutative diagram
\usepackage{ifthen}
\usepackage{url}
%\usepackage{showlabels}
\usepackage{verbatim}  % allows a comment environment:
%\usepackage{parskip}   % paragraphs not indented, but separated by spaces
\usepackage{eco}  % gives old-style numerals
\usepackage{varioref}  % for \vref
\usepackage{calc}  %  used with the following counters
\newcounter{mynum}
\newcounter{modnum}

\newcommand{\defn}[1]{\textbf{#1}}   % for words being defined
\newcommand{\defin}[1]{\textbf{#1}}   % for words being defined
\newcommand{\tech}[1]{\textsl{#1}}     % for technical terms

\usepackage{makeidx}
%\usepackage{showidx}  % For use when editing
\makeindex 
\newcommand{\itech}[1]{\tech{#1}\index{#1|textsl}}
\newcommand{\idefn}[1]{\defn{#1}\index{#1|textbf}}
\newcommand{\tindex}[1]{\index{#1|textsl}}
\newcommand{\dindex}[1]{\index{#1|textbf}}
\newcommand{\tindexsub}[2]{\index{#1!#2|textsl}}
\newcommand{\dindexsub}[2]{\index{#1!#2|textbf}}

%  For a list of the axioms:

\newcommand\axiomname[1]
        {\addcontentsline{axi}{axiom}{#1}}
\makeatletter
\newcommand\listofaxioms
        {\chapter*{List of Axioms}
\par\noindent Here, $a$ and $b$ are arbitrary sets, $\cC$ is an
        arbitrary class, $\cF$ is an arbitrary function, and $\vnn$
        and $\wf$ are
        the classes defined on pp.~\pageref{par:omega-as-class}
        and~\pageref{par:wf-universe} respectively.
\begin{enumerate} 
\@starttoc{axi}
\end{enumerate}
%A weak form of the Union Axiom, namely $\Exists xx=a\cup\{b\}$, is
%given on p.~\pageref{ax:weak-union}.
} 
\newcommand\l@axiom[2]
%        {\par\noindent 
{\item{}
[p.~#2] #1
%\par
}
\makeatother

\newcommand{\Treebox}[1]{\Tr{\psframebox{#1}}}

\newcommand{\Gk}[1]{\selectlanguage{polutonikogreek}{#1}\selectlanguage{english}}
\newcommand{\Eng}[1]{\emph{#1}}
\newcommand{\Tur}[1]{\textsf{#1}}
\newcommand{\Lat}[1]{\textsc{#1}}
\newcommand{\lett}[1]{\textsf{#1}}
\renewcommand{\phi}{\varphi}
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}

\title{Sets and Classes}
\author{David Pierce}
\date{\today}

\swapnumbers
\newtheorem{theorem}{Theorem}[section]
\newtheorem{thmdefn}[theorem]{Theorem and Definition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{lemdefn}[theorem]{Lemma and Definition}
%\newtheorem{fact}[theorem]{Fact}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{axiomscheme}[theorem]{Axiom Scheme}
%\newtheorem{proposition}[theorem]{Proposition}
%\newtheorem{porism}[theorem]{Porism}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
%\newtheorem{example}[theorem]{Example}
%\newtheorem{examples}[theorem]{Examples}
%\newtheorem{exercise}[theorem]{Exercise}
%\newtheorem{counter}[theorem]{Counter-Example}
%\newtheorem{non}[theorem]{Non-Example}
\newtheorem{parag}[theorem]{}

%\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thetheorem}{\thesection.\arabic{theorem}}%
%\newcommand{\parref}[1]{\ding{161}\ref{#1}}
\newcommand{\parref}[1]{\textparagraph\ref{#1}}
\newcommand{\sref}[1]{\S\ref{#1}}
\renewcommand{\theenumi}{\roman{enumi}}
\renewcommand{\labelenumi}{(\theenumi)}

\newcommand{\qsep}{\;}                 % follows a quantified variable
\newcommand{\Forall}[1]{\forall{#1}\qsep }
\newcommand{\Exists}[1]{\exists{#1}\qsep }
\newcommand{\existsunique}{\exists!}
\newcommand{\Existsunique}[1]{\exists!\,{#1}\qsep }

\newcommand{\setim}[1][]{''{#1}} % image of set under preceding function 
\newcommand{\setimb}[1]{[\,#1\,]}    % image of set under preceding function 
\newcommand{\conv}[1]{\breve{#1}}       % converse of a relation
\newcommand{\To}{\longrightarrow}
\newcommand{\inv}{^{-1}}                % mult. inverse
\newcommand{\rest}[1]{\restriction{#1}}% restriction of function to #1
\newcommand{\id}[1]{\operatorname{id}_{#1}}
\newcommand{\mapset}[2]{{}^{#1}#2}     % set of functions from #1 to #2

\newcommand{\Iff}{}
\let\Iff\iff
%\renewcommand{\iff}{\leftrightarrow}
\renewcommand{\iff}{\Leftrightarrow}
%\newcommand{\lto}{\to}
\newcommand{\lto}{\Rightarrow}
\renewcommand{\land}{\mathrel{\binampersand}}

%%%%%%%%  sets:

\newcommand{\set}[2]{\{#1\colon #2\}}
\newcommand{\cls}[2]{\{#1\colon #2\}}
\newcommand{\class}[1]{\bm{#1}}
\newcommand{\cA}{\class A}
\newcommand{\cB}{\class B}
\newcommand{\cC}{\class C}
\newcommand{\cD}{\class D}
\newcommand{\cE}{\class E}
\newcommand{\cF}{\class F}
\newcommand{\cG}{\class G}
\newcommand{\cH}{\class H}
\newcommand{\cK}{\class K}
\newcommand{\cM}{\class M}
\newcommand{\cR}{\class R}
\newcommand{\cS}{\class S}
\newcommand{\cT}{\class T}

\newcommand{\universe}{\mathrm{\mathbf V}}
\newcommand{\cOm}{\bm{\mathit{\Omega}}}
\newcommand{\on}{\mathbf{ON}}           % the class of ordinals
\newcommand{\cn}{\mathbf{CN}}           % the class of cardinals
\newcommand{\wf}{\mathbf{WF}}           % class of well-founded sets
\newcommand{\rwf}{\mathrm{\mathbf R}}   % R used to define WF
\newcommand{\defr}[2]{\mathbf{D}_{#1}(#2)} % definable n-ary relations
\newcommand{\cu}{\mathbf{L}}            % constructible universe L
\newcommand{\const}{\mathrm{\mathbf L}} % C used to define L


\newcommand{\str}[1]{\mathfrak{#1}}     % structure
%\newcommand{\lang}{\mathcal{L}}        % a language or signature
\newcommand{\End}[1]{\operatorname{End}(#1)} % endomorphisms

% set-theoretic operators:

% nullary:

\renewcommand{\emptyset}{\varnothing}  % [I like the other symbol better]

% unary:

\newcommand{\comp}{^{\mathrm{c}}}      % set-theoretic complement
\newcommand{\pow}[1]{\mathcal{P}(#1)}  % power set

% binary:
\renewcommand{\setminus}{\smallsetminus} % I don't like the standard symbol
\newcommand{\symdiff}{\vartriangle}    % symmetric difference

%%%%%%%%%%%%  Cardinality

\newcommand{\injects}{\preccurlyeq}    % injects in
\newcommand{\pinjects}{\prec}
\newcommand{\equip}{\approx}           % equipollent (is in bijection with)
\newcommand{\nequip}{\not\approx}      % not equipollent
\newcommand{\vscr}[1]{#1'}        % successor ordinal (v for von Neumann)
\newcommand{\ord}[1]{\operatorname{ord}(#1)} % order-type (ordinality)
\newcommand{\supr}[1]{\sup(#1)}        % supremum
%\newcommand{\size}[1]{\lvert#1\rvert}  % cardinality
\newcommand{\card}[1]{\operatorname{card}(#1)} % cardinality
\newcommand{\pl}{^{+}}                 % successor cardinal
\newcommand{\cntm}{\mathfrak c}        % cardinality of the continuum
\newcommand{\pred}[1]{\operatorname{pred}(#1)}
\newcommand{\rank}[1]{\operatorname{rank}(#1)}

%%%%%%%%%%%%%  Functions

\newcommand{\dom}[1]{\operatorname{dom}(#1)} % domain
\newcommand{\ran}[1]{\operatorname{rng}(#1)} % range
\newcommand{\fld}[1]{\operatorname{f{}ld}(#1)} % field
\newcommand{\injection}{\rightarrowtail}
\newcommand{\surjection}{\twoheadrightarrow}
%\newcommand{\bijection}{\rightarrowtail\mkern-17mu\shortrightarrow}
\newcommand{\bijection}{\rightarrowtail\mkern-18mu\twoheadrightarrow}
\newcommand{\supp}[1]{\operatorname{supp}(#1)} % support

%%%%%%%%%%%%%

\newcommand{\included}{\subseteq}      % [the name suggests the meaning here]
\newcommand{\nincluded}{\not\subseteq} % not included
\newcommand{\pincluded}{\subset}       % proper inclusion    
\newcommand{\includes}{\supseteq}

%%%%%%%%%%%%%%%

\newcommand{\axioms}[1]{\mathrm{#1}}   % set-theoretic axiom or set of axioms
\newcommand{\zf}{\axioms{ZF}}          % Zermelo-Frankel axioms
%\newcommand{\ac}{\axioms{AC}}	       % Axiom of Choice
\newcommand{\zfc}{\axioms{ZFC}}        % ZF + AC
%\newcommand{\ch}{\axioms{CH}}          % Continuum Hypothesis
%\newcommand{\pa}{\axioms{PA}}          % first-order Peano arithmetic

%%%%%%%%%%%%%%%%

% Standard structures

\newcommand{\vnn}{\upomega}       % von Neumann natural numbers

\newcommand{\stnd}[1]{\mathbb{#1}}
\newcommand{\N}{\stnd{N}}         % natural numbers
\newcommand{\scr}[1]{#1^{+}}           % successor
\newcommand{\Zp}{\Z_{+}}          % positive integers
\newcommand{\Z}{\stnd{Z}}         % integers
\newcommand{\Q}{\stnd{Q}}         % rationals
\newcommand{\R}{\stnd{R}}         % reals
\newcommand{\C}{\stnd{C}}         % complex numbers


\begin{comment}
  \usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{[\ifcase\month \or January\or February\or March\or
    April\or May\or June\or July\or August\or September\or October\or
    November\or December\fi \space
 \number\day,}
\fancyhead[LO]{\number\year]}
\fancyhead[CO]{\rightmark}
\fancyhead[CE]{\leftmark}
\fancyfoot[C]{}
\end{comment}

\usepackage{layout}

\begin{document}
%\frontmatter

%  \begin{titlepage}

%  \end{titlepage}
    
\maketitle

\tableofcontents

%\setcounter{chapter}{-1}
\chapter*{Preface}
\addcontentsline{toc}{chapter}{Preface}
\markboth{\it PREFACE}{\it PREFACE}
%\input{preface}
These notes are for use in a course called Set Theory, given in the
Mathematics Department of Middle East Technical University, Ankara,
under the designation Math~320.  The catalogue-description of the
course is:
\begin{quote}
Language and axioms of set theory. Ordered pairs, relations and
functions. Order relation[s] and well ordered sets. Ordinal numbers,
transfinite induction, arithmetic of ordinal numbers. Cardinality and
arithmatic of cardinal numbers. Axiom of choice, generalized continuum
hypothesis. 
\end{quote}
These notes cover these topics, and more.

I wrote a first version of these notes in 2001, for Fundamentals of
Mathematics (Math 111); but a good part of the notes went beyond what
that course had time for.  I revised the notes for use in Math~320 as
taught by Ay\c se Berkman in
the spring semester of the 2004/5 academic year.  Now I have
completely rewritten the notes from the 2005 edition (specifically,
from Ay\c se's copy of that edition, with her handwritten comments).
Since many things have changed, these notes must still be considered
as a rough draft.  

In writing the present edition of these notes, I have placed more
emphasis than in previous editions on the following picture of set-theory:
\begin{enumerate}
\item
There are things called \tech{sets,}\tindex{set} with certain
properties.  Sets compose a so-called \tech{universal
  class}\tindex{universal class} (denoted by $\universe$ in these notes
and elsewhere).
\item
There is a logical language for talking about sets; the one
non-logical symbol of this language is $\in$, to express
\itech{membership} of one set in another.
(\tech{Equality}\tindex{equality} of sets can be 
\emph{defined} in terms of membership.)
\item
In the language of sets, a formula $\phi$ with one free variable defines 
a \tech{sub\-{}-class}\tindex{sub-class}---namely, $\cls
x{\phi(x)}$---of the universal class.  
\item
Sets are also classes.  Most of things
that one does with sets in mathematics---like taking unions or
intersections or power-sets---can be done with classes.
\item
There is no reason to assume that all classes are sets.  Indeed, there
is a class of all sets that are not members of themselves, namely
$\cls x{x\notin x}$, but it is not a set.  Thus, the so-called
Russell Paradox is simply a basic theorem of set-theory (see
\parref{thm:R} below).
\end{enumerate}
This picture of set-theory can be seen in Levy~\cite{MR1924429}; I
have found his
book a useful reference, though it is dense with detail.  Levy is also
a good source for historical
references.  
Other useful books (at different levels) have been
Suppes~\cite{MR0349389}, Kunen~\cite{MR85e:03003}, and
Moschovakis~\cite{MR95a:04001}; also Shoenfield \cite{MR0225631} for
Ch.~\ref{ch:models}.  
I have used Fraenkel \emph{et al.}~\cite{MR0345816} for a review
of the development of the individual axioms that generate what is
called Zermelo--Fraenkel set-theory.  Those axioms are listed on
p.~\pageref{axiomlist} below.  In that list, a weaker form of the
Union Axiom is
included, along with the usual form.  In the text, I try to introduce
axioms only when they are
needed for something interesting; the full Union Axiom is not
needed for a long while; meanwhile, a weaker version suffices.
(Possibly I have overlooked some earlier implicit use of Union or other
axioms; I remind the reader of my comment that these notes are still a
rough draft.)  

Unlike most set-theory textbooks, I aim (in Ch.~\ref{ch:logic}) to
give a precise formal account of
the logic behind set-theory.  It may be pointed out that the
Zermelo--Fraenkel axioms were worked out \emph{before} the formality
of the logic was worked out.
So, the reader is perhaps not required to
know the formal logic.  But it seems useful to me to know that classes
can be given a precise definition.

I try to work with the idea that most of the Zermelo--Fraenkel axioms
amount to assertions that certain classes are sets.  I have not seen
the Infinity Axiom treated explicitly in this way, except in these
notes.  Here I take some trouble (in Ch.~\ref{ch:size-order}) to see
how the \emph{class} of
natural numbers can be obtained, \emph{without} the assumption that it
already exists as a set.

These notes are not intended for use in isolation from the classroom.
Points presented here in outline may be elaborated more fully in
lectures.  I take Euclid's \emph{Elements} \cite{MR17:814b} as a
model.  Euclid simply presents propositions and proofs, with no
explanation of \emph{why} one would want to prove these propositions.
Presumably the explanation is left to the living teacher.

Terms being \defn{defined} in these notes are printed in boldface;
technical terms being emphasized, but not properly defined, are
\tech{slanted.}  There is an index of these terms at the back
(pp.~\pageref{index}--\pageref{end}).  Most chapters have exercises at
the end; often the exercises ask the reader to supply the proofs of
propositions (lemmas, theorems) given in the chapter.

The remainder of
this preface is adapted from the 2005 edition of these notes.

\mbox{}\\
\mbox{}\hfill$*$\hfill$*$\hfill$*$\hfill$*$\hfill$*$\hfill\mbox{}\\

Any text on axiomatic set-theory will introduce the set $\vnn$, which
is the
smallest set that contains $\emptyset$ and is closed under the
operation $x\mapsto x\cup\{x\}$.  The text \emph{may} (but need not)
mention that $\vnn$ is a
model of the \itech{Peano axioms} for the natural numbers.  The present notes
differ from some published texts in two ways:
\begin{enumerate}
  \item
I prove (in Ch.~\ref{ch:N}) facts about the natural numbers \emph{from
  the Peano axioms}, not just \emph{in $\vnn$}.
\item
I mention structures that are models of some, but not all, of the
Peano axioms.  (See for example Fig.~\ref{fig:induction}.)
\end{enumerate}
Some set-theory books, such
as Ciesielski \cite[\S~3.1]{MR99c:04001},
will immediately give $\vnn$ as a model of these axioms.
Certain properties of natural numbers are
easier to prove \emph{in this model} than \emph{by the Peano axioms}.
I prefer to follow the axiomatic approach, because it can bring out a
distinction that is often ignored.  If a given set contains all of the
natural numbers, this can sometimes be proved by the technique of
\tech{(ordinary) induction.}\tindex{induction}\tindex{ordinary
  induction}  If the domain of a certain function is 
the set of natural numbers, then the function can sometimes be defined
by the technique of \tech{(ordinary)
  recursion.}\tindex{recursion}\tindex{ordinary recursion}  One
writer---Vaught 
\cite[ch.~2, \S~4]{MR95k:03001}---says that
recursion \emph{is} `the same thing as definition by induction.'
Since it is just about terminology, the statement is not wrong.  But
definition by `induction' or recursion works \emph{only} in models of
the Peano axioms, while there are other structures in which
\emph{proof} by induction works.

There are \tech{strong}\tindex{strong induction}\tindex{strong
  recursion} (also called \tech{trans-finite}\tindex{trans-finite
  induction}\tindex{trans-finite recursion}) versions of 
induction and recursion.  There is
proof by strong induction, and there is definition by strong
recursion. 
Admission of either of \emph{these} is equivalent to admission of the
other; the ordered sets that admit them are precisely the
  \emph{well-ordered} sets.  (See \S~\ref{sect:wo}.)  Some basic
  undergraduate texts suggest confusion on this point. 
For example, in talking about the integers, one book\footnote{Namely,
  Epp \cite[\S~4.4, p.~213]{Epp}, used sometimes in Math 111 and 112
  at METU.}
says:  
\begin{quote}
It is apparent that if the principle of strong mathematical induction
  is true, then so is the principle of ordinary mathematical
  induction\dots 
  It can also be shown that if the principle of ordinary mathematical
  induction is true, then so is the principle of strong mathematical
  induction.  A proof of this fact is sketched in the exercises\dots
\end{quote}
Both statements about induction here are literally false.
The second statement is correct if it is understood to
mean simply that the natural numbers satisfy the principle of strong
induction.  The `proof' that is
offered for the first statement uses implicitly
that every integer is a \tech{successor}\tindex{successor}
(\parref{par:succ}), something that does not 
follow from strong induction.  

By emphasizing the axiomatic development of the natural
numbers, I hope to encourage the reader to watch out for unexamined
assumptions, in these notes and elsewhere.  The Hajnal text
\cite{MR2000m:03001} defines
$\vnn$ on the first page of \S~1 as `the set of nonnegative
integers'.  Then come a hundred pages of the set-theory covered in
the present notes, and more.  The Preface says that this work `is
carried out on a quite precise, but intuitive level'; only after
\emph{this} does the reader get, in an appendix, on p.~127, a
rigorous definition of~$\vnn$.  To my mind, 
the precise but intuitive way to treat the natural numbers is by means
of the Peano axioms.  Perhaps the reader of Hajnal is supposed to have
seen such a treatment before, since, according to the index, the term
`Peano' appears only once, on p.~133, and there is no definition.

Devlin \cite{MR94e:03001} seems never to mention the natural numbers
as such at all, though early on (p.~6), he asserts the existence of sets
$\{a_1,\dots,a_n\}$.  (Later he defines the symbol $\vnn$, na\"\i
vely on p.~24, rigorously on p.~66.)  Like Hajnal, Moschovakis
\cite{MR95a:04001}
\emph{names} the set of natural numbers on the first page of text; but
then he discusses set-theory for only fifty pages before devoting a
chapter to a rigorous treatment of the natural numbers.

\listoffigures
\addcontentsline{toc}{chapter}{List of Figures}

\listofaxioms
\addcontentsline{toc}{chapter}{List of Axioms}
\label{axiomlist}

%\tableofcontents

%\mainmatter

\chapter{Introduction}

\setcounter{equation}{9} % not needed---no equations

\section{What a set is}

\begin{parag}\label{par:set}
A \idefn{set} is a thing that \idefn{contains} other things.  Those other
  things are called \defn{members}\dindex{member} or
  \defn{elements}\dindex{element} of the set.  The 
  set \idefn{comprises} its 
  members.  But the set cannot be separated 
  from its elements the way a box can be emptied of its contents: the
  members \idefn{compose} the set.
  A set \emph{is} its elements, considered as one thing.  It is a
  multitude that is also a unity.\end{parag}

\begin{parag}\label{par:collective}
A flock of pigeons is a set; a pair
  of socks is a set; a deck of cards is a set; the number of days in a
  week is a set.
Words like \Eng{flock, pair, deck,} and \Eng{number} are (or can be)
\defn{collective nouns.}\dindex{collective noun}  In English, such
  nouns can be used as 
subjects of singular or plural verbs:
\begin{quote}
  \Eng{A flock of pigeons is attacking that crust of bread.}

  \Eng{A flock of pigeons are attacking that crust of bread.}
\end{quote}
The concept of being describable by a collective noun has
shown itself to be a fruitful subject for mathematical study.  In
this study, we use the words \Eng{set} and \Eng{class} as
the most generally applicable collective nouns.  It will turn out that
we must make a distinction: every set is a class (\parref{par:ext}),
but not every class is a set (\parref{thm:R}).
\end{parag}

\begin{parag}\label{par:10}
  A set contains other things (\parref{par:set}).  As it happens, we
  may modify the 
  expression \Eng{other things} in three ways:  We might ignore the
  \Eng{other,} allowing a set to contain \emph{itself.}  Or, a set might
  contain, not other \emph{things,} but just \emph{one} other thing.  Or
  possibly a set contains \emph{nothing} at all.
\end{parag}

\section{Why study sets}

\begin{parag}
  Sets are a foundation for
  mathematics, in that the objects of mathematics can be
  understood as sets.  For example, a function $f$ can be understood
  as the set of \tech{ordered pairs}\tindex{ordered pair} $(a,b)$ such
  that $f(a)=b$; and an 
  ordered pair itself can be understood as a set.  Perhaps $a$ and $b$
  here are \tech{real numbers;}\tindex{real number} these can be understood as certain
  sets of \tech{rational numbers;}\tindex{rational number} rational
  numbers can be understood 
  as certain sets of \tech{integers;}\tindex{integer} integers can be
  understood as certain sets of \tech{natural numbers;}\tindex{natural
  number} these are sets that are built up from the one set that
  contains---nothing. 
\end{parag}

\begin{parag}
  Sets are a foundation for logic, the science of reasoning.  For
example, there is a correspondence between the \tech{union,}\tindex{union}
$a\cup b$, of two sets $a$ and $b$ and the
\tech{disjunction,}\tindex{disjunction} $P\lor Q$, of two propositions
$P$ and $Q$. 
\end{parag}

\begin{parag}\label{par:axiomatic}
Set\-{}-theory is an example of an \defn{axiomatic
  system.}\dindex{axiomatic system}  In such a
system, one \defn{postulates}\dindex{postulate} certain truths, called
  \defn{axioms,}\dindex{axiom} 
which are held to be self\-{}-evident; 
from the axioms, by means of logic, one derives other truths, which
are not so evident.  Thus, set\-{}-theory is a modern example of a
method as old
as Euclid~\cite{MR17:814b} for organizing and developing a body of
mathematical work. 
\end{parag}

\section{Cardinals and ordinals}\label{sect:co}

\begin{parag}
Set\-{}-theory is the origin of some amazing results, as for example
concerning the numbers we start using early in life.  As young
children, we learn to chant a sequence of numbers: \Eng{one, two,
  three} in English; \Tur{bir, iki, \"u\c c} in Turkish.  We
learn to use these numbers as 
\tech{cardinal numbers,}\tindex{cardinal number} to indicate the
\emph{sizes} of sets.  Later 
we learn that \Eng{zero}/\Tur{s\i f\i r} is also a size.
\end{parag}

\begin{parag}
But the sequence of numbers also has an \emph{order,} like the order
of letters in the alphabet.  So we can use numbers as
\tech{ordinal numbers,}\tindex{ordinal number} to indicate
\emph{position} of elements
\emph{within} a set.  We also learn special words for ordinal numbers:
\Eng{first, second, third} in English; \Tur{birinci, ikinci,
  \"u\c c\"unc\"u} in Turkish.
\end{parag}

\begin{parag}
So numbers have two uses, as cardinals and as ordinals; these uses are
completely different; and yet the \emph{same} underlying numbers are
used in each case.  For example, if a book starts on page 1 and ends
on page~\pageref{back}, 
then we know two things:  the book has~\pageref{back} pages,
and the last page of the book is 
the~\pageref{back}%
\whiledo{\value{mynum}<\pageref{end}}{\stepcounter{mynum}}%
\setcounter{modnum}{\value{mynum}-\value{mynum}/10*10}%
  \ifthenelse{\value{modnum}=1}{st}{%
   \ifthenelse{\value{modnum}=2}{nd}{%
    \ifthenelse{\value{modnum}=3}{rd}{th}}} page of the book.
\end{parag}

\begin{parag}
  I once boarded an airplane and found my seat.  Through my window, I
  could see that a valuable cargo was being loaded: perhaps it was
  banknotes.  The cargo was in small cardboard boxes.  Armed guards were
  standing by.  The boxes were
  placed one by one on a moving ramp that carried them into the hold
  of the airplane.  As the boxes ascended the ramp, a man wrote
  numerals on them: 1, 2, 3, and so on.  He was counting the
  boxes: he was making sure that none was missing.  
\end{parag}

\begin{parag}
  I did not see how the boxes were unloaded at the end of the flight.
  They may have been sent down the ramp from the hold so
  that the box labelled 1 came first, the box labelled 2 came second,
  and so forth.  But this procedure may have been difficult for the
  cargo handlers to accomplish; in any case, it would have been
  unnecessary. 
  No matter the order with which the boxes came off the plane,
  they could have been counted by the same procedure used when they
  were loaded.  If no box was missing, then the same number of boxes
  would have been found.
\end{parag}

\begin{parag}
When we count a set, then the order of the elements in
the set does not matter.  Take the sixteen pawns from a chess\-{}-set and
put them in a bag.  Draw them out one by one, each time uttering the
next number on the standard list.  When you draw the last pawn, you
will reach~16 on the list.  Put the pawns back in the bag, shake the
bag, and repeat; you will still reach~16.  This is a fact so basic that
we do not need to learn it in school.
However, set\-{}-theory opens up a world in which our usual method of
counting \emph{fails.}  This is the world of \emph{infinite} sets.
\end{parag}

\begin{parag}\label{par:omega}
  What is a number?  In set\-{}-theory, we identify certain sets that we
  call $0$, $1$, $2$, $3$, and so forth.  These sets are (by our
  definition) the 
  \tech{natural numbers.}\tindex{natural number}  Each natural number
  $n$ has a
  \tech{successor,}\tindex{successor} which can be called $n+1$.  We
  \emph{assume} that 
  all of the natural numbers compose a set, called $\vnn$.  (This
  letter is not~\lett w, the so-called double \lett u; it is the
  Greek minuscule \emph{omega,} the last
  letter of the alphabet.\footnote{Omega is a \emph{large} or
  \emph{long} (mega)
  \lett o, to be contrasted with the small or short (micro) \lett o,
  omicron.  One might even call omega a double \lett o, and indeed its 
  written minuscule form seems to come from \lett{oo.}})  We treat
  $\vnn$ as a new number.  Then we can form the new numbers $\vnn+1$,
  $\vnn+2$, and so forth.  Beyond all of these new numbers, there
  is $\vnn+\vnn$ or $\vnn\cdot2$, then $\vnn\cdot2+1$, and so forth;
  then $\vnn\cdot3$ and so forth; then $\vnn\cdot\vnn$ or $\vnn^2$,
  \&c., then $\vnn^{\vnn}$, $\vnn^{\vnn^{\vnn}}$, and so
  on.  All of these new numbers are examples of \tech{trans\-{}-finite ordinal
  numbers.}\tindex{trans-finite}\tindex{ordinal number}  
We may be able to use these trans\-{}-finite ordinals to count a set.
  Perhaps we can assign \emph{each} natural number to some different
  element of the set, only to find that some elements of the set are
  left over.  So we assign $\vnn$ itself to one of these, and
  $\vnn+1$ to another, and so forth.  Perhaps, in this way, all of
  the ordinals that come before $\vnn^3\cdot 7+\vnn^2\cdot
  4+\vnn\cdot 5$ are assigned to elements, but there is no element
  left to which we can assign
 $\vnn^3\cdot 7+\vnn^2\cdot 4+\vnn\cdot
  5$ itself.  Then how many elements has the set?  It will turn out
  that the set has the same number of elements that $\vnn$ has:  We
  can rearrange our numbering of the set so that \emph{each} 
  element is assigned a natural number.
\end{parag}

\begin{parag}
There \emph{are} sets larger than $\vnn$; these too can be `counted'
  with ordinals, but with ambiguity as before.
  The size of $\vnn$ is given the name $\aleph_0$; this is the first
  \tech{trans\-{}-finite cardinal
  number.}\tindex{trans-finite}\tindex{cardinal number}  (The letter
  $\aleph$ is \emph{aleph,} the first letter of the Hebrew alphabet.)
  There is a next larger cardinal number, $\aleph_1$; then we have
  $\aleph_2$, $\aleph_3$, \dots, $\aleph_{\vnn}$,
  $\aleph_{\vnn+1}$, \dots, $\aleph_{\vnn\cdot2}$, and so on.  Thus the
  trans\-{}-finite cardinal numbers are \itech{indexed} by the ordinal
  numbers.  But the size of an infinite set is not obtained or defined
  directly by a process of counting.
\end{parag}

\section{Sets as numbers}

\begin{parag}
  I suggested in \parref{par:collective} that \emph{number} can be a
collective noun.  It is not always so.  If I ask you, 
\begin{quote}
\Eng{Pick a number between one and ten,}
\end{quote}
you will probably not think of a set or a number \emph{of things;} you
will just pick one abstract thing, called \emph{five} perhaps, or
\emph{eight.}  But if we observe, 
\begin{quote}
\Eng{A number of people are gathering in the street,} 
\end{quote}
then the
emphasis is on the \emph{people} as much as on how many there are.
In this latter sentence, the sense of
\Eng{number} would seem to be that of the Greek \Gk{>arijm'oc.}
(See Table~\vref{table:Greek} 
for the Greek alphabet.)  The
word \Gk{>arijm'oc} is the origin of the word
\Eng{arithmetic,} and it is commonly translated as \Eng{number;} but
note how Euclid of Alexandria defines it \cite[Book VII,
  Definitions]{MR17:814b}: 
\begin{quote}
  \begin{enumerate}
\item
\Gk{{Mon'ac} >estin, kaj" <`hn <'ekaston t~wn >'ontwn <`en l'egetai.}\\
A \idefn{unit} is that by virtue of which each thing
is called \emph{one} (\Gk{<'en}).
    \item
  \Gk{>Arijm`oc d`e t`o >ek mon'adwn sugke'imenon pl~hjoc.} \\
A \idefn{number} is a multitude (\Gk{pl~hjoc}) composed of units.
  \end{enumerate}
\end{quote}
This account of \Eng{number} bears some resemblance to the account of
\Eng{set} in
\parref{par:set}.  However, Euclid does not allow the exceptional cases
discussed in \parref{par:10}; in particular, for Euclid, \emph{one} is
not a number.\footnote{This can be inferred from some other
  definitions in Book VII of the \emph{Elements:} `A \idefn{prime
    number} is that which is measured by a unit alone.  A
  \idefn{composite number} is that which is measured by some other
  number.'}
\end{parag}

\begin{parag}
If we take \Eng{number} seriously as a collective
noun roughly equivalent to \Eng{set,} then a certain passage by Plato
of Athens becomes
an argument in favor of studying sets.
Numbers and sets are worth studying, because they somehow combine
opposites like \emph{many} and \emph{one,} \emph{multiplicity} and
\emph{unity.} 
The Platonic passage is from the work commonly called the
  \emph{Republic.} 
  The \emph{Republic} is written as if by Plato's teacher Socrates; in it,
  Socrates recounts a long 
  conversation in which he describes an ideal city, as an analogy for
  the ideal person.  Certain citizens
  of the ideal city will be \emph{guardians;} Socrates describes their
  education. 
The following translation from Book VII (524d--525b) is mine, but
depends on the translations of Shorey \cite{Shorey} and Waterfield
\cite{Waterfield}.  I have inserted some of the original Greek words,
especially\footnote{I have also included certain derivatives of the
  present participle \Gk{>'ont-} corresponding to the English
  \Eng{being} and the Turkish \Tur{olan} or \Tur{olur.}  Addition of
  the abstract\-{}-noun suffix \Gk{-'ia} to the feminine form of
  \Gk{>'ont-} yields
  \Gk{o>us'ia}; the corresponding Turkish might be \Tur{olurluk.}  The
  Greek \Gk{o>us'ia} is sometimes translated as \Eng{substance}, and
  indeed both words can connote wealth.
  Putting the definite article in front of the nominative neuter form
  of \Gk{>'ont-} creates \Gk{t`o >'on.}}
those that are origins of English words.
\begin{quotation}
%\raggedright
`So this is what I %[Socrates] 
was just trying to explain:  Some things
  are \emph{thought\-{}-provoking} (\Gk{paraklhtik`a t~hc diano'iac}), and
  some are not.  Those things are called
  \idefn{thought\-{}-provoking} that strike our sense together with their
  opposites.  Those that do not, do not
tend to awaken reflection.'

`Ah, now I understand' he [Glaucon] said.  `It seems that way to me,
too.'

`Okay then. Which of these do \emph{multiplicity}
  (\Gk{>arijm'oc}) and \emph{unity} (\Gk{t`o <'en}) seem to be?' 

`I can't imagine' he said. 

`Well,' I said `reason it out from
what we said.  If unity is fully grasped alone, in itself,  by sight
or some other sense, then it must be [an object] like a finger, as we
were explaining: it does not draw us towards \emph{being\-{}-ness}
(\Gk{o>us'ia}).  But if some discrepancy is always seen with it, so as
to appear not rather \emph{one} (\Gk{<'en}) than its opposite, then a
decision is needed---indeed, the \emph{soul} (\Gk{yuq'h}) in itself is
compelled to be puzzled, and to cast about, arousing thought within
itself, and to ask:
What then is unity as such?  And so the \emph{study}
  (\Gk{m'ajhsic}) of unity must be among those that lead and guide
  [the soul] to the sight of \emph{that which is} (\Gk{t`o >'on}).'

 `But certainly' he
  said `vision is especially like that.  For, the same thing is seen
  as one and as \emph{indefinite multitude}
  (\Gk{>'apeira t`o pl~hjoc}).'

`If it is so with unity,' I said `is it not so with every  \emph{number}
  (\Gk{>arijm'oc})?'

`How could it not be?'

`But \emph{calculation}
  (\Gk{logistik'h}) and \emph{number\-{}-theory} (\Gk{>arijmhtik'h}) are
entirely about number.'

`Absolutely.'

`And these things appear to lead to truth.'

`Yes, and extremely well.'

`So it seems that these must be some of the \emph{studies}
  (\Gk{majhm'ata}) that
  we are looking for.  Indeed, the \emph{military} (\Gk{polemik'on}) needs to
  learn them for deployment [of troops],---and the philosopher,
  because he has to rise out of [the world of] \emph{becoming}
  (\Gk{g'enesic}) in order to take hold of being\-{}-ness, or else he will
  never \emph{become a calculator} (\Gk{logistik\~w| gen'esjai}).'

`Just so' he said.

`And our guardian happens to be both military man and philosopher.' 

`Of course.'

`So, Glaucon, it is appropriate to require this study by law and to
  persuade those who intend to take part in the greatest affairs of
  the city to go into calculation and to engage in it not \emph{as a pastime}
  (\Gk{>idiwtik\~wc}), but until they have attained, by thought
  itself, the vision of the nature of numbers, not [for the sake of]
  buying and selling, as if they were preparing to be merchants or
  shopkeepers, but for the sake of war\footnote{One can hardly be sure
that Socrates is not pulling Glaucon's leg.  Socrates previously
(369b--372c) described a primitive, peaceful,
vegetarian city, which Glaucon rejected (372c--d) as
being fit only for pigs.} and an easy turning of the soul
  itself from becoming towards truth and being\-{}-ness.'

`You speak superbly' he said.
\end{quotation}
\end{parag}


\begin{table}[h]
\caption{The Greek alphabet}\label{table:Greek}
  \begin{center}
      \begin{tabular}{| c  l | c  l | c l | c l |} \hline
\Gk{A a} & \textbf alpha  & \Gk{H h} & \textbf{\=e}ta   & \Gk{N n} & \textbf nu
& \Gk{T t} & \textbf tau \\ 
\Gk{B b} & \textbf beta   & \Gk{J j} & \textbf{th}eta & \Gk{X x} & \textbf xi
& \Gk{U u} & \textbf upsilon \\ 
\Gk{G g} & \textbf gamma  & \Gk{I i} & \textbf iota  & \Gk{O o} & \textbf
omicron& \Gk{F f} & \textbf{ph}i\\ 
\Gk{D d} & \textbf delta  & \Gk{K k} & \textbf kappa & \Gk{P p} & \textbf pi
& \Gk{Q q} & \textbf{ch}i\\ 
\Gk{E e} & \textbf epsilon& \Gk{L l} & \textbf lambda& \Gk{R r} & \textbf{r}ho
& \Gk{Y y} & \textbf {ps}i\\ 
\Gk{Z z} & \textbf zeta   & \Gk{M m} & \textbf mu    & \Gk{S sv/s} & \textbf
sigma  & \Gk{W w} & \textbf{\=o}mega\\ \hline 
  \end{tabular}
  \end{center}
Each Greek letter has a name, written here in Latin letters; the first
letter or two of the Latin name provides a transliteration for the
Greek letter.  The Greek vowels are \Gk{a, e, h, i, o, u, w.}  In
texts, an initial vowel takes a rough\-{}-breathing mark (as in \Gk{<a}) or a
smooth\-{}-breathing mark (\Gk{>a}); the former mark corresponds to a preceding
\lett h; the latter can be ignored.  Likewise, \Gk{<r} is
transliterated as \lett{rh.}  Some vowels may be given tonal accents
(\Gk{'a, ~a, `a}).  A terminal \Gk{w} may have an iota subscript
(\Gk{w|}).  Of the two forms of minuscule sigma, the \Gk{c} appears at
the ends of words; elsewhere, \Gk{sv} appears.
\end{table}

\chapter{Logic}\label{ch:logic}

\setcounter{equation}{9}

\section{Propositional logic}

\begin{parag}\label{par:prop}
  In all formality, set\-{}-theory is a \itech{theory} in a
  \tech{first\-{}-order logic.}\tindex{first-order logic}  Such a
  logic is based on a 
  \defn{propositional logic,}\dindex{propositional logic} which consists of:
  \begin{enumerate}
    \item
an \emph{indefinite} number of
\defn{(propositional) variables:}\dindex{propositional variable} $P$,
$Q$, $R$, \dots (see 
\parref{par:indefinite}); 
\item
a \defn{signature,}\dindex{signature} which is a definite number of
\defn{(propositional) connectives;}\dindex{propositional
  connective}\dindex{connective} 
\item
brackets: $($ and $)$.
  \end{enumerate}
From the variables, connectives, and brackets,
\tech{formulas} are 
built up \tech{recursively.}\tech{recursively}  Our official signature
for propositional 
logic will comprise two connectives, $\lnot$ and $\lto$.
In our logic then, \defn{(propositional)
  formulas}\dindex{propositional formula}\dindex{formula} are given by the
following definition:
\begin{enumerate}
  \item\label{item:P}
Every propositional variable is a propositional formula;
\item\label{item:not}
if $F$ is a propositional formula, then so is $\lnot F$: this is the
\idefn{negation} of~$F$;
\item\label{item:to}
If $F$ and $G$ are propositional formulas, then so is $(F\lto G)$: this
is the \idefn{implication} of $G$ by\footnote{One might read the
  formula also as the implication of $G$ \emph{in} $F$.  One normally
  refers to a
  formula $(F\lto G)$ merely as an \emph{implication,} without
  specifying how the sub\-{}-formulas $F$ and $G$ are involved in the
  implication.  But we may read the formula as `$F$ implies $G$.'  The
verb \Eng{imply} is from the Latin for \Eng{fold in;} so the formula
$(F\lto G)$ suggests that $G$ is `folded into' $F$, so that, when one
`has' $F$, then one also has $G$.} $F$.
\end{enumerate}
The definition is formulas is called
\defn{recursive,}\dindex{recursive} because 
Parts~\eqref{item:not} and~\eqref{item:to} show how to obtain formulas
\emph{from other formulas.}  We can \emph{use} these parts of the
definition, because Part~\eqref{item:P} gives us some formulas to
start with.  The process of constructing a formula can be shown in a
\itech{tree} (Figure~\ref{fig:tree}).
\begin{figure}
\begin{center}
\pstree[levelsep=30pt]
{\Treebox{$((P\lto Q)\lto(\lnot Q\lto\lnot P))$}}
         {\pstree{\Treebox{$(P\lto Q)$}}
                 {\Treebox{$P$}\Treebox{$Q$}}
          \pstree{\Treebox{$(\lnot Q\lto\lnot P)$}}
                 {\pstree{\Treebox{$\lnot Q$}}
                         {\Treebox{$Q$}}
                  \pstree{\Treebox{$\lnot P$}}{\Treebox{$P$}}}
         }
\end{center}
\caption{Analysis of a propositional formula}\label{fig:tree}
\end{figure}
Each \itech{node} of the tree is a formula, coming from a formula or
formulas below it by~\eqref{item:not} or~\eqref{item:to} in the
definition; if nothing is below the node, then it is obtained
from~\eqref{item:P}. 
\end{parag}

\begin{parag}
In writing formulas, we may follow the convention whereby:
\begin{enumerate}
  \item
outer parentheses may be removed;
\item
$(F\lto G\lto H)$ means $(F\lto (G\lto H))$.
\end{enumerate}
So, for example, the official formula $((P\lto Q)\lto(\lnot Q\lto\lnot
P))$ can be abbreviated as $(P\lto Q)\lto\lnot Q\lto\lnot P$. 
\end{parag}

\begin{parag}\label{par:prop-rules}
  To each variable in a propositional formula, we may assign one of
  the two \defn{truth\-{}-values,}\dindex{truth-value} namely
  \idefn{true} and \defn{false.}\dindex{false} 
  Then the whole formula becomes true or false under this
  \idefn{truth\-{}-assignment,} according to the following rules:
  \begin{enumerate}
    \item
If a formula is a variable, then it takes the truth\-{}-value assigned
to that variable. 
\item
The formula $\lnot F$ is false just in case $F$ is true.
\item
The formula $F\lto G$ is false just in case $F$ is true and $G$ is
false. 
  \end{enumerate}
These rules can be expressed by
\defn{truth\-{}-tables;}\dindex{truth-table} here, $0$ means
false, and $1$ means true\footnote{Some writers, as
  Stoll~\cite[Ch.~4, Exercise 3.7]{MR83e:04002}, use $0$ and $1$ in
  the opposite sense.}; the value of a formula is written under its
connective:
\begin{align*}
&  \begin{array}{cc}
\lnot & F\\\hline
1&0\\
0&1
\end{array}
&
\begin{array}{ccc}
  F&\lto&G\\\hline
0&1&0\\
1&0&0\\
0&1&1\\
1&1&1
\end{array}
\end{align*}
  The truth\-{}-table of a complex formula is filled out in stages, as in
  Table~\ref{table:truth}.  The formula in that table is a
  \defn{tautology:}\dindex{tautology} it is true under every
  truth\-{}-assignment. 

  \begin{table}[t]
      \begin{equation*}
    \begin{array}{ccccccccc}
P&\lto&\lnot&Q&\lto&\lnot&(P&\lto&Q)\\\hline
0&   &      &0&   &     & 0&   &0\\      
1&   &      &0&   &     & 1&   &0\\      
0&   &      &1&   &     & 0&   &1\\      
1&   &      &1&   &     & 1&   &1\\\hline
0&   &     1&0&   &     & 0&  1&0\\      
1&   &     1&0&   &     & 1&  0&0\\      
0&   &     0&1&   &     & 0&  1&1\\      
1&   &     0&1&   &     & 1&  1&1\\\hline 
0&   &     1&0&   &    0& 0&  1&0\\      
1&   &     1&0&   &    1& 1&  0&0\\      
0&   &     0&1&   &    0& 0&  1&1\\      
1&   &     0&1&   &    1& 1&  1&1\\\hline
0&   &     1&0&  0&    0& 0&  1&0\\      
1&   &     1&0&  1&    1& 1&  0&0\\      
0&   &     0&1&  1&    0& 0&  1&1\\      
1&   &     0&1&  1&    1& 1&  1&1\\\hline
0&  1&     1&0&  0&    0& 0&  1&0\\      
1&  1&     1&0&  1&    1& 1&  0&0\\      
0&  1&     0&1&  1&    0& 0&  1&1\\      
1&  1&     0&1&  1&    1& 1&  1&1      
    \end{array}
  \end{equation*}
\caption{The filling-out of a truth-table}\label{table:truth}
  \end{table}
\end{parag}

\begin{parag}\label{par:prop-more}
  Two propositional formulas $F$ and $G$ are \idefn{equivalent} if,
  under every truth\-{}-assignment, $F$ and $G$ take the same truth\-{}-value;
  in this case, we may write
  \begin{equation*}
    F\sim G.
  \end{equation*}
  We could show that
  our signature is \idefn{adequate} in the sense that every formula in
  every signature is equivalent to a formula in our signature.
  Nonetheless, we may like to use formulas from a larger signature, as
  abbreviations for formulas of our official signature.  In
  particular:
  \begin{align*}
    (F\lor G)&\sim(\lnot F\lto G);\\
    (F\land G)&\sim\lnot(\lnot F\lor \lnot G);\\
(F\iff G)&\sim(F\lto G)\land(G\lto F).
  \end{align*}
Then two formulas $F$ and $G$ are equivalent if 
and only if the formula $F\iff G$ is a tautology.
In writing, we may follow the convention whereby $\land$ and $\lor$ are
applied before $\lto$ and $\iff$, so that, for example, $F\lto G\land
G\lto F$ stands
for $F\lto(G\land G)\lto F$ (which stands for $F\lto((G\land G)\lto F)$).
\end{parag}

\begin{parag}\label{par:indefinite}
  I say in \parref{par:prop} that we have an \emph{indefinite} number
  of propositional variables.  Normally we would say that our
  variables compose an infinite set, which we might write as
  $\{P_0,P_1,P_2,\dots\}$ or $\{P_n:n\in\vnn\}$
  (\parref{par:omega}).  However, we do not
  \emph{have} $\vnn$ officially yet.  Nor do we have a good way to
  explain what comes after $2$ in the sequence $0$, $1$, $2$, \dots In any
  case, we never need
  infinitely many variables at once.  We could give a formal recursive
  definition of an infinite set of variables: we might say that $P$ is
  a variable, and if $Q$ is a variable, then so is $Q'$.  Then our
  variables are $P$, $P'$, $P''$, $P'''$, and so on.  The point is
  that we can always obtain as many variables as we need.  Similar
  considerations will apply in \parref{par:1}.
\end{parag}

\begin{parag}
  When we say for example that $F$ is a propositional formula (as in
  \parref{par:prop}), we do not mean that the \emph{letter} $F$ is
  itself a formula.  The letter itself merely \emph{stands for} a
  formula; the letter is thus a kind of variable.  It is not a
  variable of our propositional logic; it is a variable of our
  ordinary language, which we are using to talk \emph{about} the
  logic.  If one wants to give it a name, such a variable can be
  called a \idefn{syntactical variable} \cite[\S08]{MR18:631a}.  Then
  $Q$ in \parref{par:indefinite} is also a syntactical variable.  I
  shall not worry further about identifying syntactical variables as
  such. 
\end{parag}

\section{First-order logic}\label{sect:1}

\begin{parag}\label{par:1}
Our logic for talking about sets will be a so\-{}-called
  \tech{first\-{}-order} logic.\tindex{first-order logic}  Its symbols
  will be: 
\begin{enumerate}
\item
$\in$,
the sign of \idefn{membership} in a set;\footnote{The $\in$ can be
  understood as a form of \Gk{e} (epsilon), standing for the Latin
  \Lat{elementvm.}}
  \item
\defn{(individual) variables:}\dindex{individual variable}\dindex{variable} $z$, $y$, $x$, \dots;
\item
\defn{(individual) constants:}\dindex{individual constant}\dindex{constant} $a$, $b$, $c$, \dots;
\item
the propositional connectives $\lnot$ and $\lto$;
\item
the \defn{existential quantifier,}\dindex{existential quantifier}\dindex{quantifier} $\exists$;
\item
brackets.
\end{enumerate}
A \idefn{term} in our logic is an individual variable or constant.
In talking about terms, we may symbolize them with letters like $t$
and $s$.
An \idefn{atomic formula} is an expression of the form
\begin{equation*}
  s\in t
\end{equation*}
(where $s$ and $t$ are terms).  
  The \defn{formulas}\dindex{formula} in general are
defined recursively, as in \parref{par:prop}, but with an additional
possibility:
\begin{enumerate}
  \item
Atomic formulas are formulas;
\item
if $\phi$ is a formula, then so is $\lnot\phi$;
\item
if $\phi$ and $\psi$ are formulas, then so is $(\phi\lto\psi)$;
\item
if $\phi$ is a formula, and $x$ is a variable, then $\Exists x\phi$ is
a formula.
\end{enumerate}
We may use additional connectives, as in \parref{par:prop-more}.
\end{parag}

\begin{parag}
  Every formula has \defn{sub-formulas:}\dindex{sub-formula}
\begin{enumerate}
  \item
Every formula is a sub\-{}-formula of itself;
\item
$\phi$ is a sub\-{}-formula of $\lnot\phi$ and of $\Exists x\phi$;
\item
$\phi$ and $\psi$ are sub\-{}-formulas of $(\phi\lto\psi)$;
\item
if $\phi$ is a sub\-{}-formula of $\psi$, and $\psi$ is a sub\-{}-formula of
$\chi$, then $\phi$ is a sub\-{}-formula of $\chi$.
\end{enumerate}
In a formula, some \defn{occurrences}\dindex{occurrence} of a variable
are \defn{free;}\dindex{free occurrence}
the other occurrences are \defn{bound.}\dindex{bound occurrence}  The rules are that every
occurrence of $x$ in $\Exists x\phi$ is bound, and that those
occurrences remain bound when $\Exists x\phi$ is used as a sub\-{}-formula
of another formula.  The \defn{free variables}\dindex{free variable} of a formula are those
that have free occurrences in a formula (even though they might also
have bound occurrences).  So $x$ is a free variable of $(\Exists xx\in
x)\lto x\in y$, although, in this formula, $x$ has three bound
occurrences, but only one free occurrence.
\end{parag}

\begin{parag}
  If $\phi$ is a formula, $x$ is a variable, and $t$ is a term, then
  we let the expression
  \begin{equation*}
    \phi^x_t
  \end{equation*}
denote the result of replacing each \emph{free} occurrence of $x$ in
$\phi$ with $t$.  
For example, if $\phi$ is $x\in y\lto\Exists xx\in y$, then $\phi^x_a$
is $a\in y\lto\Exists xx\in y$.
Suppose no other variable than $x$ is free in
$\phi$.  We may indicate this by writing $\phi$ as
\begin{equation*}
  \phi(x),
\end{equation*}
and we may call $\phi$ a \idefn{singulary} or \idefn{unary}
    formula.\footnote{Following Quine, Church \cite[\S~02, p.~12,
    n.~29]{MR18:631a} suggests 
  \Eng{singulary} as a more etymologically correct word than
  \Eng{unary.}  Indeed, whereas the first five Latin cardinal numbers are
  \Lat{un-}, \Lat{du-}, \Lat{tri-}, \Lat{quattuor}, \Lat{quinque}, the
  first five Latin \emph{distributive} numbers---corresponding to the
  Turkish \Tur{birer}, \Tur{iki\c ser}, \Tur{\"u\c cer},
  \Tur{d\"order}, \Tur{be\c ser} \cite{LatinDili}---are \Lat{singul-},
  \Lat{bin-}, \Lat{tern-}, \Lat{quatern-}, \Lat{quin-.}  The
  latter sequence that gives us \Eng{binary, ternary, quaternary,} and
    \Eng{quinary.}  So 
  \Eng{singulary} appears to be a better word than \Eng{unary.}  In
  fact, \Eng{singulary} does not appear in the original \emph{Oxford English
Dictionary} \cite{OED}.  The word \Eng{unary} \emph{does} appear in
this dictionary, but it is considered
obsolete: only one use of the word, from 1576, was discovered in
English literature.  There, \Eng{unary} meant \emph{unit}, although
the word \Eng{unit} was not actually invented until 1570, when it was
introduced by [John] Dee to correspond to the Greek \Gk{monad-.}}
Also, we can write $\phi^x_t$ as
\begin{equation*}
  \phi(t).
\end{equation*}
\end{parag}

\begin{parag}\label{par:truth}
  A formula with no free variables is a
  \defn{sentence.}\dindex{sentence}  A sentence 
  with no constants is either true or false; a sentence \emph{with}
  constants \emph{becomes} true or
  false when those constants are \idefn{interpreted} as particular
  sets.  The rules are as follows.
  \begin{enumerate}
    \item
If $a$ and $b$ are constants, then the sentence
\begin{equation*}
  a\in b
\end{equation*}
is true whenever $a$ and $b$ are understood to denote sets such that
the set (denoted by) $b$ contains the set (denoted by) $a$.
\item
If $\sigma$ and $\tau$ are sentences, then the truth\-{}-values of
$\lnot\sigma$ and $(\sigma\lto\tau)$ follow from those of $\sigma$ and
$\tau$ according to the rules of propositional logic in
\parref{par:prop-rules}. 
\item\label{item:exists}
Suppose $\Exists x\phi$ is a sentence, and the constant $a$ does not
appear in~$\phi$.  Then $\Exists x\phi$ true just in case the sentence
$\phi(a)$ is true under \emph{some} interpretation of the constant $a$
(as a set).
  \end{enumerate}
The qualification about $a$ in \eqref{item:exists} is needed to guard
against examples like the following.  If $\phi$ is $x\in a$, then
$\phi(a)$ is $a\in a$; this may never be true, depending on the axioms
that we ultimately choose for our set\-{}-theory.  But $\Exists x\phi$
\emph{is} true, unless $a$ has no members (that are sets) at all.  If
$a$ does have a set as a member,
then we can call it $b$, so that $\phi(b)$ is true.
\end{parag}

\begin{parag}
As implied in \parref{par:truth}, in our logic, variables and
constants refer
\emph{only} to sets.  This means that the only elements of sets that
we can talk about are other sets.  Indeed, we shall restrict our
attention to the sets whose \emph{only} members are other sets.
We shall see that this is not a real limitation, mathematically
speaking. 
\end{parag}

\begin{parag}\label{par:forall}
We may write
  \begin{equation*}
    s\notin t
  \end{equation*}
instead of ${}\mathrel{\lnot} s\in t$.
  Also, we may
  write
  \begin{equation*}
    \Forall x\phi
  \end{equation*}
instead of $\lnot\Exists x\lnot\phi$.  If this is a \emph{sentence,}
then it is true just in case $\phi(a)$ is true under \emph{every}
interpretation of $a$ (as a set), assuming that $a$ does not
already appear in $\phi$.  Hence, as an alternative to asserting
$\Forall x\phi$, we may assert $\phi(a)$ simply, when it is understood
that $a$ may be any set.  I shall often follow this convention.
\end{parag}

\begin{parag}\label{par:U}
  A formula $\phi(x)$ in (at most) one free variable $x$ \idefn{defines} a
  \idefn{class} (assuming that any constants in $\phi$ have been
  interpreted).  This class \idefn{comprises} those sets $a$ such that
  $\phi(a)$ is true; such
  sets are \defn{members}\dindex{member} or
  \defn{elements}\dindex{element} of the class; the class can be denoted 
  \begin{equation*}
    \cls x{\phi(x)}
  \end{equation*}
(or $\cls y{\phi(y)}$, \&c.).
Thus a class is something like a set.  However, we are defining
classes \emph{in terms of} sets.  In particular, there is a
\idefn{universal class} of
all sets: that class can be written as
\begin{equation*}
  \set x{x\in x\lto x\in x}, 
\end{equation*}
which we may denote by
\begin{equation*}
  \universe.
\end{equation*}
In our conception, the sets come first; then we recognize that some of
them belong to classes.
It may be that some classes are already members of $\universe$; but we
should not expect \emph{all} classes to have this property.  
\end{parag}

\begin{parag}\label{par:mistake}
We should not expect all classes to be sets.  Yet this mistake was
made at the beginning of the study of sets in the nineteenth century;
rather, no possibility of a distinction between classes and sets was
recognized.  This led to problems, discussed below.  Hence an
\emph{axiomatic} treatment of sets was pursued, as described in
\parref{par:axiomatic}, in an attempt to avoid the problems.  These
notes present set\-{}-theory as a full\-{}-blown axiomatic system; however,
its development as such spans several decades of (almost) living
memory.  Euclid's \emph{Elements} is the classical presentation of an
axiomatic system, but it too is given to us full\-{}-blown; we do not have
any earlier texts to tell us how the idea of erecting a mathematical
theory on axioms was discovered.
\end{parag}

\begin{parag}\label{par:class=}
Two classes are considered \idefn{equal} or the \idefn{same} if they
  have the same
  members, regardless of whether they are defined by the same formula.
In a word, classes are equal when they have the same
  \defn{extension.}\dindex{extension} 
  For example, $\universe$ is also the class $\cls x{x\in
  x\lor x\notin x}$. 
\end{parag}

\section{Proof}

\begin{parag}
  We have \emph{defined} when a sentence is true, in
  \parref{par:truth}; but how do we \emph{establish} that a particular
  sentence is true?  We have noted, in \parref{par:mistake}, that
  perhaps not every class $\cls x{\phi(x)}$ is a set; this class
  {is} a set, if the sentence
  \begin{equation*}
    \Exists x(y\in x\iff\phi(y))
  \end{equation*}
is true; but how can we use the \emph{definition} of truth to tell
whether the sentence is true?  It was suggested in the beginning
(\parref{par:axiomatic}) that we would use an axiomatic system.  Now we
shall be able to say what this means precisely.
\end{parag}

\begin{parag}
  In the most precise, formal sense, an \idefn{axiomatic system} consists of:
  \begin{enumerate}
    \item
  \defn{axioms,}\dindex{axiom} which are just
  certain sentences (in a particular logic);
\item
 \defn{rules of inference,}\dindex{rule of inference} which are formal
  ways of obtaining new sentences from given sentences.  
  \end{enumerate}
The rules of
  inference can be applied recursively to the axioms; all of the
  resulting sentences are \defn{theorems}\dindex{theorem} of the system.  A
  \idefn{proof} or \idefn{deduction} that a particular sentence is a
  theorem is a tree
  like Figure~\ref{fig:tree}, although one may write down the proof
  also in a more conventional linear fashion: see
  \parref{par:deduction} below.
  A useful
  axiomatic system will at least be \defn{sound:}\dindex{sound} that
  is, all of its 
  theorems will be true.  The \emph{ideal} sound axiomatic system will
  also be \defn{complete,}\dindex{complete} in that \emph{every} true
  sentence of the
  relevant logic will be a theorem of the system.
\end{parag}

\begin{parag}
  Some sentences are true for logical reasons.  For example, suppose we
  take a tautology of propositional logic, and replace its variables
  with sentences of our first\-{}-order logic.  The resulting sentence is
  also called a \defn{tautology.}\dindex{tautology}  A tautology in
  this sense is true 
  under every interpretation of its constants; it is 
  true, even if $\in$ is understood to indicate something other than
  membership of one set in another.  That is, a tautology is true
  under an \emph{arbitrary} assignment of truth\-{}-values to the atomic
  sentences.  
\end{parag}

\begin{parag}
  In general, if a sentence is true under every truth\-{}-assignment
  to the atomic sentences, then the sentence is called a
  \defn{validity.}\dindex{validity}  So tautologies
  are validities.  But there are validities that are not tautologies:
  for example, $\Forall x(x\in x\lto x\in x)$, or $\Forall
  x(\phi\lto\psi)\lto\Forall x\phi\lto\Forall x\psi$, where $\phi$ and
  $\psi$ are arbitrary formulas (in at most one free variable, $x$).
\end{parag}

\begin{parag}\label{par:GCT}
  A result known as \idefn{G\"odel's Completeness Theorem} is that the
  validities are precisely the \defn{theorems}\dindex{theorem} of a
  certain axiomatic
  system.  The axioms of this system are of three kinds, as follows;
  here, $\phi$ is a singulary formula, and $\sigma$ is a sentence:
  \begin{enumerate}
    \item
the tautologies;
\item\label{item:axiom2}
$(\phi(a)\lto\sigma)\lto\Exists x\phi(x)\lto\sigma$, where
$a$ does not appear in~$\sigma$;
\item\label{item:axiom3}
$\phi(a)\lto\Exists x\phi(x)$ (where $a$ is allowed to
appear in~$\sigma$).
  \end{enumerate}
The system has one rule of inference, called
\defn{\emph{Modus Ponens}}\index{modus ponens@\emph{Modus
    Ponens}|textbf} in Latin and \idefn{Detachment} in English;
the rule allows to obtain the sentence $\tau$ from the two sentences
$\sigma$ and $(\sigma\lto\tau)$.
Hence the theorems of the system have the following recursive definition:
\begin{enumerate}
  \item
the axioms are theorems;
\item\label{item:MP}
if $\sigma$ and $(\sigma\lto\tau)$ are theorems, then so is $\tau$.
\end{enumerate}
\end{parag}

\begin{parag}\label{par:deduction}
The sentence $\Forall x(x\in x\lto x\in x)$ is really an abbreviation
  for $\lnot\Exists x\lnot(x\in x\lto x\in x)$.
Now let $\phi(x)$ stand for $\lnot(x\in x\lto x\in x)$.
  In the axiomatic system of \parref{par:GCT}, the sentence
  $\lnot\Exists x\phi(x)$ is a
  theorem by the proof given in 
  Figure~\ref{fig:proof}.
  \begin{figure}[h]
    \begin{center}
      \pstree[treemode=U,treesep=10pt,levelsep=40pt]
{\Treebox{$\lnot\Exists x\phi(x)$}}
{\Treebox{$\lnot\phi(a)$}
 \pstree{\Treebox{$\lnot\phi(a)\lto\lnot\Exists x\phi(x)$}}
        {\pstree{\Treebox{$\Exists x\phi(x)\lto\phi(a)$}}
                {\Treebox{$\phi(b)\lto\phi(a)$}
                 \Treebox{$(\phi(b)\lto\phi(a))\lto\Exists
				      x\phi(x)\lto\phi(a)$}}
         \Treebox{$(\Exists
	   x\phi(x)\lto\phi(a))\lto\lnot\phi(a)\lto\lnot\Exists
	   x\phi(x)$}}}
    \end{center}
\caption{A formal proof}\label{fig:proof}
  \end{figure}
Every node
  follows from the nodes \emph{above} it by Detachment; or if there are
  no nodes above, it is an axiom.
  The proof can
  also be written out line by line, as follows:
  \begin{enumerate}
    \item\label{item:i}
$\lnot\phi(a)$ \hfill [tautology]
\item\label{item:ii}
$\phi(b)\lto\phi(a)$ \hfill [tautology]
\item\label{item:iii}
$(\phi(b)\lto\phi(a))\lto\Exists x\phi(x)\lto\phi(a)$
  \hfill [axiom]
\item\label{item:iv}
$\Exists x\phi(x)\lto\phi(a)$ \hfill [detachment,
  lines~\eqref{item:ii} and~\eqref{item:iii}] 
\item\label{item:v}
$(\Exists x\phi(x)\lto\phi(a))\lto\lnot\phi(a)\lto\lnot\Exists
  x\phi(x)$ \hfill [tautology]
\item\label{item:vi}
$\lnot\phi(a)\lto\lnot\Exists x\phi(x)$ \hfill [detachment,
  lines~\eqref{item:iv} and~\eqref{item:v}] 
\item\label{item:vii}
$\lnot\Exists x\phi(x)$ \hfill [detachment, lines~\eqref{item:i}
  and~\eqref{item:vi}] 
  \end{enumerate}
\end{parag}

\begin{parag}
  We are not going to try to prove G\"odel's Completeness Theorem.
  Indeed, the proof would involve some set\-{}-theoretical ideas that we
  have yet to develop.  But the Theorem is an \emph{if-and-only-if:} a
  sentence is a validity if and only if it is a theorem.  The
  \emph{if-}part follows, by an \idefn{inductive} proof, made possible
  by the recursive definition of theorems:  The axioms
  are validities, and if $\sigma$ and $(\sigma\lto\tau)$ are
  validities, then so is $\tau$ by \parref{par:truth}; therefore every
  theorem is a validity. 
\end{parag}

\begin{parag}
  We are looking for more than the validities: we are looking for
  truths \emph{about sets.}  In principle, we can do this by means
  of an axiomatic system enlarging that of \parref{par:GCT}.  Being
  validities, the
  axioms in \parref{par:GCT} can be called \defn{logical
  axioms;}\dindex{logical axiom} now
  we shall introduce new axioms that are not validities, but that
  express what we understand about sets.
  From these axioms, along with the logical axioms and the Rule of
  Detachment, we shall deduce various interesting theorems.  We shall
  not try to write out formal deductions as in \parref{par:deduction};
  but in principle, we could do it.
\end{parag}

\chapter{Foundations of mathematics}

\setcounter{equation}{10}

\section{Equality of sets}

\begin{parag}
  The sign of equality ($=$) is usually included as a logical symbol
  in first\-{}-order logics. Then one has the formulas
  \begin{equation}\label{eqn:=definiendum}
    s=t
  \end{equation}
among the atomic formulas, and the sentences
\begin{gather*}
  \Forall xx=x,\\
\Forall x\Forall y(x=y\lto\phi(x)\lto\phi(y))
\end{gather*}
are taken to be validities, for every singulary atomic formula $\phi$.
In particular, in the logic of sets, one has the sentences
\begin{gather}\label{eqn:=1}
  \Forall x\Forall y(x=y\lto x\in a\lto y\in a),\\\label{eqn:=2}
  \Forall x\Forall y(x=y\lto a\in x\lto a\in y)
\end{gather}
as validities.
\end{parag}

\begin{parag}\label{par:=def}
Alternatively, we can reach~\eqref{eqn:=1} and~\eqref{eqn:=2} by
another route.  First,
we introduce the formula $s=t$ as an \emph{abbreviation} for
\begin{equation}\label{eqn:=definiens}
  \Forall x(s\in x\iff t\in x)
\end{equation}
where $x$ is neither $s$ nor $t$.  So, by \emph{definition,} two sets
are equal if (and only if) they are members of the same sets.
Then~\eqref{eqn:=1} is a consequence of this definition.  Indeed,
if two sets are such that no set contains one of them without
the other, then the two sets would appear to be indistinguishable,
set\-{}-theoretically speaking; so they might as well be counted as the
same.  From this definition,~\eqref{eqn:=1} follows.  But then we must
rule out the possibility that~\eqref{eqn:=2} is violated---that two
sets with different elements are still equal.
This we do with the following---our first axiom of set\-{}-theory.
\end{parag}

\begin{axiom}[Extension]\label{ax:extension} 
\axiomname{Extension: \[a=b\iff a\included b\land b\included a.\]}
  Two sets are equal if and only if they have the same elements:
  \begin{equation}\label{eqn:a=b'}
    a=b\iff\Forall x(x\in a\iff x\in b).
  \end{equation}
\end{axiom}

\begin{parag}\label{par:ext}
So the Extension Axiom is that sets are determined by their elements, as
suggested in 
\parref{par:set}.  Another way to say this is that a set is
determined by its \emph{extension} (\parref{par:class=}).
Equivalently, all sets are classes; in particular, every set $a$ is
equal to the class $\cls x{x\in a}$.
\end{parag}

\begin{parag}\label{par:bold}
We may denote classes by boldface capital letters.\footnote{This
  convention is followed by Kunen~\cite[Ch.~1, \S9]{MR85e:03003}, for
  example, 
though not by Moschovakis~\cite[\textbf{3.19}]{MR95a:04001}; Levy
  \cite[I.4.1]{MR1924429} uses plainface capital letters for classes.}  (We
started doing
this in \parref{par:U} with the universal class, $\universe$.  The
  handwritten version of a
boldface letter is the letter with a wavy line underneath; so $\universe$
can be written by hand as
$\utilde{\mathsf{V}}$.)  If we
let $\cC$ denote a class $\cls x{\phi(x)}$, then, in any formula, we may use
  the expression
\begin{equation}\label{eqn:t-in-C}
  t\in\cC
\end{equation}
instead of $\phi(t)$.  Then we can use the sentence
\begin{equation}\label{eqn:C=D}
  \cC=\cD
\end{equation}
to stand for the sentence
$\Forall x(x\in\cC\iff x\in \cD)$.  For
${}\mathrel{\lnot}\cC=\cD$, we can write
\begin{equation*}
  \cC\neq\cD.
\end{equation*}
\end{parag}

\begin{parag}
  A class $\cC$ is a \idefn{sub\-{}-class} of a class $\cD$ if
  $\cD$ contains all members of $\cC$.  In that case, we may
  say also that $\cD$ \idefn{includes} $\cC$, or that $\cC$ is
  \idefn{included in} $\cD$; also, we write 
  \begin{equation*}
    \cC\included\cD;
  \end{equation*}
so this is an abbreviation for $\Forall x(x\in\cC\lto x\in\cD)$.
Instead of ${}\mathrel{\lnot}\cC\included\cD$, we may write 
\begin{equation*}
  \cC\not\included\cD.
\end{equation*}
The class $\cC$ is a \idefn{proper sub\-{}-class} of $\cD$ if
$\cC\included\cD$, but $\cC\neq\cD$; in that case,
we write
\begin{equation*}
  \cC\pincluded\cD.
\end{equation*}
Since sets are classes by the Extension Axiom (\parref{ax:extension}),
we may use
the same notation for sets.  A sub\-{}-class that is also a set can be
called a \defn{subset.}\dindex{subset}
\end{parag}

\begin{parag}\label{par:a=b-subsets}
We can rewrite \eqref{eqn:a=b'} as
\begin{equation*}
  a=b\iff a\included b\land b\included a.
\end{equation*}
Two sets are equal just in case each one is a subset of the
other.  (This holds for classes in general, by \parref{par:class=}.)
\end{parag}

\begin{theorem}[Russell Paradox]\label{thm:R}\dindex{Russell Paradox}
  Not all classes are sets; in particular, the class
  \begin{equation*}
    \cls x{x\notin x}
  \end{equation*}
is not a set: symbolically,
  $\lnot\Exists y\Forall x(x\in y\iff x\notin x)$.
\end{theorem}

\begin{proof}
  Let $\cR$ be the given class.  It suffices by
  \parref{par:a=b-subsets} to show that no subset of $\cR$ is
  equal to $\cR$.  Suppose $r\included\cR$, so
  that
  \begin{equation*}
    \Forall x(x\in r\lto x\in\cR).
  \end{equation*}
Then, in particular, if
  $r\in r$, then $r\in\cR$, so $r\notin r$ by definition of
  $\cR$.
Therefore, logically,
\begin{equation}\label{eqn:r-notin-r}
  r\notin r,
\end{equation}
which, by definition of $\cR$, means
\begin{equation}\label{eqn:r-in-R}
  r\in\cR.
\end{equation}
The last two conclusions---\eqref{eqn:r-notin-r}
and~\eqref{eqn:r-in-R}---imply $\cR\not\included r$, so
$r\neq\cR$.
\end{proof}

\begin{parag}
Often Theorem~\ref{thm:R} is proved by \idefn{contradiction} as
follows:
\begin{quote}
  Suppose $\cR$ is a set.  Then $\cR\in\cR\lto\cR\notin\cR$ and
  $\cR\notin\cR\lto\cR\in\cR$, so $\cR\in\cR\iff\cR\notin\cR$, which
  is absurd.  Therefore $\cR$ is not a set.
\end{quote}
This is a valid argument.  However, I prefer to avoid proofs by
contradiction,
for reasons of style.  In a proof of $P\lto Q$ by contradiction, one
assumes $P$ and $\lnot Q$, and proves an absurdity like $P\land\lnot
P$.  Often in such proofs, however, one does not need the assumption of
$P$; one really just proves $\lnot Q\lto\lnot P$, the
\idefn{contrapositive} of $P\lto Q$.  Then the needless assumption of $P$
simply prevents anything in the proof from having independent value.
By contrast, in the proof given in
\parref{thm:R}, we happen to learn something more than the truth of
the theorem:
namely that no subset of $\cR$ is a member of itself.\footnote{The
argument for this---$r\included\cR\land r\in r\lto r\notin r$---can be
understood as using the method of contradiction.  However, we still
prove $r\notin r$ directly; we do not have to go back and say that our
original assumption that $r\in r$ is wrong; we simply use the
tautology $(P\lto\lnot P)\lto\lnot P$.}
\end{parag}

\section{New classes from old}\label{sect:new-classes}

\begin{parag}\label{par:class-ops}
  Several \defn{operations}\dindex{operation} on classes correspond to logical
  operations on formulas:
  \begin{enumerate}
    \item
The \idefn{complement} of $\cC$ is $\cls x{x\notin\cC}$,
denoted by
\begin{equation*}
  \cC\comp.
\end{equation*}
\item
The \idefn{union} of $\cC$ and $\cD$ is $\cls x{x\in\cC\lor x\in\cD}$,
denoted by 
\begin{equation*}
  \cC\cup\cD.
\end{equation*}
\item
The \idefn{intersection} of $\cC$ and $\cD$ is $\cls x{x\in\cC\land
  x\in\cD}$, denoted by 
\begin{equation*}
  \cC\cap\cD.
\end{equation*}
\item
The \idefn{empty class} is $\cls x{x\neq x}$, denoted by
\begin{equation*}
  \emptyset.
\end{equation*}
\item
The \idefn{difference} of $\cC$ from $\cD$ is $\cls
x{x\in\cC\land x\notin\cD}$ or $\cC\cap\cD\comp$,
denoted also by
\begin{equation*}
  \cC\setminus\cD.
\end{equation*}
\item
The \idefn{symmetric difference} of $\cC$ and $\cD$ is $\cls
x{x\in\cC\iff x\notin\cD}$ or
$(\cC\setminus\cD)\cup(\cD\setminus\cC)$, denoted also by
\begin{equation*}
  \cC\symdiff\cD.
\end{equation*}
  \end{enumerate}
Hence, for example,
\begin{gather*}
\emptyset\comp=\universe,\\
%\universe\comp=\emptyset,\\
  \cC=\cD\iff\cC\symdiff\cD=\emptyset.
\end{gather*}
  Since sets are classes (\parref{par:ext}),
  operations on classes can be performed on sets in
particular.
\end{parag}

\begin{parag}\label{par:infinitary}
  Two other operations on classes correspond to \itech{infinitary}
  logical operations (such logical operations are used in some logics,
  though not in ours):
  \begin{enumerate}
    \item
The \idefn{union} of a single class $\cC$ is the class $\cls
x{\Exists y(x\in y\land y\in \cC)}$ of elements of the elements of
$\cC$; it is denoted by
\begin{equation*}
  \bigcup{\cC}.
\end{equation*}
\item
The \idefn{intersection} of a class $\cC$ is the class
$\cls x{\Forall y(y\in\cC\lto x\in y)}$ of elements common to the
elements of $\cC$; it is denoted by
\begin{equation*}
  \bigcap\cC.
\end{equation*}
  \end{enumerate}
There is also a class of \emph{subsets} of a class $\cC$, namely $\cls
x{\Forall y(y\in x\lto y\in\cC)}$ or $\cls x{x\included\cC}$; we may
call this the 
\idefn{subset\-{}-class} of $\cC$, and denote it by
\begin{equation*}
  \pow{\cC}.
\end{equation*}
(The subset\-{}-class of a \emph{set} will later be called the \itech{power-set}
of the set; the power\-{}-set will \emph{be} a set, by
\parref{ax:power-set}; but for now, it is simply a class.) 
\end{parag}

\begin{parag}\label{par:pair-class}
  We can put two \emph{sets} $a$ and $b$ into a class, namely the
  class 
  \begin{equation*}
  \cls x{x=a\lor x=b};
  \end{equation*}
this class is commonly denoted
\begin{equation*}
  \{a,b\}.
\end{equation*}
This class is going to be a set (\parref{ax:pairing}); but without
using this, we can still observe:
\begin{gather}\label{eqn:cup-bigcup}
  a\cup b=\bigcup\{a,b\};\\\label{eqn:cap-bigcap}
  a\cap b=\bigcap\{a,b\}
\end{gather}
(Exercise~\ref{ex:cop-bigcop}).
We do not have such equations for classes in general, since
we do not have a way to put classes, as such, into other classes.
However, $\bigcup a$ is a set; but we do not need to use this until
after \P\P~\ref{ax:weak-union} and~\ref{ax:union}.  Meanwhile, if
$\cC\included\pow b$, then
$\bigcup \cC\included b$, so $\bigcup\cC$ will be a set by
\parref{ax:comprehension}
(Exercise~\ref{ex:UC-set}). 
\end{parag}

\section{New sets from old}

\begin{parag}\label{par:proper}
Classes that are not sets are called \defn{proper
  classes.}\dindex{proper class}
The proof of the Russell Paradox \eqref{thm:R} suggests that proper
classes are \emph{too big} to be sets.  In the belief that size is the
only bar to being a set, we postulate the following \tech{scheme} of
axioms: it is a \defn{scheme,}\dindex{scheme} because it comprises one
  axiom for each 
singulary formula:
\end{parag}

\begin{axiomscheme}[Comprehension]\label{ax:comprehension}
  \axiomname{Comprehension-Scheme: \[\Exists xx=a\cap\cC.\]} 
Every sub\-{}-class of a set is a set:
  For every singulary formula $\phi$,
  \begin{equation}\label{eqn:comprehension}
    \Exists x\Forall y(y\in x\iff y\in a\land\phi(y)).
  \end{equation}
\end{axiomscheme}

\begin{parag}\label{par:comprehension}
  The set whose existence is expressed by~\eqref{eqn:comprehension} is
  the intersection 
  \begin{equation*}
  a\cap\cls x{\phi(x)}; 
  \end{equation*}
this can be denoted by
  \begin{equation*}
    \set{x\in a}{\phi(x)}.
  \end{equation*}
We may refer to this as \emph{the} set guaranteed by the sentence,
  because of the Extension Axiom (\parref{ax:extension}).  As a first
  consequence of the
  Comprehension-Scheme, we have that, if $a\in\cC$, then
  $\bigcap\cC$ is the \emph{set} $\set{x\in a}{x\in\bigcap\cC}$
  (Exercise~\ref{ex:cap}).  Likewise, $a\setminus\cD$ is the set
  $\set{x\in a}{x\notin\cD}$.
\end{parag}

\begin{parag}
  There is an assumption so basic that we do not bother to state it
  formally as an axiom.\footnote{Some writers do, as Kunen \cite[I~5,
  p.~10]{MR85e:03003}.}  This assumption is that there \emph{are}
  sets.  Hence, by the Comprehension-Scheme, the empty class $\emptyset$
  is a set, called the \defn{empty set.}\dindex{empty set}
  (There is only one empty set, by the Extension Axiom.)
\end{parag}

\begin{parag}
  We observed (\parref{par:pair-class}) that, from two sets $a$ and
  $b$, we can form the class denoted $\{a,b\}$.  But if any class is a
  set, surely this class is:
\end{parag}

\begin{axiom}[Pairing]\label{ax:pairing} 
\axiomname{Pairing: \[\Exists xx=\{a,b\}.\]}
  Any two sets are contained in a third:
  \begin{equation*}
    \Exists x(a\in x\land b\in x).
  \end{equation*}
\end{axiom}

\begin{parag}
As stated, the axiom is merely that some set contains $a$ and $b$;
  additional members of the set are not excluded.  So the class
  $\{a,b\}$ is a sub\-{}-class of some set.
  By the Comprehension-Scheme, $\{a,b\}$ is itself a set.
This set is an \defn{(unordered) pair.}\dindex{unordered
  pair}\dindex{pair}  In case $a=b$, the set is a 
\defn{singleton,}\dindex{singleton} denoted
\begin{equation*}
  \{a\}
\end{equation*}
or $\{b\}$.  We may use the equation
\begin{equation*}
  u=\{s,t\}
\end{equation*}
to stand for
$\Forall x(x\in u\iff x=s\lor x=t)$; then
\begin{equation*}
  \phi(\{s,t\})
\end{equation*}
stands for $\Exists x(\phi(x)\land x=\{s,t\})$ (which stands for
$\Exists x(\phi(x)\land\Forall y(y\in x\iff y=s\lor y=t))$). 
\end{parag}

\section{Relations}

\begin{parag}
  A formula with (at most) two free variables is a \idefn{binary}
  formula.  Suppose $\phi$ is such, with its free
  variables among $x$ and $y$.  Then we can write $\phi$
  as
  \begin{equation*}
    \phi(x,y).
  \end{equation*}
In this case, $\phi(s,t)$ means
\begin{equation*}
  \phi^{x\;y}_{s\;t};
\end{equation*}
this is the result of \emph{simultaneously} replacing free occurrences
of $x$ with $s$, and $y$ with $t$.  So it is the same formula as
$\phi^{y\;x}_{t\;s}$, but it need not be the same as
$(\phi^x_s){}^y_t$.  For example, if $\phi$ is $x\in y$, then 
$\phi^{x\;y}_{y\;x}$ is $y\in x$, while $(\phi^x_y)^y_x$ is $x\in x$.
Also, $\phi(x,y)$ will usually be different from $\phi(y,x)$.
\end{parag}

\begin{parag}\label{par:u-pair}
  A binary formula determines a class of pairs.
  Indeed, $\phi(x,y)$ determines the class
  \begin{equation*}
    \cls z{\Exists x\Exists y(z=\{x,y\}\land\phi(x,y))}.
  \end{equation*}
However, this is also the class determined in the same way by
$\phi(x,y)\lor\phi(y,x)$ (Exercise~\ref{ex:u-pair}).
\end{parag}

\begin{parag}\label{par:op}
  For more control, we want to combine $a$ and $b$ into an
  \defn{ordered pair,}\dindex{ordered pair} denoted
  \begin{equation*}
    (a,b),
  \end{equation*}
such that
\begin{equation}\label{eqn:op-iff}
  (a,b)=(c,d)\iff a=c\land b=d.
\end{equation}
One way (but not the only way) to achieve this is by defining $(a,b)$
as
\begin{equation*}
  \{\{a\},\{a,b\}\}.
\end{equation*}
(See Exercises~\ref{ex:op} and~\ref{ex:pair-alt}.)  Then the class
  $\cls z{\Exists x\Exists
  y(z=(x,y)\land\phi(x,y))}$ can be denoted by
\begin{equation*}
  \cls{(x,y)}{\phi(x,y)};
\end{equation*}
this is the class \idefn{defined by} $\phi(x,y)$.
\end{parag}

\begin{parag}
In particular, we now we have a new operation on classes:  the
\idefn{Cartesian product} 
of $\cC$ and $\cD$ is
\begin{equation*}
  \cls {(x,y)}{x\in\cC\land y\in\cD};
\end{equation*}
this class is denoted
\begin{equation*}
  \cC\times\cD,
\end{equation*}
and it is a sub\-{}-class of $\pow{\pow{\cC\cup\cD}}$
(Exercise~\ref{ex:pair-pow}).
The class
$\cls{(x,y)}{\phi(x,y)}$ is a sub\-{}-class of $\universe\times\universe$.
\end{parag}

\begin{parag}
A sub\-{}-class of $\universe\times\universe$ is a \defn{(binary)
  relation.}\dindex{relation}\dindex{binary relation}  If $\cR$ is a
  binary relation, then we usually write 
\begin{equation*}
  s\mathrel{\cR}t
\end{equation*}
instead of $(s,t)\in\cR$.  The \idefn{domain} of $\cR$
is the class
  $\cls x{\Exists yx\mathrel{\cR}y}$;
this can be denoted by
\begin{equation*}
  \dom{\cR}.
\end{equation*}
The \idefn{range} of $\cR$ is the class
  $\cls y{\Exists xx\mathrel{\cR}y}$;
this can be denoted by
\begin{equation*}
  \ran{\cR}.
\end{equation*}
The union of the domain and range is the \defn{field:}\dindex{field}
\begin{equation*}
  \dom{\cR}\cup\ran{\cR}=\fld{\cR}.
\end{equation*}
\end{parag}

\section{Kinds of relations}

\begin{parag}
A binary relation $\cR$ has a \defn{converse,}\dindex{converse}
$\cls{(x,y)}{y\mathrel{\cR}x}$, which can be denoted by
\begin{equation*}
  \conv{\cR}.
\end{equation*}
Then
\begin{gather}\label{eqn:dom-ran}
  \dom{\conv{\cR}}=\ran{\cR},\\\label{eqn:ran-dom}
  \ran{\conv{\cR}}=\dom{\cR},\\\label{eqn:conv-conv}
\conv{\conv{\cR}}=\cR
\end{gather}
(Exercise~\ref{ex:conv}).
If $\conv{\cR}=\cR$, then $\cR$ is called
\defn{symmetric;}\dindex{symmetric} this means
\begin{equation*}
  a\mathrel{\cR}b\iff b\mathrel{\cR}a.
\end{equation*}
Then $\cR$ is \idefn{symmetric on} $\cC$ if $\cR\cap(\cC\times\cC)$ is
symmetric. 
\end{parag}

\begin{parag}\label{par:composite}
If $\cR$ and  $\cS$ are both binary relations, then the
relation 
\begin{equation*}
  \cls{(x,z)}{\Exists y(x\mathrel{\cR}y\land y\mathrel{\cS}z)}
\end{equation*}
is the \idefn{composite} of $\cR$ and
$\cS$, denoted\footnote{Tarski~\cite[\S~28, p.~92]{Tarski-Intro} uses
the notation $\cR/\cS$ and refers to the indicated class as
the \itech{relative product} of $\cR$ and $\cS$. 
Suppes~\cite[\S~3.1, Definition 7, p.~63]{MR0349389} also uses the
notation.}  
\begin{equation*}
  \cR/\cS.
\end{equation*}
Logically, if $\cT$ is also a relation, then
\begin{equation}\label{eqn:comp-assoc}
  (\cR/\cS)/\cT=\cR/(\cS/\cT).
\end{equation}
If $\cR/\cR\included\cR$, then $\cR$ is called
\defn{transitive;}\dindex{transitive} this means
\begin{equation}\label{eqn:transitive}
  a\mathrel{\cR}b\land b\mathrel{\cR}c\lto a\mathrel{\cR}c.
\end{equation}
We may then write
\begin{equation*}
  a\mathrel{\cR}b\mathrel{\cR}c
\end{equation*}
instead of $a\mathrel{\cR}b\land b\mathrel{\cR}c$.  More generally, if
$\cR\cap(\cC\times\cC)$ is transitive, then $\cR$ is \idefn{transitive
  on} $\cC$.  
\end{parag}

\begin{parag}\label{par:diagonal}
For any class $\cC$, the relation
$\cls{(x,y)}{x=y\land x\in\cC}$
is the \idefn{diagonal} on ${\cC}$, denoted
\begin{equation*}
   \Delta_{\cC}.
\end{equation*}
Then
\begin{gather}\label{eqn:dom}
  \Delta_{\dom{\cR}}\included\cR/\conv{\cR},\\\label{eqn:ran} 
  \Delta_{\ran{\cR}}\included\conv{\cR}/\cR,
\end{gather}
for every binary relation $\cR$ (Exercise~\ref{ex:comp}).  Also, $\cR$
is called: 
\begin{enumerate}
  \item
\defn{reflexive,}\dindex{reflexive} if $\Delta_{\universe}\included \cR$, that
is,  $a\mathrel{\cR}a$;
\item
\defn{irreflexive,}\dindex{irreflexive} if $\cR\cap\Delta_{\universe}=\emptyset$,
that is, ${}\mathrel{\lnot}a\mathrel{\cR}a$;
\item
\defn{anti-symmetric,}\dindex{anti-symmetric} if $\cR\cap \conv{\cR} \included
\Delta_{\universe}$, that is, $a\mathrel{\cR}b\land
b\mathrel{\cR}a\lto a=b$.
\end{enumerate}
There are relative versions.  The relation $\cR$ is:
\begin{enumerate}
\item
\idefn{reflexive on} $\cC$, if  $\Delta_{\cC}\included \cR$;
\item
\idefn{irreflexive on} $\cC$, if $\cR\cap\Delta_{\cC}=\emptyset$;
\item
\idefn{anti-symmetric on} $\cC$, if $\cR\cap
\conv{\cR}\cap(\cC\times\cC)\included\Delta_{\cC}$.   
\end{enumerate}
\end{parag}

\begin{parag}\label{par:equiv-reln}
A relation is an \idefn{equivalence-relation on} $\cC$ if it is reflexive,
symmetric and transitive on $\cC$.
Then \defn{equality,}\dindex{equality} understood as
$\Delta_{\universe}$, is an
equivalence\-{}-relation on every class (Exercise~\ref{ex:=-equiv}).
The diagonal 
$\Delta_{\cC}$ is an equivalence-relation on every sub\-{}-class of
$\cC$. 
\end{parag}

\begin{parag}
The relation $\cR$ is:
\begin{enumerate}
  \item
an \idefn{ordering of} $\cC$, if it is
anti\-{}-symmetric, transitive, and either reflexive or irreflexive,
on $\cC$;
\item
a \idefn{total ordering of} $\cC$, if it is an ordering of $\cC$ and
\begin{equation*}
  \cR\cup\conv{\cR}\cup\Delta_{\cC}=\cC\times\cC.
\end{equation*}  
\end{enumerate}
An ordering in the present sense is often called a \tech{partial
ordering,}\tindex{partial ordering} even though it might be total.  An
\emph{irreflexive} ordering is 
also called a \defn{strict ordering.}\dindex{strict ordering}
The converse of an ordering is an ordering.
If $\cR$ is a reflexive ordering of $\cC$, then there is a
corresponding strict ordering of $\cC$, namely
$\cR\setminus\Delta_{\cC}$ (or $\cR\setminus\Delta_{\universe}$, for
example; it doesn't matter what $\cR\setminus(\cC\times\cC)\comp$ is).
A strict ordering~$\cS$ of $\cC$ has
the corresponding reflexive ordering $\cS\cup\Delta_{\cC}$.
\end{parag}

\begin{parag}
There are standard examples:
\begin{enumerate}
\item
\defn{Inclusion}\dindex{inclusion}---the class $\cls
     {(x,y)}{x\included y}$, which can
be denoted by $\included$ alone---is a reflexive ordering of every class. 
\item
The converse of inclusion is usually denoted by $\includes$; it is a
reflexive ordering, by the comment in \parref{par:diagonal}.
\item
\defn{Proper inclusion}\dindex{proper inclusion}---the class
$\cls{(x,y)}{x\pincluded y}$, or
$\pincluded$---is a strict ordering.
\end{enumerate}
It will take more work to define a good example of a total ordering.
Often a reflexive ordering is symbolized by $\leq$; then the
corresponding strict ordering is denoted
by $<$.  The
converse of $\leq$ is $\geq$; the converse of $<$ is $>$.
\defn{Containment}\dindex{containment}---$\cls{(x,y)}{x\in y}$ or
$\in$---is not yet an
example of anything in particular; but it will be. (See
\P\P~\ref{par:least} and~\ref{thm:on-wo}.)
\end{parag}

\begin{parag}
Suppose $<$ is a strict ordering of $\cC$.  
An element $a$ of $\cC$ is \idefn{minimal} with respect to $<$, or
\defn{$<$-minimal,} if
\begin{equation*}
  b\in\cC\lto{}\mathrel{\lnot}b<a.
\end{equation*}
A $>$-minimal element is \defn{$<$-maximal.}
An element $a$ of
  $\cC$ is \idefn{least} with respect to $<$, or \defn{$<$-least,} if
\begin{equation*}
  b\in\cC\lto a\leq b.
\end{equation*}
A $>$-least
element is \defn{$<$-greatest.}
Least elements are minimal elements.
Least elements are unique when they exist; but they need
not exist.  With respect to a total ordering, a minimal element is a
least element.
\end{parag}

\begin{parag}
An \idefn{initial segment} of $\cC$ (with respect to the strict
ordering $<$) is a sub\-{}-class $\cD$ of $\cC$ such that
\begin{equation*}
  a\in\cD\land b\in\cC\land b< a\lto b\in\cD.
\end{equation*}
We may say that initial segments are \idefn{closed under} $<$.
A \idefn{proper initial segment} is an initial segment that is a proper
  sub\-{}-class. 
\end{parag}

\begin{parag}\label{par:least}
  The class $\cC$ is \idefn{well-ordered} by $<$ if:
  \begin{enumerate}
\item
$<$ is a strict total ordering of $\cC$;
\item
every proper initial segment of $\cC$ with respect to $<$ is a
set;
    \item
every non-empty subset of $\cC$ has a $<$-least element.
  \end{enumerate}
In this case, every non-empty sub-\emph{class} of $\cC$ has a least element:
Indeed, if $\cD$ is such a sub\-{}-class, and it contains only $a$, then
$a$ is its least element; but if $\cD$ also has another element, then
we may assume that this is greater than $a$, so that $\cls x{x\in\cC\land
  x\leq a}$ is a set (being a proper initial segment).  Then
 $\cls
x{x\in\cD\land x\leq a}$ is a non-empty subset of $\cC$, and its least
element is the least element of $\cD$.
\end{parag}

\section{Functions}

\begin{parag}
  The various operations on classes defined in \P\P~\ref{par:class-ops}
  and~\ref{par:infinitary} are examples of
  \defn{functions.}\dindex{function}  The 
  union-operation is the function by which the class $\cC\cup\cD$ is
  obtained from the classes $\cC$ and $\cD$; the subset-class
  operation is a function converting $\cC$ into $\pow{\cC}$.  In this
  sense, a function is not a set or a class; it is a feature of our
  logic. 
\end{parag}

\begin{parag}\label{par:aRRa}
Binary relations always determine certain functions.
  Suppose $\cR$ is a binary relation.  Then we can make the definitions:
  \begin{align*}
    a\cR&=\cls x{a\mathrel{\cR}x},\\
    \cR a&=\cls x{x\mathrel{\cR}a}.
  \end{align*}
The classes $a\cR$ and $\cR a$ are functions of the set $a$.  Some
kinds of relations can be understood in terms of these functions.
For example, the
relation $\cR$ is symmetric if and only if $\Forall xx\cR=\cR x$
(Exercise~\ref{ex:sym}).  If $\cE\included\cC\times\cC$ and is an
equivalence-relation on
$\cC$, and $a\in\cC$, then $a\cE$ is the
\idefn{equivalence-class} of $a$ with respect to $\cE$, or the
\defn{$\cE$-class} of $a$.  Then $a$ is a
\idefn{representative} of this class; every other member of the class
is also a representative.  There is something denoted
\begin{equation*}
  \cC/\cE,
\end{equation*}
whose members are the equivalence-classes of the elements of $\cC$.
Then there is a function that converts every set in $\cC$ into its
equivalence-class, which is in $\cC/\cE$.
However, since the elements of $\cC/\cE$ may be proper classes, we do not
necessarily have $\cC/\cE$ even as a class. We can still work with it
though; we may call it a
\defn{virtual class.}\dindex{virtual class}   See \S~\ref{sect:e-wf}. 
\end{parag}

\begin{parag}\label{par:functions}
Often it is \emph{sets} that are functions of other sets.
A binary relation $\cF$ is \idefn{functional} if
\begin{equation*}
  \conv{\cF}/\cF\included\Delta_{\universe},
\end{equation*}
that is,
\begin{equation}\label{eqn:functional}
a\mathrel{\cF}b\land a\mathrel{\cF}c\lto b=c.
\end{equation}
This is equivalent to $\conv{\cF}/\cF=\Delta_{\ran{\cF}}$
(Exercise~\ref{ex:functional}). 
In this case, $\cF$ is a \idefn{function on} its domain.  Suppose
that domain is $\cC$, and $\ran{\cF}\included\cD$.
Then we may write either of
\begin{gather*}
  \cF\colon \cC\to\cD,\\
\cC\overset{\cF}{\To}\cD; 
\end{gather*}
these are abbreviations
of the sentence
\begin{multline*}
\Forall x((\Exists yx\mathrel{\cF} y\lto x\in\cC)\land\\
(x\in\cC\lto\Exists y(x\mathrel{\cF}y\land y\in\cD
  \land\Forall z(x\mathrel{\cF}z\lto y=z)))).
\end{multline*}
We may also say that $\cF$ is a function \defn{from $\cC$ to}
  $\cD$.
If $a\mathrel{\cF}b$, then we usually write
\begin{equation*}
  \cF(a)=b.
\end{equation*}
This is consistent with our definition of equality of sets, by which
 equality is an equivalence-relation (\parref{par:equiv-reln}):
now the implication~\eqref{eqn:functional} becomes
\begin{equation*}
  \cF(a)=b\land\cF(a)=c\lto b=c.
\end{equation*}
As an alternative notation for $\cF$ itself, we may write
\begin{equation*}
  x\mapsto\cF(x).
\end{equation*}
\end{parag}

\begin{parag}\label{par:f}
  We can produce a few examples of functions in the sense of
  \parref{par:functions}:
  \begin{enumerate}
    \item
  Most basic is the
  \defn{identity function,}\dindex{identity function} which is
  $x\mapsto x$ or 
  $\Delta_{\universe}$; considered as a function, this can be denoted
  by 
  \begin{equation*}
  \id{\universe}.
  \end{equation*}   
The \idefn{identity on} $\cC$ is $\Delta_{\cC}$, usually
denoted by
\begin{equation*}
  \id{\cC}.
\end{equation*}
\item\label{item:function}
If $\cF$ is a function, then so is
  $x\mapsto(x,\cF(x))$: its domain is $\dom{\cF}$, and its
range is $\cF$. 
\item
If $a$ is a set, then
  $x\mapsto a$ is a \defn{constant function,}\dindex{constant
  function} with domain 
  $\universe$. 
\item
If $\cF\colon \cC\to\cD$, and $\cE\included\cC$,
then $\cF\cap(\cE\times\universe)$ (which is $\cF\cap(\cE\times\cD)$)
is a function with domain
$\cE$ called the \idefn{restriction} of $\cF$ to $\cE$
  and denoted
  \begin{equation*}
    \cF\rest{\cE}.
  \end{equation*}
In particular, $\id{\universe}\rest{\cC}$ is $\id{\cC}$.
\item
By (a special case of) the Pairing Axiom, we have a function
$x\mapsto\{x\}$ on $\universe$.
\item
By \parref{par:op}, there is a function $\cF$ on
$\universe\times\universe$ such that $\cF(b)=a\iff\Exists
xb=(a,x)$; this function can be denoted
\begin{equation*}
  (x,y)\mapsto x;
\end{equation*}
it is \idefn{projection} onto the first coordinate.  Likewise, there is
$(x,y)\mapsto y$.
\item
Hence, by Pairing again, we have a function $(x,y)\mapsto\{x,y\}$.
  \end{enumerate}
\end{parag}

\begin{parag}
  If $\cF$ and $\cG$ are  functional relations, and
  $\ran{\cF}\included\dom{\cG}$, then the composite $\cF/\cG$ is a function on $\dom{\cF}$; usually this function 
  is denoted by either of
  \begin{gather*}
    (\cG\circ\cF),\\
x\mapsto\cG(\cF(x)).
  \end{gather*}
If also $\cH$ is functional, and $\ran{\cG}\included\dom{\cH}$, then, as we have~\eqref{eqn:comp-assoc},
  so
  \begin{equation}\label{eqn:comp-f-assoc}
    \cH\circ(\cG\circ\cF)=(\cH\circ\cG)\circ\cF. 
  \end{equation}
\end{parag}

\begin{parag}\label{par:inv}
Suppose $\cF\colon \cC\to\cD$, and
  $\cF/\conv{\cF}\included\Delta_{\universe}$, equivalently,
  $\cF/\conv{\cF}=\Delta_{\dom{\cF}}$ (Exercise \ref{ex:inj}).
  This means 
\begin{equation*}
  \cF(a)=\cF(b)\lto a=b.
\end{equation*}
Then $\cF$ is called an \idefn{injective} function, or an
  \idefn{injection} from $\cC$ (in)to $\cD$, or an
  \idefn{embedding} of $\cC$ in $\cD$;
we may write
\begin{equation*}
  \cF\colon \cC\injection\cD.
\end{equation*}
(So the tail of the arrow indicates injectivity.)
The converse of an injective function is also a function
  (Exercise~\ref{ex:conv-f-inv}), called the \idefn{inverse} of the
  function; when it exists, the inverse of $\cF$ is denoted
  \begin{equation*}
    \cF\inv.
  \end{equation*}
\end{parag}

\begin{parag}
Suppose again $\cF\colon \cC\to\cD$.
If $\cD=\ran{\cF}$, then $\cF$ is \idefn{surjective
  onto} $\cD$ (or a \idefn{surjection onto} $\cD$); we may write
\begin{equation*}
  \cF\colon \cC\surjection\cD.
\end{equation*}
(So the second head of the arrow indicates surjectivity.)
Note well that a function cannot be surjective simply; it is only
surjective with respect to the set that the function is surjective
\emph{onto} (namely its \emph{range}).
If $\cF$ is injective, and surjective onto $\cD$, then
$\cF$ is a \idefn{bijection} from $\cC$ to $\cD$,
and we may write
\begin{equation*}
  \cF\colon \cC\bijection\cD.
\end{equation*}
\end{parag}

\begin{theorem}\label{thm:f-inj-bij}
  Suppose $\cF\colon\cC\to\cD$.
  \begin{enumerate}
    \item
$\cF$ is injective if and only if $\cC$ is empty or there is
      a function $\cG$ from $\cD$ to $\cC$ such that
      $\cG\circ\cF=\id{\cC}$.
\item
$\cF$ is a bijection from $\cC$ to $\cD$ if and only if
  there is a function $\cG$ from $\cD$ to $\cC$ such that
      $\cG\circ\cF=\id{\cC}$ and $\cF\circ\cG=\id{\cD}$.
  \end{enumerate}
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:f-inj-bij}.
\end{proof}

\section{Functions from functions}

\begin{parag}
A function $\cF$ induces two functions on classes:
\begin{enumerate}
  \item
If $\cE$ is a sub\-{}-class of $\dom{\cF}$, then the class 
\begin{equation}\label{eqn:image}
  \cls y{\Exists x(x\in\cE\land \cF(x)=y)}
\end{equation}
is the \idefn{image} of $\cE$ under
  $\cF$ and can be denoted by either of
\begin{gather*}
  \cF\setimb{\cE},\\
\cls{\cF(x)}{x\in\cE}.
\end{gather*}
Then $\ran{\cF}=\cF\setimb{\dom{\cF}}$.
\item
%If $\cE$ is a sub\-{}-class of $\ran{\cF}$, then t
The class 
\begin{equation}\label{eqn:pre-image}
\cls x{x\in\dom{\cF}\land\cF(x)\in\cE}
\end{equation}
is the \idefn{pre\-{}-image} of $\cE$ under
  $\cF$ and can be denoted by
\begin{equation*}
  \cF\inv\setimb{\cE}.
\end{equation*}
Pre\-{}-images of all classes exist, regardless of whether the
function $\cF$ itself
has an inverse (\parref{par:inv}).
In particular, $\dom{\cF}=\cF\inv\setimb{\cE}$ whenever
$\ran{\cF}\included\cE$.
\end{enumerate}
Note the great difference in form between~\eqref{eqn:image}
and~\eqref{eqn:pre-image}.  The difference is reflected in the
following. 
\end{parag}

\begin{theorem}\label{thm:functions}
  Suppose $\cF$ is a function.  Then
\begin{align}
\cF\setimb{\cC\cup\cD}&=\cF\setimb{\cC}\cup\cF\setimb{\cD},\\
\cF\setimb{\cC\cap\cD}&\included\cF\setimb{\cC}\cap\cF\setimb{\cD},\\
\cF\setimb{\dom{\cF}\setminus\cC}&\includes\ran{\cF}\setminus\cF\setimb{\cC}
\end{align}
for all sub\-{}-classes $\cC$ and $\cD$ of $\dom{\cF}$, and
\begin{align}
\cF\inv\setimb{\cC\cup\cD}&=\cF\inv\setimb{\cC}\cup\cF\inv\setimb{\cD},\\
\cF\inv\setimb{\cC\cap\cD}&=\cF\inv\setimb{\cC}\cap\cF\inv\setimb{\cD},\\
\cF\inv\setimb{\ran{\cF}\setminus\cC}&=\dom{\cF}\setminus\cF\inv\setimb{\cC}
\end{align}
for all classes $\cC$ and $\cD$.  Moreover,
the following statements are equivalent:
\begin{enumerate}
  \item
$\cF$ is injective;
\item
$\cC\cup\cD\included\dom{\cF}\lto\cF\setimb{\cC\cap\cD}
  =\cF\setimb{\cC}\cap\cF\setimb{\cD}$ 
for all classes $\cC$ and $\cD$;
\item
$\cC\included\dom{\cF}\lto\cF\setimb{\dom{\cF}\setminus\cC}=
  \ran{\cF}\setminus\cF\setimb{\cC}$ for all classes $\cC$; 
\item
$a\cup b\included\dom{\cF}\lto\cF\setimb{a\cap b}=\cF\setimb
  a\cap\cF\setimb b$ for all sets $a$ and $b$;  
\item
$a\included\dom{\cF}\lto\cF\setimb{\dom{\cF}\setminus
  a}=\ran{\cF}\setminus\cF\setimb a$ for all 
  sets $a$.
\end{enumerate}
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:functions}.
\end{proof}
\begin{parag}
If $\dom{\cF}$ is a set,
  then $\cF\inv\setimb{\cE}$ is a set, by the Comprehension\-{}-Scheme
  (\parref{ax:comprehension}).  Likewise, if 
  $\ran{\cF}$ is 
a set, and $\cE\included\dom{\cF}$, then $\cF\setimb{\cE}$ is a set.
  However, possibly  
$\ran{\cF}$ is a set, while $\dom{\cF}$ is a proper class:
consider a constant function.  However, when we noted in
\parref{par:proper} that some classes are too big to be
  sets, we also suggested that, if a class is \emph{not} too big
  to be a set, then it \emph{is} a set.
Presumably the range of a function is not bigger than its domain,
  since the range contains no more than one element for each element
  of the domain; so we postulate the following.
\end{parag}

\begin{axiomscheme}[Replacement]\label{ax:replacement}
  \axiomname{Replacement-scheme: \[a\included\dom{\cF}\lto\Exists
    xx=\cF\setimb{a}.\]} 
The image of a set under a function is a set:  
\begin{equation*}
  a\included\dom{\cF}\lto\Exists xx=\cF\setimb{a}
\end{equation*}
for all functions $\cF$, so that the class
$\cls{\cF(x)}{x\in a}$ is a set whenever $a$ is a subset of
$\dom{\cF}$. 
\end{axiomscheme}

\begin{lemma}\label{lem:dom-inj-set}\mbox{}
  \begin{enumerate}
\item
A function whose domain is a set is a set.
    \item
  The domain of an injection into a set is a set.
\item
Suppose $f\colon a\to b$.  Then $x\mapsto f\setimb x$ is a
(well\-{}-defined) function
from $\pow a$ to $\pow b$, and $y\mapsto f\inv\setimb y$ is a
well\-{}-defined function from $\pow b$ to~$\pow a$.  Moreover,
\begin{gather*}
f\setimb{\bigcup c}=\bigcup\cls{f\setimb x}{x\in c},\\
f\setimb{\bigcap c}\included\bigcap\cls{f\setimb x}{x\in c}
\end{gather*}
 for all subsets
    $c$ of $\pow a$; and
\begin{gather*}
f\inv\setimb{\bigcup c}=\bigcup\cls{f\inv\setimb x}{x\in c},\\
f\inv\setimb{\bigcap c}=\bigcap\cls{f\inv\setimb x}{x\in c}\\
\end{gather*}
for all subsets $c$ of $\pow b$.
  \end{enumerate}
\end{lemma}

\begin{proof}
  Exercise~\ref{ex:dom-inj-set}.
\end{proof}

\section*{Exercises}
\addcontentsline{toc}{section}{Exercises}

\begin{enumerate}
  \renewcommand{\theenumi}{\arabic{enumi}}
\item
Prove carefully that $\{a\}=\{b\}\iff a=b$.
\item\label{ex:cop}
What are $\bigcap\emptyset$ and $\bigcup\emptyset$?
\item\label{ex:cap}
Show that the intersection of a non\-{}-empty class is a set
(\parref{par:comprehension}). 
\item\label{ex:cop-bigcop}
Show~\eqref{eqn:cap-bigcap} and~\eqref{eqn:cup-bigcup}.
\item\label{ex:UC-set}
Show that, if $\cC\included\pow a$, then $\bigcup\cC$ is a
set. 
\item\label{ex:u-pair}
Show that the class determined by $\phi(x,y)$ in the sense of
\parref{par:u-pair} is the same as the class determined by
$\phi(x,y)\lor\phi(x,y)$. 
\item\label{ex:op}
Show the definition of ordered pair in \parref{par:op}
causes~\eqref{eqn:op-iff} to be true.
\item\label{ex:pair-alt}
Show that the same is true if $(a,b)$ is defined as
$\{\{\emptyset,\{a\}\},\{\{b\}\}\}$. 
\item\label{ex:pair-pow}
Show that $\cC\times\cD\included\pow{\pow{\cC\cup\cD}}$. 
\item
For each of the listed classes, using only the symbols listed in
\parref{par:1}, write out a formula that defines the same class.
Treat $\cC$ as $\cls x{\phi(x)}$, and $\cD$ as $\cls
x{\psi(x)}$. 
\begin{enumerate}
  \item
$\emptyset$
\item
$\cC\symdiff\cD$
\item
$\cC\times\cD$
\end{enumerate}
\item\label{ex:conv}
Verify~\eqref{eqn:dom-ran}, \eqref{eqn:ran-dom}, and
\eqref{eqn:conv-conv}.
\item\label{ex:comp}
Verify
\eqref{eqn:dom} and~\eqref{eqn:ran}.
\item\label{ex:=-equiv}
Prove that $\Delta_{\universe}$ is an equivalence-relation using only
the definition of equality in \parref{par:=def} (and not for example
the Extension Axiom).  
\item\label{ex:sym}
Prove the claim in \parref{par:aRRa} that the
relation $\cR$ is symmetric if and only if $\Forall xx\cR=\cR x$.
\item\label{ex:functional}
Prove that a binary relation $\cF$ is functional if and only if
 $\conv{\cF}/\cF=\Delta_{\ran{\cF}}$.
\item\label{ex:inj}
If $\cR$ is a binary relation, prove that
$\cR/\conv{\cR}\included\Delta_{\universe}$ if and only if
$\cR/\conv{\cR}=\Delta_{\dom{\cR}}$. 
\item\label{ex:conv-f-inv}
Show that the converse of an injective function is a function.
\item\label{ex:f-inj-bij}
Prove Theorem~\ref{thm:f-inj-bij}.
\item
Suppose $\cF\colon\cC\surjection\cD$.  Is there a
function $\cG$ from $\cD$ to $\cC$ such that $\cF\circ\cG=\id{\cD}$?
\item\label{ex:functions}
Prove Theorem~\ref{thm:functions}.
\item
Write out the Replacement-Scheme (\parref{ax:replacement}) using only
the symbols of \parref{par:1}, and using an \emph{arbitrary} binary
formula $\phi(x,y)$ instead of $\cF$ (so your sentence will have
to express the condition that $\phi(x,y)$ defines a functional
relation). 
\item\label{ex:dom-inj-set}
Prove Lemma~\ref{lem:dom-inj-set}.
\end{enumerate}

\chapter{Size and order}\label{ch:size-order}

%\setcounter{equation}{9}

\section{Cardinality}

\begin{parag}\label{par:equip}
Two
  classes $\cC$ and $\cD$ have the \idefn{same cardinality}
  (or the \idefn{same
  size}) if there is a bijection between them; in that case, we may
  write
  \begin{equation*}
    \cC\equip \cD;
  \end{equation*}
we may also say that $\cC$ and $\cD$ are
\defn{equipollent.}\dindex{equipollent}
If one of these classes is a set, then so is the other, by the
Replacement-Scheme~(\parref{ax:replacement}).  If $a\equip b$, then we
may write also
\begin{equation}\label{eqn:|a|=|b|}
  \card a=\card b.
\end{equation}
Restricted to sets, equipollence is an equivalence-relation.  (That
is, the class $\cls{(x,y)}{x\equip y}$ is
an equivalence-relation.)  If we understand $\card a$ as the
equivalence-class $\cls x{x\equip a}$, then~\eqref{eqn:|a|=|b|} is
indeed a consequence of $a\equip b$.  (See Exercise~\ref{ex:equip}.)
However, we shall ultimately (\parref{par:card}) find a definition of
$\card a$ as a 
\emph{set} that is equipollent with $a$.  Meanwhile, we may write
\begin{equation*}
  \cC\nequip\cD
\end{equation*}
if $\cC$ and $\cD$ are not equipollent.
\end{parag}

\begin{parag}\label{par:injects}
  A class $\cD$ is \idefn{larger than} or \defn{bigger
  than,}\dindex{bigger than} or
  \defn{has greater cardinality
  than,}\dindex{greater cardinality} a class $\cC$, if there is an
  injection from $\cC$ 
  into $\cD$, but no bijection; then
  $\cC$ is \defn{smaller than,}\dindex{smaller than} or \defn{has
  lesser cardinality than,}\dindex{smaller cardinality} 
  the class $\cD$; we
  may write
  \begin{equation*}
    \cC\pinjects \cD.
  \end{equation*}
If there is an injection from $\cC$ to $\cD$, then we write
\begin{equation*}
  \cC\injects\cD.
\end{equation*}
Therefore
\begin{equation*}
  \cC\injects\cD\iff\cC\pinjects\cD\lor\cC\equip\cD.
\end{equation*}
If $\cC\injects\cD$, and $\cD$ is a set, then so is
$\cC$, by Lemma~\ref{lem:dom-inj-set}. 
If $a\injects b$, then we may write also
\begin{equation*}
  \card a\leq\card b.
\end{equation*}
On sets, the relations $\injects$ and $\pinjects$ are transitive; the
former is reflexive, but the latter is irreflexive
(Exercise~\ref{ex:<-trans}).  Loosely speaking, by the
following theorem, both relations
are anti-symmetric on cardinalities; so they are a reflexive and a
strict ordering, respectively.
\end{parag}

\begin{theorem}[Schroeder--Bernstein\footnote{The theorem is also
      called the Cantor--Bernstein Theorem, as for example by Levy
  \cite[III.2.8, p.~85]{MR1924429}, who nonetheless observes that Dedekind
  gave the first proof in 1887.  The proof given here is due to
  Zermelo, according to Moschovakis \cite[ch.~4, exercises 4.26 and
  4.27,
  pp.~50~f.]{MR95a:04001}.}]\label{thm:sch-b}\dindex{Schoeder--Bernstein
  Theorem}
  $a\injects b\land b\injects a\lto a\equip b$.
\end{theorem}

\begin{proof}
  Suppose $f\colon a\injection b$ and $g\colon b\injection a$.  Let $\cC$ be
  the class
  \begin{equation*}
    \cls x{x\included b\land(b\setminus f\setimb{a})\cup(f\circ
    g)\setimb{x}\included x}.
  \end{equation*}
Then $\cC$ contains $b$.  In particular, $\cC$ is non-empty,
so (by \parref{par:comprehension}) its intersection is a set $d$.
Then $d\in\cC$, and
\begin{equation}\label{eqn:sch-b}
  (b\setminus f\setimb{a})\cup(f\circ g)\setimb{d}=d
\end{equation}
(Exercise~\ref{ex:sch-b}).  Hence
\begin{equation*}
  f\setimb a\setminus(f\circ g)\setimb d=b\setminus d
\end{equation*}
(Exercise~\ref{ex:sch-bb}).  This means
\begin{equation*}
  f\setimb{a\setminus g\setimb d}=f\setimb a\setminus(f\circ g)\setimb
  d=b\setminus d=b\setminus g\inv\setimb{g\setimb d}.
\end{equation*}
Now define $h$ from $a$ to $b$ by
\begin{equation}\label{eqn:sch-b:h}
  h(x)=
  \begin{cases}
    f(x),&\text{ if }x\in a\setminus g\setimb d;\\
 g\inv(x),&\text{ if }x\in g\setimb d.
  \end{cases}
\end{equation}
Then $h\colon a\bijection b$.
\end{proof}

\begin{parag}
  Where did this proof of the Schroeder--Bernstein Theorem come from?
  Perhaps more importantly, if we know that the Theorem is correct,
  but have forgotten the proof, how can we recover it?
  To define the bijection $h$ from $a$ to $b$, all we have to work
  with are $f$ and~$g\inv$.  The domain of $g\inv$ is only $g\setimb
  b$.  So $h$ and $f$ will have to agree on 
  $a\setminus g\setimb b$, and perhaps on a larger set.  Hence there will
  be a subset $d$ of $b$ such that $h$ is as in~\eqref{eqn:sch-b:h}.
  Since $h$ will be a bijection onto $b$, and $f$ and $g\inv$ are already
  injections, we need to ensure
  \begin{enumerate}
    \item
$f\setimb{a\setminus g\setimb d}\cap g\inv\setimb{g\setimb
      d}=\emptyset$, for injectivity of $h$;
\item
$f\setimb{a\setminus g\setimb d}\cup g\inv\setimb{g\setimb
      d}=b$, for surjectivity of $h$ onto $b$.
  \end{enumerate}
These conditions can be expressed by the single equation
\begin{equation*}
  b\setminus g\inv\setimb{g\setimb d}=f\setimb{a\setminus g\setimb d},
\end{equation*}
that is, $b\setminus d=f\setimb a\setminus(f\circ g)\setimb d$, which
can be written as
\begin{equation*}
  (b\setminus f\setimb a)\cup(f\circ g)\setimb d=d.
\end{equation*}
Now we can obtain $d$ as an intersection, as in the proof.
\end{parag}

\begin{parag}
  The Schroeder--Bernstein Theorem is often proved in the following
  way.  Assuming $f\colon a\injection b$ and $g\colon b\injection a$,
  we make the
  following definitions:
  \begin{align*}
    a_1&=g\setimb b,&b_1&=f\setimb a,\\
    a_2&=g\setimb{b_1},&b_2&=f\setimb{a_1},\\
    a_3&=g\setimb{b_2},&b_3&=f\setimb{a_2},\\
    a_4&=g\setimb{b_3},&b_4&=f\setimb{a_3},
  \end{align*}
and so on.  (We are not ready to be precise about what \Eng{and so on}
means here; this is why the proof above does not follow the present
lines.)  Then $a\includes a_1\includes a_2\includes\dotsb,$ and
$b\includes b_1\includes b_2\includes\dotsb$.  Also, $f$ determines a
bijection from $a\setminus a_1$ to $b_1\setminus b_2$, from
$a_2\setminus a_3$ to $b_3\setminus b_4$, and so on, while $g\inv$
determines a bijection from $a_1\setminus a_2$ to $b\setminus b_1$, from
$a_3\setminus a_4$ to $b_2\setminus b_3$, and so on.  Then there
is a bijection $h$ from $a$ to $b$ that agrees with these, and agrees
with $f$ at the elements of $a$ that are not yet accounted for.  In
fact, this will be the same $h$ found in the proof above.
\end{parag}

\begin{theorem}[Cantor]\label{thm:pow}\dindex{Cantor Theorem}
The subset-class of a set is larger than the set itself:
\begin{equation*}
  a\pinjects\pow a.
\end{equation*}
\end{theorem}

\begin{proof}
We have $x\mapsto\{x\}\colon a\injection\pow a$, so $a\injects\pow a$.
  Suppose $f\colon a\injection\pow a$.
  Let $b$ be the set $\set{x\in a}{x\notin f(x)}$.  Then
  \begin{align}\label{eqn:cantor1}
    c\in b&\lto c\in b\setminus f(c),\\\label{eqn:cantor2}
c\in a\setminus b&\lto c\in f(c)\setminus b
  \end{align}
(Exercise~\ref{ex:cantor}).
Thus, if $c\in a$, then $f(c)\neq b$.  So $b\notin\ran f$.  Therefore,
there is no bijection from $a$ to $\pow a$; so $a\pinjects\pow a$.
\end{proof}

\begin{parag}
  Note well how the preceding proof requires $b$ to be a set
  (Exercise~\ref{ex:why-set}).  If $a$
  were a proper class, then the proof would fail.  In particular, we
  cannot yet address the cardinality of $\pow{\pow a}$, since we have
  not established that $\pow a$ is a set.  This is what
  the following axiom is for.
\end{parag}

\begin{axiom}[Power-set]\label{ax:power-set} 
\axiomname{Power-set: \[\Exists xx=\pow a.\]}
  The subset-class of a set is a set: that is,
  \begin{equation*}
    \Exists xx=\pow a.
  \end{equation*}
\end{axiom}

\begin{parag}
  As foretold in \parref{par:infinitary}, we may now refer to the
  subset-class of a set as its \defn{power-set.}\dindex{power-set}
  We can form chains: 
  \begin{equation*}
    a\pinjects\pow a\pinjects\pow{\pow a}\pinjects\pow{\pow{\pow
    a}}\pinjects\dotsb. 
  \end{equation*}
In particular, letting $a$ be the empty set, we have
\begin{equation*}
  \emptyset\pinjects
\{\emptyset\}\pinjects
\{\emptyset,\{\emptyset\}\}\pinjects
\{\emptyset,\{\emptyset\},\{\{\emptyset\}\},\{\emptyset,\{\emptyset\}\}\}
\pinjects\dotsb; 
\end{equation*}
but this is hardly surprising.  Cantor's Theorem becomes
remarkable when we have \tech{infinite} sets.  
\end{parag}

\section{Ordinary induction and recursion}

\begin{parag}\label{par:inf}
  By the formal definition that we shall use, a class is
  \idefn{infinite} if it is equipollent with a proper sub\-{}-class of
  itself.  (Later, in Ch.~\ref{ch:cardinality}, we shall refer to such
  sets as \defn{Dedekind-infinite.})\dindex{Dedekind-infinite}
  Hence for example the universal class $\universe$ is
  infinite.  To see this precisely, first note that, by the Power-Set Axiom
  (\parref{ax:power-set}), we
  have a function $x\mapsto\pow x$ from $\universe$ to itself.  This
  function is
  injective, since, if $a\neq b$, then we may assume that $a\setminus
  b$ is non-empty, so that $a\setminus b\in\pow a\setminus\pow b$.
  Also, every power-set contains $\emptyset$, but $\emptyset$ contains
  nothing, so $\emptyset$ is not a power-set; thus, $x\mapsto\pow x$
  is not surjective onto $\universe$.  So $\universe$ is infinite, by
  definition.
  However, by the Russell Paradox (\parref{thm:R}), $\universe$
  has a sub\-{}-class that is not a set; so $\universe$ itself is not a
  set, by the Comprehension-Scheme (\parref{ax:comprehension}).  Is
  there an infinite \emph{set?}  It is generally assumed that there
  is, and we shall make the assumption in \parref{ax:infinity}; but
  let us first see how far we can go without it.
\end{parag}

\begin{parag}\label{par:rec}
Suppose $\cC$ is a class, and $\cF$ is a function, such that
\begin{enumerate}
  \item
$\cC\included\dom{\class F}$;
\item
$\cF\setimb{\cC}\included\cC$.
\end{enumerate}
Then $\cC$ can be said to be \idefn{closed under} $\cF$.  Suppose also
$i\in\cC$.  Then $\cC$ is not just a class anymore: it has additional
`structure' provided by $\cF$ and~$i$.  We can think of $\cC$ and
$\cF$ and $i$ together as something called a
\tech{structure,}\tindex{structure} 
denoted by
\begin{equation*}
  (\cC,\cF,i).
\end{equation*}
Since $\universe$ itself, together with $\in$, will another example of a
 structure---to be denoted $(\universe,\in)$---, let us distinguish
 $(\cC,\cF,i)$ as an \defn{iterative structure.}\dindex{iterative
 structure}\footnote{I could not 
 think of a better term.} (See \S~\ref{sect:structures}.)
There are two properties that such a structure might have:
 \begin{enumerate}
   \item
If $\cC$ is a sub\-{}-class of every class that contains $i$ and is closed
under $\cF$, then $(\cC,\cF,i)$ is \defn{recursive.}\dindex{recursive}
\item
If $\cC$ has no proper sub\-{}-class that contains $i$ and is closed
under $\cF$, then $(\cC,\cF,i)$ \defn{admits (proof by ordinary)
  induction.}\dindex{admits proof by induction}\dindex{induction}
 \end{enumerate}
If  $(\cC,\cF,i)$ is recursive, then $\cC$ can be understood as being
\idefn{defined recursively} by the rules
\begin{enumerate}
  \item
$i\in\cC$;
\item
$a\in\cC\lto\cF(a)\in\cC$.
\end{enumerate}
Here, $\cC$ contains what the rules require it to contain, \emph{and
  nothing else.}
If $(\cC,\cF,i)$ admits induction, this means that sub\-{}-classes of
  $\cC$ can be proved
to be equal to $\cC$ \defn{by (ordinary) induction:}\dindex{ordinary
  induction}\dindex{induction}  Suppose
  $\cD\included\cC$.  If
\begin{enumerate}
  \item
$i\in\cD$ (the \idefn{base} of the induction) and 
\item
$a\in\cD\lto\cF(a)\in\cD$ (that is, $\cF(a)\in\cD$ follows from
  the \idefn{inductive hypothesis} $a\in\cD$), 
\end{enumerate}
then $\cD=\cC$.
\end{parag}

\begin{lemma}
An iterative structure is recursive if and only if it admits induction. 
\end{lemma}

\begin{proof}
  Let $(\cC,\cF,i)$ be an iterative structure.
\begin{enumerate}
\item
Suppose
 $(\cC,\cF,i)$ does not admit induction.  Then $\cC$ has a proper
  sub\-{}-class $\cD$ that contains $i$ and is closed under $\cF$.  Then
  $\cC$ is not a sub\-{}-class of $\cD$, so $(\cC,\cF,i)$ is not recursive.
\item
Suppose conversely that $(\cC,\cF,i)$ is not recursive.  Then there is a
  class $\cD$ containing $i$ and closed under $\cF$ of which $\cC$ is
  not a sub\-{}-class.  Then $\cC\cap\cD$ is a proper sub\-{}-class of $\cC$
  that contains $i$ and is closed under $\cF$ (by
  Theorem~\ref{thm:functions}).  Hence $(\cC,\cF,i)$ does not admit
  induction.\hfill\qed 
\end{enumerate}
\renewcommand{\qed}{}
\end{proof}

\begin{parag}\label{par:one-rec}
   Suppose the iterative structure $(\cC,\cF,i)$ admits induction.
   Then it can be denoted suggestively by 
   \begin{equation*}
     \{i,\cF(i),\cF(\cF(i)),\dots\}.
   \end{equation*}
See Fig.~\ref{fig:induction}.
\begin{figure}[t]
    \begin{pspicture}(-3,-8)(2,0.5)
\psset{arrows=->}
\rput(0,0){\rnode{20}{\psframebox[linecolor=white]{$i$}}}
\rput(0,-2){\rnode{21}{\psframebox[linecolor=white]{$\cF(i)$}}}
\ncline{20}{21}
\rput(0,-4){\rnode{22}{\psframebox[linecolor=white]{$\cF(\cF(i))$}}}
\ncline{21}{22}
\rput(-1.4,-5.4){\rnode{23}{\psframebox[linecolor=white]{$\cF(\cF(\cF(i)))$}}}
\ncline{22}{23}
\Cnode[linecolor=white](0,-6.8){24}
\ncline{23}{24}
\Cnode[linecolor=white](1.4,-5.4){25}
\ncline{24}{25}
\ncline{25}{22}
    \end{pspicture}
    \begin{pspicture}(-1.5,-8)(1.5,0.5)
\psset{arrows=->}
\rput(0,0){\rnode{10}{\psframebox[linecolor=white]{$i$}}}
\rput(0,-2){\rnode{11}{\psframebox[linecolor=white]{$\cF(i)$}}}
\ncline{10}{11}
\rput(0,-4){\rnode{12}{\psframebox[linecolor=white]{$\cF(\cF(i))$}}}
\ncline{11}{12}
\rput(0,-6){\rnode{13}{\psframebox[linecolor=white]{$\cF(\cF(\cF(i)))$}}}
\ncline{12}{13}
\psset{linestyle=dotted}
\pnode(0,-8){14}
\ncline{13}{14}
    \end{pspicture}
    \begin{pspicture}(-2,-6)(2,2.5)
\psset{arrows=->}
\rput(0,2){\rnode{30}{\psframebox[linecolor=white]{$i$}}}
\rput(-1.73,1){\rnode{31}{\psframebox[linecolor=white]{$\cF(i)$}}}
\ncline{30}{31}
\rput(-1.73,-1){\rnode{32}{\psframebox[linecolor=white]{$\cF(\cF(i))$}}}
\ncline{31}{32}
\rput(0,-2){\rnode{33}{\psframebox[linecolor=white]{$\cF(\cF(\cF(i)))$}}}
\ncline{32}{33}
\Cnode[linecolor=white](1.73,-1){34}
\ncline{33}{34}
\Cnode[linecolor=white](1.73,1){35}
\ncline{34}{35}
\ncline{35}{30}
    \end{pspicture}
    \caption{Some iterative structures admitting
    induction}\label{fig:induction} 
\end{figure}
Suppose $(\cD,\cG,j)$ is another iterative structure (not necessarily
admitting induction.)  Then there is
at most one function $\cH$ from $\cC$ to $\cD$ such that
\begin{enumerate}
  \item
$\cH(i)=j$;
\item
$a\in\cC\lto \cH(\cF(a))=\cG(\cH(a))$, that is, $\cH\circ \cF=\cG\circ
  \cH$. 
\end{enumerate}
Indeed, suppose $\cH_0$ and $\cH_1$ are two such functions.  Let
\begin{equation*}
\cC_1=\cls x{x\in\cC\land\cH_0(x)=\cH_1(x)}.  
\end{equation*}
Since $\cH_0(i)=j=\cH_1(i)$, we have
$i\in\cC_1$.  Suppose $a\in\cC_1$, so that $\cH_0(a)=\cH_1(a)$.  Then 
\begin{equation*}
  \cH_0(\cF(a))=\cG(\cH_0(a))=\cG(\cH_1(a))=\cH_1(\cF(a)),
\end{equation*}
so $\cF(a)\in\cC_1$.  Therefore, by induction, $\cC_1=\cC$.  So there is at
most one function $\cH$; if $\cH$ does exist at all, then it is said to be
defined \idefn{recursively} by the two rules above.  However, in some
cases, $\cH$ does not exist (Exercise~\ref{ex:rec-counter}).
\end{parag}

\section{Countably infinite classes}

\begin{parag}
  Suppose $\cC$ is infinite.  This means:
  \begin{enumerate}
    \item
  there is an element $i$ of $\cC$, and
\item
 there is a function $\cF$
  from $\cC$ under which $\cC$ is closed,
such that
    \item
$i\notin\cF\setimb{\cC}$, and
\item
$\cF\rest{\cC}$ is injective.
  \end{enumerate}
(In particular, $(\cC,\cF,i)$ is an iterative structure.)
Suppose also
\begin{enumerate}
  \setcounter{enumi}{4}
\item
$(\cC,\cF,i)$ admits induction.
\end{enumerate}
Then $\cC$ is called \defn{countably infinite.}\dindex{countably
  infinite}  I propose to refer to 
$(\cC,\cF,i)$ as an \defn{arithmetic structure.}\dindex{arithmetic
  structure}  The five numbered 
conditions here are sometimes referred to as the \defn{Peano
  axioms.}\dindex{Peano axioms}
\end{parag}

\begin{lemma}\label{lem:ci}
  Every infinite set has a countably infinite subset.
\end{lemma}

\begin{proof}
  Say $a$ is infinite.  Then there is an element $i$ of $a$ and an
  injection $f$ from $a$ into $a\setminus\{i\}$.  Let $\cC$ be the
  class
  \begin{equation*}
    \cls x{x\included a\land i\in x\land f\setimb x\included x};
  \end{equation*}
this is the class of subsets of $a$ that contain $i$ and are closed
under $f$.  Then $\bigcap\cC$ also belongs to $\cC$
(Exercise~\ref{ex:nc-in-c}) and is a set $a_0$.  Then $(a_0,f,i)$ is
recursive, so $a_0$ is countably infinite.
\end{proof}

\begin{parag}
  If we have two sets $a$ and $b$, then surely we can form a set that
  \emph{includes} $a$ and \emph{contains} $b$; that is, surely the
  class $a\cup\{b\}$ is a set.  The Pairing Axiom is a special case of
  this observation; the full Union Axiom (\parref{ax:union}) will be a
  generalization. 
\end{parag}

\begin{axiom}[Weak Union]\label{ax:weak-union}
\axiomname{Weak Union: \[\Exists xx=a\cup\{b\}.\]}
  The union of a set and a singleton is a set:
  \begin{equation*}
    \Exists xx=a\cup\{b\}.
  \end{equation*}
\end{axiom}

\begin{theorem}[Recursion]\label{thm:rec}\dindex{Recursion Theorem}
Suppose $(\cC,\cF,i)$ is an arithmetic structure, and $(\cD,\cG,j)$ is
  an iterative structure.
Then there is (uniquely, by \parref{par:one-rec}) a function $\cH$ from
  $\cC$ into 
  $\cD$ defined recursively by 
  \begin{enumerate}
    \item
$\cH(i)=j$;
\item
$a\in \cC\lto \cH(\cF(a))=\cG(\cH(a))$, that is, $\cH\circ \cF=\cG\circ
  \cH$. 
  \end{enumerate}
\end{theorem}

\begin{proof}
  Let $\cE$ be the class
  \begin{multline*}
    \cls x{\Forall y(y\in x\lto y=(i,j)\lor{}\\
{}\lor\Exists u\Exists v((u,v)\in
    x\cap(\cC\times\cD)\land (\cF(u),\cG(v))=y))},
  \end{multline*}
which is a sub\-{}-class of $\pow{\cC\times\cD}$.  Let $\cH=\bigcup\cE$.  Then:
\begin{enumerate}
  \item
$\{(i,j)\}\in\cE$, so $i\mathrel{\cH}j$;
\item
if $a\mathrel{\cH}b$, then $(a,b)$ is an element of a
member $c$ of $\cE$; but then $c\cup\{(\cF(a),\cG(b))\}\in\cE$; so
$\cF(a)\mathrel{\cH}\cG(b)$.   
\end{enumerate}
By induction then, $\dom{\cH}=\cC$.  We have not yet used the
particular properties of $\cF$; but now we need them to prove that
$\cH$ is functional:
\begin{enumerate}
  \item
If $i\mathrel{\cH}k$, then $(i,k)$ belongs to an element of
$\cE$; since $i\notin\ran{\cF}$, this means, by the definition of
$\cE$, that $k=j$.
\item
Suppose $b$ is unique such that $a\mathrel{\cH}b$.  We have shown
$\cF(a)\mathrel{\cH}\cG(b)$.  Suppose also
 $\cF(a)\mathrel{\cH}c$.  Then (by definition of $\cE$ and
$\cH$, since $i\notin\ran{\cF}$) we have
$a_1\mathrel{\cH}b_1$ for some 
$a_1$ and $b_1$ such that 
 $\cF(a_1)=\cF(a)$ and $\cG(b_1)=c$.  Since $\cF$ is injective, this
means $a_1=a$; so $b_1=b$, by the uniqueness of $b$; hence $c=\cG(b)$. 
\end{enumerate}
By induction then, $\cH$ is functional.  Since we have
$a\mathrel{\cH}c\lto \cF(a)\mathrel{\cH}\cG(c)$, we can
now write this as $\cH(a)=c\lto\cH(\cF(a))=\cG(c)$.
Equivalently, $a\in \cC\lto\cH(\cF(a))=\cG(\cH(a))$.
%In short, $\cH\circ \cF=\cG\circ\cH$.
Therefore $\cH$ is as desired.
\end{proof}

\begin{theorem}\label{thm:cnt-equip}
All countably infinite classes are equipollent.
\end{theorem}

\begin{proof}
Suppose $(\cC,\cF,i)$ and $(\cD,\cG,j)$ are arithmetic structures.
By the Recursion Theorem,
  there are functions $\cH$ from $\cC$ to $\cD$, and $\cK$ from $\cD$ to $\cC$,
  such that
  \begin{enumerate}
    \item
$\cH(i)=j$ and $\cK(j)=i$;
\item
$\cH\circ \cF=\cG\circ \cH$ and $\cK\circ \cG=\cF\circ \cK$.
  \end{enumerate}
Then also
\begin{enumerate}
  \item
$(\cK\circ \cH)(i)=i$;
\item
$(\cK\circ \cH)\circ \cF=\cF\circ(\cK\circ \cH)$ since,
  by~\eqref{eqn:comp-f-assoc}, we can compute
$(\cK\circ \cH)\circ \cF=\cK\circ(\cH\circ \cF)=\cK\circ(\cG\circ \cH)=(\cK\circ \cG)\circ
  \cH=(\cF\circ \cK)\circ \cH=\cF\circ(\cK\circ \cH)$.
\end{enumerate}
Thus $\cK\circ \cH$ is a recursively defined function from $\cC$ to itself.
But $\id{\cC}$ satisfies the same definition.  Therefore
(\parref{par:one-rec}) $\cK\circ \cH=\id{\cC}$.  Likewise $\cH\circ
\cK=\id{\cD}$. 
Therefore, by Theorem~\ref{thm:f-inj-bij}, $\cH$ is a bijection from
$\cC$ to~$\cD$. 
\end{proof}

\section{Infinite sets}

\begin{parag}\label{par:post-inf}
We have shown
  (\parref{par:inf}) that there are infinite classes.  
  We have defined (\parref{par:one-rec}) countably infinite classes,
  and we have shown (\parref{thm:cnt-equip}) that all of them have the
  same cardinality.  
We have shown (\parref{lem:ci}) that, if there is an infinite set,
  then there is a countably infinite set.
We have \emph{not} shown that a countably infinite \emph{class}
  exists, much less a set.  If we believe that there is an infinite
  set, then we can \emph{postulate} its existence.  Indeed, suppose
  $(\cC,\cF,i)$ is an 
  iterative structure, and $\cF$ is injective on $\cC$, and
  $i\notin\cF\setimb{\cC}$.  For example, the structure might be
  $(\universe,x\mapsto\pow x,\emptyset)$.  Let $\cD$ be the class
  \begin{equation*}
    \cls x{x\included\cC\land i\in\cC\land\cF\setimb x\included x}.
  \end{equation*}
(Compare with the proof of Lemma~\ref{lem:ci}.)  All elements of $\cD$
  are infinite sets.  If there \emph{are} elements,
then $\bigcap\cD$ is a countably infinite set.  If $\cD$ is empty,
  then $\bigcap\cD=\universe$ (Exercise~\ref{ex:cop}), which is not a
  set (\parref{par:inf}).  So, by postulating that $\bigcap\cD$
  is a set, we ensure that $\cD$ is not empty, so that there are
  infinite sets.  But this
seems like cheating, since, before making such a postulate, we cannot
  exhibit an element of $\cC$.  Can we 
obtain a countably infinite \emph{class} without knowing whether there
are any infinite sets?
\end{parag}

\begin{parag}\label{par:aF}
We can try to define a countably infinite class as in the proof of the
Recursion Theorem.
Suppose
$(\cC,\cF,i)$ is an iterative structure, and let
\begin{equation}\label{eqn:D}
\cD=  \cls x{\Forall y(y\in x\lto y=i\lor\Exists z(z\in
    x\cap\cC\land\cF(z)=y))}.
\end{equation}
Then $\cD\included\pow{\cC}$, and $\{i\}\in \cD$; also, if $b\in
\cD$, and $a\in b$, then $b\cup\{\cF(a)\}\in \cD$.
Thus, $i\in\bigcup \cD$; and if $a\in\bigcup \cD$, then
$\cF(a)\in\bigcup \cD$.  So
$(\bigcup\cD,\cF,i)$ is an iterative structure.  However, it might
not be arithmetic, even if $\cF\colon\cC\injection \cC\setminus\{i\}$.  For
example, suppose $\cF$
is the injective function $x\mapsto\{x\}$ on $\universe$, and $i$ is
$\emptyset$.  If there is a set $a$ that is equal to the set $\{a\}$,
then $\cF(a)=a$, so that $\{a\}\in \cD$, and then $a\in\bigcup
\cD$.  So $\bigcup\cD$ properly includes $\bigcup\cD\setminus\{a\}$,
although the latter class still contains $i$ and is closed under
$\cF$.   
\end{parag}

\begin{theorem}\label{thm:wo}
  Suppose 
$(\cC,\cF,i)$ is an iterative structure, and
  let $\cD$ be as in~\eqref{eqn:D}.
If $\cC$ is well\-{}-ordered by a relation $<$ such that 
  \begin{equation}\label{eqn:<}
  a\in\cC\lto a<\cF(a),  
  \end{equation}
then $(\bigcup\cD,\cF,i)$ is an arithmetic structure, so $\bigcup\cD$
is countably infinite.
\end{theorem}

\begin{proof}
  We showed in \parref{par:aF} that
  $(\bigcup\cD,\cF,i)$ is an iterative structure.
  Suppose $\cE$ is a class of which $\bigcup\cD$ is \emph{not} a sub\-{}-class.
  Then $\bigcup\cD\setminus\cE$ is non-empty.
  If $\cC$ is well-ordered, then $\bigcup\cD\setminus\cE$ has a least
  element, $a$.  By definition of $\cD$, either $a=i$, or $a=\cF(b)$ for
  some $b$ in $\bigcup\cD$.
If $a=i$, then
  $i\notin\cE$.  If $a=\cF(b)$,
  then 
  $b<a$, so $b\in\cE$, but $\cF(b)\notin\cE$, and so $\cE$ is not
  closed under $\cF$.  The contrapositive of this conclusion is that
  $\bigcup\cD$ is a sub\-{}-class of every class
  that contains $i$ and is closed under $\cF$.  So
  $(\bigcup\cD,\cF,i)$ is recursive, hence it admits induction.  

It remains to show
$\cF\rest{\bigcup\cD}\colon\bigcup\cD\injection\bigcup\cD\setminus\{i\}$. 
By induction, $i$ is the least element of $\bigcup\cD$.  Indeed, let
$\cE=\cls x{x\in\bigcup\cD\land i\leq x}$.  Then $i\in\cE$, and if
$a\in\cE$, then $i\leq a<\cF(a)$ by~\eqref{eqn:<}, so $\cF(a)\in\cE$.
Therefore $\cE=\bigcup\cD$.
It now follows from~\eqref{eqn:<} that
$i\notin\cF\setimb{\bigcup\cD}$.

Finally, $\cF$ is injective on $\bigcup\cD$.  Indeed, suppose if
possible that $\bigcup\cD$ has elements $a$ and $b$ such that $a<b$,
but $\cF(a)=\cF(b)$.  Then
\begin{equation}\label{eqn:a<b<f(a)}
  a<b<\cF(a).
\end{equation}
In particular, $b\neq i$, so $b=\cF(c)$ for some $c$ in $\bigcup\cD$.
Then $c<b$.
We can let $a$ be least such that $b$ exists as
in~\eqref{eqn:a<b<f(a)}; then we can let $b$ be least.  In particular,
by the minimality of $b$, since $c<b$, we have $c\leq a$.  But
$\cF(c)=b\neq\cF(a)$, so $c\neq a$.  Hence $c<a$.  By minimality of $a$,
we then have $\cF(c)\leq a$, so $b\leq a$, contrary
to~\eqref{eqn:a<b<f(a)}.  Therefore $\cF$ is injective on
$\bigcup\cD$, and so
$(\bigcup\cD,\cF,i)$ is an arithmetic structure.
\end{proof}

\begin{parag}
We shall show in the next section that the conditions of
Theorem~\ref{thm:wo} are met when $\cC$ is a certain class called
$\on$, and $\cF$ is $x\mapsto x\cup\{x\}$, and $i=\emptyset$.  How
might this be discovered?  The only strict ordering that we know
is $\pincluded$.  Also, to obtain a set that properly includes a set
$a$, the easiest thing to do is to take $a\cup\{a\}$.  (However, this
does not work if $a=\{a\}$.)
So we should try letting
  $\cF$ be $x\mapsto x\cup\{x\}$.  The simplest set is $\emptyset$, so
we should try letting $i$ be this.  Also, the class $\cD$ given
by~\eqref{eqn:D} contains $\emptyset$, and $\{i\}$, and
$\{i,\cF(i)\}$, and $\{i,\cF(i),\cF(\cF(i))\}$, and so forth.  Once we
do obtain $\bigcap\cD$ as $\{i,\cF(i),\cF(\cF(i)),\dots\}$, then we
might be able to define a function $\cH$ from $\bigcap\cD$ into $\cD$
so that
  \begin{align*}
    \cH(i)                  &=\emptyset,\\
\cH(\cF(i))                 &=\{i\},\\
\cH(\cF(\cF(i)))            &=\{i,\cF(i)\},\\
\cH(\cF(\cF(\cF(i))))       &=\{i,\cF(i),\cF(\cF(i))\},\dots
%\cH(\cF(\cF(\cF(\cF((i))))))&=\{i,\cF(i),\cF(\cF(i)),\cF(\cF(\cF(i)))\},\dots
  \end{align*}
We should be able to obtain this by the Recursion Theorem if there is
a function $\cG$ on $\cD$ such that
\begin{align*}
  \cG(\emptyset)&=\{i\},\\
\cG(\{i\})&=\{i,\cF(i)\},\\
\cG(\{i,\cF(i)\})&=\{i,\cF(i),\cF(\cF(i))\},\dots
\end{align*}
We seem to have this if $i=\emptyset$ and $\cG$ is $x\mapsto
x\cup\{x\}$.  
\begin{comment}
  

In the next section, we show that the conditions of the
theorem are indeed satisfied when $i=\emptyset$ and $\cF$ is $x\mapsto
x\cup\{x\}$.  


\end{comment}
Since $a\in a\cup\{a\}$, the fundamental relation of
containment will be involved in the construction.
\end{parag}

\section{Ordinals}

\begin{parag}
  A class $\cC$ is called \idefn{transitive} if it \emph{includes}
  each of its elements, that is, $a\in\cC\lto a\included\cC$, or
  equivalently 
  \begin{equation*}
    b\in a\land a\in\cC\lto b\in\cC.
  \end{equation*}
Compare with~\eqref{eqn:transitive}; however,
transitivity of \emph{classes} must be distinguished from transitivity
of \emph{relations} on classes (\parref{par:composite}).  We shall be
particularly interested in the relation of containment, $\in$:
\begin{enumerate}
  \item
%$\Bigl\{\emptyset,\bigl\{\emptyset\bigr\},\bigl\{\{\emptyset\}\bigr\}\Bigr\}$
 $\Bigl\{\emptyset,     \{\emptyset\}     ,\bigl\{\{\emptyset\}\bigr\}\Bigr\}$
    is a transitive 
    set, but containment is
    not transitive on this set.
\item
On the set
%$\biggl\{\Bigl\{\emptyset\Bigr\},\Bigl\{\bigl\{\emptyset\bigr\}\Bigr\},\Bigl\{\bigl\{\emptyset\bigr\},\bigl\{\{\emptyset\}\bigr\}\Bigr\}\biggr\}$,
$\biggl\{\{\emptyset\},\bigl\{\{\emptyset\}\bigr\},\Bigl\{\{\emptyset\},\bigl\{\{\emptyset\}\bigr\}\Bigr\}\biggr\}$,
containment is transitive, but the set itself is not
transitive (it does not include its member $\{\emptyset\}$).
\end{enumerate}
For every set $a$, let $a\cup\{a\}$ be called the
\idefn{successor} of $a$; this can be denoted by
\begin{equation*}
  \vscr a.
\end{equation*}
Then (Exercise~\ref{ex:a'})
\begin{equation}\label{eqn:a'}
\vscr a=\bigcap\cls x{a\in x\land a\included x}.
\end{equation}
\end{parag}

\begin{lemma}\label{lem:trans}
  Every transitive set includes the
successor of each of its elements.  The successor of every transitive set
is transitive.
\end{lemma}

\begin{proof}
Suppose $a$ is transitive.  If $b\in a$, then
$\{b\}\included a$, but also $b\included a$ by transitivity of $a$, so
that $\vscr b\included a$.  If $c\in \vscr a$, then either $c=a$ or
$c\in a$; in either case, $c\included \vscr a$; thus $\vscr a$ is
transitive. 
\end{proof}

\begin{parag}\label{par:ord}
A set is an \idefn{ordinal (number)} if it is transitive and also
well-ordered by containment.  Trivially, $\emptyset$ is an
ordinal.  We shall generally denote ordinals by letters from the
beginning of the Greek alphabet: $\alpha$,~$\beta$,
$\gamma$,~$\delta$, and so
on.  The class of ordinals is denoted by $\on$.
\end{parag}

\begin{lemma}\label{lem:ord-n-set}
Suppose $\alpha$ is an ordinal, and $b$ is a set.  The following are
equivalent:
\begin{enumerate}
  \item\label{xin}
  $b\in \alpha$;
  \item\label{xpino}
   $b\pincluded \alpha$, and $b$ is transitive;
  \item\label{xpis}
  $b$ is a proper initial segment of $\alpha$ with respect to containment.
\end{enumerate}
Hence every element of $\alpha$ is an ordinal.  Moreover,
$\vscr{\alpha}$ is also an ordinal.
\end{lemma}

\begin{proof}
First, there are three implications to prove:
\begin{enumerate}
  \item
%(\ref{xin})$\lto$(\ref{xpino}):  
Suppose $b\in\alpha$.  Then
$b\neq\alpha$, since $\alpha$ is strictly well-ordered by containment
  (see Exercise~\ref{ex:o-wf});
  and $b\included\alpha$, by transitivity of $\alpha$.  Hence
  $b\pincluded\alpha$.  Say
  $c\in b$. Then $c\in\alpha$. Say also $d\in c$.
Then $d\in\alpha$ by transitivity of $\alpha$.  Thus,
$d\in c\land c\in b$, and $b$, $c$, and $d$ are in $\alpha$;
so $d\in b$ by
transitivity of $\in$ on $\alpha$.  Thus $c\included b$.  Therefore $b$
is transitive.
\item
%(\ref{xpino})$\lto$(\ref{xpis}):  
Suppose $b\pincluded\alpha$, and $b$ is transitive.  Say $c\in b$ and
$d\in c$.  Then $d\in b$ by
transitivity of $b$.  Hence $b$ is a proper initial segment of $\alpha$.
\item
%(\ref{xpis})$\lto$(\ref{xin}):  
Suppose $b$ is a proper initial
segment of $\alpha$ with respect to $\in$.  Let $c$ be the $\in$-least
element of $\alpha\setminus b$.  In particular, $c\notin b$; but
$c\in\alpha$, so $c\included\alpha$.  We
shall show $c=b$.  We first show $b\included c$.  Say 
$d\in\alpha$, but $d\notin c$.  Then $d=c$ or $c\in d$, since $\alpha$
is totally ordered by $\in$.  If $d=c$, then $d\in\alpha\setminus b$,
so $d\notin b$.  If $c\in d$, then $d\notin b$, since $b$ is an initial
segment of $\alpha$, and $c\notin b$.  In either case, $d\notin b$.
Thus, $b\included
c$.  Conversely, if $d\in c$, then
$d\in\alpha$; so $d\in b$, since $c$ is
$\in$-least in $\alpha\setminus b$.  Hence $c\included b$, so $b=c$,
and $b\in\alpha$.
\end{enumerate}
Every subset of a well-ordered set is well-ordered; so a
transitive subset of $\alpha$ is an ordinal; but we have just shown
that the elements of $\alpha$ are transitive subsets.  So the elements
of $\alpha$ are ordinals.

To see that
$\vscr{\alpha}$ is an ordinal, note first that elements of $\alpha$
are \emph{proper} subsets and are hence distinct from $\alpha$.  So
$\alpha\notin\alpha$.  Hence, since $\in$ is irreflexive on $\alpha$, it
remains so on $\alpha\cup\{\alpha\}$, that is, $\vscr{\alpha}$.
Also, if $b\in\alpha$, then $b\included\alpha$, so $\alpha\notin b$
(since $\alpha\notin\alpha$).  So, since $\in$ is anti-symmetric on
$\alpha$, it remains so on $\vscr{\alpha}$.  Since $\alpha$ is
transitive, and $\in$ is transitive on $\alpha$, we have that $\in$ is
transitive on $\vscr{\alpha}$.  So $\in$ is a strict total ordering of
$\vscr{\alpha}$, and $\alpha$ is $\in$-greatest in $\vscr{\alpha}$.
The $\in$-least element of a non-empty subset $b$ of $\vscr{\alpha}$
is the least element of $b\cap\alpha$, if this set is non-empty;
otherwise, it is $\alpha$ itself.  In particular, $\vscr{\alpha}$ is
well-ordered by $\in$.  So $\vscr{\alpha}$ is an ordinal.
\end{proof}

\begin{lemma}
  Suppose $\alpha$ and $\beta$ are distinct ordinals such that
  $\alpha\notin\beta$.  Then $\beta\in\alpha$.
\end{lemma}

\begin{proof}
  Since $\alpha\notin\beta$, we know from Lemma~\ref{lem:ord-n-set}
  that $\alpha$ is not a proper subset of $\beta$.  Since also we
  assume $\alpha\neq\beta$, we have that $\alpha$ is not a subset of
  $\beta$, so $\alpha\setminus\beta$ is
  non-empty.  Let $\gamma$ be its $\in$-least element.  Then $\gamma$
  is an initial segment of $\alpha$, again by
  Lemma~\ref{lem:ord-n-set}; so its elements are in $\beta$, and
  $\gamma\included\beta$.  But $\gamma\notin\beta$.  Since $\gamma$ is
  an ordinal, $\gamma$ must not be a proper subset of $\beta$.  Hence
  $\gamma=\beta$.  
\end{proof}

\begin{theorem}\label{thm:on-wo}
  $\on$ is transitive and well-ordered by containment.
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:on-wo}.
\end{proof}

\begin{corollary}[Burali-Forti
    Paradox]\label{cor:bf-paradox}\dindex{Burali-Forti Paradox}
  $\on$ is not a set, so it is not an ordinal.
\end{corollary}

\begin{proof}
  Exercise~\ref{ex:bf-paradox}.
\end{proof}

\begin{parag}\label{par:omega-as-class}
By Theorem~\ref{thm:wo}, there is a class
$\{\emptyset,\vscr{\emptyset},\vscr{\vscr{\emptyset}},\dots\}$;
it is the class of \defn{natural numbers,}\dindex{natural number} and
it can be denoted by
\begin{equation*}
  \vnn.
\end{equation*}
There are \defn{numerals}\dindex{numeral} for denoting natural numbers:
\begin{align*}
  0&=\emptyset,& 5&=\vscr 4,\\
  1&=\vscr0,& 6&=\vscr 5,\\
  2&=\vscr1,& 7&=\vscr 6,\\
  3&=\vscr2,& 8&=\vscr 7,\\
  4&=\vscr3,& 9&=\vscr 8.
\end{align*}
If $\vnn$ is a proper class, then it is just $\on$
(Exercise~\ref{ex:omega=on}).  We shall ultimately
(\parref{ax:infinity}) say that $\vnn$ \emph{is} a set; but
we need not do this for a while.
\end{parag}

\section*{Exercises}
\addcontentsline{toc}{section}{Exercises}

\begin{enumerate}
  \renewcommand{\theenumi}{\arabic{enumi}}
\item\label{ex:equip}
Show that equipollence of sets is an equivalence-relation, and hence that it
is justifiable to define the cardinality of a set $a$ as $\cls
x{x\equip a}$ (as in \parref{par:equip}).
\item\label{ex:<-trans}
Show that $\injects$ is transitive and reflexive, but $\pinjects$ is
transitive and irreflexive.
\item\label{ex:sch-b}
Establish~\eqref{eqn:sch-b} in the proof of the Schroeder--Bernstein
Theorem. 
\item\label{ex:sch-bb}
Assuming $\class A\included\class B\included\cD$ and $\class
C\included\cD$, show that $\class B\setminus\class A=\class
D\setminus\cC\iff\cC=(\cD\setminus\class B)\cup\class
A$.  Show also that the condition $\class A\included\class B$ is
necessary.
\item
Is the Schroeder--Bernstein Theorem true for classes in general?
\item\label{ex:cantor}
Establish the implications~\eqref{eqn:cantor1} and~\eqref{eqn:cantor2}
in the proof of Cantor's Theorem.
%\item\label{ex:rec}
%Prove the claim in \parref{par:post-inf}.
\item\label{ex:why-set}
Why does the proof of Cantor's Theorem (\parref{thm:pow}) require
$\set{x\in a}{x\notin f(x)}$ to be a set?
\item\label{ex:rec-counter}
Find an example of a structure $(\cC,\cF,i)$ admitting induction and an
iterative structure
$(\cD,\cG,j)$ such that there is \emph{no} function $\cH$ from $\cC$
to $\cD$ such that $\cH(i)=j$ and $\cH\circ\cF=\cG\circ\cH$.
\item\label{ex:nc-in-c}
Prove the claim in the proof of Lemma~\ref{lem:ci}.
\item
How is the Weak Union Axiom (\parref{ax:weak-union}) used in the proof
of the Recursion Theorem (\parref{thm:rec})? 
\item\label{ex:a'}
Prove~\eqref{eqn:a'}.
\item\label{ex:o-wf}
Show that, if $a=\{a\}$, then $a$ is not an ordinal.
\item\label{ex:on-wo}
Prove Theorem~\ref{thm:on-wo}.
\item\label{ex:bf-paradox}
Prove the Burali-Forti Paradox (\parref{cor:bf-paradox}).
\item\label{ex:omega=on}
Show that, if $\vnn$ is a proper class, then $\vnn=\on$. 
\end{enumerate}

\chapter{The natural numbers}\label{ch:N}

%\setcounter{equation}{9}

\section{Structures}\label{sect:structures}

\begin{parag}
The class of functions from
a set $a$ into a class $\cC$ can be denoted
  \begin{equation*}
    \mapset{a}{\cC}.
  \end{equation*}
We shall be interested especially in the classes $\mapset n{\cC}$, where
$n\in\vnn$ and $\cC\neq\emptyset$.  In this case, we may write
\begin{equation*}
  \cC^n
\end{equation*}
instead of $\mapset n{\cC}$, although some cases of this notation will
get a different interpretation in \parref{par:card-exp}.
Meanwhile have
\begin{equation}\label{eqn:C0}
%\mapset{0}{\cC}
\cC^0
=\{0\}=1,
\end{equation}
as well as
\begin{align}\label{eqn:C1}
\cF\mapsto\cF(0)
&\colon%\mapset{1}{\cC}
\cC^1\bijection\cC,\\\label{eqn:C2}
  \cF\mapsto(\cF(0),\cF(1))
&\colon%\mapset{2}{\cC}
\cC^2\bijection\cC\times\cC.
\end{align}
A notation like $\cC\times\cC\times\cC$ is ambiguous; it
could be $(\cC\times\cC)\times\cC$ or $\cC\times(\cC\times\cC)$; but the
distinction is usually unimportant, since the two classes are in
bijection with each other and with ${\cC}^3$ (Exercise~\ref{ex:3}).
\end{parag}

\begin{parag}
An arbitrary element of ${\cC}^n$ can be written as
\begin{equation*}
  (a_i\colon i\in n),
\end{equation*}
or as $(a_0,\dots,a_{n-1}),$
or just as
\begin{equation*}
  \vec a.
\end{equation*}
If the free variables of a formula $\phi$ are the variables $x_i$,
where $i\in n$, then we can write $\phi$ as $\phi(x_0,\dots,x_{n-1})$
or $\phi(\vec x)$.  Such a formula is called $n$-ary, and the result
of replacing each free occurrence of
$x_i$ with $a_i$, for each $i$ in $n$, is
$\phi(a_0,\dots,a_{n-1})$ or $\phi(\vec a)$.
In general, a sub\-{}-class of ${\cC}^n$ can be called an
\defn{$n$-ary relation on}\dindex{relation}\dindex{n-ary
  relation@$n$-ary relation} $\cC$: such a relation is
\begin{equation*}
  \cls{\vec x\in\cC^n}{\phi(\vec x)}
\end{equation*}
for some $n$-ary formula $\phi$.
  By~\eqref{eqn:C1}, a
$1$-ary relation on $\cC$ can be considered as a
sub\-{}-class of $\cC$; by~\eqref{eqn:C2}, a 
$2$-ary relation can be considered as a binary
relation.  A function from ${\cC}^n$  
into $\cC$ is an \defn{$n$-ary operation on}\dindex{n-ary
  operation@$n$-ary operation}\dindex{operation} $\cC$. 
By~\eqref{eqn:C0} and~\eqref{eqn:C1}, a $0$-ary operation can
be considered as an element of $\cC$.  A singulary
($1$-ary) operation $\cF$ is sometimes written as
\begin{equation*}
  x\mapsto x^{\cF}
\end{equation*}
(as in the case of the successor-operation $x\mapsto\vscr x$)
instead of $x\mapsto\cF(x)$;
a binary ($2$-ary) operation $\cG$ is often
written as
\begin{equation*}
  (x,y)\mapsto x\mathop{\cG}y
\end{equation*}
instead of $(x,y)\mapsto\cG(x,y)$.
\end{parag}

\begin{parag}
A \idefn{structure} is a non-empty class equipped with some operations
and relations.  The class is then the \idefn{universe} of the
structure.  Examples include:
\begin{enumerate}
  \item
the iterative structures of \parref{par:rec}, such as
$(\vnn,x\mapsto\vscr x,0)$; 
\item
$(\cC,\cR)$, where $\cR$ is an ordering of $\cC$: this structure
%  $(\cC,\cR)$ 
is an \idefn{ordered class} or just an \defn{order;}\dindex{order} 
\item
$(\universe,\in)$;
\item
$(\pow{\cC},\cap,\cup,x\mapsto x\comp,\emptyset,\cC)$.
\end{enumerate}
We can understand a structure formally as a class
(Exercise~\ref{ex:str}), but it is not necessary to do so.
When we speak in general terms, we may denote a structure by the
Fraktur form of the letter denoting its universe.  So the structure
$(\cC,\dots)$ may be denoted by $\str C$, and $(a,\dots)$ by $\str a$.
The Fraktur letters can be written by hand
in the S\"utterlin script (Fig.~\ref{fig:suetterlin}).\footnote{If you
  learn to write these letters, you will be among the few people who
  know how to.  I took the figure from
  \url{www.suetterlinschrift.de/Englisch/Sutterlin.htm}.}
\end{parag}

\begin{figure}[t]\label{fig:suetterlin}
  \begin{center}
    \includegraphics{alphabet}
  \end{center}
\caption{The S\"utterlin script}
\end{figure}

\begin{parag}\label{par:sig}
  A structure $\str C$ has a \defn{signature,}\dindex{signature}
  which comprises: 
  \begin{enumerate}
\item
    an \defn{$n$-ary function-symbol}\dindex{n-ary
    function-symbol@$n$-ary function-symbol}\dindex{function-symbol}
    for each $n$-ary operation of
    $\str C$;
\item
an \defn{$n$-ary predicate}\dindex{n-ary predicate@$n$-ary
  predicate}\dindex{predicate} for each $n$-ary relation of $\str C$. 
  \end{enumerate}
If $s$ is one of these symbols, then the corresponding operation
  or relation can be denoted
  \begin{equation*}
    s^{\str C}.
  \end{equation*}
We may need this notation when another structure $\str D$ has the same
signature as $\str C$.  Then $s^{\str C}$ and $s^{\str D}$ are
different operations, although they are represented by the same symbol
$s$. 
\end{parag}

\begin{parag}\label{par:hom}
Suppose $\str C$ and $\str D$ have a common signature.  If
also there is a function $\cH$ from $\cC$ to $\cD$ such that
\begin{enumerate}
  \item
$\cH(F^{\str C}(a_i\colon i\in n))=F^{\str D}(\cH(a_i):i\in n)$ when
 $n\in\vnn$ and $F$ is
    an $n$-ary function-symbol of the signature, and
\item
$(a_i\colon i\in n)\in R^{\str C}\cap{\cC}^n\lto(\cH(a_i)\colon
  i\in n)\in
  R^{\str D}$ when $n\in\vnn$ and $R$ is an $n$-ary predicate of the
  signature, 
\end{enumerate}
then $\cH$ is a \idefn{homomorphism} from $\str C$ to $\str D$, and we
may write
\begin{equation*}
  \cH\colon\str C\to\str D.
\end{equation*}
We can understand all iterative structures as having the same signature.
Then the Recursion Theorem is that there is a unique homomorphism from
an (arbitrary) arithmetic structure into an iterative structure.  By
\parref{par:one-rec}, there is at most one homomorphism from any
structure admitting induction into an iterative structure.
\end{parag}

\begin{parag}\label{par:embed}
  Again suppose $\str C$ and $\str D$ have a common signature.  A
  function $\cH$ from $\cC$ into $\cD$ is an \idefn{embedding} of $\str
  C$ in $\str D$ if $\cH$ is an injective homomorphism and also
  \begin{equation*}
(\cH(a_i)\colon i\in n)\in
  R^{\str D}\lto
  (a_i\colon i\in n)\in R^{\str C}
\end{equation*}
when $R$ is an $n$-ary predicate of the signature.  If
$\cC\included\cD$, and $\id{\cC}$ is an embedding, then $\str C$ is a
\idefn{sub-structure} of $\cD$, and we may write
\begin{equation*}
  \str C\included\str D.
\end{equation*}
Suppose in
 particular that $\str D$ is an iterative structure.  Then $\str D$
 admits induction if and only if, whenever $\str C$ is an iterative
 structure, and $\cH$ is an embedding of $\str C$ in $\str D$, then
 $\cH$ is surjective onto $\cD$ (Exercise~\ref{ex:embed}).
\end{parag}

\begin{parag}\label{par:N}
If $\cH$ is a bijection from $\cC$ to $\cD$, and $\cH$ is a
homomorphism from $\str C$ to $\str D$, and $\cH\inv$ is a
homomorphism from $\str D$ to $\str C$,
then $\cH$ is an \idefn{isomorphism} from $\str C$ to $\str D$, and we
may write
\begin{equation*}
  \cH\colon\str C\overset{\cong}{\longrightarrow}\str D
\end{equation*}
or simply
\begin{equation*}
  \str C\cong\str D.
\end{equation*}
  By the proof of Theorem~\ref{thm:cnt-equip}, all arithmetic
  structures are isomorphic.  We know of an arithmetic structure,
  namely $(\vnn,x\mapsto\vscr x,\emptyset)$.  However, throughout this
  chapter, let
  \begin{equation*}
    (\N,x\mapsto\scr x,0)
  \end{equation*}
denote an arbitrary arithmetic structure.  We shall think of $\N$ as
the class of natural numbers, when the understanding of natural
numbers as ordinals in the sense of \parref{par:ord} is unimportant.
To simplify writing, we may
use $\N$ and~$\vnn$ 
by themselves to refer to structures of which they are universes.
\end{parag}

\section{Addition on structures admitting induction}

\begin{parag}
  We shall see that some statements about arithmetic structures are
  actually true about all structures that admit ordinary induction.
  In this section and 
  the next, let us denote by
  \begin{equation*}
    (\cA,\cS,i)
  \end{equation*}
an arbitrary structure admitting induction.
\end{parag}

\begin{thmdefn}\label{thm:addition}
  On $\cA$, there is a unique binary operation, called \idefn{addition}
  and denoted by
  \begin{equation*}
    (x,y)\mapsto x+y,
  \end{equation*}
  such that (for all $a$ and $b$ in $\cA$)
  \begin{enumerate}
    \item
$a+i=a$,
\item
$a+\cS(b)=\cS(a+b)$.
  \end{enumerate}
\end{thmdefn}

\begin{proof}
We first prove uniqueness.
Suppose at least one such operation $+$ exists.  For each $a$ in
$\cA$, let the operation
$y\mapsto a+y$ be denoted by $\cF_a$.  Then
\begin{enumerate}
  \item
$\cF_a(i)=a$,
\item
$\cF_a(\cS(b))=\cS(\cF_a(b))$.
\end{enumerate}
Then $\cF_a$ is recursively defined, so
by \parref{par:one-rec} it is is unique.  Therefore $+$ is
unique.

Let $\cG$ be the homomorphism from $(\N,x\mapsto\scr x,0)$ into
$(\cA,\cS,i)$ (\parref{par:hom}).  Then let 
\begin{multline*}
  \cR=\bigcup\Bigl\{v\colon\Forall u\Bigl(u\in v\lto
\Exists y\bigl(y\in \cA\land u=(0,i,y,y)\bigr)\lor{}\\
{}\lor\Exists x\Exists y\Exists
z\bigl((x,y,z)\in\N\times\cA\times\cA\land{}\\ 
{}\land(x,\cG(x),y,z)\in v\land u=(\scr
x,\cS(\cG(x)),y,\cS(z))\bigr)\Bigr)\Bigr\}, 
\end{multline*}
a sub\-{}-class of $\N\times\cA\times\cA\times\cA$.  If $d\in\N$, let
\begin{equation*}
  \cR_d=\cls{(y,z)}{(d,\cG(d),y,z)\in\cR}.
\end{equation*}
Then $\cR_0$ is an operation on $\cA$, and $\cR_0=\id{\cA}$;
also, if
$\cR_d$ is an operation on $\cA$, then so is 
$\cR_{\scr d}$, and $\cR_{\scr d}=\cS\circ\cR_d$
(Exercise~\ref{ex:+proof}).  By induction,
each $\cR_d$ is an operation on $\cA$.  We can also show by induction
that
\begin{enumerate}
  \item
$\cR_d(i)=\cG(d)$,
\item
$\cR_d(\cS(b))=\cS(\cR_d(b))$.
\end{enumerate}
Indeed, the claims are easily true when $d=0$, since $\cR_0=\id{\cA}$.
If the claims are true when $d=e$, 
then, since $\cR_{\scr e}=\cS\circ\cR_e$, we have
\begin{enumerate}
  \item
$\cR_{\scr e}(i)=\cS(\cR_e(i))=\cS(\cG(e))=\cG(\scr e)$,
\item
$\cR_{\scr e}(\cS(b))=
  \cS(\cR_e(\cS(b)))=\cS(\cS(\cR_e(b)))=\cS(\cR_{\scr e}(b))$,
\end{enumerate}
so the claims are true when $d=\scr e$.  This completes the induction.

Finally, by the uniqueness argument
above, if $\cG(d)=\cG(e)$, then $\cR_d=\cR_e$.  So let
\begin{equation*}
  \mathord{+}=\cls{(x,y,z)}{\Exists u(u,x,y,z)\in\cR}.
\end{equation*}
Then the classes $\cls{(y,z)}{(a,y,z)\in\cR}$ are the functions
$\cF_a$ given above, and~$+$ is as desired.
\end{proof}

\begin{parag}
It is sometimes argued that the existence of $+$ follows immediately
  by induction:
  \begin{quote}
We define $x+i$ as $x$, for all $x$ in $\cA$.  If $x+b$ has been
defined for all $x$ in $\cA$, then we let
$x+\cS(b)=\cS(x+b)$.  Therefore, by induction, $x+y$ is defined for all
$x$ and $y$ in $\cA$.
  \end{quote}
However, induction is not a method of definition; it is a method of
proving that one class is equal to another.  So the proposed proof
here would have to start out in the following fashion:
\begin{quote}
  Let $\cA_0$ be the sub\-{}-class of $\cA$ comprising all $y$ for which
  the operation $x\mapsto x+y$ is defined on $\cA$ so that $\Forall
  xx+i=x$ and $\Forall x\Forall zx+\cS(z)=\cS(x+z)$.
\end{quote}
But this definition of $\cA_0$ is invalid: the conditions imposed on
the singulary operation $x\mapsto x+y$ make no sense here.
\end{parag}

\begin{parag}
If we know that $\cA$ is a \emph{set,} then we can prove
Theorem~\ref{thm:addition} as follows:
As we showed, for each $a$ in $\cA$, there is at most one operation
$f_a$ on $\cA$ such that
\begin{enumerate}
  \item
$f_a(i)=a$,
\item
$\Forall yf_a(\cS(y))=\cS(f_a(y))$.
\end{enumerate}
Since the functions $f_a$ will be sets, we can prove by induction that
the set of $a$ for which $f_a$ exists as desired is $\cA$ itself.
Then we have a function $x\mapsto f_x$ on $\cA$, and we can let
\begin{equation*}
  \mathord{+}=\bigcup\big\{\{x\}\times f_x\colon x\in\cA\big\}.
\end{equation*}
If we do not know that $\cA$ is a set, then we have to follow a more
roundabout route, as above.
\end{parag}

\begin{lemma}
For all $a$ and $b$ in $\cA$,
  \begin{enumerate}
    \item
$i+a=a$,
\item
$\cS(b)+a=\cS(b+a)$.
  \end{enumerate}
\end{lemma}

\begin{proof}
  By definition of $+$, we have $i+i=i$.  Suppose $i+b=b$.  Then also
  by definition of $+$, we have $i+\cS(b)=\cS(i+b)=\cS(b)$.  By
  induction, $\Forall xi+x=x$.

Let $\cA_0=\cls x{\Forall y\cS(y)+x=\cS(y+x)}$.  Since
$\cS(b)+i=\cS(b)=\cS(b+i)$, we have $i\in\cA_0$.  Suppose
$a\in\cA_0$, so that $\cS(b)+a=\cS(b+a)$.  Then
$\cS(b)+\cS(a)=\cS(\cS(b)+a)=\cS(\cS(b+a))=\cS(b+\cS(a))$, so
$\cS(a)\in\cA_0$. 
\end{proof}

\begin{parag}
  In proving the last lemma, we cannot establish $\cS(b)+a=\cS(b+a)$
  by induction if we use the class
  $\cls y{\Forall x\cS(y)+x=\cS(y+x)}$ instead of $\cA_0$.
\end{parag}

\begin{theorem}\label{thm:+}
For all $a$, $b$, and $c$ in $\cA$,
  \begin{enumerate}
    \item
$\cS(a)=a+\cS(i)$;
\item
$a+b=b+a$, that is, $+$ is \defn{commutative;}\dindex{commutative}
\item
$(a+b)+c=a+(b+c)$, that is, $+$ is \defn{associative;}\dindex{associative}
\item\label{item:canc}
$a+c=b+c\lto a=b$, that is, $+$ admits
  \defn{cancellation.}\dindex{cancellation} 
  \end{enumerate}
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:+thm}.
\end{proof}

\section{Multiplication and exponentiation}

\begin{parag}
We again let $(\cA,\cS,i)$ be
an arbitrary structure admitting ordinary induction.
\end{parag}

\begin{thmdefn}\label{thm:multiplication}
  On $\cA$, there is a unique binary operation, called \idefn{multiplication}
  and denoted by
  \begin{equation*}
    (x,y)\mapsto x\cdot y
  \end{equation*}
or $(x,y)\mapsto xy$,
  such that (for all $a$ and $b$ in $\cA$)
  \begin{enumerate}
    \item
$a\cdot i=i$,
\item
$a\cdot\cS(b)=a\cdot b+a$.
  \end{enumerate}
\end{thmdefn}

\begin{proof}
Exercise~\ref{ex:multiplication}.
\end{proof}

\begin{lemma}\label{lem:mult}
For all $a$ and $b$ in $\cA$,
  \begin{enumerate}
    \item
$i\cdot a=i$,
\item
$\cS(b)\cdot a=b\cdot a+a$.
  \end{enumerate}
\end{lemma}

\begin{proof}
  Exercise~\ref{ex:mult-lem}.
\end{proof}

\begin{theorem}\label{thm:mult}
For all $a$, $b$, and $c$ in $\cA$,
  \begin{enumerate}
    \item
$\cS(i)\cdot a=a$;
\item
$a\cdot b=b\cdot a$, that is, multiplication is
  \defn{commutative;}\dindex{commutative} 
\item
$(a+b)\cdot c=a\cdot c+b\cdot c$, that is, multiplication
  \idefn{distributes} over addition;
\item
$(a\cdot b)\cdot c=a\cdot (b\cdot c)$, that is, multiplication is
  \defn{associative.} \dindex{associative}
\item\label{item:m-canc}
$a\cdot\scr c=b\cdot\scr c\lto a=b$, that is, $\cdot$ admits
  \defn{cancellation.}\dindex{cancellation} 
  \end{enumerate}
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:mult-thm}.
\end{proof}

\begin{thmdefn}\label{thm:exp}
  There is a unique function from $\cA\times\N$ into $\cA$, called
  \idefn{exponentiation} and denoted by
  \begin{equation*}
    (x,y)\mapsto x^y,
  \end{equation*}
such that, for all $a$ in $\cA$ and $m$ in $\N$,
\begin{enumerate}
  \item
$a^0=\cS(i)$,
\item
$a^{\scr m}=a^m\cdot a$.
\end{enumerate}
\end{thmdefn}

\begin{proof}
By the Recursion Theorem (\parref{thm:rec}), for each $a$ in $\cA$,
there is a unique function $\cF_a$ from $\N$ into $\cA$ such that
\begin{enumerate}
  \item
$\cF_a(0)=\cS(i)$,
\item
$\cF_a(\scr b)=\cF_a(b)\cdot a$.
\end{enumerate}
By the \emph{proof} of the Recursion Theorem, there is a binary
formula $\phi(x,y)$ such that $\cF_a=\cls y{\phi(a,y)}$.  Hence we can
define $(x,y)\mapsto x^y$ as $\cls{(x,y)}{x\in\cA\land\phi(x,y)}$.
Since the functions $\cF_a$ are unique, so is$(x,y)\mapsto x^y$.
\end{proof}

\begin{parag}
  An \idefn{endomorphism} of a structure is a homomorphism from the
  structure into itself.  The endomorphisms of $\str C$ compose a
  virtual class (\parref{par:aRRa}), which we may denote by
  \begin{equation*}
    \End{\str C};
  \end{equation*}
this is closed under composition, so we have a (virtual) structure
$(\End{\str C},\circ)$. 
\end{parag}

\begin{theorem}\label{thm:exp-prop}.
  \mbox{}
  \begin{enumerate}
    \item
$a^{m+n}=a^m\cdot a^n$, that is, $x\mapsto a^x$ is a homomorphism from
      $(\N,+)$ into $(\cA,\cdot)$;
\item
$(a\cdot b)^m=a^m\cdot b^m$, that is, $x\mapsto x^a$ is an endomorphism
  of $(\cA,\cdot)$;
\item
$(a^m)^n=a^{m\cdot n}$, that is, $x\mapsto(y\mapsto y^x)$ is a
  homomorphism from $(\N,\cdot)$ into $(\End{\cA,\cdot},\circ)$. 
  \end{enumerate}
\end{theorem}

\begin{proof}
Exercise~\ref{ex:exp}.
\end{proof}

\section{The ordering of the natural numbers}

\begin{parag}\label{par:<}
There is a unique isomorphism $\cH$ from $\N$ to $\vnn$.  As $\vnn$
is well-ordered by $\in$, so $\N$ is well-ordered by
\begin{equation*}
  \cls{(x,y)}{\cH(x)\in\cH(y)};
\end{equation*}
we denote this ordering by $<$.  The elements of the initial
 segment 
 \begin{equation*}
 \set{x\in\N}{x<a}
 \end{equation*}
are the \defn{predecessors}\dindex{predecessor} of $a$.  In
 particular,
 \begin{enumerate}
   \item
$\set{x\in\N}{x<0}=\emptyset$,
\item
$\set{x\in N}{x<\scr a}=\set{x\in\N}{x<a}\cup\{a\}$.
 \end{enumerate}
This can be understood as a recursive definition of the function
$x\mapsto\set{y\in\N}{y<x}$, though the definition is not quite
recursive in the sense of \parref{par:one-rec}.  The definition is
justified by the following.
\end{parag}

\begin{theorem}[Recursion with
    Parameter]\label{thm:rec-p}\index{Recursion Theorem}
  Suppose $i\in\cC$ and $\cF\colon\N\times\cC\to\cC$.  Then there is a
  unique function $\cG$ from $\N$ into $\cC$ such that
  \begin{enumerate}
    \item
$\cG(0)=i$,
\item
$\cG(\scr a)=\cF(a,\cG(a))$.
  \end{enumerate}
\end{theorem}

\begin{proof}
  Let $\cF_1$ be the function $(x,y)\mapsto(\scr x,\cF(x,y))$ on
  $\N\times\cC$.  Then $(\N\times\cC,\cF_1,(0,i))$ is an iterative
  structure, so by the Recursion Theorem, there is a unique function
  $\cH$ from $\N$ into $\N\times\cC$ such that
  \begin{enumerate}
    \item
$\cH(0)=(0,i)$,
\item
$\cH(\scr a)=\cF_1(\cH(a))$.
  \end{enumerate}
Let $\pi_0$ be the function $(x,y)\mapsto x$, and let $\pi_1$ be
$(x,y)\mapsto y$.  Now define $\cG$ as 
$\pi_1\circ\cH$, so that $\cG(0)=i$.  By induction, we can prove
\begin{equation*}
 \pi_0(\cH(a)=a.
\end{equation*}
Indeed,
the claim is true when $a=0$.  Suppose it is true when $a=b$; that is,
assume
\begin{equation}\label{eqn:rec-ih}
  \cH(b)=(b,\cG(b)).  
\end{equation}
Then 
\begin{align*}
  \cH(\scr b)&=\cF_1(\cH(b))\\
&=\cF_1(b,\cG(b))\\
&=(\scr b,\cF(b,\cG(b))).
\end{align*}
Hence $\pi_0(\cH(\scr b))=\scr b$.  This computation establishes the
claim.  In particular, the inductive hypothesis~\eqref{eqn:rec-ih} has
been proved correct.  Hence the computation also establishes that $\cG(\scr
b)=\pi_1(\cH(\scr b))=\cF(b,\cG(b))$.  So $\cG$ exists as desired.

The uniqueness of $\cG$ follows from the uniqueness of $\cH$, since
each of these functions is a function of the other:
$\cG=\pi_1\circ\cH$, and also $\cH=((x,y)\mapsto(x,\cG(x,y))$.
\end{proof}

\begin{parag}\label{par:pred}
  Now we can define a function $x\mapsto\pred x$ on $\N$ by the
  rules\footnote{In using the notation $\pred x$ I follow
  Kunen~\cite[III~5.3]{MR85e:03003}.  The notation stands for
  \Eng{predecessor,} although some writers (As
  Levy~\cite[II.3.30]{MR1924429}) use this term for what I would call
  an \emph{immediate} predecessor.}
  \begin{enumerate}
    \item
$\pred 0=\emptyset$,
\item
$\pred{\scr a}=\pred a\cup\{a\}$.
  \end{enumerate}
Then
\begin{equation*}
  a<b\iff\pred a\pincluded\pred b:
\end{equation*}
this follows from the definition of $<$ in \parref{par:<}; it can also
be used as a definition of $<$.  A third possibility for a definition
of $<$ on $\N$ is given by part~\eqref{item:leq} of the following.
\end{parag}

\begin{theorem}\label{thm:<}
In $\N$,
\begin{enumerate}
\item
$0\leq a$,
\item
$a<b\iff a+c<b+c$,
\item
$a<b\iff a\cdot\scr c<b\cdot\scr c$,
  \item\label{item:leq}
$a\leq b\iff\Exists xa+x=b$.
\end{enumerate}
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:<}.
\end{proof}

\begin{parag}
  Theorem~\ref{thm:rec-p} allows to make some standard definitions:
  \begin{enumerate}
    \item
Letting $\cC=\N$ and $i=1$ and $\cF=((x,y)\mapsto\scr x\cdot y$), we
have the operation $x\mapsto x!$ on $\N$, defined recursively by
\begin{equation*}
0!=1\land
(n+1)!=n!\cdot(n+1).
\end{equation*}
\item
Suppose $\cF\colon\N\to\cC$, where $\cC$ is the universe of a structure
equipped with addition and multiplication.  Then the sum
$\sum_{k=0}^n\cF(k)$ and the product $\prod_{k=0}^n\cF(k)$ are defined
recursively as follows:
  \begin{enumerate}
\begin{comment}

    \item
      $\displaystyle\sum_{k=0}^0\cF(k)=\cF(0)$ and
      $\displaystyle\sum_{k=0}^{\scr
      n}\cF(k)=\displaystyle\sum_{k=0}^n\cF(k)+\cF(\scr n)$; 
      \item
	$\displaystyle\prod_{k=0}^0\cF(k)=\cF(0)$ and
	$\displaystyle\prod_{k=0}^{\scr
	n}\cF(k)=\displaystyle\prod_{k=0}^n\cF(k)\cdot\cF(\scr
	n)$.  


\end{comment}
    \item
      $\sum_{k=0}^0\cF(k)=\cF(0)$ and
      $\sum_{k=0}^{\scr
      n}\cF(k)=\sum_{k=0}^n\cF(k)+\cF(\scr n)$; 
      \item
	$\prod_{k=0}^0\cF(k)=\cF(0)$ and
	$\prod_{k=0}^{\scr
	n}\cF(k)=\prod_{k=0}^n\cF(k)\cdot\cF(\scr
	n)$.  
  \end{enumerate}
  \end{enumerate}
\end{parag}

\section{The integers and the rational numbers}

\begin{parag}\label{par:a-b}
  In $\N$, if $a\leq b$, then (Theorem~\ref{thm:<}) there is a
  solution to the equation
  \begin{equation*}
    a+x=b;
  \end{equation*}
this solution is unique (Theorem~\ref{thm:+}~\eqref{item:canc}) and
can be denoted
\begin{equation*}
  b-a.
\end{equation*}
If $a\leq b$ and $c\leq d$, then $b-a=d-c\iff a+d=b+c$; if $a+d=b+c$
and $a\leq b$, then $c\leq d$ (Exercise~\ref{ex:a-b}).
\end{parag}

\begin{thmdefn}\label{thmdefn:Z}
  On $\N\times\N$, let $\cE$ be the binary relation given by
  \begin{equation*}
    (a,b)\mathrel{\cE}(c,d)\iff a+d=b+c.
  \end{equation*}
Then $\cE$ is an equivalence-relation.  The virtual class
$(\N\times\N)/\cE$ is denoted by
\begin{equation*}
  \Z;
\end{equation*}
its elements are the \defn{integers.}\dindex{integer}  The class
\begin{equation*}
  \cls{(x,y)}{(x,y)\in\N\times\N\land(x=0\lor y=0)}
\end{equation*}
contains exactly one representative for each $\cE$-class, and nothing
else; so we can treat $\Z$ as this class. 
Let the $\cE$-class $(a,b)\cE$
be denoted
\begin{equation*}
  b-a.
\end{equation*}
Then addition and \idefn{additive inversion} and multiplication of
$\cE$-classes, and a total ordering of them, can be defined by 
the following rules:
\begin{align*}
  (b-a)+(d-c)&=(b+d)-(a+c),\\
-(b-a)&=a-b,\\
  (b-a)\cdot(d-c)&=(b\cdot d+a\cdot c)-(b\cdot c+a\cdot d),\\
b-a<d-c&\iff b+c<a+d.
\end{align*}
In $\Z$, let $0-0$ be denoted by $0$, and let $1-0$ be denoted by
$1$.  Then $(\Z,+,-,\cdot,0,1,<)$ is an \defn{ordered
  ring:}\dindex{ordered ring}\dindex{ring}
\begin{enumerate}
  \item
$+$ and $\cdot$ are commutative and associative;
\item
$\cdot$ distributes over $+$;
\item
$a+0=a$;
\item
$a\cdot 1=a$;
\item
$<$ is a total ordering;
\item
$0<a\land 0<b\lto0<a+b\land0<a\cdot b$.
\end{enumerate}
There is an embedding of $(\N,+,\cdot,0,1,<)$ in $(\Z,+,\cdot,0,1,<)$
by the rule taking $a$ to $a-0$.
\end{thmdefn}

\begin{proof}
  Exercise~\ref{ex:Z}.  To validate the definitions of $+$ and $\cdot$
  in $\Z$, one must show that, if $(a_0,b_0)\mathrel{\cE}(a_1,b_1)$ and
$(c_0,d_0)\mathrel{\cE}(c_1,d_1)$, then
\begin{align}\notag
    (a_0+c_0,b_0+d_0)&\mathrel{\cE}(a_1+c_1,b_1+d_1),\\\label{eqn:Z-m}
(a_0\cdot c_0+b_0\cdot d_0,b_0\cdot c_0+a_0\cdot
  d_0)&\mathrel{\cE}(a_1\cdot c_1+b_1\cdot d_1,b_1\cdot c_1+a_1\cdot
  d_1),\\\notag
b_0+c_0<a_0+d_0&\iff b_1+c_1<a_1+d_1. 
\end{align}
For~\eqref{eqn:Z-m}, consider  $(a_1\cdot c_0+b_1\cdot
d_0,b_1\cdot c_0+a_1\cdot d_0)$.
\end{proof}

\begin{parag}\label{par:b/a}
  In $\Z$, if $a\neq0$, if there is a solution to the equation
  \begin{equation*}
    a\cdot x=b,
  \end{equation*}
then the solution is unique by
Theorem~\ref{thm:mult}~\eqref{item:m-canc} and
can be denoted by
\begin{equation*}
  \frac ba
\end{equation*}
or by $b/a$; also $a$ is a \idefn{divisor} of $b$ (see \parref{par:wo}).
If $b/a$ and $d/c$ exist in $\Z$, then $b/a=d/c\iff a\cdot
  d=b\cdot c$ (Exercise~\ref{ex:b/a}).
\end{parag}

\begin{thmdefn}\label{thmdefn:Q}
  On $(\Z\setminus\{0\})\times\Z$, let $\cE$ be the binary relation
  given by 
  \begin{equation*}
    (a,b)\mathrel{\cE}(c,d)\iff a\cdot d=b\cdot c.
  \end{equation*}
Then $\cE$ is an equivalence-relation.  The virtual class
$((\Z\setminus\{0\})\times\Z)/\cE$ is denoted by
\begin{equation*}
  \Q;
\end{equation*}
its elements are the \defn{rational numbers.}\dindex{rational number}
Let the $\cE$-class $(a,b)\cE$
be denoted
\begin{equation*}
  \frac ba.
\end{equation*}
Then addition, additive inversion, multiplication, and multiplicative
inversion of
$\cE$-classes, and a total ordering of them, can be defined by
the following rules:
\begin{align*}
  \frac ba+\frac dc&=\frac{a\cdot d+b\cdot c}{ac},\\
-\frac ba&=\frac{-b}a,\\
\left(\frac ba\right)\inv&=\frac ab\quad\text{ (if $b\neq0$)},\\
  \frac ba\cdot\frac dc&=\frac{b\cdot d}{a\cdot c},\\
\frac ba<\frac dc&\iff a\cdot b\cdot c\cdot c<a\cdot a\cdot c\cdot d.
\end{align*}
In $\Q$, let $0-0$ be denoted by $0$, and let $1-0$ be denoted by
$1$.  Then $(\Q,+,-,\cdot,0,1,<)$ is an \defn{ordered
  field:}\dindex{ordered field}\dindex{field} it is an
ordered ring, and
\begin{equation*}
  \frac ab\cdot\frac ba=1
\end{equation*}
if $a\neq0$ and $b\neq0$.
Then $(\Z,+,\cdot,0,1,<)$ embeds in $(\Q,+,\cdot,0,1,<)$
by the rule taking $a$ to $a/1$.
\end{thmdefn}

\begin{proof}
  Exercise~\ref{ex:Q}.
\end{proof}

\section*{Exercises}
\addcontentsline{toc}{section}{Exercises}
\begin{enumerate}
  \renewcommand{\theenumi}{\arabic{enumi}}
\item\label{ex:3}
Write down bijections from $(\cC\times\cC)\times\cC$ to
$\cC\times(\cC\times\cC)$ and ${\cC}^3$. 
\item\label{ex:str}
Show that an ordered pair $(\cC,\cD)$ of \emph{classes} can be defined
as the class $(\cC\times\{0\})\cup(\cD\times\{1\})$: that is, show
that an equivalence like~\eqref{eqn:op-iff} holds in this case.
Define an ordered triple $(\cC,\cD,\cE)$ of classes.
\item\label{ex:embed}
Prove that an iterative structure admits induction if and only if every
embedding into it is a surjection onto the universe
(\parref{par:embed}).
\item\label{ex:+proof}
Prove the claim in the proof of Theorem~\ref{thm:addition} that
$\cR_0$ is an operation on $\cA$, and $\cR_0=\id{\cA}$, and if
$\cR_d$ is an operation on $\cA$, then so is 
$\cR_{\scr d}$, and $\cR_{\scr d}=\cS\circ\cR_d$.  Note carefully
how it is required that $x\mapsto\scr
x:\N\injection\N\setminus\{0\}$. 
  \item\label{ex:+thm}
Prove Theorem~\ref{thm:+}.
\item\label{ex:multiplication}
Prove Theorem~\ref{thm:multiplication}.  You may use, as a pattern, the
proof of Theorem~\ref{thm:addition}.
\item\label{ex:mult-lem}
Prove~Lemma~\ref{lem:mult}.
\item\label{ex:mult-thm}
Prove~Theorem~\ref{thm:mult}.
\item
As an alternative to the proofs of Theorems~\ref{thm:addition}
and~\ref{thm:multiplication}, 
use the Recursion Theorem to show that addition and multiplication
exist as operations on $\N$.
\item\label{ex:exp}
Prove Theorem~\ref{thm:exp-prop}.
\item
Find an example showing that exponentiation does not always exist as a
binary operation on $\cA$.
\item
Show that there is a unique binary operation $(x,y)\mapsto\binom xy$
on $\N$ such that $\binom a0=1$ and $\binom 0{\scr b}=0$ and
$\binom{\scr a}{\scr b}=\binom ab+\binom a{\scr b}$.  Can such an
operation be defined on any structures that admit induction, but are
\emph{not} 
arithmetic? 
\item\label{ex:<}
Prove Theorem~\ref{thm:<}.
\item
Prove $1+a\cdot b\leq (1+a)^b$ in $\N$.
\item
Prove $3<a\lto a^2<2^a$ in $\N$.
\item\label{ex:a-b}
Prove the claims in \parref{par:a-b}.
\item\label{ex:Z}
Prove Theorem~\ref{thmdefn:Z}.
%\item\label{ex:Zdotsolve}
%Prove in $\Z$ that any solution to $a\cdot x=b$ is unique, provided
$a\neq0$. 
\item\label{ex:b/a}
Prove the claims in \parref{par:b/a}.
\item\label{ex:Q}
Prove Theorem~\ref{thmdefn:Q}.
\end{enumerate}

\chapter{Ordinality}

%\setcounter{equation}{9}

\section{Well-ordered classes}\label{sect:wo}

\begin{parag}\label{par:wo}
  A natural number is \idefn{prime} if its only divisors are $1$ and
  itself, and these are distinct.  So $0$ and $1$ are not prime, though
  $2$ is prime.  Then
  every natural number different from $1$ has a prime divisor; but
  this does not follow from a simple proof by induction.  Indeed, if $a$ has a
  prime divisor, this does not tell us anything about $a+1$.  However,
  $2$ (like all primes) is a prime divisor of $0$; also,
  if $a>1$ and is not prime, then $a$ has a divisor $b$ that is not $1$ or
  $a$.  Then $b<a$.  Any divisor of $b$ is a divisor of $a$; so if $b$
  is known to have a prime divisor, then $a$ has one also.  By
  \tech{strong induction,}
  as defined below (\parref{par:strong}), we 
  can conclude that every natural number different from $1$ has a prime
  divisor. 
\end{parag}

\begin{parag}\label{par:strong}
Suppose $(\cC,<)$ is a (strict) total order.  Following \parref{par:pred},
if $a\in\cC$, we can define
\begin{equation*}
  \pred{a}=\cls x{x\in\cC\land x<a}.
\end{equation*}
(One might write $\pred{a,\cC,<}$ instead of just $\pred a$, for complete
precision.)
Such a class can be called a \idefn{section} of $(\cC,<)$; it is a kind
of proper initial segment.
If $\cC$ is \emph{well-ordered} by $<$, then every proper initial
segment $\cC_0$ is equal to the section $\pred a$, where $a$ is the
least element of $\cC\setminus\cC_0$.  In any case,
let us say that:
\begin{enumerate}
  \item
$(\cC,<)$ \defn{admits (proof by) strong} or \defn{trans-finite
    induction}\dindex{proof by strong induction}\dindex{proof by
    trans-finite induction}\dindex{strong
    induction}\dindex{trans-finite induction}\dindex{induction} if
    \begin{equation*}
      \Forall x(x\in\cC\land\pred x\included\cC_0\lto x\in\cC_0)
\lto\cC_0=\cC
    \end{equation*}
whenever $\cC_0\included\cC$;
\item
$(\cC,<)$ \defn{admits (definition by) strong} or \defn{trans-finite
  recursion}\dindex{strong recursion}\dindex{trans-finite
  recursion}\dindex{recursion} if: 
  \begin{enumerate}
    \item
all sections are sets;
\item
for every class $\cD$, if
\begin{equation}\label{eqn:tf-rec}
\cF\colon\cls x{\Exists
  y(y\in\cC\land x\in\mapset{\pred y}{\cD})}\to\cD
\end{equation}
(that is, if $\cF$ is such that, if $g$ is a function from a section of
$\cD$ into $\cD$, then $\cF(g)\in\cD$),
then there is a unique function $\cG$ from $\cC$ into $\cD$ such that
\begin{equation*}
  \cG(a)=\cF(\cG\rest{\pred a}).
\end{equation*}
  \end{enumerate}
\end{enumerate}
\end{parag}

\begin{theorem}
  Suppose $(\cC,<)$ is a total order whose every sub\-{}-class $\pred a$
  is a set.  The following conditions are equivalent:
  \begin{enumerate}
    \item
$(\cC,<)$ is well-ordered,
    \item
$(\cC,<)$ admits strong induction;
    \item
$(\cC,<)$ admits strong recursion.
  \end{enumerate}
\end{theorem}

\begin{proof}
There are three implications to prove.
\begin{enumerate}
  \item
  Suppose $(\cC,<)$ is well-ordered.
If $\cC_0\pincluded\cC$, then $\cC\setminus\cC_0$ is non-empty, so it
has a least element $a$; then $\pred a\included\cC_0$, but
$a\notin\cC_0$.  The contrapositive of this implication is that
$(\cC,<)$ admits strong recursion.
\item
Suppose $(\cC,<)$ admits strong induction, $\cD$ is a class, and $\cF$
is as in~\eqref{eqn:tf-rec}.
\begin{enumerate}
  \item
We first show that there is
at most one function $\cG$ from $\cC$ into $\cD$ such that
$\cG(a)=\cF(\cG\rest{\pred a})$.  Suppose $\cG_0$ and $\cG_1$ are
two such functions, and that they agree on $\pred a$.  Then
\begin{equation*}
  \cG_0(a)=\cF(\cG_0\rest{\pred a})=
\cF(\cG_1\rest{\pred a})=\cG_1(a).
\end{equation*}
By strong induction, $\cG_0$ and $\cG_1$ agree on $\cC$.  So there is
at most one function $\cG$ as desired.
\item
We next show that there is at
least one function $\cG$ as desired.  Suppose that, for each $b$ in
$\pred a$, there is at least
one function $\cG_b$ from $\pred b\cup\{b\}$ into $\cD$ such that
\begin{equation*}
\cG_b(c)=\cF(\cG_b\rest{\pred c}).
\end{equation*} 
Then by what we have just shown, there is at \emph{most} one function
$\cG_b$ (see Exercise~\ref{ex:is-si}).  In particular then, if
$c<b<a$, then $\cG_c$ and $\cG_b$ 
must agree on the domain of the former, so $\cG_c\included\cG_b$.
Therefore the union $\bigcup\cls{\cG_b}{b<a}$ is a function $\cH$,
whose domain is 
\begin{equation*}
  \bigcup\cls{\pred b\cup\{b\}}{b<a}, 
\end{equation*}
which is $\pred a$.  Now let
\begin{equation*}
  \cG_a=\cH\cup\{(a,\cF(\cH))\}.
\end{equation*}
We have just shown,
by strong induction, that for every $a$ in $\cC$, there is a
function $\cG_a$ from $\pred a\cup\{a\}$ into $\cD$ such that
$\cG_a(b)=\cF(\cG_a\rest{\pred b})$.  We have also shown that the union
$\bigcup\cls{\cG_a}{a\in\cC}$ is a function; its domain is $\cC$; so
it is the desired function $\cG$.
\end{enumerate}
Thus $(\cC,<)$ admits strong recursion.
\item
Suppose $(\cC,<)$ is not well-ordered.  Then some sub\-{}-class $\cC_0$ of
$\cC$ has no least element.  Then the sub\-{}-class $\cls
x{x\in\cC\land\Exists y(y\in\cC\land y\leq x)}$ also has no least
element.  Call this sub\-{}-class $\cC_1$.
Let
\begin{equation*}
  \cF\colon\cls x{\Exists y(y\in\cC\land x\in\mapset{\pred y}2)}\to 2,
\end{equation*}
where $\cF(h)=1\iff 1\in\ran h$.  If $e\in 2$, let
$\cG_e$ be the function from $\cC$ into $2$ given by
\begin{equation*}
  \cG_e(x)=
  \begin{cases}
    0,&\text{ if }x\in\cC\setminus\cC_1;\\
    e,&\text{ if }x\in\cC_1.
  \end{cases}
\end{equation*}
Then $\cG_e(a)=\cF(\cG_e\rest{\pred a})$:
\begin{enumerate}
  \item
If $a\in\cC\setminus\cC_1$, and $b<a$, then $b\notin\cC_1$; so
$\cG_e\setimb{\pred a}=\{0\}$, hence $\cF(\cG_e\rest{\pred a})=0=\cG_e(a)$.
\item
If $a\in\cC_1$, then $a$ is not the least element of $\cC_1$, which means
$e\in\cG_e\setimb{\pred a}$.  Then $\cF(\cG_e\rest{\pred
  a})=e=\cG_e(a)$. 
\end{enumerate}
Thus $(\cC,<)$ does not admit strong recursion.\hfill\qed
\end{enumerate}
\renewcommand{\qed}{}
\end{proof}

\begin{parag}\label{par:succ}
  Suppose $(\cC,<)$ is a non-empty well-ordered class.  Then $\cC$ has
  a least element, which we may call $0$ (or more precisely
  $0^{(\cC,<)}$).  Every element $a$ of 
  $\cC$ has a \defn{successor,}\dindex{successor} which (following
  \parref{par:N}) we 
  may denote by 
  \begin{equation*}
    \scr a;
  \end{equation*}
  it is the least element of $\cC\setminus\cls x{x\in\cC\land x\leq
  a}$, that is, $\cC\setminus(\pred a\cup\{a\})$.
  Then an element of $\cC$ is a \defn{successor,} if it is the successor of
  some element.  An element of $\cC$ that is neither a successor nor
  $0$ is a \defn{limit.}\dindex{limit}  So $a$ is a limit if and only if
  \begin{enumerate}
    \item
$a\neq0$ and
\item
$b<a\lto\scr b<a$.
  \end{enumerate}
Note that $\vnn$
  contains no limits.  We do not yet have an example that does; after
  \parref{ax:infinity}, we shall.
\end{parag}

\begin{theorem}\label{thm:si}
  Suppose $(\cC,<)$ is a well-ordered class, and $\cD$ is a sub\-{}-class
  such that:
  \begin{enumerate}
\item
$0\in\cD$ (that is, $0^{(\cC,<)}\in\cD$),
    \item
$a\in\cD\lto\scr a\in\cD$;
\item
if $a$ is a limit and $\pred a\included\cD$, then $a\in\cD$.
  \end{enumerate}
Then $\cD=\cC$.
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:si}.
\end{proof}

\begin{theorem}\label{thm:rec-alt}
  Suppose $(\cC,<)$ is a well-ordered class,
  $\cF\colon\cD\to\cD$, and 
  \begin{equation*}
  \cG\colon\cls x{\Exists y(y\in\cC\land\Forall z(z\in\cC\lto\scr
    z\neq y)\land x\in\mapset{\pred y}\cC)} \to\cD,
  \end{equation*}
Then there is a unique function $\cH$ from
  $\cC$ to $\cD$ such that
  \begin{enumerate}
\item
$\cH(\scr a)=\cF(\cH(a))$,
\item
$\cH(d)=\cG(\cH\rest{\pred d})$ if $d$ is limit or $0$.
  \end{enumerate}
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:rec-alt}.
\end{proof}

\section{Order-types}

\begin{parag}\label{par:on<}
  By definition (\parref{par:ord}), every ordinal $\alpha$ is
  well-ordered by containment.  We may then understand $\alpha$ to
  denote the structure $(\alpha,\in)$.  Likewise, since $\on$ is also
  well-ordered by containment (\parref{thm:on-wo}), we may take $\on$
  to denote the
  structure $(\on,\in)$.  Finally, since for
  ordinals, $\alpha\in\beta\iff\alpha\pincluded\beta$
  (\parref{lem:ord-n-set}), we may use $\in$ and $\pincluded$
  interchangeably in $\on$; we may also use $<$ for either of them,
  and we may use $\leq$ in place of $\included$.  But let us continue
  to use $\vscr{\alpha}$ (rather than $\scr{\alpha}$) to denote the
  successor
  $\alpha\cup\{\alpha\}$ of the ordinal $\alpha$.
\end{parag}

\begin{parag}
  Suppose $(a,<)$ is an order, and $b\included a$, and $c\in a$.  Then
  $c$ is an \idefn{upper bound} for $b$ (with respect to $<$) if $d\in
  b\lto d\leq c$; and $c$ is a \idefn{strict upper bound} if $d\in
  b\lto d<c$.  If $b$ has a \emph{least} upper bound, then this is
unique and is the \idefn{supremum} of $b$; it is denoted by
  \begin{equation*}
    \supr b.
  \end{equation*}
\end{parag}

\begin{axiom}[Union]\label{ax:union} 
\axiomname{Union: \[\Exists xx=\bigcup a.\]}
  The union of a set is a set:
  \begin{equation*}
    \Exists xx=\bigcup a.
  \end{equation*}
\end{axiom}

\begin{lemma}\label{lem:sup}
  The union of a set of ordinals is an ordinal, which is the supremum
  of the set:
  \begin{equation*}
   a\pincluded\on\lto\bigcup a=\supr a.
  \end{equation*}
\end{lemma}

\begin{proof}
  Let $a$ be a set of ordinals.  Ordinals are sets of ordinals
  (Lemma~\ref{lem:ord-n-set}), so $\bigcup a$ is a sub\-{}-class of $\on$.
  Hence $\bigcup a$ is well-ordered by inclusion.  
Since $\bigcup a$ is a set by the Union Axiom.
Also, let $\beta\in\bigcup a$.  Then some
  element $\alpha$ of $a$ contains $\beta$.  But then $\alpha$ is
  transitive, so $\beta\included\alpha\included\bigcup a$.  Therefore
  $\bigcup a$ is an ordinal.

Finally, if $\alpha\in a$, then $\alpha\included\bigcup a$; so
$\bigcup a$ is an upper bound of $a$.  If $\beta<\bigcup a$, then
$\beta$ belongs to an element of $a$; that is, $\beta$ is less than
that element, so $\beta$ is not an upper bound of $a$.
\end{proof}

\begin{lemma}\label{lem:least}
  If $a$ is a set of ordinals, then $\bigcup\set{\vscr x}{x\in a}$ is
  the least ordinal that is greater than the ordinals in $a$.
\end{lemma}

\begin{proof}
  Exercise~\ref{ex:least}.
\end{proof}

\begin{thmdefn}\label{thm:ot}
  Every well-ordered set $\str a$ is uniquely isomorphic to a unique
  ordinal, denoted by
  \begin{equation*}
    \ord{\str a}
  \end{equation*}
and called
  the \idefn{order-type} or the \idefn{ordinality} of $\str a$.
  Every well-ordered
  proper class is uniquely isomorphic to $\on$.
\end{thmdefn}

\begin{proof}
  Let $(\cC,<)$ be a well-ordered class.  Suppose $\cF$ is an
  isomorphism from this to $\alpha$ or $\on$.  This means that, if $\cC$
  contains $a$ and $b$, and $b<a$,
  then $\cF(b)\in \cF(a)$.  Thus $\cF(a)$ is greater than the ordinals in
  $\cF\setimb{\pred a}$.  Since $\cF$ is surjective onto an initial
  segment of $\on$, we
  conclude that $\cF(a)$ is the \emph{least} ordinal greater than those
  in $\cF\setimb{\pred a}$.  Therefore, by Lemma~\ref{lem:least},
  \begin{equation*}
\cF(a)=
\bigcup\set{\vscr x}{x\in \ran{\cF\rest{\pred a}}}.
  \end{equation*}
By strong recursion, there is exactly one such function $\cF$ from
$\cC$ into $\on$.

It remains to show that $\cF$ is indeed the desired isomorphism.
Again by Lemma~\ref{lem:least}, $\cF$ is a homomorphism; therefore it
is an isomorphism onto its range (Exercise~\ref{ex:isom}).
We have to show that $\cF\setimb{\cC}$ is an initial segment of
$\on$.  Suppose $\alpha\included\cF\setimb{\cC}$.  In particular then,
being an ordinal,
$\alpha$ is an initial segment
of $\cF\setimb{\cC}$, so $\cF\inv\setimb{\alpha}$ is an initial segment of
$(\cC,<)$.  If it is a \emph{proper} initial segment, then
(\parref{par:strong}) it is a
section $\pred a$, and then $\cF(a)=\alpha$ by definition of $\cF$.
By strong induction, either $\cF\setimb{\cC}=\on$, or
$\cF\setimb{\cC}=\alpha$ for some ordinal $\alpha$.
\end{proof}

\section{Ordinal addition}

\begin{parag}\label{par:lex}
  Suppose $(\cC,<)$ and $(\cD,<)$ are total orders.  The
  \defn{(right) lexicographic ordering}\dindex{lexicographic ordering}
  of $\cC\times\cD$ is given by 
  \begin{equation*}
    (a,b)<(c,d)\iff b<d\lor (b=d\land a<c).
  \end{equation*}
This is a \emph{total} ordering of $\cC\times\cD$
(Exercise~\ref{ex:lex-tot}; see also Fig.~\ref{fig:lex}). 
  If $(\cC,<)$ and $(\cD,<)$ are \emph{well-ordered,} then the
  lexicographic order well-orders $\cC\times\cD$: Indeed,
  if $\cE\included\cC\times\cD$, then its least element is $(a,b)$,
  where $b$ is the least element of
$\cls y{\Exists x(x,y)\in\cE}$, and $a$ is the least element of $\cls
  x{(x,b)\in\cC}$.
\end{parag}

\begin{figure}[t]
  \begin{center}
        \begin{pspicture}(0,-9.2)(12,0)
\psset{arrows=->}
\rput(1,-1){\rnode{00}{$(0,0)$}}
\rput(3,-1){\rnode{01}{$(0,1)$}}
\rput(1,-3){\rnode{10}{$(1,0)$}}
\rput(3,-3){\rnode{11}{$(1,1)$}}
\rput(5,-1){\rnode{02}{$(0,2)$}}
\rput(5,-3){\rnode{12}{$(1,2)$}}
\rput(1,-5){\rnode{20}{$(2,0)$}}
\rput(3,-5){\rnode{21}{$(2,1)$}}
\rput(5,-5){\rnode{22}{$(2,2)$}}
\rput(7,-1){\rnode{03}{$(0,3)$}}
\rput(7,-3){\rnode{13}{$(1,3)$}}
\rput(7,-5){\rnode{23}{$(2,3)$}}
\rput(1,-7){\rnode{30}{$(3,0)$}}
\rput(3,-7){\rnode{31}{$(3,1)$}}
\rput(5,-7){\rnode{32}{$(3,2)$}}
\rput(7,-7){\rnode{33}{$(3,3)$}}
\rput(9,-1){\rnode{04}{$(0,4)$}}
\rput(9,-3){\rnode{14}{$(1,4)$}}
\rput(9,-5){\rnode{24}{$(2,4)$}}
\rput(9,-7){\rnode{34}{$(3,4)$}}
\rput(1,-9){\rnode{40}{$(4,0)$}}
\rput(3,-9){\rnode{41}{$(4,1)$}}
\rput(5,-9){\rnode{42}{$(4,2)$}}
\rput(7,-9){\rnode{43}{$(4,3)$}}
\rput(9,-9){\rnode{44}{$(4,4)$}}
\rput(11,-1){\rnode{05}{$(0,5)$}}
\rput(11,-3){\rnode{15}{$(1,5)$}}
\rput(11,-5){\rnode{25}{$(2,5)$}}
\rput(11,-7){\rnode{35}{$(3,5)$}}
\rput(11,-9){\rnode{45}{$(4,5)$}}

\ncline{00}{10}
\ncline{10}{20}
\ncline{20}{30}
\ncline{30}{40}
\ncline{40}{01}
\ncline{01}{11}
\ncline{11}{21}
\ncline{21}{31}
\ncline{31}{41}
\ncline{41}{02}
\ncline{02}{12}
\ncline{12}{22}
\ncline{22}{32}
\ncline{32}{42}
\ncline{42}{03}
\ncline{03}{13}
\ncline{13}{23}
\ncline{23}{33}
\ncline{33}{43}
\ncline{43}{04}
\ncline{04}{14}
\ncline{14}{24}
\ncline{24}{34}
\ncline{34}{44}
\ncline{44}{05}
\ncline{05}{15}
\ncline{15}{25}
\ncline{25}{35}
\ncline{35}{45}
\ncline{45}{55}
    \end{pspicture}
  \end{center}
\caption{The lexicographic ordering of $5\times 6$}\label{fig:lex}
\end{figure}

\begin{parag}\label{par:ord-sum}
  The \defn{(ordinal) sum}\dindex{ordinal sum}\dindex{sum} of two
  ordinals $\alpha$ and $\beta$ is the
  ordinality of a well-ordered set that is like $\alpha$
  \emph{followed by} $\beta$.  Suppose there are embeddings $f$ and
  $g$ of $\alpha$ and $\beta$ respectively in a common well-ordered
  set such that $f(\gamma)<g(\delta)$ whenever $\gamma\in\alpha$ and
  $\delta\in\beta$; then we can take the sum of $\alpha$ and $\beta$
  to be the ordinality of $f\setimb{\alpha}\cup g\setimb{\beta}$.  To
  be precise, we define
  \begin{equation*}
    \alpha+\beta=\ord{(\alpha\times\{0\})\cup(\beta\times\{1\})},
  \end{equation*}
where $(\alpha\times\{0\})\cup(\beta\times\{1\})$ has the lexicographic
ordering of $(\alpha\cup\beta)\times2$.  But we must confirm that this
definition agrees with the definition in \parref{thm:addition} when
the ordinals are natural numbers.
\end{parag}

\begin{theorem}\label{thm:ord-add}
For all ordinals $\alpha$, $\beta$, and $\gamma$, 
\begin{enumerate}
  \item
  $0+\alpha=\alpha+0=\alpha,$
  \item
  $\vscr\alpha=\alpha+1,$
  \item
  $(\alpha+\beta)+\gamma=\alpha+(\beta+\gamma),$
\item\label{item:c+a<c+b}
$\alpha<\beta\lto\gamma+\alpha<\gamma+\beta,$
\item\label{item:a+x=b}
if $\alpha<\beta$, then $\alpha+x=\beta$ has a unique ordinal solution.
\end{enumerate}
\end{theorem}

\begin{proof}
Exercise~\ref{ex:ord-add}.  In \eqref{item:a+x=b}, the solution is
$\ord{\alpha\setminus\beta}$; it is unique by \eqref{item:c+a<c+b}.
\end{proof}

\begin{theorem}\label{thm:ord+rec}
  Ordinal addition has the recursive definition
  \begin{enumerate}
\item
    $\alpha+0=\alpha$,
\item
$\alpha+\vscr{\beta}=\vscr{(\alpha+\beta)}$,
\item
$\alpha+\beta=\bigcup\set{\alpha+x}{x\in\beta}$ when $\beta$ is a limit.
  \end{enumerate}
In particular, addition on $\vnn$ is as defined in
\parref{thm:addition}. 
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:ord+rec}.
\end{proof}

\begin{lemma}\label{lem:ord<}
  Suppose $\str a$ and $\str b$ are well-ordered sets, and
  $f\colon\str a\to\str b$.  Then $\ord{\str a}\leq\ord{\str b}$.
\end{lemma}

\begin{proof}
  The homomorphism $f$ is an embedding, which induces an embedding $g$
  of  $\ord{\str a}$ in $\ord{\str b}$.  We shall show by induction
  that
 $\alpha<\ord{\str a}\lto\alpha\leq g(\alpha)$.  Suppose this is so
  when $\alpha<\beta$.  Say also $\beta<\ord{\str a}$.  Then
  $\alpha\leq g(\alpha)< g(\beta)$, so $\alpha<g(\beta)$.  Briefly,
  $\alpha<\beta\lto\alpha<g(\beta)$; so $\beta\leq g(\beta)$.  This
  completes the induction.  Since $g(\alpha)<\ord{\str b}$ whenever
  $\alpha<\ord{\str a}$, we conclude $\alpha<\ord{\str
  a}\lto\alpha<\ord{\str b}$, and hence $\ord{\str a}\leq\ord{\str b}$. 
\end{proof}

\begin{theorem}\label{thm:ord<}
  $\alpha\leq\beta\lto\alpha+\gamma\leq\beta+\gamma$.
\end{theorem}

\begin{proof}
  If $\alpha\leq\beta$, then
  $(\alpha\times\{0\})\cup(\gamma\times\{1\})\included 
   (\beta\times\{0\})\cup(\gamma\times\{1\})$; this inclusion is an
  embedding of the well-ordered sets, so
  $\alpha+\gamma\leq\beta+\gamma$ by Lemma~\ref{lem:ord<}.
\end{proof}

\begin{axiom}[Infinity]\label{ax:infinity}
\axiomname{Infinity: 
\[\Exists xx=\vnn.\]%
%\[\Exists x(\emptyset\in x\land\Forall y(y\in x\lto y\cup\{y\}\in x))\]
}
The class of natural numbers is a set:
\begin{equation*}
  \Exists xx=\vnn.
\end{equation*}
\end{axiom}

\begin{theorem}\label{thm:+not-comm}
  $n<\vnn\lto n+\vnn=\vnn$.
\end{theorem}

\begin{proof}
  Define $f$ from $\vnn$ into $(n\times\{0\})\cup(\vnn\times\{1\})$ by 
  \begin{equation*}
    f(x)=
    \begin{cases}
      (x,0),& \text{ if }x<n;\\
      (y,1),& \text{ if }x=n+y.
    \end{cases}
  \end{equation*}
Then $f$ is an isomorphism.
\end{proof}

\begin{parag}\label{par:is+}
  By Theorem~\ref{thm:ord-add}~\eqref{item:c+a<c+b}, along with the
  Axiom of Infinity, we have the following initial segment of $\on$:
  \begin{equation*}
    \{0,1,2,\dots;\vnn,\vnn+1,\vnn+2,\dots;
  \vnn+\vnn,\vnn+\vnn+1,\dots;\vnn+\vnn+\vnn,\dots\}.
  \end{equation*}
Here the ordinals following the semicolons (;) are limits.  By
Theorem~\ref{thm:+not-comm}, addition involving infinite ordinals is not
commutative; also the ordering in Theorem~\ref{thm:ord<} cannot be
made strict: we have $0<1$, but $0+\vnn=\vnn=1+\vnn$.
\end{parag}

\section{Ordinal multiplication}

\begin{parag}\label{par:ord-prod}
  The \defn{(ordinal) product}\dindex{ordinal
  product}\dindex{product} of two ordinals is the 
  ordinality of their product with the lexicographic ordering
  (\parref{par:lex}):
  \begin{equation*}
    \alpha\cdot\beta=\ord{\alpha\times\beta}.
  \end{equation*}
We must confirm that this agrees with \parref{thm:multiplication} on
$\vnn$. 
\end{parag}

\begin{theorem}\label{thm:ord-mult}
  For all ordinals $\alpha$, $\beta$, and $\gamma$,
  \begin{enumerate}
    \item
$1\cdot\alpha=\alpha\cdot 1=\alpha$;
\item
$(\alpha\cdot\beta)\cdot\gamma=\alpha\cdot(\beta\cdot\gamma)$;
\item\label{item:left}
$\alpha\cdot(\beta+\gamma)=\alpha\cdot\beta+\alpha\cdot\gamma$;
\item\label{item:mult-strict}
$\alpha<\beta\land 0<\gamma\lto\gamma\cdot\alpha<\gamma\cdot\beta$;
\item\label{item:mult-loose}
$\alpha\leq\beta\lto\alpha\cdot\gamma\leq\beta\cdot\gamma$;
\item\label{item:xy-sol}
 $\alpha\cdot x+y=\beta\land y<\alpha$ has a unique ordinal solution if
 $0<\alpha$. 
  \end{enumerate}
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:ord-mult}.  
For \eqref{item:xy-sol}, show
  $\beta\leq\alpha\cdot\beta$.  If $\beta<\alpha\cdot\beta$, then
  $\beta$ is isomorphic to a section $\pred{(\gamma,\delta)}$ of
  $\alpha\times\beta$.  But
  $\pred{(\gamma,\delta)}=
  (\alpha\times\delta)\cup(\gamma\times\{\delta\})$; so
  $\alpha\cdot\delta+\gamma=\beta$ and $\gamma<\alpha$.  Now show
  uniqueness.  
\end{proof}

\begin{theorem}\label{thm:ord.rec}
  Ordinal multiplication has the recursive definition
  \begin{enumerate}
    \item
$\alpha\cdot0=0$,
\item
$\alpha\cdot\vscr{\beta}=\alpha\cdot\beta+\alpha$,
\item
$\alpha\cdot\beta=\bigcup\set{\alpha\cdot x}{x\in\beta}$ when $\beta$
  is a limit.
  \end{enumerate}
In particular, multiplication on $\vnn$ is as in
\parref{thm:multiplication}. 
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:ord.rec}.
\end{proof}

\begin{theorem}\label{thm:nw=w}
  $0<n<\vnn\lto n\cdot\vnn=\vnn$.
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:nw=w}.  (Write out an isomorphism from
  $n\times\vnn$ to $\vnn$.)
\end{proof}

\begin{parag}
We can now extend the initial segment of $\on$ in \parref{par:is+}:
\begin{equation*}
  \{0,1,\dots;\vnn,\vnn+1,\dots;
  \vnn\cdot2,\dots;\vnn\cdot3,\dots;
  \vnn\cdot\vnn,\dots;\vnn\cdot\vnn\cdot\vnn,\dots\}.
\end{equation*}
By Theorem~\ref{thm:ord-mult}~\eqref{item:left} and
Theorem~\ref{thm:nw=w}, ordinal multiplication is not commutative, nor
does it distribute from the right over addition:
\begin{gather*}
(1+1)\cdot\vnn=2\cdot\vnn=\vnn<\vnn+\vnn
=1\cdot\vnn+1\cdot\vnn
=\vnn\cdot 1+\vnn\cdot 1=\vnn\cdot2;
\end{gather*}
also the ordering in
Theorem~\ref{thm:ord-mult}~\eqref{item:mult-loose} cannot be made strict.
\end{parag}

\section{Ordinal exponentiation}

\begin{parag}\label{par:normal}
  An endomorphism $\cF$ of $\on$ is called \idefn{normal} if
  \begin{equation*}
    \cF(\alpha)=\supr{\cF\setimb\alpha}
  \end{equation*}
(that is, $\cF(\alpha)=\bigcup\cF\setimb{\alpha}$)
whenever $\alpha$ is a limit.  For example, the function
$x\mapsto\alpha+x$ is an endomorphism of
$\on$ by Theorem~\ref{thm:ord-add}~\eqref{item:c+a<c+b};
it is normal by Theorem~\ref{thm:ord+rec}.  Likewise, if $0<\alpha$,
then $x\mapsto\alpha\cdot x$ is normal by
Theorems~\ref{thm:ord-mult}~\eqref{item:mult-strict}
and~\ref{thm:ord.rec}. 
\end{parag}

\begin{thmdefn}\label{thm:ord-exp}
There is a unique binary operation of \defn{(ordinal)
  exponentiation}\dindex{ordinal
  exponentiation}\dindex{exponentiation} 
on $\on$, denoted
\begin{equation*}
(x,y)\mapsto x^y,
\end{equation*}
such that:
\begin{enumerate}
\item
$0^\beta=0$ when $\beta\neq0$;
  \item
  $\alpha^0=1$;
  \item
  $\alpha^{\beta+1}=\alpha^\beta\cdot\alpha$;
  \item\label{item:a^b}
  $\alpha^{\beta}=\bigcup\set{\alpha^x}{x\in\beta}$ when
  $\beta$ is a limit and $\alpha\neq0$. 
\end{enumerate}
On $\vnn$, this operation is as given in \parref{thm:exp}. 
  If $1<\alpha$, then $x\mapsto\alpha^x$ is normal.
\end{thmdefn}

\begin{proof}
  Exercise~\ref{ex:ord-exp}.  (Normality follows immediately, once one has
\begin{equation*}
0<\alpha\land\beta<\gamma\lto\alpha^\beta<\alpha^\gamma,
\end{equation*}
which can be proved by induction on $\gamma$.)
\end{proof}

\begin{lemma}\label{lem:normal}
If $\cF$ is normal and $c\pincluded\on$, then
\begin{equation*}
  \cF(\supr c)=\supr{\cF\setimb c}.
\end{equation*}
\end{lemma}

\begin{proof}
  Let $\alpha=\supr c$.  If $\alpha\in c$, then $\alpha$ is the
  greatest element of $c$,
  so $\supr{\cF\setimb c}=\cF(\alpha)$ since $\cF$ preserves order.
  Suppose $\alpha\notin c$. 
Then $c\included\alpha$, so $\supr{\cF\setimb
  c}\leq\supr{\cF\setimb{\alpha}}$.  Also, if
  $\beta<\alpha$, then $\beta\leq\gamma<\alpha$ for some $\gamma$ in
  $c$, so $\supr{\cF\setimb\alpha}\leq\bigcup\cF\setimb c$.
Therefore $\supr{\cF\setimb\alpha}=\bigcup\cF\setimb c$.
But $\alpha$ must be a limit, so $\supr{\cF\setimb\alpha}=\cF(\alpha)$
  by normality of $\cF$.
\end{proof}

\begin{theorem}\label{thm:ord-exp-prop}
  For all ordinals $\alpha$, $\beta$, and $\gamma$,
  \begin{enumerate}
    \item
$0<\alpha\lto 0^{\alpha}=0$,
\item
$1^{\alpha}=1$,
\item\label{item:a^(b+c)}
$\alpha^{\beta+\gamma}=\alpha^\beta\cdot\alpha^\gamma$,
\item\label{item:a^(bc)}
$\alpha^{\beta\cdot\gamma}=(\alpha^\beta)^\gamma$.
  \end{enumerate}
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:ord-exp-prop}.
  For~\eqref{item:a^(b+c)}, by
  Lemma~\ref{lem:normal}, if $1<\alpha$ and $\gamma$ is a limit, one
  has by induction
  \begin{align*}
\alpha^\beta\cdot\alpha^\gamma
&=\alpha^\beta\cdot\supr{\set{\alpha^x}{x\in\gamma}}\\
&=\supr{\set{\alpha^\beta\cdot\alpha^x}{x\in\gamma}}\\
&=\supr{\set{\alpha^{\beta+x}}{x\in\gamma}}\\
&=\alpha^{\supr{\set{\beta+x}{x\in\gamma}}}\\
&=\alpha^{\beta+\supr{\set{x}{x\in\gamma}}}\\
&=\alpha^{\beta+\gamma}.
  \end{align*}
Likewise for \eqref{item:a^(bc)}.
\end{proof}

\begin{parag}
We now have the following initial segment of $\on$:
\begin{multline*}
  \{0,1,\dots;\vnn,\vnn+1,\dots,\vnn\cdot 2,\dots;\vnn^2,\vnn^2+1,\dots;
  \vnn^2+\vnn,\dots;\\
\vnn^2\cdot2,\dots;
\vnn^3,\dots;\vnn^\vnn,\dots;
  \vnn^{\vnn\cdot2},\dots;\vnn^{\vnn^2},\dots;\vnn^{\vnn^\vnn},
  \dots;\vnn^{\vnn^{\vnn^\vnn}},\dots\}.
\end{multline*}
This set is closed under the operations that we have defined so far.
Its supremum is denoted by
\begin{equation*}
  \upepsilon_0;
\end{equation*}
this is 
$\bigcup{\ran{\cF}}$, where $\cF$ is the function on
$\vnn$ defined recursively by
\begin{enumerate}
\item
  $\cF(0)=1,$
\item
$\cF(n+1)=\vnn^{\cF(n)}$.
\end{enumerate}
\end{parag}

\section*{Exercises}
\addcontentsline{toc}{section}{Exercises}

\begin{enumerate}
  \renewcommand{\theenumi}{\arabic{enumi}}
\item\label{ex:is-si}
Show that every subset of an ordered set that admits strong induction
admits strong induction.
\item
Let $(\cC,<)$ be a total order whose every section is a set.  Show
that $(\cC,<)$ admits recursion if and only if, for every class $\cD$
and every function $\cF$ from $\pow{\cD}$ into $\cD$, there is a
unique function $\cG$ from $\cC$ into $\cD$ such that
$\cG(a)=\cF(\cG\setimb{\pred a})$. 
\item\label{ex:si}
Prove Theorem~\ref{thm:si}.
\item\label{ex:rec-alt}
Prove Theorem~\ref{thm:rec-alt}.
\item\label{ex:isom}
Suppose $(\cA,\cR)$ and $(\cB,\cS)$ are strict total orders, and $h$
is a homomorphism from the former to the latter.  Show that
$h:(\cA,\cR)\overset{\cong}{\longrightarrow}(\ran h,\cS)$. 
\item\label{ex:least}
Prove Lemma~\ref{lem:least}.
\item
Prove that an ordinal $\alpha$ is $0$ or a limit if and only if
$\alpha=\bigcup\alpha$. 
\item\label{ex:lex-tot}
Prove that the lexicographic ordering is total (\parref{par:lex}).
\item\label{ex:ord-add}
Prove Theorem~\ref{thm:ord-add}.
\item\label{ex:ord+rec}
Prove Theorem~\ref{thm:ord+rec}.
\item\label{ex:ord-mult}
Prove Theorem~\ref{thm:ord-mult}.
\item\label{ex:ord.rec}
Prove Theorem~\ref{thm:ord.rec}.
\item\label{ex:nw=w}
Prove Theorem~\ref{thm:nw=w}.
\item\label{ex:ord-exp}
Prove Theorem~\ref{thm:ord-exp}.
\item
Prove $1<\alpha\lto\beta\leq\alpha^\beta$.
\item\label{ex:ord-exp-prop}
Prove Theorem~\ref{thm:ord-exp-prop}.
\end{enumerate}

\chapter{Cardinality}\label{ch:cardinality}

%\setcounter{equation}{9}

\section{Finite sets}

\begin{parag}\label{par:inductive}
  A set is called \emph{Dedekind-infinite}\index{Dekekind-finite} if
  it is equipollent with a
  proper subset of itself (\parref{par:inf}).  The definition is an
  attempt to capture what we mean by calling something infinite.  One
  attempt to capture what we mean by \Eng{finite}
  runs as follows.  First, let a subset $b$ of a power-set $\pow a$ be
  called a \idefn{inductive} subset of $\pow a$ if
  \begin{enumerate}
    \item
$\emptyset\in b$,
\item
$c\in b\land d\in a\lto c\cup\{d\}\in b$.
  \end{enumerate}
If $c\included a$, then $b\cap\pow c$ is an inductive subset of
$\pow c$ (Exercise~\ref{ex:ind-defn}).
A set is called \idefn{finite} if it is an element of each inductive
subset of its power-set.  Trivially then, $\emptyset$ is finite.
\end{parag}

\begin{lemma}\label{lem:fin}
  If $a$ is finite, then so is $a\cup\{b\}$.
\end{lemma}

\begin{proof}
Assuming $a$ finite,
  let $c$ be an inductive subset of $\pow{a\cup\{b\}}$; we must show
  $a\cup\{b\}\in c$.  But $c\cap\pow a$ is an inductive subset of
  $\pow a$ (\parref{par:inductive}).  Hence $a\in c$. Therefore
  $a\cup\{b\}\in c$, by definition of an inductive set.
\end{proof}

\begin{theorem}[Induction]\label{thm:set-ind}\dindex{Induction Theorem}
  Suppose $\cC$ is a class of finite sets such that
  \begin{enumerate}
    \item
$\emptyset\in \cC$,
\item
$a\in\cC\lto a\cup\{b\}\in \cC$.
  \end{enumerate}
Then $\cC$ contains all finite sets.
\end{theorem}

\begin{proof}
  Let $a$ be finite.  By the hypothesis on $\cC$, the set
  $\set{x\in\pow a}{x\in\cC}$ is an inductive subset of $\pow a$;
  therefore it contains $a$.  So $a\in \cC$.
\end{proof}

\begin{lemma}\label{lem:fin-im}
  The image of a finite set is finite.
\end{lemma}

\begin{proof}
  Let $\cC$ comprise those finite sets whose images are all finite.
  Trivially, $\emptyset\in \cC$.  Suppose $a\in\cC$ and
  $a\cup\{b\}\included\dom{\cF}$.  Then $\cF\setimb a$ is finite, and
  $\cF\setimb{a\cup\{b\}}=\cF\setimb a\cup\{\cF(b)\}$, so this is also
  finite.  Thus $a\cup\{b\}\in\cC$.  By induction
  (\parref{thm:set-ind}), $\cC$ contains all finite sets.
\end{proof}

\begin{theorem}\label{thm:fin-char}
  A set is finite if and only if it is equipollent with a natural
  number. 
\end{theorem}

\begin{proof}
  All natural numbers are finite, by induction:
  \begin{enumerate}
    \item
$\emptyset$ is finite;
\item
if $n$ is finite, then so is $\vscr n$, that is, $n\cup\{n\}$, by
Lemma~\ref{lem:fin}. 
  \end{enumerate}
Hence all sets equipollent with natural numbers are finite, by
Lemma~\ref{lem:fin-im}. 

Conversely, every finite set is equipollent with a natural number, by
induction (\parref{thm:set-ind}):
\begin{enumerate}
  \item
$\emptyset\equip\emptyset$;
\item
if $a\equip n$, then $a\cup\{b\}\equip n\cup\{n\}$ (assuming $b\notin
a$). \hfill\qed
\end{enumerate}
\renewcommand{\qed}{}
\end{proof}

\begin{lemma}\label{lem:finite}
  Suppose $a$ and $b$ are in $\vnn$, and $f\colon\vscr
  a\injection\vscr b$.  Then $g\colon a\injection b$, where 
  \begin{equation*}
    g(x)=
    \begin{cases}
      f(x),&\text{ if }f(x)\neq b;\\
      f(a),&\text{ if }f(x)=b.
    \end{cases}
  \end{equation*}
Also, $f\colon\vscr a\bijection\vscr b\iff g\colon a\bijection b$.
\end{lemma}

\begin{proof}
If $f$ is a bijection, then
\begin{equation*}
\ran g
=f\setimb{\vscr a\setminus\{f\inv(b)\}}
=f\setimb{\vscr a}\setminus\{b\}
=\vscr b\setminus\{b\}=b,
\end{equation*}
so $g$ is surjective.  If $g$ is a bijection, then
\begin{equation*}
  \ran f=\ran g\cup f\setimb{f\inv\setimb{\{b\}}}=b\cup\{b\}=\vscr b,
\end{equation*}
so $f$ is surjective.
For the  injectivity of $g$, assuming the injectivity of $f$, there
  are two cases.  If $f(a)=b$, then $g$ is simply $f\rest{a}$, so it
  preserves the injectivity of $f$.  Suppose $f(c)=b$, where
  $c<b$.  Then $g(c)=f(a)$, but $a\notin\dom g$, so $g(d)=f(d)\neq
  f(a)$ when $d\in a\setminus\{c\}$.  Again $g$ is injective.  
\end{proof}

\begin{theorem}\label{thm:nat-fin}
  No finite set is Dedekind-infinite.
\end{theorem}

\begin{proof}
By Theorem~\ref{thm:fin-char}, it is enough to show that no natural
  number is Dedekind-infinite.
  We show that every injection from a natural number into itself is
  surjective.  This is trivially true for $0$, and if it is true for
  $a$, then it is true for $\vscr a$, by Lemma~\ref{lem:finite}: if
  $f\colon\vscr a\injection\vscr a$, then there is an injection
  from $a$ into itself, but this is then a surjection too by
  inductive hypothesis, so $f$ is surjective. 
\end{proof}

\begin{theorem}
  Equipollent natural numbers are equal.
\end{theorem}

\begin{proof}
  We show
  \begin{equation*}
    a\in\vnn\land b\in\vnn\land a+b\equip a\lto b=0.
  \end{equation*}
This is trivially true when $a=0$.  Suppose it is true when $a=c$.
Say $\vscr a+b\equip\vscr a$.  Since $\vscr a+b=\vscr{(a+b)}$, by
Lemma~\ref{lem:finite} there is a bijection from $a+b$ to $a$.  By the
inductive hypothesis then, $b=0$.
\end{proof}

\section{Cardinals}


\begin{parag}\label{par:card}
If a set $a$ can be well-ordered, then $a$ is equipollent with some
  ordinal number (Theorem~\ref{thm:ot}).  In this case, 
  we can define the \idefn{cardinality} of $a$ as the \emph{least}
  ordinal that is equipollent with $a$.  
If $a$ cannot be well-ordered, then we still have to understand its
\idefn{cardinality} as the class $\cls x{x\equip a}$, as in
\parref{par:equip}.
In either case, as suggested in
  \parref{par:equip}, the cardinality of $a$ is denoted by
  \begin{equation*}
    \card a.
  \end{equation*}
We shall ultimately (with \parref{ax:choice}) decide that there are
\emph{no} sets that cannot be well-ordered; but not everything that
can be said about cardinalities requires this assumption.  So, for now,
we have two kinds of cardinalities:
\begin{enumerate}
  \item
those that are ordinal numbers: these can be called \defn{cardinal
  numbers} or just \defn{cardinals;}\dindex{cardinal (number)} 
\item
the other cardinalities: the classes $\cls x{x\equip a}$: where $a$
cannot be well-ordered.
\end{enumerate}
The cardinal \emph{numbers} compose the class denoted by
  \begin{equation*}
    \cn;
  \end{equation*}
this is a sub\-{}-class of $\on$.  Then $\cn$ inherits the ordering of
$\on$,
usually denoted by $<$ as suggested in \parref{par:on<}; and this
ordering coincides with $\pinjects$ (\parref{par:injects};
Exercise~\ref{ex:cn<}). 
\end{parag}

\begin{lemma}[Hartogs]\dindex{Hartogs Theorem}
  For every set, there is an ordinal that does not embed in it.
\end{lemma}

\begin{proof}
  If $a$ is a set, let $b$ be the set of well-ordered sets $(c,<)$
  such that $c\included a$.  If $\ord{c,<}=\beta$, and
  $\gamma<\beta$, then $\ord{d,<}=\gamma$ for some section $d$ of $c$.
  This shows that $\set{\ord{\str c}}{\str c\in b}$ is a transitive
  subset of $\on$; so it is an ordinal $\alpha$.  If
  $f:\beta\injection a$, then $f$ determines an element of $b$ whose
  ordinality is $\beta$; so $\beta\in\alpha$.  Since
  $\alpha\notin\alpha$, there is no injection of $\alpha$ in $a$.
\end{proof}

\begin{parag}
  As a consequence of the Hartogs Lemma, for every cardinal $\kappa$,
  there is a cardinal $\alpha$ such that $\kappa<\alpha$, but
  $\kappa\nequip\alpha$.  Therefore $\kappa<\card{\alpha}$.  Thus
  $\kappa$ has a \defn{successor,}\dindex{successor}
  \begin{equation*}
    \scr{\kappa};
  \end{equation*}
it is the \emph{least} of the cardinals that are greater than $\kappa$.
\end{parag}

\begin{lemma}
  The union of a set of cardinals is a cardinal.
\end{lemma}

\begin{proof}
  Let $a$ be a set of cardinals.  The union $\bigcup a$ is $\supr a$,
  an ordinal 
  (Lemma~\ref{lem:sup}).  Hence, if $\kappa$ is a cardinal less than
  $\supr a$, then $\kappa<\lambda$ for some $\lambda$ in $a$, and
  therefore $\kappa\neq\card{\supr a}$.  Therefore $\supr a$ must be a
  cardinal (namely its own cardinality).
\end{proof}

\begin{thmdefn}\label{thm:aleph}
The class $\cls x{x\in\cn\land\vnn\leq x}$ of infinite cardinals is a
proper class; there is an isomorphism
\begin{equation*}
  x\mapsto\aleph_x
\end{equation*}
from $\on$ onto this class, given by
\begin{enumerate}
  \item
$\aleph_0=\vnn$,
\item
$\aleph_{\vscr{\alpha}}=\scr{\aleph_\alpha{}}$,
\item
$\aleph_{\alpha}=\bigcup\set{\aleph_x}{x\in\alpha}$ if $\alpha$ is a limit.
\end{enumerate}
If $0<\alpha$, then $\aleph_{\alpha}$ is called
\defn{uncountable.}\dindex{uncountable} 
\end{thmdefn}

\begin{proof}
  Exercise~\ref{ex:aleph}.
\end{proof}

\section{Cardinal addition and multiplication}

\begin{parag}
The \defn{(cardinal) sum}\dindex{cardinal sum}\dindex{sum} and
  \defn{(cardinal) product}\dindex{cardinal product}\dindex{product}
  of two
  cardinals $\kappa$ and $\lambda$ are defined by
  \begin{align*}
    \kappa+\lambda&=\card{(\kappa\times\{0\})\cup(\lambda\times\{1\})},\\
    \kappa\cdot\lambda&=\card{\kappa\times\lambda}.
  \end{align*}
If $\kappa$ and $\lambda$ are merely cardinalities, not ordinals, then
  \begin{align}\label{eqn:card+}
    \kappa+\lambda&=\card{(a\times\{0\})\cup(b\times\{1\})},\\\label{eqn:card.}
    \kappa\cdot\lambda&=\card{a\times b},
  \end{align}
where $a\in\kappa$ and $b\in\lambda$ (Exercise~\ref{ex:card+.}).
One must distinguish the cardinal operations from the ordinal operations of
  \P\P~\ref{par:ord-sum} and~\ref{par:ord-prod}.  However, the
  cardinal operations, when involving infinite \emph{cardinals} (and not
  merely cardinalities), will turn
  out to be very simple.
\end{parag}

\begin{theorem}\label{thm:card-arith}
If $\kappa$, $\lambda$, and $\mu$ are cardinalities, then
\begin{enumerate}
  \item
$\kappa+\lambda=\lambda+\kappa$,
\item
$\kappa+0=\kappa$,
\item
$(\kappa+\lambda)+\mu=\kappa+(\lambda+\mu)$,
  \item
$\kappa\cdot\lambda=\lambda\cdot\kappa$,
\item
$\kappa\cdot1=\kappa$,
\item
$(\kappa\cdot\lambda)\cdot\mu=\kappa\cdot(\lambda\cdot\mu)$,
\item
$\kappa\cdot(\lambda+\mu)=\kappa\cdot\lambda+\kappa\cdot\mu$,
\item
$\kappa\leq\lambda\lto\kappa+\mu\leq\lambda+\mu$,
\item
$\kappa\leq\lambda\lto\kappa\cdot\mu\leq\lambda\cdot\mu$.
\end{enumerate}
  The cardinal operations agree with the ordinal operations on
  $\vnn$.  
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:card-arith}.
\end{proof}

\begin{lemma}\label{lem:onon}
The class $\on$ of ordinals becomes isomorphic to
  $\on\times\on$ when the latter is ordered by $<$, where
\begin{multline*}
  (\alpha,\beta)<(\gamma,\delta)\iff
  \max(\alpha,\beta)<\max(\gamma,\delta)\lor{}\\ 
{}\lor\Bigl(\max(\alpha,\beta)=\max(\gamma,\delta)\land
  \bigl(\alpha<\gamma\lor(\alpha=\gamma\land\beta<\delta)\bigr)\Bigr).  
\end{multline*}
(Here $\max(\alpha,\beta)$ is the maximal element of
$\{\alpha,\beta\}$.  See Fig.~\ref{fig:onon}.) 
\end{lemma}

\begin{figure}[t]
  \begin{center}
    \begin{pspicture}(0,-9.2)(12,0)
\psset{arrows=->}
\rput(1,-1){\rnode{00}{$(0,0)$}}
\rput(3,-1){\rnode{01}{$(0,1)$}}
\ncline{00}{01}
\rput(1,-3){\rnode{10}{$(1,0)$}}
\ncline{01}{10}
\rput(3,-3){\rnode{11}{$(1,1)$}}
\ncline{10}{11}
\rput(5,-1){\rnode{02}{$(0,2)$}}
\ncline{11}{02}
\rput(5,-3){\rnode{12}{$(1,2)$}}
\ncline{02}{12}
\rput(1,-5){\rnode{20}{$(2,0)$}}
\ncline{12}{20}
\rput(3,-5){\rnode{21}{$(2,1)$}}
\ncline{20}{21}
\rput(5,-5){\rnode{22}{$(2,2)$}}
\ncline{21}{22}
\rput(7,-1){\rnode{03}{$(0,3)$}}
\ncline{22}{03}
\rput(7,-3){\rnode{13}{$(1,3)$}}
\ncline{03}{13}
\rput(7,-5){\rnode{23}{$(2,3)$}}
\ncline{13}{23}
\rput(1,-7){\rnode{30}{$(3,0)$}}
\ncline{23}{30}
\rput(3,-7){\rnode{31}{$(3,1)$}}
\ncline{30}{31}
\rput(5,-7){\rnode{32}{$(3,2)$}}
\ncline{31}{32}
\rput(7,-7){\rnode{33}{$(3,3)$}}
\ncline{32}{33}
\rput(9,-1){\rnode{04}{$(0,4)$}}
\ncline{33}{04}
\rput(9,-3){\rnode{14}{$(1,4)$}}
\ncline{04}{14}
\rput(9,-5){\rnode{24}{$(2,4)$}}
\ncline{14}{24}
\rput(9,-7){\rnode{34}{$(3,4)$}}
\ncline{24}{34}
\rput(1,-9){\rnode{40}{$(4,0)$}}
\ncline{34}{40}
\rput(3,-9){\rnode{41}{$(4,1)$}}
\ncline{40}{41}
\rput(5,-9){\rnode{42}{$(4,2)$}}
\ncline{41}{42}
\rput(7,-9){\rnode{43}{$(4,3)$}}
\ncline{42}{43}
\rput(9,-9){\rnode{44}{$(4,4)$}}
\ncline{43}{44}
\rput(11,-1){\rnode{05}{$(0,5)$}}
\ncline{44}{05}
\rput(11,-3){\rnode{15}{$(1,5)$}}
\ncline{05}{15}
\rput(11,-5){\rnode{25}{$(2,5)$}}
\ncline{15}{25}
\rput(11,-7){\rnode{35}{$(3,5)$}}
\ncline{25}{35}
\rput(11,-9){\rnode{45}{$(4,5)$}}
\ncline{35}{45}
    \end{pspicture}
  \end{center}
\caption{$\on\times\on$, well-ordered}\label{fig:onon}
\end{figure}

\begin{proof}
  Exercise~\ref{ex:onon}.  After showing that $<$ is a total ordering,
  one can show that the least element of a non-empty subset $a$ of
  $\on\times\on$ is $(\beta,\gamma)$, where 
  \begin{align*}
\gamma&=\min\set y{(\beta,y)\in a},\\
\beta&=\min\set x{\Exists y\max(x,y)=\alpha},\\
\alpha&=\min\set{\max(x,y)}{(x,y)\in a}.
  \end{align*}
Now show that every proper initial segment is a set. 
\end{proof}

\begin{theorem}\label{thm:card-easy}
If $\kappa$ and $\lambda$ are cardinals,
 $0<\kappa\leq\lambda$, and $\lambda$ is infinite, then
  \begin{equation*}
    \kappa+\lambda=\kappa\cdot\lambda=\lambda.
  \end{equation*}
That is,
\begin{equation*}
  \aleph_\alpha+\aleph_\beta=
  \aleph_\alpha\cdot\aleph_\beta=
  \aleph_{\max(\alpha,\beta)}.
\end{equation*}
\end{theorem}

\begin{proof}
We shall show 
\begin{equation}\label{eqn:lll}
\lambda\cdot\lambda=\lambda.
\end{equation}
Then we can complete the argument by observing
\begin{gather*}
  \lambda\leq\kappa+\lambda\leq\lambda+\lambda=\lambda\cdot
  2\leq\lambda\cdot\lambda,\\ 
\lambda\leq\kappa\cdot\lambda\leq\lambda\cdot\lambda.
\end{gather*}
We establish~\eqref{eqn:lll} by induction on the infinite cardinals.
Suppose the equation holds 
whenever $\vnn\leq\lambda<\mu$, for some cardinal $\mu$.  Let $\cF$ be
the isomorphism from 
$\on\times\on$ onto $\on$ guaranteed by Lemma~\ref{lem:onon}.  As
$\alpha\times\alpha$ is always a section of $\on\times\on$, so
$\cF\setimb{\alpha\times\alpha}$ must be a section of $\on$: that is,
$\cF\setimb{\alpha\times\alpha}$ is an ordinal.  Suppose
$\cF\setimb{\mu\times\mu}=\alpha$.
Then
\begin{equation*}
  \mu\leq\mu\cdot\mu=\card{\mu\times\mu}=\card{\alpha}\leq\alpha.
\end{equation*}
So $\mu\leq\alpha$.
Suppose $\nu$ is an infinite cardinal and $\nu<\alpha$.  Then
$\nu=\cF(\beta,\gamma)$, where $(\beta,\gamma)\in\mu\times\mu$.  Since
$\mu$ is a limit ordinal (Exercise~\ref{ex:card-lim}), the successor
$\delta$ of $\max(\beta,\gamma)$ is also less than $\mu$.  Hence
\begin{gather*}
\nu\in\cF\setimb{\delta\times\delta},\\
\nu\included\cF\setimb{\delta\times\delta},\\
\nu\leq\card{\delta\times\delta}=\card\delta\cdot\card\delta
\end{gather*}
(Exercise~\ref{ex:nnn}).  By inductive hypothesis,
$\card\delta\cdot\card\delta=\card\delta$, so
$\nu\leq\card\delta<\delta<\mu$.  In short, $\nu<\alpha\lto\nu<\mu$.
Therefore $\alpha\leq\mu$; but since $\mu\leq\alpha$, we have
$\mu=\alpha=\mu\cdot\mu$. 
\end{proof}

\section{Exponentiation}

\begin{parag}\label{par:card-exp}
\defn{Cardinal exponentiation}\dindex{cardinal
  exponentiation}\dindex{exponentiation} is as easy to define as cardinal
  addition and multiplication:  If $\kappa$ and $\lambda$
  are cardinals, then
  \begin{equation*}
    \kappa^\lambda=\card{\mapset{\lambda}{\kappa}};
  \end{equation*}
if $\kappa$ and $\lambda$ are merely cardinalities, containing
representatives $a$ and $b$ respectively, then
\begin{equation*}
  \kappa^\lambda=\card{\mapset ab}.
\end{equation*}
\end{parag}

\begin{theorem}\label{thm:card-exp}
  For all cardinalities $\kappa$, $\lambda$, $\mu$ and $\nu$,
  \begin{enumerate}
    \item
$\kappa^0=1$,
\item
$0<\lambda\lto0^\lambda=0$,
\item
$1^\lambda=1$,
\item
$\kappa^1=\kappa$,
\item
$\kappa^2=\kappa\cdot\kappa$,
\item
$\kappa^{\lambda+\mu}=\kappa^\lambda\cdot\kappa^\mu$,
\item
$\kappa^{\lambda\cdot\mu}=(\kappa^\lambda)^\mu$,
\item
$\kappa\leq\mu\land\lambda\leq\nu\lto\kappa^\lambda\leq\mu^\nu$.
  \end{enumerate}
\end{theorem}

\begin{proof}
  Exercise~\ref{ex:card-exp}.
\end{proof}

\begin{theorem}\label{thm:k<2^k}
For all sets $a$,
\begin{equation}\label{eqn:pow-card}
    \card{\pow a}=2^{\card a}; 
\end{equation}
hence for all
  cardinalities $\kappa$,
  \begin{equation}\label{eqn:k<2^k}
    \kappa<2^\kappa.
  \end{equation}
\end{theorem}

\begin{proof}
There is a bijection between $\mapset a2$ and $\pow a$  that takes the
function $f$ to the set $\set{x\in a}{f(x)=1}$.  This
establishes~\eqref{eqn:pow-card}.  Then~\eqref{eqn:k<2^k} follows by
Cantor's Theorem (\parref{thm:pow}). 
\end{proof}

\begin{corollary}
  If $\kappa$ and $\lambda$ are cardinals such that
  $2\leq\kappa\leq\lambda$ and $\lambda$ is infinite, then
  \begin{equation*}
    \kappa^\lambda=2^\lambda.
  \end{equation*}
\end{corollary}

\begin{proof}
  $2^\lambda\leq\kappa^\lambda\leq\lambda^\lambda\leq(2^\lambda)^\lambda
  =2^{\lambda\cdot\lambda}=2^\lambda$ by Theorem~\ref{thm:card-easy}.
\end{proof}

\begin{theorem}
  There is a normal embedding
  \begin{equation*}
    x\mapsto\beth_x
  \end{equation*}
of $\on$ in the class of infinite cardinals given by
\begin{enumerate}
  \item
$\beth_0=\aleph_0$,
\item
$\beth_{\vscr\alpha}=2^{\beth_\alpha}$,
\item
$\beth_{\alpha}=\bigcup\set{\beth_x}{x\in\alpha}$ if $\alpha$ is a limit.
\end{enumerate}
In particular,
\begin{equation}\label{eqn:aleph-beth}
  \aleph_\alpha\leq\beth_\alpha.
\end{equation}
\end{theorem}

\begin{proof}
The definition is a valid recursive definition.
The function preserves the ordering, by Theorem~\ref{thm:k<2^k} and
induction; it 
then meets the definition of a normal operation
(\parref{par:normal}).  Finally,~\eqref{eqn:aleph-beth} holds, again
by Theorem~\ref{thm:k<2^k} and induction.
\end{proof}

\begin{parag}
The letter $\beth$ is \emph{beth,} the second letter of the Hebrew
alphabet.  The \idefn{Continuum Hypothesis} is that $\aleph_1=\beth_1$;
the \defn{Generalized}\dindex{Generalized Continuum Hypothesis}
Continuum Hypothesis is that 
$\aleph_\alpha=\beth_\alpha$ for all ordinals $\alpha$.  The
\idefn{continuum} is the set of \tech{real numbers,}\tindex{real
  number} defined in 
\S~\ref{sect:real}. 
\end{parag}

\section{The Axiom of Choice}

\begin{parag}
Suppose $a$ is not finite.  If $n\in\vnn$ and $f\colon n\injection a$,
then $f$ is not surjective; so $a\setminus f\setimb n$ has an element
$b$, and then $f\cup\{(n,b)\}\colon n+1\injection a$.  Since,
trivially, $0\colon 0\injection a$, we have by induction that every
natural number embeds in $a$.  However, this by itself does not allow
us to conclude that $\vnn$ embeds in $a$.
\end{parag}

\begin{parag}
  A \idefn{choice-function} for a set is a function that assigns, to
  each non-empty subset of the set, an element of that subset.
  Suppose $f$ is a
  choice-function for $a$, so that
  \begin{equation*}
    b\in\pow a\setminus\{\emptyset\}\lto f(b)\in b.
  \end{equation*}
If also $a$ is non-finite, then there is an embedding $g$ of $\vnn$ in
$a$ defined recursively by
\begin{equation*}
  g(n)=f(a\setminus g\setimb n).
\end{equation*}
Thus every non-finite set with a choice-function is Dedekind-infinite.
\end{parag}

\begin{theorem}\label{thm:ac=wo}
  A set has a choice-function if and only if the set can be
  well-ordered.
\end{theorem}

\begin{proof}
  Suppose $a$ has the choice-function $f$.  Assume also $f(\emptyset)$
  is defined, but is not in $a$.  Then there is a function $\cG$ on
  $\on$ defined recursively by
  \begin{equation*}
    \cG(\alpha)=f(a\setminus\cG\setimb{\alpha}).
  \end{equation*}
Then $\cG\inv{\setimb a}$ is an initial segment of $\on$, and
$\cG\rest{\cG\inv\setimb a}$ is a bijection onto $a$.  So, by means of
$\cG$, the ordering of $\cG\inv\setimb a$ induces a well-ordering of
$a$.

Now suppose conversely that $a$ is well-ordered.  Then there is a
choice-function for $a$ that assigns to each non-empty subset of $a$
its least element.
\end{proof}

\begin{theorem}\label{thm:zorn}
  Suppose $(a,<)$ is an order such that every totally ordered subset
  of $a$ has an upper bound in $a$.  If $a$ has a choice-function,
  then $a$ has a maximal element.
\end{theorem}

\begin{proof}
If $b\included a$, let $f(b)$ be the set
  (possibly empty) of strict upper bounds of $b$.  So $f$ is
  order-reversing, in the sense that
  \begin{equation*}
    c\included b\lto f(c)\includes f(b).
  \end{equation*}
  Let $g$ be a choice-function for $a$, and assume
  $g(\emptyset)\notin a$.  Then define $\cH$
  on $\on$ by
  \begin{equation*}
    \cH(\alpha)=g(f(a\cap\cH\setimb{\alpha})).
  \end{equation*}
Then $\cH$ is an embedding of $\cH\inv\setimb a$ in $a$, so
$a\cap\ran{\cH}$ is totally ordered, but it has no strict upper bound
in $a$.  By hypothesis though, it has an upper bound; this is a
maximal element of $a$.
\end{proof}

\begin{parag}\label{par:zorn}
  Let $a$ be the set of choice-functions for subsets of $b$.
%; assume that, if $f\in a$, then $\dom f$ is precisely $\pow
%c\setminus\{\emptyset\}$ for some subset $c$ of $b$.  
Then $a$ is
  ordered by proper inclusion. 
  Also, the union of any totally ordered subset of $a$ belongs to $a$
  and is an upper bound for the subset.  If $f\in a$, but $\dom f=\pow
  c\setminus\{\emptyset\}$, where $c\pincluded b$, then $b\setminus c$
  contains some $d$.  Then $f\pincluded g$, where $g$ is a
  choice-function for $c\cup\{d\}$ such that $g(e)=d$ when $d\in e$.
  Thus $f$ is not a maximal element of $a$.  Therefore any maximal
  element of $a$ is a choice-function for $b$.
\end{parag}

\begin{axiom}[Choice]\label{ax:choice}
\axiomname{Choice: \[\text{Every set has a choice-function.}\]}
  Every set has a choice-function.
\end{axiom}

\begin{parag}
The Axiom of Choice is a completely new kind of axiom, since it
  asserts the existence of sets that we do not already have as
  classes.  However, the axiom is very convenient.
  In the presence of the Axiom of Choice, the conclusion of
  Theorem~\ref{thm:zorn} is often known as Zorn's Lemma (though it
  appears to be due to Hausdorff).  Then \parref{par:zorn} shows that
  assuming the Axiom of Choice is \emph{equivalent} to assuming Zorn's
  Lemma (this conclusion apparently \emph{is} due to Zorn).  By
  Theorem~\ref{thm:ac=wo} now, every set has a cardinality in the
  sense of \parref{par:card}; and this
  too is equivalent to the Axiom of Choice.
\end{parag}

\section{Computations}

\begin{parag}
  From the definitions of ordinal and cardinal addition and
  multiplication, we have
  \begin{align*}
    \card{\alpha+\beta}&=\card\alpha+\card\beta,\\
    \card{\alpha\cdot\beta}&=\card\alpha\cdot\card\beta.
  \end{align*}
Here the ordinal operations are on the left; the cardinal, on the
right.  So these equations illustrate a convention:  If an operation
is applied to ordinals that are not necessarily cardinals, then the
operation is the ordinal operation; if the ordinals \emph{are} known
to be cardinals, then the operation is the cardinal operation (even
though the ordinal operation would also make sense).  Following
strictly the notation of \parref{par:sig}, we would write for example
\begin{equation*}
\card{\alpha+^{\on}\beta}=\card\alpha+^{\cn}\card\beta.
\end{equation*}
\end{parag}


\begin{parag}
  Exponentiation is different.  We defined ordinal exponentiation so
  that $x\mapsto\alpha^x$ would be normal, assuming $0<\alpha$.  An
  alternative definition is as follows.  We shall define the function
  $x\mapsto\alpha^x$ on $\beta+1$.  First, we
  define a function $\exp_{\alpha}$ from $\beta+1$ into
  $\pow{\mapset{\beta+1}{\alpha}}$ recursively:
  \begin{enumerate}
    \item
$\exp_{\alpha}(0)=\mapset 0\alpha$,
\item
$\exp_{\alpha}(\gamma+1)=\set{x\in\mapset{\gamma+1}\alpha}{x\rest{\gamma}\in
  \exp_{\alpha}(\gamma)}$,
\item
$\exp_{\alpha}(\gamma)=\bigcup \exp_{\alpha}\setimb\gamma$ if $\gamma$ is a limit.
  \end{enumerate}
Then $\exp_{\alpha}$ is a homomorphism: $\gamma<\delta\lto \exp_{\alpha}(\gamma)\pincluded
\exp_{\alpha}(\delta)$.  We can also recursively assign well-orderings to the sets
$\exp_{\alpha}(\gamma)$: 
\begin{enumerate}
  \item
$\exp_{\alpha}(0)$ has the empty ordering;
\item
if $g$ and $h$ are in $\exp_{\alpha}(\gamma+1)$, then 
\begin{equation*}
  g<h\iff g(\gamma)<h(\gamma)\lor(g(\gamma)=h(\gamma)\land
  g\rest\gamma<h\rest\gamma);
\end{equation*}
\item
if $\gamma$ is a limit, then $\exp_{\alpha}(\gamma)$ is ordered by the
union of the
orderings of the $\exp_{\alpha}(\delta)$ where $\delta<\gamma$.
\end{enumerate}
By induction, $\delta<\gamma\lto
 (\exp_{\alpha}(\delta),<)\included(\exp_{\alpha}(\gamma),<)$, 
 and 
 each $\exp_{\alpha}(\gamma)$ is well-ordered; in particular,
$\exp_{\alpha}(\beta)$ is well\-{}-ordered.  Then we can define
\begin{equation*}
  \alpha^\beta=\ord{\exp_{\alpha}(\beta)}.
\end{equation*}
By induction, this definition agrees with the definition in
\parref{thm:ord-exp}. 
\end{parag}

\begin{parag}\label{par:supp}
The \idefn{support} of an element of $\mapset\beta\alpha$ is the
  set of ordinals where the function is not $0$.  We may write
  \begin{equation*}
    \supp f=\set x{x\in\dom f\land f(x)\neq0}.
  \end{equation*}
  Then $\exp_{\alpha}(\beta)$ is the set of elements of
  $\mapset\beta\alpha$ with finite support, and the ordering is the
  (right) lexicographic ordering: that is, $f<g$ if and only if
  $f(\gamma)<g(\gamma)$, where $\gamma$ is the greatest element of
  $\set{x\in\beta}{f(x)\neq g(x)}$; because this set is finite,
  $\gamma$ does exist.  See Fig.~\ref{fig:a^b}.
\end{parag}

\begin{figure}[t]
\begin{gather*}
  (0,0,0,0,\dots)\\
(1,0,0,0,\dots)\\
(2,0,0,0,\dots)\\
\text{\makebox[2.2cm]{\dotfill}}\\
(0,1,0,0,\dots)\\
(1,1,0,0,\dots)\\
(2,1,0,0,\dots)\\
\text{\makebox[2.2cm]{\dotfill}}\\
(0,0,1,0,\dots)\\
(1,0,1,0,\dots)\\
\text{\makebox[2.2cm]{\dotfill}}\\
(0,1,1,0,\dots)\\
\text{\makebox[2.2cm]{\dotfill}}
\end{gather*}
\caption{The ordering of $\set{x\in\mapset\beta\alpha}{\card{\supp
      x}<\aleph_0}$.}\label{fig:a^b}
\end{figure}

\begin{lemma}\label{lem:inf-sum}
  If $b$ is a non-empty set, and $x\mapsto a_x$ is a function on $b$
  such that each set $a_c$ is non-empty, but $c\neq d\lto a_c\cap
  a_d=\emptyset$, 
  and one of 
  $b$ and $\sup\set{\card{a_x}}{x\in b}$ is infinite, then
  \begin{equation*}
    \operatorname{card}\bigl(\bigcup\set{a_x}{x\in b}\bigr)=\card
    b\cdot\sup\set{\card{a_x}}{x\in b}. 
  \end{equation*}
\end{lemma}

\begin{proof}
Let $\kappa=\card{\bigcup\set{a_x}{x\in b}}$ and
  $\lambda=\sup\set{\card{a_x}}{x\in b}$.
  For each $c$ in $b$, there is a bijection $f_c$ from $a_c$ onto
  $\card{a_c}$.  Now let $f$ be the function from
  $\bigcup\set{a_x}{x\in b}$ into $b\times\lambda$ such that
  $f(d)=(c,f_c(d))$ when $d\in a_c$.  Since $f$ is injective, we have
  $\kappa=\card{\ran f}\leq\card b\cdot\lambda$.  Also $\ran f$
  includes $b\times
  1$, so $\card b\leq\kappa$.  If $\alpha<\lambda$, then
  $\alpha<\card{a_c}$ for some $c$ in $b$, but then
  $\{c\}\times\alpha\included\ran f$, so $\alpha\leq\kappa$.  Thus
  $\lambda\leq\kappa$ (since $\lambda$ is a limit ordinal).  By
  Theorem~\ref{thm:card-easy}, we are done.
\end{proof}

\begin{parag}
  The preceding proof used the Axiom of Choice, since a bijection
  $f_c$ from $a_c$ onto $\card{a_c}$ was chosen for each $c$ in $b$.
  But there may be many such bijections.  To define $f$, we need to
  know more than that such functions $f_c$ exist; we must be able to
  specify one of them for each $c$ in $b$.
  So let $g$ be a choice-function for the set $e$ of bijections
  between elements of $\set{a_x}{x\in b}$ and their cardinals.  (See
  Exercise~\ref{ex:choice}.)  Then $f_c=g(\set{x\in e}{\dom x=a_c})$,
  so $f(d)=(c,g(\set{x\in e}{\dom x=a_c})(d))\iff d\in a_c$. 
\end{parag}

\begin{lemma}\label{lem:fin-subsets}
If $a$ is an infinite set, then
\begin{equation*}
  \card{\set{x\in\pow a}{\card x<\aleph_0}}=\card a.
\end{equation*}
\end{lemma}

\begin{proof}
  Exercise~\ref{ex:fin-subsets}.  Use Lemma~\ref{lem:inf-sum}.
\end{proof}

\begin{theorem}
  If $1<\alpha$, and $0<\beta$, and one of $\alpha$ and $\beta$ is
  infinite, then
  \begin{equation*}
    \card{\alpha^\beta}=\card\alpha\cdot\card\beta.
  \end{equation*}
\end{theorem}

\begin{proof}
Let  $b$ be the set of finite subsets of $\beta$.  Then
\begin{equation*}
  \card{\alpha^\beta}=\card{\bigcup\set{\mapset
  x{(\alpha\setminus\{0\})}}{x\in b}}.
\end{equation*}
If $\alpha$ is infinite and $b$ is finite, then $\card{\mapset
  b{(\alpha\setminus\{0\})}}=\card{\alpha}$ (Exercise~\ref{ex:k^n}).
  If $\beta$ is infinite, then $\card b=\card\beta$ by
  Lemma~\ref{lem:fin-subsets}.  In either case, we are done by
  Lemma~\ref{lem:inf-sum}. 
\end{proof}

\section{The real numbers}\label{sect:real}

\begin{parag}
  A \idefn{cut} of a total order $(\cC,<)$ is a non-empty proper
  initial segment that does not contain its supremum (if it has a
  supremum).  The cuts of $\on$ are precisely the limit ordinals, and
  every cut of $\on$ does have a supremum, namely itself.  Some cuts
  of $\Q$ have suprema, others don't: $\pred{a,\Q,<}$ has the supremum
  $a$, but $\set{x\in\Q}{x^2<2\lor x<0}$ has no supremum in $\Q$.
  If we picture $\Q$ as comprising points on a horizontal line,
  with a cut on the left and its complement on the right, then the two
  possibilities are as in Fig.~\ref{fig:cuts}. (If $a$ is a cut of
  $\Q$, then the ordered pair $(a,\Q\setminus a)$ is a cut in the
  original sense of Dedekind~\cite[p.~13]{MR28:2989}.)
\end{parag}

\begin{figure}[t]
  \begin{center}
    \begin{pspicture}(0,-0.2)(12,2.2)
\psset{linewidth=0.8mm}
      \psline(0,2)(5.5,2)
      \psline(0,0)(5.5,0)
      \psline(6.5,2)(12,2)
      \psline(6.5,0)(12,0)
\psdots(6.5,2)
\psdots[dotstyle=o](5.5,2)(5.5,0)(6.5,0)
    \end{pspicture}
  \end{center}
\caption{Cuts}\label{fig:cuts}
\end{figure}

\begin{parag}
  Let $\R$ be the set of cuts of $\Q$; these are the so-called
  \defn{real numbers.}\dindex{real number}  Then $\R$ is totally ordered 
  by inclusion, and
  \begin{equation*}
    x\mapsto\pred x\colon(\Q,<)\to(\R,\pincluded).
  \end{equation*}
Now define the ring-operations on $\R$.  First,
\begin{align*}
  a+b&=\set{x+y}{x\in a\land y\in b},\\
-a&=\set{-x}{x\in\Q\setminus a\land\Exists y(y\in\Q\setminus a\land y<x)}.
\end{align*}
Multiplication is defined by cases.  First, if $0\in a\cap b$ (so that
$a$ and $b$ are \emph{positive} real numbers), then
\begin{equation*}
  a\cdot b=\set{x\cdot y}{x\in a\land y\in b}.
\end{equation*}
If $a=0^{\R}$ or $b=0^{\R}$ (that is, 
if $a=\pred 0$ or $b=\pred 0$), then $a\cdot b=0$.  Finally,
\begin{equation*}
  a\cdot b=
  \begin{cases}
    -(-a\cdot b),&\text{ if }0\in b\setminus a;\\
-(a\cdot-b),&\text{ if }0\in a\setminus b;\\
-a\cdot-b,&\text{ if }0\notin a\cup b.
  \end{cases}
\end{equation*}
Then $x\mapsto\pred x$ is an embedding of ordered fields
(Exercise~\ref{ex:Q-in-R}). 
\end{parag}

\begin{parag}
  If $a$ is a cut of $\R$, then $\bigcup a$ is a cut of $\Q$ and is
  the supremum of $a$ (Exercise~\ref{ex:complete}).  Then every subset
  of $\R$ with an upper bound 
  has a supremum: this makes $\R$ a \idefn{complete} ordered field.
\end{parag}

\begin{parag}
We have a surjection of $\N\times\N$ onto $\Z$, so (Exercise~\ref{ex:ac-surj})
$\card{\Z}=\aleph_0$.  We have a surjection of
$\Z\times(\Z\setminus\{0\})$ onto $\Q$, so $\card{\Q}=\aleph_0$.  (See
also Exercise~\ref{ex:ZQcount}.)  Since $\R\included\pow{\Q}$, we have
\begin{equation}\label{eqn:R<=}
  \card{\R}\leq 2^{\aleph_0}.
\end{equation}
\end{parag}

\begin{parag}
  There is an embedding of $\mapset\vnn2$ into $\R$, so that
  $2^{\aleph_0}\leq\card{\R}$; because of~\eqref{eqn:R<=}, by the
  Schroeder--Bernstein Theorem (\parref{thm:sch-b}), we then have
  \begin{equation*}
    \card{\R}=2^{\aleph_0}.
  \end{equation*}
To define the embedding, replace $\Q$ with its image in $\R$; that is,
treat $\Q$ as a sub-field of $\R$.  Let $f\colon\mapset\vnn2\to\R$,
where
\begin{equation*}
  f(\sigma)=\sup\Bigl\{\sum_{k=0}^x\frac{2\cdot\sigma(k)}{3^{k+1}}\colon
  x\in\vnn\Bigr\}. 
\end{equation*}
Then $f$ is well-defined, since, by induction, 
\begin{equation*}
  \sum_{k=0}^n\frac{2\cdot\sigma(k)}{3^{k+1}}\leq 1-\frac 1{3^{n+1}}.
\end{equation*}
Also, $f$ is injective, since, if $\sigma\rest n=\tau\rest n$, but
$\sigma(n)=0<1=\tau(n)$, then
\begin{equation*}
  f(\sigma)\leq\sum_{k=0}^{n-1}\frac{2\cdot\sigma(k)}{3^{k+1}}+\frac1{3^n} 
< \sum_{k=0}^{n-1}\frac{2\cdot\sigma(k)}{3^{k+1}}+\frac2{3^n} 
\leq f(\tau).
\end{equation*}
Here $f\setimb{\mapset\omega2}$ is called the \defn{Cantor
  set;}\dindex{Cantor set} it is
the intersection of the sets depicted in Fig.~\ref{fig:cantor}.
\end{parag}

\begin{figure}[t]
  \begin{center}
    \begin{pspicture}(0,-2.6)(12.15,1)
\uput[u](0,0    ){$0                   $}
\uput[u](12.15,0){$1                   $}
\uput[u](4.05,0){$\displaystyle\frac13$}
\uput[u](8.10,0){$\displaystyle\frac23$}
\uput[u](1.35,0){$\displaystyle\frac19$}
\uput[u](2.7,0){$\displaystyle\frac29$}
\uput[u](9.45,0){$\displaystyle\frac79$}
\uput[u](10.8,0){$\displaystyle\frac89$}
\begin{comment}
\uput[u](0.45,0){$\displaystyle\frac1{27}$}
\uput[u](0.90,0){$\displaystyle\frac2{27}$}
\uput[u](3.15,0){$\displaystyle\frac7{27}$}
\uput[u](3.6,0){$\displaystyle\frac8{27}$}
\uput[u](8.55,0){$\displaystyle\frac{19}{27}$}
\uput[u](9    ,0){$\displaystyle\frac{20}{27}$}
\uput[u](11.25,0){$\displaystyle\frac{25}{27}$}
\uput[u](11.7 ,0){$\displaystyle\frac{26}{27}$}
\end{comment}
\psset{linewidth=0.8mm}
\psline(0,0)(12.15,0)
 \psline(0,-0.5)(4.05,-0.5)
 \psline(8.1,-0.5)(12.15,-0.5)
  \psline(0,-1)(1.35,-1)
  \psline(2.7,-1)(4.05,-1)
  \psline(8.1,-1)(9.45,-1)
  \psline(10.8,-1)(12.15,-1)
   \psline(0,-1.5)(0.45,-1.5)
   \psline(0.90,-1.5)(1.35,-1.5)
   \psline(2.7,-1.5)(3.15,-1.5)
   \psline(3.6,-1.5)(4.05,-1.5)
   \psline(8.1,-1.5)(8.55,-1.5)
   \psline(9,-1.5)(9.45,-1.5)
   \psline(10.8,-1.5)(11.25,-1.5)
   \psline(11.7,-1.5)(12.15,-1.5)
    \psline(0,-2)(0.15,-2)
    \psline(0.3,-2)(0.45,-2)
    \psline(0.90,-2)(1.05,-2)
    \psline(1.2,-2)(1.35,-2)
    \psline(2.7,-2)(2.85,-2)
    \psline(3.0,-2)(3.15,-2)
    \psline(3.6,-2)(3.75,-2)
    \psline(3.9,-2)(4.05,-2)
    \psline(8.1,-2)(8.25,-2)
    \psline(8.4,-2)(8.55,-2)
    \psline(9  ,-2)(9.15,-2)
    \psline(9.3,-2)(9.45,-2)
    \psline(10.8,-2)(10.95,-2)
    \psline(11.1,-2)(11.25,-2)
    \psline(11.7,-2)(11.85,-2)
    \psline(12,-2)(12.15,-2)
     \psline(0,-2.5)(0.05,-2.5)
     \psline(0.1,-2.5)(0.15,-2.5)
     \psline(0.3,-2.5)(0.35,-2.5)
     \psline(0.4,-2.5)(0.45,-2.5)
     \psline(0.9,-2.5)(0.95,-2.5)
     \psline(1,-2.5)(1.05,-2.5)
     \psline(1.2,-2.5)(1.25,-2.5)
     \psline(1.3,-2.5)(1.35,-2.5)
     \psline(2.7,-2.5)(2.75,-2.5)
     \psline(2.8,-2.5)(2.85,-2.5)
     \psline(3.0,-2.5)(3.05,-2.5)
     \psline(3.1,-2.5)(3.15,-2.5)
     \psline(3.6,-2.5)(3.65,-2.5)
     \psline(3.7,-2.5)(3.75,-2.5)
     \psline(3.9,-2.5)(3.95,-2.5)
     \psline(4,-2.5)(4.05,-2.5)
     \psline(8.1,-2.5)(8.15,-2.5)
     \psline(8.2,-2.5)(8.25,-2.5)
     \psline(8.4,-2.5)(8.45,-2.5)
     \psline(8.5,-2.5)(8.55,-2.5)
     \psline(9  ,-2.5)(9.05,-2.5)
     \psline(9.1,-2.5)(9.15,-2.5)
     \psline(9.3,-2.5)(9.35,-2.5)
     \psline(9.4,-2.5)(9.45,-2.5)
     \psline(10.8,-2.5)(10.85,-2.5)
     \psline(10.9,-2.5)(10.95,-2.5)
     \psline(11.1,-2.5)(11.15,-2.5)
     \psline(11.2,-2.5)(11.25,-2.5)
     \psline(11.7,-2.5)(11.75,-2.5)
     \psline(11.8,-2.5)(11.85,-2.5)
     \psline(12,-2.5)(12.05,-2.5)
     \psline(12.1,-2.5)(12.15,-2.5)
    \end{pspicture}
  \end{center}
\caption{Towards the Cantor set}\label{fig:cantor}
\end{figure}

\section*{Exercises}
\addcontentsline{toc}{section}{Exercises}

\begin{enumerate}
  \renewcommand{\theenumi}{\arabic{enumi}}
\item\label{ex:ind-defn}
If $b$ is an inductive subset of $\pow a$, and $c\included a$, prove that
$b\cap\pow c$ is an inductive subset of $\pow c$.
\item\label{ex:cn<}
Prove that $\in$ coincides with $\pinjects$ on $\cn$.
\item\label{ex:aleph}
Prove Theorem~\ref{thm:aleph}.
\item\label{ex:card+.}
Show that~\eqref{eqn:card+} and~\eqref{eqn:card.} are independent of
the choice of $a$ in $\kappa$ and $b$ in $\lambda$.
\item\label{ex:card-lim}
Prove that infinite cardinals are limit ordinals.
\item\label{ex:nnn}
Show that $\card{a\times b}=\card a\cdot\card b$.
\item\label{ex:card-arith}
Prove Theorem~\ref{thm:card-arith} without using
Theorem~\ref{thm:card-easy}. 
\item\label{ex:onon}
Prove Lemma~\ref{lem:onon}.
\item\label{ex:card-exp}
Prove Theorem~\ref{thm:card-exp}.
\item\label{ex:k^n}
If $\kappa$ is an infinite cardinal, and $1<n<\vnn$, prove
$\kappa^n=\kappa$. 
\item\label{ex:ac-surj}
Use the Axiom of Choice to show that, if $f\colon a\surjection b$,
then $b\injects a$. 
\item\label{ex:choice}
If $a$ is a set, why is there a \emph{set} of bijections between
elements of $a$ and their cardinals?
\item\label{ex:fin-subsets}
Prove Lemma~\ref{lem:fin-subsets}.
\item\label{ex:Q-in-R}
Show that $x\mapsto\pred x$ is an embedding of $\Q$ in $\R$ as ordered
fields. 
\item\label{ex:complete}
Show that the union of a cut of $\R$ is the supremum of the cut.
\item\label{ex:ZQcount}
Show that $\Z$ and $\Q$ are countable without using the Axiom of Choice.
\end{enumerate}

\chapter{Models}\label{ch:models}

\setcounter{equation}{9}

\section{Well-founded sets}

\begin{parag}
  We have noted the possibility that a set might contain itself as a
  member.  We shall see now how to rule out this possibility, along
  with other pathologies like $a\in b\land b\in a$.
\end{parag}

\begin{parag}\label{par:wf-universe}
  Let $\rwf$ be the function on $\on$ given by
  \begin{enumerate}
    \item
$\rwf(0)=\emptyset$,
\item
$\rwf(\alpha+1)=\pow{\rwf(\alpha)}$,
\item
$\rwf(\alpha)=\bigcup\rwf\setimb\alpha$ if $\alpha$ is a limit.
  \end{enumerate}
Now define
\begin{equation*}
  \wf=\bigcup\rwf\setimb{\on};
\end{equation*}
this is the \defn{well-founded universe.}\dindex{well-founded
  universe}  (We do not have a particular name for the elements of
  $\wf$ as such.)
\end{parag}

\begin{lemma}
  Each set $\rwf(\alpha)$ is transitive, so $\wf$ is transitive.  If
  $\beta<\alpha$, then $\rwf(\beta)\included\rwf(\alpha)$.
\end{lemma}

\begin{proof}
  Use induction.  Trivially, $\rwf(0)$ is transitive; the power-set of
  a transitive set is transitive; the union of a set of transitive
  sets is transitive.  (See Exercise~\ref{ex:trans}.)  Therefore each
  set $\rwf(\alpha)$ is transitive, so $\wf$ is transitive.

Consequently, as $\rwf(\alpha)\in\rwf(\alpha+1)$, so
$\rwf(\alpha)\included\rwf(\alpha+1)$.  If $\beta<\alpha$, and
$\alpha$ is limit, then immediately
$\rwf(\beta)\included\rwf(\alpha)$.  By induction,
$\beta<\alpha\lto\rwf(\beta)\included\rwf(\alpha)$. 
\end{proof}

\begin{parag}
  A set is \idefn{ill-founded} if there is a function $f$ from $\vnn$
  into the set such that $f(n+1)\in f(n)$ for each $n$.  (There is no
  requirement that $\in$ be transitive on the set.)  A set that is not
  ill-founded is \defn{well-founded.}\dindex{well-founded}
\end{parag}

\begin{lemma}
  The set $a$ is well-founded if and only if
  \begin{equation}\label{eqn:wf}
    b\included a\land b\neq\emptyset\lto\Exists x(x\in b\land x\cap
    b=\emptyset). 
  \end{equation}
\end{lemma}

\begin{proof}
Suppose $a$ is ill-founded, so it has a subset $\set{b_x}{x\in\vnn}$,
where $b_{n+1}\in b_n$.  Then $b_{n+1}\in b_n\cap\set{b_x}{x\in\vnn}$.
Thus~\eqref{eqn:wf} fails.

Suppose conversely that~\eqref{eqn:wf} fails, so $a$ has a non-empty
subset $b$ such that
\begin{equation*}
  c\in b\lto c\cap b\neq\emptyset.
\end{equation*}
Then there is a recursively defined function $f$ from $\vnn$ into $b$
such that $f(n+1)\in f(n)\cap b$.  (This uses the Axiom of Choice:
assuming $b$ is well-ordered, we let $f(n+1)$ be the \emph{least}
element of $f(n)\cap b$.)
\end{proof}

\begin{parag}\label{par:rank}
  If $a\in\wf$, then the least ordinal $\alpha$ such that
  $a\in\rwf(\alpha)$ must be a successor, $\beta+1$.  Then $\beta$ is
  the \idefn{rank} of $a$:
  \begin{equation*}
    \rank a=\min\set{x\in\on}{a\in\rwf(x+1)}.
  \end{equation*}
If $b\in a$, then $b\in\wf$, and $\rank b<\rank a$
(Exercise~\ref{ex:rank}).  Since $\on$ is well-ordered, there is no
infinite descending sequence $\alpha_0>\alpha_1>\alpha_2>\dotsb$ of
ordinals.  Therefore the elements of $\wf$ are well-founded.  However,
the converse may fail:  If $a=\{b\}$ and $b=\{a\}$, but $a\neq b$,
then $a\notin\wf$ 
(since otherwise $\rank a>\rank b>\rank a$); but $a$ is well-founded
since $a\cap b=\emptyset$.  Note however $\bigcup\{a,\bigcup
a\}=\{a,b\}$, which is ill-founded.
\end{parag}

\begin{lemma}
  Every set is included in a transitive set.  All transitive
  well\-{}-founded sets are in $\wf$.
\end{lemma}

\begin{proof}
  Given a set $a$, we define the sets $\bigcup^na$ recursively:
  \begin{enumerate}
    \item
$\bigcup^0a=a$,
\item
$\bigcup^{n+1}a=\bigcup\bigcup^na$.
  \end{enumerate}
Now let $\bigcup^{\vnn}a=\bigcup\set{\bigcup^xa}{x\in\vnn}$.  Then
$a\included\bigcup^{\vnn}a$; also, the latter is transitive, since if
$b\in\bigcup^{\vnn}a$, then $b\in\bigcup^na$ for some $n$, and
therefore $b\included\bigcup^{n+1}a\included\bigcup^{\vnn}a$. 

For the second claim, suppose $a$ is transitive, but not in $\wf$.
All subsets of $\wf$ are elements of $\wf$
(Exercise~\ref{ex:wf-subsets}); therefore $a\nincluded\wf$, so
$a\setminus\wf$ has a member $a_1$, which is also a subset of $a$.
Now continue: if $a_n\notin\wf$,
then $a_n\nincluded\wf$, so we may
let $a_{n+1}\in a_n\setminus\wf$; if also $a_n\included a$, then
$a_{n+1}\in a$, so $a_{n+1}\included a$ (see Exercise~\ref{ex:wf-ac}).
Therefore $a$ is ill-founded.  
\end{proof}

\begin{theorem}\label{thm:wf}
  All sets are in $\wf$ if and only if all sets are well-founded:
  \begin{equation*}
    \Forall xx\in\wf\iff\Forall x(x\neq\emptyset\lto\Exists y(y\in
    x\land y\cap x=\emptyset)).
  \end{equation*}

  \begin{proof}
    Exercise~\ref{ex:wf-wf}.
  \end{proof}
\end{theorem}
\begin{axiom}[Foundation]
\axiomname{Foundation: 
\[\universe=\wf.\]%
%\[a\neq0\lto\Exists y(y\in a\land y\cap a=\emptyset)\]
}
All sets are well-founded:
\begin{equation*}
  a\neq0\lto\Exists y(y\in a\land y\cap a=\emptyset).
\end{equation*}
\end{axiom}

\section{Virtual classes}\label{sect:e-wf}

\begin{parag}
The Foundation Axiom is like a definition: it declares which sets we
wish to study.  Unlike most of our axioms, it does not assert the
existence of any sets.  In the following section, we shall see in a
precise way that in fact we do not \emph{need} any ill-founded sets.
Meanwhile, in the present section, we show that that it is convenient
not to \emph{have} well-founded sets.
\end{parag}

\begin{parag}\label{par:tau}
  Along with the class-operations of \S~\ref{sect:new-classes}, there
  is an operation that assigns to the class $\cC$ a \emph{set}
  $\tau(\cC)$ such that
  \begin{enumerate}
    \item
$\tau(\cC)\included\cC$;
\item
$\cC\neq\emptyset\lto\tau(\cC)\neq\emptyset$.
  \end{enumerate}
Indeed, if $\cC\neq\emptyset$, let $\alpha=\min\cls{x\in\on}{\Exists
 y(y\in\cC\land\rank y=x)}$, and let
  \begin{equation*}
\tau(\cC)=\rwf(\alpha)\cap\cC.
  \end{equation*}
\end{parag}

\begin{theorem}\label{thm:e-wf}
  If $\cE$ is an equivalence-relation on $\cC$, then there is a
  function $\cF$ on $\cC$ such that
  \begin{equation*}
    \cF(a)=\cF(b)\iff a\mathrel{\cE}b.
  \end{equation*}
\end{theorem}

\begin{proof}
  Let $\cF(a)=\tau(a\cE)$, where $\tau$ is as in \parref{par:tau} (and
  $a\cE$ is the equivalence-class of $a$, as in \parref{par:aRRa}).
\end{proof}

\begin{parag}
  Now the virtual class $\cC/\cE$ of \parref{par:aRRa} can be
  understood as the real class $\cF\setimb{\cC}$, where $\cF$ is as in
  the theorem.
\end{parag}

\section{Consistency}

\begin{parag}
  We now have all of the standard axioms of set-theory.  All of these
  axioms, besides Choice, are known collectively as $\zf$, in honor of
  Zermelo and Fraenkel.  When Choice is added, the set of axioms is called
  $\zfc$.  We shall now justify the Foundation Axiom by showing that
  all of the other axioms in $\zf$ remain true under the assumption
  that $\universe=\wf$.
\end{parag}

\begin{parag}\label{par:model}
  If $\cM$ is a class, and $\phi$ is a formula, we shall define a
  \idefn{relativization} of $\phi$ to $\cM$, denoted by
  \begin{equation*}
    \phi^{\cM}.
  \end{equation*}
The aim is that, if $\phi$ is $n$-ary, and $\vec a\in\cM^n$, then
$\phi^{\cM}(\vec a)$ means that $\phi(\vec a)$ is true under the
assumption that all sets belong to $\cM$.  In short, if $\sigma$ is a
sentence, then $\sigma^{\cM}$ means that $\sigma$ is \idefn{true in}
$\cM$, or that $\cM$ is a \idefn{model} of $\sigma$. 
The formal definition is
recursive:
\begin{enumerate}
  \item
$(s\in t)^{\cM}$ is $s\in t$ (the same formula);
\item
$(\lnot\phi)^{\cM}$ is $\lnot\phi^{\cM}$ (the negation of
  $\phi^{\cM}$);
\item
$(\phi\to\psi)^{\cM}$ is $\phi^{\cM}\to\psi^{\cM}$;
\item
$(\Exists x\phi)^{\cM}$ is $\Exists x(x\in\cM\land\phi^{\cM})$ (that
  is, $\Exists x\lnot(x\in\cM\lto\lnot\phi^{\cM})$).
\end{enumerate}
Then $(\Forall x\phi)^{\cM}$ is $\Forall x(x\in\cM\lto\phi^{\cM})$.
If $\cR=\cls{\vec x}{\phi(\vec x)}$, then we can write $\cR^{\cM}$
for $\cls{\vec x\in\cM^n}{\phi^{\cM}(\vec x)}$, although, strictly,
this class depends on the formula $\phi$ chosen to define $\cR$.  (See
Exercise~\ref{ex:R^M}.) 
\end{parag}

\begin{parag}
  An $n$-ary formula $\phi$ is \defn{absolute} for $\cM$ if
  \begin{equation*}
    \phi^{\cM}(\vec a)\iff\phi(\vec a)
  \end{equation*}
for all $\vec a$ in $\cM^n$.  Then the atomic formula $x\in y$ is
always absolute.  However, $x=y$ need not be absolute, by our
account.  Indeed, $x=y$ is an abbreviation for $\Forall x(x\in z\iff
y\in z)$; so the relativization to $\cM$ is
\begin{equation*}
  \Forall z(z\in\cM\lto(x\in z\iff y\in z)).
\end{equation*}
So, suppose $a$ and $b$ are distinct sets such that $a\notin b$ and
$b\notin a$: perhaps $a=\emptyset$ and
$b=\bigl\{\{\emptyset\}\bigr\}$.  If $\cM=\{a,b\}$, then
$(a=b)^{\cM}$, although $a\neq b$.
\end{parag}

\begin{lemma}\label{lem:zf-m}
  $\zf$ is true in $\cM$, provided
  \begin{enumerate}
    \item
$\cM$ is transitive,
\item
$a\included\cM\lto\Exists x(a\included x\land x\in \cM)$,
\item
the Comprehension-Scheme is absolute for $\cM$, that is, 
\begin{equation*}
a\in\cM\lto a\cap\cls{x\in\cM}{\phi^{\cM}(x)}\in\cM
\end{equation*}
for all (singulary) formulas $\phi$ whose constants are in $\cM$, and
\item
$x=y$ is absolute for $\cM$.
  \end{enumerate}
\end{lemma}

\begin{proof}
  Suppose throughout that $a$ and $b$ are arbitrary members of $\cM$.
  Note first that $x\included y$ is absolute for $\cM$, merely because
  $\cM$ is transitive.  Indeed, this formula
  stands for $\Forall z(z\in x\lto z\in y)$; so the relativization is 
  \begin{equation*}
    \Forall z(z\in x\cap\cM\lto z\in y).
  \end{equation*}
But $a\cap\cM=a$, by transitivity of $\cM$; so $(x\included y)^{\cM}$
is just $x\included y$.

Since the Extension Axiom can be written as
\begin{equation*}
  a=b\iff(a\included b\land b\included a)
\end{equation*}
(\parref{par:a=b-subsets}), and $a=b$ is absolute for $\cM$, so is the
axiom.  

Foundation is absolute for $\cM$, by transitivity of $\cM$.

The remaining axioms to consider are that certain classes $\cls
x{\phi}$ are sets. 
We have to show that the relativizations $\cls{x\in\cM}{\phi^{\cM}}$ are sets
that belong to $\cM$ (assuming the constants of $\phi$ are in $\cM$).
Let $\cC=\cls{x\in\cM}{\phi^{\cM}}$.
By Comprehension in $\cM$, it will be enough to 
show that $\cC$ is a set:  Indeed,
$\cC\included\cM$ by definition; if also $\cC$ is a set, then
$\cC\included d$ for some element $d$ of $\cM$, and consequently
$\cC=d\cap\cC\in\cM$. 
\begin{enumerate}
  \item
Pairing: $\{a,b\}^{\cM}=
\cls{x\in\cM}{x=a\lor x=b}=
\{a,b\}$, a set.
\item
Union: By transitivity of $\cM$, we have
\begin{align*}
\bigl(\bigcup a\bigr)^{\cM}
&=\cls{x\in\cM}{\Exists y(y\in\cM\land y\in a\land x\in y)}\\
&=\cls{x\in\cM}{\Exists y(y\in a\land x\in y)}\\
&=\bigcup a.
\end{align*}
\item
Infinity: $\vnn^{\cM}=\vnn$
(Exercise~\ref{ex:rel-inf}). 
\item
Power-set: $\pow a^{\cM}=\cM\cap\pow a$.
\end{enumerate}
Replacement is a bit more work.  Suppose
\begin{equation*}
(\Forall x\Forall y\Forall z(\phi(x,y)\land
\phi(x,z)\lto y=z))^{\cM}.  
\end{equation*}
Then $\cls{(x,y)\in\cM\times\cM}{\phi^{\cM}(x,y)}$ is a function $\cF$.  Say
$a\included\dom{\cF}$.  Then 
\begin{align*}
\cF\setimb a^{\cM}
&=\cls{y\in\cM}{(\Exists x(x\in a\land\phi(x,y)))^{\cM}}\\
&=\cls{y\in\cM}{\Exists x(x\in a\cap\cM\land\phi^{\cM}(x,y))}\\
&=\cls{y\in\cM}{\Exists x(x\in a\land\phi^{\cM}(x,y))}\\
%&=\cls{x\in\cM}{\Exists y(y\in a\land y\mathrel{\cR^{\cM}}x}\\
&=\cF\setimb a,
\end{align*}
which is a set. 
\end{proof}

\begin{parag}
A collection of axioms is \idefn{inconsistent} if some sentence and its
negation can be proved from the axioms.  Axioms not inconsistent are
\defn{consistent.}\dindex{consistent} 
Any collection of axioms with a model (\parref{par:model}) is consistent.
  The axioms in $\zf$, besides Foundation, might be called $\zf^-$.
  We believe that these axioms have the model $\universe$; in
  particular, we believe that $\zf^-$ is consistent. 
  Since $\wf$ meets the conditions of the last lemma
  (Exercise~\ref{ex:zf-}), we have that $\wf$ is a model of $\zf$, so
  $\zf$ is consistent.  But $\wf$ is constructed on the assumption
  that $\universe$ exists as a model of $\zf^-$.  Briefly then,
  \emph{if} $\zf^-$ is consistent, then 
  so is $\zf$ itself. 
\end{parag}

\section{Constructible sets}

\begin{parag}
  A relation on a set $a$ is called \idefn{definable} if it is a
  relativization $\cR^a$, where $\cR$ is defined by a formula whose
  only constants are elements of $a$.  Let the set of $n$-ary
  definable relations on $a$ be denoted by
  \begin{equation*}
    \defr na.
  \end{equation*}
%then let 
%\begin{equation*}
%  \defr{}a=\bigcup\set{\defr xa}{x\in\vnn}.
%\end{equation*}
Then $\defr na\included\pow{a^n}$.  However, if $a$ is infinite, then
$\card{\defr na}=\card a$ (Exercise~\ref{ex:def-count}); so not every
relation on $a$ is definable. 
\end{parag}

\begin{parag}
A formal definition of the definable sets can be given by recursion,
paralleling the definition of formulas.
First, suppose $m$ and $n$ 
are in $\vnn$, and $f\colon m\to n$.  Then we obtain two related
functions:
\begin{enumerate}
  \item
Let $f_*$ be the function
\begin{equation*}
  x\mapsto\set{(u_j\colon j\in n)\in\universe^n}{(u_{f(i)}\colon i\in m)\in x}
\end{equation*}
from $\pow{\universe^m}$ to $\pow{\universe^n}$.  If $a$ is
defined by $\phi(x_i\colon i\in m)$, then $f_*(b)$ is
defined by $\phi(x_{f(i)}\colon i\in m)$.
\item
Let $f^*$ be the function
\begin{equation*}
  y\mapsto\set{(u_{f(i)}\colon i\in m)\in\universe^m}{(u_j\colon j\in n)\in y}.
\end{equation*}
from $\pow{\universe^n}$ to $\pow{\universe^m}$.  If $b$ is
defined by $\psi(x_j\colon j\in n)$, then $f^*(b)$ is defined by
\begin{equation*}
\Exists{y_0}\dotsb\Exists{y_{n-1}}(\psi(y_j\colon j\in n)\land
x_0=y_{f(0)}\land\dotsb\land x_{m-1}=y_{f(m-1)}).
\end{equation*} 
\end{enumerate}
\end{parag}

\begin{parag}
Now we can define the sets $\defr na$ recursively as follows.
\begin{enumerate}
\item
$\set{(x,y)\in a\times a}{x\in y}\in\defr 2a$.
  \item
$b\cap a$ (that is, $\set{x\in a}{x\in b}$) and $\set{y\in a}{b\in y}$
    are in $\defr 1a$ when $b\in a$. 
\item
$a^n\setminus b\in\defr na$ when $b\in\defr na$.
\item
$b\cap c\in\defr na$ when $b$ and $c$
  are in $\defr na$.
\item
$f_*(b)\in\defr na$ when $b\in\defr ma$ and $f\colon m\to n$.
\item
$f^*(c)\in\defr ma$ when $c\in\defr na$ and $f\colon m\to n$.
\end{enumerate}
%Formally, the sets $\defr na$ are the intersections of the sets of
%subsets of the power-sets $\pow{a^n}$ that have the required properties. 
\end{parag}

\begin{parag}
  A function $x\mapsto\const(x)$ on $\on$ is defined recursively as follows:
  \begin{enumerate}
    \item
$\const(0)=\emptyset$,
\item
$\const(\alpha+1)=\defr 1{\const(\alpha)}$,
\item
$\const(\alpha)=\bigcup\const\setimb{\alpha}$ if $\alpha$ is a limit.
  \end{enumerate}
We now use $\cu$ to denote $\bigcup\cls{\const(x)}{x\in\on}$ (rather
than the function $x\mapsto\const(x)$).
%\begin{equation*}
%  \cu=\bigcup\const\setimb{\on};
%\end{equation*}
Then $\cu$ the \defn{constructible universe,} and its elements are the
\defn{constructible sets.}\dindex{constructible}  As in
\parref{par:rank}, if $a\in\cu$, then we can define
\begin{equation*}
  \rho(a)=\min\set{x\in\on}{a\in\const(x+1)}.
\end{equation*}
\end{parag}

\begin{lemma}\label{lem:L(a)}
$\const(\alpha)\in\const(\alpha+1)$, and $\cu$ is transitive, and
$\const(\alpha)\included\const(\alpha+1)$.
\end{lemma}

\begin{proof}
  Exercise~\ref{ex:L(a)}.
\end{proof}

\begin{theorem}\label{thm:zf-l}
  $\zf$ is true in $\cu$.
\end{theorem}

\begin{proof}
Use Lemma~\ref{lem:zf-m}.  By the previous lemma, $\cu$ is
transitive.  Suppose $a\subseteq\cu$.  Then $\bigcup\set{\rho(x)+1}{x\in
    a}$ is an ordinal $\beta$, and $a\included\const(\beta)$.  If $a$
and $b$ are distinct elements of $\cu$, then $\{a\}\in\cu$, but
$b\notin\{a\}$; this shows that $x=y$ is absolute for $\cu$.

It remains to show that Comprehension is absolute for $\cu$.  Suppose
$a\in\cu$, so that $a$ is a definable 
subset of $\const(\rho(a))$. 
If $\phi$ is an $n$-ary formula with constants from $\cu$,
we shall show 
\begin{equation}\label{eqn:phi-L}
\phi^{\cu}(\vec c)\iff\phi^{\const(\beta)}(\vec c)
\end{equation}
for all $\vec c$
in $\const(\beta)^n$, where $\beta$ is sufficiently large.  In particular,
we may assume $\rho(a)\leq\beta$, and the constants of $\phi$ are in
$\const(\beta)$.
Then $a$ is a definable subset of $\const(\beta)$ by the previous
lemma, so (assuming now $\phi$ is singulary), we have
\begin{equation*}
a\cap\cls{x\in\cu}{\phi^{\cu}(x)}=
a\cap\cls{x}{\phi^{\const(\beta)}(x)},
\end{equation*}
which is a definable subset of $\const(\beta)$; so
$a\cap\cls{x\in\cu}{\phi^{\cu}(x)}\in\const(\beta+1)$. 

To prove~\eqref{eqn:phi-L},
we use induction on the complexity of formulas.
Trivially,~\eqref{eqn:phi-L} holds when $\phi$ is atomic.
If~\eqref{eqn:phi-L} holds when 
$\phi$ is $\psi$ or $\chi$, then
it immediately holds when $\phi$ is $\lnot\psi$
or $\psi\lto\chi$.  Suppose~\eqref{eqn:phi-L} holds when $\phi$ is
$\psi(\vec x,y)$.  Then 
\begin{equation}\label{eqn:phi-L-imp}
(\Exists y\phi(\vec c,y))^{\const(\beta)}\lto
(\Exists y\phi(\vec c,y))^{\cu}
\end{equation}
when $\vec c\in\const(\beta)^n$.  Conversely, for some such $\vec c$,
if $(\Exists y\phi(\vec c,y))^{\cu}$, then $\phi^{\cu}(\vec c,d)$ for
some $d$ in $\cu$; but then $d\in\const(\beta)$ if $\beta$ is large
enough, so the converse of~\eqref{eqn:phi-L-imp} holds.
%  Exercise~\ref{ex:zf-l}.
\end{proof}

\begin{theorem}
  The Axiom of Choice and the Generalized Continuum Hypothesis are
  true in $\cu$.
\end{theorem}

\begin{proof}
  I suggest the idea only. For Choice, one shows something stronger:
  that there is a binary formula $\phi$ such that $\phi^{\cu}$ defines
  a relation by which $\cu$ is well-ordered.  Indeed, if $\const(\alpha)$ is
  well-ordered, then the ordering can be extended to well-order
  $\const(\alpha+1)$.  For the Generalized Continuum Hypothesis, one
  shows $\card{\const(\alpha)}=\card{\alpha}$ in $\cu$, and
  $\pow{\const(\alpha)}^{\cu}\included\const(\scr{\card{\alpha}})$. 
\end{proof}

\section*{Exercises}
\addcontentsline{toc}{section}{Exercises}

\begin{enumerate}
  \renewcommand{\theenumi}{\arabic{enumi}}
\item\label{ex:trans}
Show that both the power-set of
  a transitive set and the union of a set of transitive
  sets are transitive.
\item\label{ex:R^M}
Find two formulas $\phi$ and $\psi$  and a class $\cM$ such that
$\cls{\vec x}{\phi(\vec x)}=\cls{\vec x}{\psi(\vec x)}$, but
then $\cls{\vec x\in\cM^n}{\phi^{\cM}(\vec x)}\neq\cls{\vec
  x\in\cM^n}{\psi^{\cM}(\vec x)}$.
\item
Show $\beta<\alpha\lto\rwf(\beta)\in\rwf(\alpha)$.
\item\label{ex:rank}
Assuming $a\in\wf$ and $b\in a$,
show that $b\in\wf$ and $\rank b<\rank a$.
\item\label{ex:wf-subsets}
Show that all subsets of $\wf$ are elements of $\wf$.
\item\label{ex:wf-ac}
Using the Axiom of Choice, assuming $a$ is transitive, but not a
subset of $\wf$, show that there is a function $f$ on $\vnn$ such that
$f(0)=a$ and $f(n+1)\in f(n)\setminus\wf$.
\item\label{ex:wf-wf}
Prove Theorem~\ref{thm:wf}.
\item\label{ex:rel-inf}
Show that $\vnn\in\cM$ under the conditions of
Theorem~\ref{lem:zf-m}. 
\item\label{ex:zf-}
Show that $\wf$ meets the conditions of
Theorem~\ref{lem:zf-m}. 
\item\label{ex:def-count}
If $a$ is infinite, show that
$\card{\defr na}=\card a$.
\item\label{ex:L(a)}
Prove Lemma~\ref{lem:L(a)}.
%\item\label{ex:zf-l}
%Prove Theorem~\ref{thm:zf-l}.
\end{enumerate}

\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{plain}
\bibliography{../../../../TeX/references}

\printindex
%\label{index}      % labels etc should be added to the index file
%\addcontentsline{toc}{chapter}{Index}
%\label{end}


\markboth{}{}
\begin{figure}\label{back}
  \begin{center}
    \includegraphics{trail}
  \end{center}
\end{figure}

%\layout


\end{document}

