\documentclass[%
version=last,%
a4paper,%
11pt,%
headings=small,%
bibliography=totoc,%
index=totoc,%
twoside,%
reqno,%
cleardoublepage=empty,%
open=any,%
draft=false,%
%draft=true,%
DIV=9,%
BCOR=10mm,%
%headinclude=false,%
headinclude=true,%
pagesize]%{scrreprt}
{scrbook}

%\areaset{176mm}{250mm}

%\usepackage[notref,notcite]{showkeys}

\makeindex
\usepackage{makeidx}

\usepackage[polutonikogreek,english]{babel}
%\usepackage{gfsneohellenic}
%\newcommand{\Gk}[1]{\foreignlanguage{polutonikogreek}{\neohellenic{#1}}}
\newcommand{\Gk}[1]{\foreignlanguage{polutonikogreek}{#1}}

\usepackage{scrpage2}
\pagestyle{scrheadings}
\ohead{\pagemark}
\ihead{\headmark}
\ofoot{}

%\renewcommand{\figureformat}{\figurename~\thefigure}
\renewcommand{\captionformat}{ }

\usepackage{layout}

\usepackage{amsmath,amsthm}
\usepackage{mathrsfs}
\usepackage{cclicenses}
\usepackage[perpage,symbol]{footmisc}
%\renewcommand{\thefootnote}{\fnsymbol{footnote}}

\usepackage{url}

\usepackage{amssymb}
\usepackage{hfoldsty}
\usepackage{pstricks,pst-plot}

\usepackage[neverdecrease]{paralist}
\usepackage{graphicx}

\usepackage[all]{xy}
\usepackage{verbatim}
\usepackage{amscd}

%\usepackage{txfonts} % for \nsimeq

%\usepackage{mathabx}
%\newcommand{\dotdiv}{-}
\newcommand{\dotdiv}{\stackrel{.}{-}}
%\newcommand{\dotdiv}{\stackrel{*}{-}}

\newcommand{\stnd}[1]{\mathbb{#1}}
\newcommand{\starred}[1]{{}^*#1}
\newcommand{\N}{\stnd N}
\newcommand{\sN}{\starred{\N}}
\newcommand{\Z}{\stnd Z}
\newcommand{\Q}{\stnd Q}
\newcommand{\R}{\stnd R}
\newcommand{\sR}{\starred{\R}}
\newcommand{\C}{\stnd C}
\newcommand{\Ham}{\stnd H}
\newcommand{\ii}{\mathrm i}
\newcommand{\me}{\mathrm e}
\newcommand{\B}{\stnd B}
\newcommand{\F}{\stnd F}
\newcommand{\Qp}{\Q^+}
\newcommand{\Qpp}{\Q^{++}}
\newcommand{\Rp}{\R^+}
\newcommand{\Rpp}{\R^{++}}
\newcommand{\on}{\mathbf{ON}}

\newcommand{\ls}[1]{\mathscr D(#1)}
\newcommand{\sS}{\starred{\!S}}
\newcommand{\sT}{\starred T}
\newcommand{\sU}{\starred U}
\newcommand{\sB}{\starred{\!B}}
\newcommand{\sO}{\starred{\!O}}
\newcommand{\sF}{\starred{\!F}}
\newcommand{\sI}{\starred{\!I}}
\newcommand{\stf}{\starred{\!f}}
\newcommand{\seq}[1]{#1^{\vnn}}
\newcommand{\Ro}{\seq{\R}}
\newcommand{\Ko}{\seq{K}}
\newcommand{\sK}{\starred{\!K}}
\newcommand{\starsub}[2]{\starred{(#1_{#2})}}
\newcommand{\sKt}[1]{\starsub{K}{#1}}
\newcommand{\sta}{\starred{\!a}} %\sa is used by the cclicenses package
\newcommand{\sX}{\starred{\!X}}
%\newcommand{\startilde}[1]{\starred{\!(\tilde{#1})}}
\newcommand{\startilde}[1]{\starred{\!\tilde{#1}}}
\newcommand{\stK}{\startilde K}
\newcommand{\stR}{\starred{\tilde{\R}}}
\newcommand{\tsK}{\widetilde{\sK}}
\newcommand{\sA}{\starred{\!A}}
\newcommand{\oi}{\mathcal{U}}

\newcommand{\maxi}{\mathfrak m}

\newcommand{\included}{\subseteq}
\newcommand{\nincluded}{\nsubseteq}
\newcommand{\pincluded}{\subset}
\newcommand{\includes}{\supseteq}

%\newcommand{\abs}[1]{\mathopen|#1\mathclose|}
\newcommand{\absn}[1]{\lvert#1\rvert}
\newcommand{\abs}[1]{\left|#1\right|}
\renewcommand{\epsilon}{\varepsilon}
\renewcommand{\setminus}{\smallsetminus}
\renewcommand{\emptyset}{\varnothing}
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}
\renewcommand{\phi}{\varphi}

\usepackage{stmaryrd} % for \olessthan
\newcommand{\olt}{\olessthan}
%\newcommand{\olt}{\prec}
%\renewcommand{\land}{\mathrel{\binampersand}}
\renewcommand{\land}{\mathrel{\&}}

%\newcommand{\str}[1]{\mathfrak{#1}}
\newcommand{\lett}[1]{\textsf{#1}}
\newcommand{\class}[1]{\mathbf{#1}}
\newcommand{\pred}[1]{\operatorname{pred}(#1)}
\newcommand{\Forall}[1]{\forall{#1}\;}
\newcommand{\Exists}[1]{\exists{#1}\;}
\newcommand{\val}[1]{\operatorname{val}(#1)}
\newcommand{\lto}{\Rightarrow}
\newcommand{\liff}{\Leftrightarrow}
\newcommand{\inv}{^{-1}}
\newcommand{\mapset}[2]{#2^{#1}}
\newcommand{\units}[1]{#1^{\times}}
\newcommand{\gpgen}[1]{\langle#1\rangle}
\newcommand{\vo}{\mathfrak O}
\newcommand{\mi}{\mathfrak p}
\newcommand{\Char}[1]{\operatorname{char}(#1)}
\usepackage{upgreek}
\newcommand{\vnn}{\upomega}
\usepackage{mathrsfs}
\newcommand{\pow}[1]{\mathscr P(#1)}
\usepackage{bm}
\newcommand{\tuple}[1]{\bm{#1}}
\renewcommand{\models}{\vDash}
\newcommand{\nmodels}{\nvDash}
\newcommand{\completion}[1]{\overline{#1}}
\newcommand{\supp}[1]{\operatorname{supp}(#1)}
\newcommand{\Supp}[1]{\operatorname{supp}[#1]}
\newcommand{\Suppinv}[1]{\operatorname{supp}\inv[#1]}
\newcommand{\dom}[1]{\operatorname{dom}(#1)} % domain
\newcommand{\symdiff}{\vartriangle}
\newcommand{\compl}[1]{#1^{\mathrm c}}
%\newcommand{\oi}[1]{#1^{\downarrow}}
%\newcommand{\pred}[1]{\operatorname{pred}(#1)}
\newcommand{\succn}{\operatorname S}
\newcommand{\id}[1]{\operatorname{id}_{#1}}
\newcommand{\Sym}[1]{\operatorname{Sym}(#1)}
\newcommand{\opp}[1]{#1^{\operatorname{op}}}

\newcommand{\universe}{\mathbf V}

\newtheorem{theorem}{Theorem}
\newtheorem{problem}[theorem]{Problem}
%\newtheorem{lemma}[theorem]{Lemma}
\newtheorem*{lemma}{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{porism}[theorem]{Porism}

\numberwithin{equation}{section}
%\numberwithin{equation}{chapter}
\renewcommand{\theequation}{\fnsymbol{equation}}

%\setcounter{tocdepth}{1}

\begin{document}

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

\extratitle{
\pagestyle{empty}
\mbox{}\vfill
%\psset{xunit=27.75pt,yunit=39.24pt}
\psset{xunit=11.11mm,yunit=16.5mm}
\begin{pspicture}(-7,-5)(5,5)
\uput[d](0,6){\huge Non-standard analysis}
\uput[u](0,-6){\Large David Pierce}
%\psgrid
%\psaxes(0,0)(-9,-9)(9,9)
\psset{unit=166.5pt}
\pscircle(0,0){1}
\psdots[dotstyle=o](0,1)
\psdots
(1,0)
(0.991,0.132)%8/7
(-0.991,0.132)
(0.991,-0.132)
(-0.991,-0.132)
\uput[8](0.991,0.132){$-8/7$}
\uput[-8](0.991,-0.132){$-7/8$}
\uput[172](-0.991,0.132){$8/7$}
\uput[188](-0.991,-0.132){$7/8$}
\psdots
(0.96,0.28)%4/3
(-0.96,0.28)
(0.96,-0.28)
(-0.96,-0.28)
\uput[16](0.96,0.28){$-\displaystyle\frac43$}
\uput[-16](0.96,-0.28){$-\displaystyle\frac34$}
\uput[164](-0.96,0.28){$\displaystyle\frac43$}
\uput[196](-0.96,-0.28){$\displaystyle\frac34$}
\psdots
(0.899,0.438)%8/5
(-0.899,0.438)
(0.899,-0.438)
(-0.899,-0.438)
\uput[26](0.899,0.438){$-\displaystyle\frac85$}
\uput[-26](0.899,-0.438){$-\displaystyle\frac58$}
\uput[154](-0.899,0.438){$\displaystyle\frac85$}
\uput[206](-0.899,-0.438){$\displaystyle\frac58$}
\psdots
(0.8,0.6)%2
(0.657,0.753)%8/3
(-0.657,0.753)
(0.657,-0.753)
(-0.657,-0.753)
\uput[229](-0.657,-0.753){$\displaystyle\frac38$}
\uput[131](-0.657,0.753){$\displaystyle\frac83$}
\uput[-49](0.657,-0.753){$-\displaystyle\frac38$}
\uput[49](0.657,0.753){$-\displaystyle\frac83$}
\psdots
(0.471,0.882)%4
(0.246,0.969)%8
(-1,0)(-0.8,0.6)(-0.471,0.882)(-0.246,0.969)
(0,-1)(0.8,-0.6)(0.471,-0.882)(0.246,-0.969)
(0,-1)(-0.8,-0.6)(-0.471,-0.882)(-0.246,-0.969)
\uput[r](-1,0){$1$}
\uput[d](0,-1){$0$} 
\uput[l](1,0){$-1$}
\uput[-37](-0.8,0.6){$2$}
\uput[-62](-0.471,0.882){$4$}
\uput[-76](-0.246,0.969){$8$}
\uput[37](-0.8,-0.6){$\displaystyle\frac12$}
\uput[62](-0.471,-0.882){$\displaystyle\frac14$}
\uput[76](-0.246,-0.969){$\displaystyle\frac18$}
\uput[217](0.8,0.6){$-2$}
\uput[242](0.471,0.882){$-4$}
\uput[256](0.246,0.969){$-8$}
\uput[143](0.8,-0.6){$-\displaystyle\frac12$}
\uput[118](0.471,-0.882){$-\displaystyle\frac14$}
\uput[104](0.246,-0.969){$-\displaystyle\frac18$}
\end{pspicture}
\newpage
\mbox{}
\newpage
\mbox{}
\vfill
\center{\includegraphics[width=8cm]{priene.eps}}\label{photo}
\vfill

\newpage

\mbox{}\vfill
The photograph on the previous page\\
 was taken in Priene, S\"oke, Ayd\i n, in 2008.\\  
  The columns are in the Ionic order; see p.~\pageref{order}.\\
Another version of the cover image is Fig.~\ref{fig:Q} of the
text. 
\vfill
}  % end of ``extratitle''

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

\title{Non-standard analysis}
\author{David Pierce}
\date{\today}

\uppertitleback{\center{
This work is licensed under the\\
 Creative Commons Attribution--Noncommercial--Share-Alike
License.\\
 To view a copy of this license, visit\\
  \url{http://creativecommons.org/licenses/by-nc-sa/3.0/}\\
\mbox{}\\
\cc \ccby David Pierce \ccnc \ccsa\\
\mbox{}\\
Mathematics Department\\
Middle East Technical University\\
Ankara 06531 Turkey\\
\url{http://metu.edu.tr/~dpierce/}\\
\url{dpierce@metu.edu.tr}
}
}

\maketitle[-1]


%\setcounter{section}{-1} 

%\addchap{Preface}
\chapter*{Preface}

This book is prepared for a course called Non-standard
Analysis, given in July, 2010, at the Nesin Matematik K\"oy\"u (Nesin
Mathematics Village), \c Sirince, Sel\c cuk, \.Izmir, Turkey.   

The book is a thorough revision of the notes prepared for the 2009
version of the same course.  The course and the book could also be
called Foundations of Analysis, like Landau's book \cite{MR12:397m}.
Like Landau, I
construct the real numbers, albeit with more attention to the
\emph{logic} of the construction.  Unlike Landau, I construct also a
field of
so-called \emph{hyper-real} or \emph{non-standard real numbers;} then
I show the use of this field in establishing some of the basic theorems of
analysis.  

The book is not a textbook, but just a record of what I have worked
out so far for myself and for anybody else who may be interested.  A
week of lectures in \c Sirince can cover only lightly what is here.
This book itself only lightly covers some topics. 

The earlier version of the notes had mistakes and other infelicities;
I have corrected some of these, but others remain.  Mathematics is
like art, as Collingwood \cite[p.~2]{Collingwood-Auto}
describes it in recalling his childhood: 
\begin{quote}
\dots I was constantly watching the work of my father and mother, and
the other professional painters who frequented the house, and
constantly trying to imitate them; so that I learned to think of a
picture not as a finished product exposed for the admiration of
virtuosi, but as the visible record, lying about the house, of an
attempt to solve a definite problem in painting, so far as the attempt
has gone.  I learned what some critics and aestheticians never know to
the end of their lives, that no `work of art' is ever finished, so
that in that sense of the phrase there is no such thing as a `work of
art' at all.  
\begin{comment} Work ceases upon the picture or the manuscript, not
because it is finished, but because the sending-in day is at hand, or
because the printer is clamorous for copy, or because `I am sick of
working at this thing' or `I can't see what more I can do with it'. 
\end{comment}
\end{quote}
It is time to print these notes.  Then the next round of revision
begins.

\begin{flushright}
D. P.\\
Ankara\\
\today
\end{flushright}

%\addtocontents{toc}{\enlargethispage{1\baselineskip}}
\tableofcontents

\listoffigures


\addchap{Introduction}

\textbf{Mathematical analysis}\index{analysis} is the
theoretical side of calculus.  Calculus consists of
methods of solving certain sorts of problems; analysis studies those
methods.  The
\textbf{standard}\index{standard} way of solving calculus problems is
founded on the `epsilon-delta' definition of \emph{limit.}  The
\textbf{non-standard}\index{non-standard} approach uses 
\emph{infinitesimals,} with rigorous logical justification.
Abraham Robinson first gave this justification, which can be found in
his book \emph{Non-standard Analysis} \cite{MR1373196}.


An \textbf{infinitesimal}\index{infinitesimal} is a number whose
absolute value is less
than than every positive rational number.  If two numbers $a$ and
$b$ differ by an infinitesimal, we shall write
\begin{equation*}
  a\simeq b.
\end{equation*}
Zero is an infinitesimal, but there are no other infinitesimals among
the so-called \emph{real numbers.}  Indeed, suppose $\epsilon$ is a
positive real number.  Then some integer $n$ is greater than
$1/\epsilon$, so $0<1/n<\epsilon$.  Thus $\epsilon$ is not
infinitesimal. 

In standard analysis, a function $f$ is said to be \textbf{continuous}\index{continuous}
at an element $a$ of its domain if
\begin{equation*}
  \lim_{x\to a}f(x)=f(a);
\end{equation*}
this means that, for all positive numbers $\epsilon$, there is a
positive number $\delta$ such that, for all $x$ in the domain of $f$,
if $\abs{x-a}<\delta$, then $\abs{f(x)-f(a)}<\epsilon$.  

In
non-standard analysis, there is an alternative formulation of
continuity: $f$ is 
continuous at $a$ just in case, for all
$x$ in the domain of $f$, if $x\simeq a$, then $f(x)\simeq f(a)$.

The alternative formulation of continuity and many other things will
be worked out in Chapter~\ref{ch:analysis}, the last chapter of these
notes.  The other 
chapters are meant 
to provide logical justication and motivation for the work of Chapter~\ref{ch:analysis}.
Chapter~\ref{ch:Arch} looks at Archimedes's solution of a calculus
problem, and it also mentions the \emph{Archimedean axiom,} which we used
above to prove that no non-zero real numbers are infinitesimal.  Today
we think of calculus as 
involving the \emph{complete 
  ordered field} $\R$ of real numbers; this field is constructed in 
Chapters~\ref{ch:N}, \ref{ch:N2Q}, and~\ref{ch:reals}.  As we have seen,
non-standard analysis 
requires a certain larger ordered field, which will be denoted by $\sR$: this is an example of a
\emph{non-archimedean} ordered field.  Non-archimedean ordered fields
in general, and 
simple examples of these and related fields, are discussed in
Chapter~\ref{ch:non-Arch}.  The field $\sR$ can be obtained as an
\emph{ultrapower} of $\R$; this construction is treated in
Chapter~\ref{ch:ultra}.  Readers can jump ahead to Chapter~\ref{ch:analysis} at
any time, provided they understand the meaning of
Theorem~\ref{thm:elsub} in \S~\ref{sect:logic}.  



\chapter{Archimedes's quadrature of the parabola}\label{ch:Arch}

In the last chapter of \emph{Non-standard Analysis}~\cite{MR1373196},
Robinson treats the
history of calculus in the light of non-standard analysis.  Robinson
begins with Leibniz; but I think it worthwhile to go back much
further---about two thousand years further.
In the
work of Archimedes, both standard and non-standard approaches to
calculus (in our terms) can be discerned.
For example, 
Archimedes takes up the following

\begin{problem}\label{prob:Arch}
Find a square equal to a given segment of a parabola.
\end{problem}

Parabolas (in the sense of this problem) will be defined below; meanwhile, a
segment of a parabola can be seen in Figure~\ref{fig:parab}, 
\begin{figure}[ht]
\begin{center}
\psset{unit=6mm}
  \begin{pspicture}(-4,-4)(2,0)
%\psgrid
    \psplot{-4}{2}{x x mul neg 4 div}
\psline(-4,-4)(2,-1)(-1,-0.25)(-4,-4)
%\psdots(-4,-4)(2,-1)(-1,-0.25)
\uput[r](2,-1){$C$}
\uput[ul](-1,-0.25){$A$}
\uput[dl](-4,-4){$B$}
  \end{pspicture}
  \end{center}
  \caption{A parabolic segment with the inscribed triangle}\label{fig:parab}
\end{figure}
with an
\emph{inscribed} triangle.  A solution to Problem~\ref{prob:Arch} is
a \textbf{quadrature:}\index{quadrature} a `squaring' of the parabola.  Archimedes's solution is given
by the following 

\begin{theorem}[Archimedes]\label{thm:Arch}
  A parabolic segment is a third again as
large\footnote{\Gk{>ep'itritoc}, one and a third times as much.
See Appendix~\ref{app:Gk} for the Greek letters.}  as
the inscribed triangle.
\end{theorem}

In Figure~\ref{fig:parab}, I say triangle $ABC$ is \textbf{inscribed}\index{inscribed} in the parabolic segment cut off by the chord $AB$, because the tangent to the parabola at $A$ is
parallel to the chord $BC$.  Once we have Archimedes's theorem, we can carry out the actual squaring of the parabolic segment by a standard procedure described in a series of propositions (I.42, I.45, II.14) in Euclid's
\emph{Elements} \cite{MR17:814b,MR1932864}.  Indeed, from Figure~\ref{fig:parab}, we can obtain Figure~\ref{fig:quad-parab} as follows.
\begin{figure}[ht]
\begin{center}
\psset{unit=6mm}
  \begin{pspicture}(-7.3,-7.3)(2,0)
%\psgrid
    \psplot{-4}{2}{x x mul neg 4 div}
\psline(-4,-4)(2,-1)(-1,-0.25)(-4,-4)
%\psdots(-4,-4)(2,-1)(-1,-0.25)
\uput[r](2,-1){$C$}
\uput[110](-1,-0.25){$A$}
\uput[d](-4,-4){$B$}
%\psline(-4,-4)(-4.9,-2.2)
\psline(-6.8,-5.4)(-4,-4)
\psline(-1,-0.25)(-5.9,-2.7)(-3.658,-7.183)(-0.975,-5.842)(-2.317,-3.158)
\psline(-1,-2.5)(-1.9,-0.7)
\pscircle(-3.9,-3.95){3.242}
\uput[330](-1,-2.5){$D$}
\uput[245](-5,-4.5){$E$}
\uput[ul](-5.9,-2.7){$F$}
\uput[110](-1.9,-0.7){$G$}
\uput[dl](-6.8,-5.4){$H$}
\uput[d](-3.658,-7.183){$K$}
\uput[r](-0.975,-5.842){$L$}
\uput[110](-2.317,-3.158){$M$}
  \end{pspicture}
  \end{center}
  \caption{Quadrature of a parabolic segment}\label{fig:quad-parab}
\end{figure}
Bisect $BC$ at $D$.  Extend $CB$ to $E$ so that $BE=\frac13DB$.  Draw
straight line $AF$ parallel to $BC$, and construct rectangle $DEFG$: this is a third again as large as triangle $ABC$, so it is equal to the parabolic segment on chord $BC$ by Theorem~\ref{thm:Arch}.
Extend $BE$ to $H$ so that $EH=EF$.  Draw a circle with diameter $DH$,
and extend $FE$ to meet the circle at $K$.  Then $EK$ is a mean proportional to $EF$ and $ED$ (by \emph{Elements} VI.13), so the square $EKLM$
constructed on $EK$ is equal to the parabolic segment on chord $BC$ (by \emph{Elements} VI.17 or just II.14). 

So Problem~\ref{prob:Arch} can be solved by means of Theorem~\ref{thm:Arch}.
Archimedes proves Theorem~\ref{thm:Arch}
in two ways in his
\emph{Quadrature of the parabola:} in Proposition~17 (and the
propositions leading up to it), and in Proposition~24.  Heath
\cite{MR2000800} provides an 
English version of this work; however, instead of simply translating,
he rewrites Archimedes in a way intended to be more comprehensible to
his modern readers.  Selections from the 
Greek text of Archimedes, with more literal English translations, are
provided by Thomas \cite{MR13:419b}.  
The first volume of a faithful translation of all of Archimedes's
works
by Netz \cite{MR2093668} has appeared; but this does not contain the
works that we are particularly interested in here.

Insight into the
\emph{discovery} of Theorem~\ref{thm:Arch} is given in Archimedes's
\emph{Method.}  This work was lost until 1906.
Then, in \.Istanbul, the Danish scholar J.~L. Heiberg
discovered the \emph{Archimedes Palimpsest:}
a parchment codex of the works of 
Archimedes that had been washed and reused for writing prayers. 

\section{Parabolas}

Archimedes does not use the word
\emph{parabola}~\cite[p.~clxvii]{MR2000800}; for him, a parabola is a
\emph{section of an orthogonal
cone.}\footnote{\Gk{>orjogwn'iou k'wnou tom'h}.}  
Let me review what this means, sometimes following also the account of
Apollonius of Perga \cite{MR1660991}.  A
cone is determined by a circle, called the
\textbf{base,}\index{base} and a point, called the \textbf{apex.}\index{apex}  The apex is not in 
the plane of the base.  The cone is traced out by a straight line that has one
endpoint at the apex: the other endpoint is moved about the
circumference of the base.  The straight line drawn from the apex
to the center of the base is the \textbf{axis}\index{axis} of the cone.  A plane
containing the axis intersects the cone in an \textbf{axial triangle.}\index{axial triangle}
See Figure~\ref{fig:cone}.
\begin{figure}[ht]
\begin{center}
\psset{xunit=2cm,yunit=1cm}
\begin{pspicture}(-1,-1)(1,2.1)
%\psgrid
\parametricplot{0}{360}{t cos t sin}
\psline(0.966,0.259)(0.518,1.932)(-0.707,0.707)
\psline(0.518,1.932)(0,0)
\psline(0.174,-0.985)(-0.174,0.985)(0.518,1.932)(0.174,-0.932)
\uput[r](0.513,1.932){apex}
\uput[l](-1,0){base}
\end{pspicture}
\end{center}
\caption{A cone, with an axial triangle}\label{fig:cone}
\end{figure}
If the axis is perpendicular to the base, then the cone is
a \textbf{right cone.}\index{right cone}  
If an axial triangle of a right cone has a right
angle at the apex, then the cone is an \textbf{orthogonal
  cone.}\index{orthogonal cone}\footnote{Or
  `right-angled cone'; but not every \emph{right cone} is a \emph{right-angled cone.}}  
Suppose a plane is perpendicular to one of the sides of an axial triangle of an orthogonal cone.
 Then the plane
cuts the cone in 
a curve that---following Apollonius---we call a
\textbf{parabola.}\index{parabola}  
See Figure~\ref{fig:parabola}.
\begin{figure}[ht]
\begin{center}
\psset{unit=3cm}
\begin{pspicture}(-1,-0.45)(1,0.9)
%\psgrid
\psellipse(0,0)(1,0.447)
\psline(0,0.894)(0.174,0.440)
\psline(0.174,0.440)(-0.174,-0.440)
\psline(-0.174,-0.440)(0,0.894)
\psline(0.070,0.712)(-0.035,-0.088)
\psline(-1.000,-0.012)(0.930,-0.164)
\parametricplot{-1}{1}{
t t mul t sub -0.035 mul 1 t t mul sub 0.070 mul add t 0.930 mul add
t t mul t sub -0.088 mul 1 t t mul sub 0.712 mul add t -0.164 mul add
}
\psline(-0.866,0.224)(0,0.894)(0.866,0.224)
\end{pspicture}
\end{center}
\caption{A parabola in a cone}\label{fig:parabola}
\end{figure}
The 
intersection of the cutting plane and the axial triangle is the straight line called the
\textbf{axis}\index{axis} of the parabola (and this is different from the axis of the
cone itself); the intersection of the axis of the parabola and the
parabola itself is the point called the \textbf{vertex}\index{vertex} of the parabola.  

A straight\label{order}
line drawn from the parabola to the axis perpendicularly to the axis is
an \textbf{ordinate;}\index{ordinate} the part of the axis between the ordinate and the vertex is the corresponding
\textbf{abscissa.}\index{abscissa}  See Figure~\ref{fig:ord}.  The word \emph{abscissa} means \emph{cut off} in Latin,
while the word \emph{ordinate} is related to \emph{order.}  The word \emph{order} is
used for any of the several classical styles of architecture.  An order in this sense
features columns standing parallel, like ordinates of a
parabola.  For an example, see p.~\pageref{photo}.
\begin{figure}[ht]
\begin{center}
\psset{unit=7.5mm}
  \begin{pspicture}(-0,-1)(6,2.5)
  %\psgrid
    \psline(0,0)(6.5,0)
    \psset{plotpoints=200}
    \psplot{0}{6.5}{x sqrt}
    \psplot{0}{2}{x sqrt neg}
    \psline(1,0)(1,1)
    \psline(2,0)(2,1.414)
    \psline(3,0)(3,1.732)
    \psline(4,0)(4,2)
    \psline(5,0)(5,2.236)
    \psline(6,0)(6,2.449)
    %\psdots(0,0)(6,0)(6,2.449)
    \uput[u](6,2.449){$B$}
    \uput[d](6,0){$C$}
    \uput[l](0,0){$A$}
  \end{pspicture}
  \end{center}
  \caption[Ordinates and abscissas]{The ordinate $BC$ cuts off from the axis the abscissa
    $AC$}\label{fig:ord} 
\end{figure}

Apollonius's reason for using the term \emph{parabola} is shown in
Proposition 11 of his \emph{Conics} 
\cite{MR1660991,MR13:419b}.  Apollonius also shows that parabolas can be 
obtained from \emph{all} cones, not necessarily orthogonal, not
necessarily right.  What is important for us are the following
properties of a parabola, whose proofs can be found in Apollonius.
\begin{asparaenum}[\P~1.]
\item \label{item:parab}
The squares on two ordinates are in the ratio of the corresponding
abscissas \cite[I.11]{MR1660991}; in modern terms, there is a \emph{parameter,} $\ell$, such that, if $x$ is an ordinate, and $y$ the corresponding abscissa, then $\ell y=x^2$.
\item\label{item:tan}
Suppose a parabola has the vertex $A$, and another point $B$ is chosen
on the parabola, and the ordinate $BC$ is drawn, as in Figure~\ref{fig:tangent}.  Extend the
axis $CA$ beyond $A$ to a point $D$.  The straight line $BD$ is
tangent to the parabola at $B$ if and only if $AD=CA$ \cite[I.33,
  35]{MR1660991}.  
\begin{figure}[ht]
\begin{center}
 \psset{unit=7.5mm}
  \begin{pspicture}(-4,-0.6)(4,2)
 %\psgrid
    \psline(-4,0)(4,0)
    \psset{plotpoints=200}
    \psplot{0}{4}{x sqrt}
    \psplot{0}{1}{x sqrt neg}
    \psline(2,1.414)(2,0)
    \psline(-4,-0.707)(4,2.121)
    %\psdots(-2,0)(0,0)(2,0)(2,1.414)
    \uput[u](2,1.414){$B$}
    \uput[d](2,0){$C$}
    \uput[dl](0,0){$A$}
    \uput[d](-2,0){$D$}
  \end{pspicture}
  \end{center}
  \caption[A tangent to a parabola]{$DB$ is tangent at $B$ if and only if
    $CA=AD$}\label{fig:tangent}  
\end{figure}

\item\label{item:diam}
Every straight line parallel to the axis is a \textbf{diameter}\index{diameter} in the
following sense.  Where such a straight line meets the parabola, a tangent
can be drawn.  If a chord of the parabola is drawn parallel to this
tangent, then the given straight line bisects the chord \cite[I.46]{MR1660991},
as in Figure~\ref{fig:diameter}.
Half of such a chord can be called
an ordinate with respect to the corresponding diameter, and the
squares on two such ordinates are in the ratio of the corresponding
abscissas, as in \P~\ref{item:parab} \cite[I.49]{MR1660991}. 
\begin{figure}[ht]
\begin{center}
  \psset{unit=7.5mm}
  \begin{pspicture}(0,-1)(8,2.8)
  %\psgrid
%    \psline(0,0)(4,0)
    \psset{plotpoints=200}
    \psplot{0}{9}{x sqrt}
    \psplot{0}{1}{x sqrt neg}
%    \psline(2,1.414)(2,0)
%    \psline(0,0.707)(4,2.121)
    %\psdots(2,1.414)(4,1.414)(3,1.414)
    \psline(2,1.414)(8,1.414)
    %\psdots(0.172,0.414)(5.828,2.414)(0,0)(8,2.828)
    \psline(0.172,0.414)(5.828,2.414)
    \psline(0,0)(8,2.828)
  \end{pspicture}
  \end{center}
  \caption{A new diameter for a parabola}\label{fig:diameter}  
\end{figure}
\end{asparaenum}

\section{The mechanical argument}

In the \emph{Method,} Archimedes solves Problem~\ref{prob:Arch} as follows.
We add some 
straight lines to Figure~\ref{fig:parab}, getting
Figure~\ref{fig:parab+}. 
\begin{figure}[ht]
\begin{center}
  \psset{unit=7.5mm}
  \begin{pspicture}(-10,-4)(2,5)
  %\psgrid
    \psplot{-4}{2}{x x mul neg 4 div}
\psline(-4,-4)(2,-1)(-1,-0.25)(-4,-4)
%\psdots(-4,-4)(2,-1)(-1,-0.25)
\uput[r](2,-1){$C$}
\uput[125](-1,-0.25){$A$}
\uput[l](-4,-4){$B$}
\psline(2,-1)(-4,5)(-4,-4)
\psline(-1,-2.5)(-1,2)
\psline(-10,2)(-1,-0.25)
\psline(-3,-3.5)(-3,4)
\uput[dr](-1,-2.5){$D$}
\uput[ur](-1,2){$E$}
\uput[l](-4,5){$F$}
\uput[dl](-4,0.5){$G$}
\uput[l](-10,2){$H$}
\psline(-4,5)(-1,-2.5)
\uput[230](-2,0){$K$}
\uput[ul](-3,-2.25){$L$}
\uput[dr](-3,-3.5){$M$}
\uput[dl](-3,0.25){$N$}
\uput[ur](-3,4){$P$}
\psline(-3,-2.25)(0.458,-0.583)
\uput[dr](-1,-1.25){$Q$}
\uput[d](0.458,-0.583){$R$}
%\psdots(-1,-2.5)(-1,2)(-4,5)(-4,0.5)(-10,2)(-2,0)(-3,-2.25)(-3,-3.5)(-3,0.25)(-3,4)(-1,-1.25)(0.458,-0.583)
  \end{pspicture}
  \end{center}
  \caption{Quadrature by balancing}\label{fig:parab+}
\end{figure}
Here $D$ is the midpoint of $BC$, so that, since $BC$ is parallel to
the tangent at $A$, the straight line $AD$ must be a diameter of
the parabola by \P~\ref{item:diam} above.  The tangent to the parabola at $C$ meets $DA$ extended
at $E$.  Then $A$ is the midpoint of $DE$, by \P~\ref{item:tan} above.
A straight line from $B$ drawn parallel to $DA$ meets $CE$
extended at $F$.  Extend $CA$ to meet $BF$ at $G$, then extend further
to $H$ so that $GH=CG$.  The idea now is to consider $CH$ as a
\emph{lever} with \emph{fulcrum} at $G$.  Conceiving our
figures as having weights proportional to their sizes, we shall
show that, if we place the weight of the parabolic segment $ABC$ at
$H$, then it will just balance triangle $BCF$ where it is.

Since $A$ is
the midpoint of $DE$, also
$G$ is the midpoint of $BF$.  Let $DF$ be drawn,
intersecting $CG$ at $K$.  Since $D$ is the midpoint of
$BC$, we can conclude that $K$ is the center of gravity (or centroid)
of triangle
$BCF$.  Then $GK$ is a third of $CG$, hence a third of $GH$.
Therefore triangle $BCF$ is balanced by a third of its weight at $H$.
If we can show that the parabolic segment balances the triangle, then
the segment must be a third of the triangle.  But triangle $BCF$ is
twice triangle $BCG$, which is twice triangle $ABC$.  Then Theorem~\ref{thm:Arch} follows. 

To show that, when placed at $H$, the parabolic segment balances $BCF$, we pick a point $L$ at random on the parabola between $B$ and $C$.
Let the straight line drawn through $L$ parallel to $BF$ meet $BC$ at
$M$ and $CG$ at $N$ and $CF$ at $P$.  We shall show that $LM$ has to $MP$ the same ratio that $GN$ has to $GH$: more simply, $LM$ is to $MP$ as $GN$ is to $GH$, or
\begin{equation}\label{Ar-prop}
  LM:MP::GN:GH.
\end{equation}
This is the key point.  If the proportion~\eqref{Ar-prop}
holds, then $LM$, if its midpoint is placed at $H$, will
just balance $MP$.  
Since $L$ was chosen arbitrarily, we conclude that, if all of the
parabolic segment were placed at $H$, then it would balance $BCF$.

Although he does give this argument in the \emph{Method,} Archimedes
does not think it is rigorous.
Indeed, in the preface to the \emph{Method,} he writes,
\begin{quote}
  For some things first became clear to me by mechanics, though they
  had later to be proved geometrically owing to the fact that
  investigation by this method does not amount to actual proof; but it
  is, of course, easier to provide the proof when some knowledge of
  the things sought has been acquired by this method rather than to
  seek it with no prior knowledge.\hfill\cite[p.223]{MR13:419b}
\end{quote}
I want to look at the `actual proof' of Archimedes later, in \S~\ref{sect:proof}.
Meanwhile, let us establish~\eqref{Ar-prop}.  Perhaps you think of it
as an equation of fractions: $LM/MP=GN/GH$.  That is fine;
but~\eqref{Ar-prop} simply expresses a relation of
\emph{proportionality} among four
\emph{magnitudes.}\label{magnitude}  Here are Definitions 3--6 from Book V of Euclid's
\emph{Elements.}
\begin{quote}
\noindent 3. A \textbf{ratio}\index{ratio} is a sort of relation in respect of size
between two 
magnitudes of the same kind. 

\noindent 4.  Magnitudes are said to \textbf{have a ratio}\label{have-a-ratio} to one
another which are capable, 
when multiplied, of exceeding one another. 


\noindent 5.  Magnitudes are said to \textbf{be in the same ratio,} the first
to the second 
  and the third to the fourth, when, if any equimultiples whatever be
  taken of the first and third, and any equimultiples whatever of the
  second and fourth, the former equimultiples alike exceed, are alike
  equal to, or alike fall short of, the latter equimultiples
  respectively taken in corresponding order. 

\noindent 6.  Let magnitudes which have the same ratio be called
\textbf{proportional.}\index{proportional}
\end{quote}
In view of Definition 6, we may refer to what is written in~\eqref{Ar-prop} as a
\textbf{proportion.}\index{proportion}
Since no number of lines are equal to an area,
Definition 4 implies that there is no ratio between a line and an
area.  But we want to use~\eqref{Ar-prop}, a proportion of
\emph{lines,} to establish the proportion of \emph{areas} that leads
to Theorem~\ref{thm:Arch}.   Archimedes calls this a `mechanical'
argument. 
The thinking behind Definition 4 may by why Archimedes does not find
the `mechanical' argument to be rigorous.  

If $a$ and $b$ \emph{are} magnitudes having a ratio in the sense of Definition~4, and $c$ and $d$ are also magnitudes with a ratio, then by Definition 5, we may say variously
\begin{compactenum}[(1)]
\item $a$ has to $b$ the same ratio that $c$ has to $d$,
\item
$a$ is to $b$ as $c$ is to $d$,
\item
$a:b::c:d$,
\end{compactenum}
provided that, whenever we take a multiple $na$ of $a$, and the same
multiple 
$nc$ of $c$, and a multiple $mb$ of $b$, and the same multiple $md$ of
$d$, then 
\begin{gather*}
  na>mb\ \text{ if and only if }\ nc>nd,\\
  na=mb\ \text{ if and only if }\ nc=nd,\\
  na<mb\ \text{ if and only if }\ nc<nd.
\end{gather*}
The multiple $na$ is a \emph{number} of (copies of) $a$.  To be more
precise, we should say that $na$ is a \textbf{counting
  number}\index{counting number} or a
\textbf{natural number}\index{natural number}\label{nats} of $a$.  We think today that there
are other numbers besides the counting numbers $1$, $2$, $3$, and so
on; there is, for example, the square root of two, written
$\sqrt{\vphantom1}2$.  Justification for this way of thinking can be
found in Euclid's definition of proportion.  For example,
$\sqrt{\vphantom1}2$ can be defined as the set of pairs $(m,n)$ of
counting numbers such that $m^2<2n^2$.  These matters will be taken up
later.  See also Russo \cite[\S~2.5]{MR2038833}, who
suggests that Weierstrass and his student Dedekind were able to
develop the modern theory of real numbers precisely because they had
studied Euclid's \emph{Elements.} 
Meanwhile, let us just note that, in Books V and VI of the
\emph{Elements,} Euclid proves the properties of proportionality that
we shall need. 

We return to the problem of establishing~\eqref{Ar-prop}.  From $L$ draw a
straight line parallel to $BC$, meeting 
$AD$ at $Q$ and $AC$ at $R$.
Then by property~\ref{item:parab} of the parabola given above,
\begin{equation*}
  LQ^2:CD^2::AQ:AD.
\end{equation*}
Since $LQ=MD$, and triangle $ACD$ is similar to $NCM$, while $ARQ$ is
similar to $ACD$,
we can rewrite the proportion as
\begin{gather*}
  NA^2:AC^2::AR:AC.
\end{gather*}
Therefore $NA$ is a mean proportional to $AC$ and $AR$, that is,
\begin{align*}
NA:AC&::AR:NA,\\
\intertext{so we have the following, where $\pm$ resolves to $+$ if $L$ is to the left of $A$, and otherwise to $-$:}
  NA:AC
       &::NA\pm AR:AC\pm NA\\
       &::NR:NC\\
       &::NL:NM.
\end{align*}
Since $AC=AG$, we obtain
\begin{gather*}
  NA:AG::NL:NM,\\
AG\mp NA:AG::NM\mp NL:NM,\\
NG:AG::LM:NM,\\
NG:2AG::LM:2NM.
\end{gather*}
Since also $MN=NP$, we get finally
\begin{gather*} 
NG:GC::LM:MP,\\
NG:GH::LM:MP,
\end{gather*}
which is~\eqref{Ar-prop}, as desired.

\section{The proof}\label{sect:proof}

Archimedes works out the `mechanical' argument for Theorem~\ref{thm:Arch} also in the
\emph{Quadrature of the parabola;} but I prefer now to look at the
alternative proof, which Archimedes gives for Proposition 24 of the \emph{Quadrature.}

Start over from Figure~\ref{fig:parab}, getting Figure~\ref{fig:parab-rig}.
\begin{figure}[ht]
\begin{center}
\psset{unit=15mm}
  \begin{pspicture}(-4,-4)(2,0)
%\psgrid
    \psplot{-4}{2}{x x mul neg 4 div}
\psline(-4,-4)(2,-1)(-1,-0.25)(-4,-4)
%\psdots(-4,-4)(2,-1)(-1,-0.25)(-1,-2.5)(0.5,-0.625)(0.5,-0.0625)(-1,-1.375)(-1,-0.8125)(-0.25,-0.4375)(-2.5,-1.5625)
\uput[r](2,-1){$C$}
\uput[ul](-1,-0.25){$A$}
\uput[dl](-4,-4){$B$}
\psline(-1,-0.25)(-1,-2.5)
\uput[dr](-1,-2.5){$D$}
\uput[d](0.5,-0.625){$E$}
\psline(0.5,-0.625)(0.5,-0.0625)
\uput[ur](0.5,-0.0625){$F$}
\psline(-1,-0.25)(0.5,-0.0625)(2,-1)
\psline(0.5,-0.625)(-1,-1.375)
\uput[ul](-2.5,-1.5625){$G$}
\psline(-1,-0.25)(-2.5,-1.5625)(-4,-4)
\uput[l](-1,-1.375){$H$}
\psline(0.5,-0.0625)(-1,-0.8125)
\uput[l](-1,-0.8125){\psframebox*[framesep=1pt]{$K$}}
\uput[d](-0.25,-0.4375){\psframebox*[framesep=1pt]{$L$}}
  \end{pspicture}
  \end{center}
  \caption{Quadrature by inscribing triangles}\label{fig:parab-rig}
\end{figure}
Here $D$ is the midpoint of $BC$ as before, and $E$ is the midpoint of
$AC$.  From $E$ a straight line is drawn parallel to $DA$, meeting the
parabola at $F$.  Draw straight lines $AF$ and $FC$.  Then triangle
$ACF$ has the same altitude as the parabolic segment in which it is
inscribed.  Similarly we can find $G$ on the parabola between $A$ and
$B$ so that the inscribed triangle $ABG$ has the same height as its
parabolic segment.
We show that triangles $ACF$ and $ABG$ are together one fourth of triangle
$ABC$.

To this end, from $E$ and $F$ we draw parallels to $BC$, meeting $AD$
at $H$ and $K$ respectively.  Then
\begin{equation*}
  FK^2:CD^2::AK:AD.
\end{equation*}
But $FK=EH$, and
\begin{equation*}
  EH:CD::EA:CA::1:2.
\end{equation*}
Therefore 
\begin{equation*}
AK:AD::EH^2:CD^2::1:4,
\end{equation*}
so $AK$ is one fourth of $AD$.  Consequently $K$ is the
midpoint of $AH$, and so, letting $L$ be the intersection of $FK$ and $AC$, we have that $L$ is the midpoint of $AE$.  Hence triangle
$AKL$ is equal to triangle $EFL$.  But $EFL$ is one fourth of $ACF$,
and $AKL$ is one thirty-second of $ABC$.  Therefore $ACF$ is one
eighth of $ABC$.  Similarly, $ABG$ is one eighth of $ABC$; so $ABG$
and $ACF$ together are one fourth of $ABC$.

We have started with the parabolic segment cut off by the chord $BC$,
and 
we have removed from it the triangle $ABC$.  Then we have removed
triangles equal 
to a fourth of $ABC$.  We can continue, removing triangles equal to a
sixteenth of $ABC$, and so on.  Moreover, at each step, we remove \emph{more
than half} the remainder of the original parabolic segment.

Therefore, if we continue long enough, we can make the remainder of
the parabolic segment less than any pre-assigned area $M$.  This is the
conclusion of Proposition X.1 of Euclid's \emph{Elements;} let us note the proof.  The
pre-assigned area $M$ is assumed to \emph{have a ratio} with the parabolic
segment, so that, by Definition 4 quoted above from \emph{Elements} V, some multiple $nM$ of $M$
exceeds the segment.  Indeed, Archimedes himself makes this assumption
explicit in the preface to the \emph{Quadrature of the parabola;} it
is what we may refer to as the \textbf{Archimedean
  axiom:}\index{Archimedean axiom}\label{Arch-ax}
\begin{quote}
  given [two] unequal areas, the exess by which the greater exceeds
  the less can, by being added to itself, be made to exceed any given
  finite area. \hfill\mbox{\cite[p.231]{MR13:419b}}
\end{quote}
If we take away at least half of the parabolic segment,
and take $M$ from $nM$, then in the latter case we are taking not more
than half; so the remainder in the former case is still less than the remainder in
the latter case, which is $(n-1)M$.  If we repeat this process $n-2$ more times, then, in the end, the
remainder of the parabolic segment will be less than $M$.

Suppose we have an area that is a third again as large as triangle
$ABC$.  If we remove an area equal to triangle $ABC$, then what is left is one third of this triangle.  If we
then remove an area equal to one fourth of triangle $ABC$, then what is left is one
twelfth of that triangle, which is one fourth of the previous
remainder.  Continuing, if at each step we remove one fourth of what we last
removed, then what remains is one fourth of the previous remainder.
Therefore, continuing as far as necessary, we can make the remainder
as small as we like.  But this is the same process as we described in
the original parabolic segment.

Now, suppose if possible that the original parabolic segment is \emph{more than} a third again as
large as $ABC$.  Let it be greater by $M$.  By the process described, we can
inscribe in the parabolic segment a rectilinear figure which differs
from the segment by less than $M$.  But then the inscribed figure is more than a third greater
than $ABC$, whereas the process of inscription always gives us a figure \emph{less} then a third greater than $ABC$,
which is absurd.  There is a similar contradiction if the
parabolic segment is less than a third again as large as $ABC$.
Theorem~\ref{thm:Arch} now follows.

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

Today many number systems are recognized, and some of them form the chain
\begin{equation}\label{chain}
  \N\pincluded\Z\pincluded\Q\pincluded\R.
\end{equation}
Here $\N$ is the set of \textbf{natural numbers}\index{natural number} in the sense of
p.~\pageref{nats};\footnote{That is, $\N=\{1,2,3,\dots\}$; but some
  writers consider $0$ as a natural number---as indeed \emph{we} shall in \ref{subsect:vnn} and later.} 
$\Z$ comprises the \textbf{integers;}\index{integer} $\Q$, the
\textbf{rational numbers;}\index{rational number} 
$\R$, the \textbf{real numbers.}\index{real number}
What, if anything, comes after $\R$?  It depends on how we think of
$\R$.  If we think of it as a \emph{field,} then we might think of
$\R$ as included in $\C$, the field of \textbf{complex
  numbers.}\index{complex number}  But
what if we think of $\R$ as an \emph{ordered field?}  I postpone an
answer until Chapter~\ref{ch:non-Arch}.  Meanwhile I want to look at how
we obtain~\eqref{chain} in the first place.


\section{The numbers themselves}\label{sect:N}

We can understand $\N$ axiomatically.  To do this, we first have to name some features of $\N$.
\begin{compactenum}[1.]
\item 
It has an \textbf{initial element}\index{initial element} called \textbf{one,}\index{one} denoted by
\begin{equation*}
1.
\end{equation*}
\item
It has an operation of \textbf{succession,}\index{succession}
  denoted by 
  \begin{equation*}
n\mapsto n+1;
\end{equation*}
here $n+1$ is the \textbf{successor}\index{successor} of
  $n$. 
\end{compactenum}
Let us denote succession also by $\succn$, so
\begin{equation}\label{eqn:Sn=n+1}
\succn(n)=n+1.
\end{equation}
I propose to refer to the ordered triple $(\N,1,\succn)$ as an
\emph{iterative structure.}\footnote{Stoll \cite[\S 2.1,
  p.~58]{MR83e:04002} 
uses the term `unary system'.} 
In general, by an \textbf{iterative structure,}\index{iterative
  structure} I mean any set that has a 
distinuished element and a distinguished \textbf{singulary
  operation}\index{singulary operation}
(function from the set to itself).  For example, modular arithmetic 
involves the iterative structures
 $(\Z_n,1,\succn)$.\footnote{One can understand $\Z_n$ either as the
  set $\{1,\dots,n\}$ comprising the first $n$ natural numbers, or as
  the set of congruence-classes $k+(n)$ of
  integers \emph{modulo} $n$.  In the latter case, the element of
  $\Z_n$ that is called one is really $1+(n)$; but we can still denote
  it by $1$.  Likewise, though the operation of succession on $\Z_n$
  is different from the operation on $\N$, we may still denote it by
  the same symbolism.} 
 The iterative structure $(\N,1,\succn)$ is
distinguished among iterative structures for  satisfying the
following axioms.
\begin{compactenum}[1.]
\item\label{ax:0}
$1$ is not a successor: $1\neq n+1$.
\item\label{ax:inj}
Succession is injective: if $m+1=n+1$, then $m=n$.
\item\label{ax:ind}
\textbf{Proof by induction}\index{induction} is admitted, in the sense that a subset $A$ is the whole set, provided we can establish
  \begin{compactdesc}
  \item[(base step)]
$1\in A$;
\item[(inductive step)]
for all $n$, if the \textbf{inductive hypothesis} $n\in A$ holds, then $n+1\in A$.
  \end{compactdesc}
\end{compactenum}

These axioms were published originally by
Dedekind in 1888~\cite[II, VI (71), p.~67]{MR0159773}; then they were 
written down by 
Peano in a special notation in 1889~\cite{Peano}.  They are usually
known as the \textbf{Peano axioms.}\index{Peano axioms}
From these axioms, Landau develops the rational, real, and complex
numbers rigorously, over the course of a book \cite{MR12:397m}.  I
want to do the same here, though more quickly and in a different
style.  In particular, Landau does not use the next theorem below.  The
proof is difficult, but the result is very useful.  The function $h$ found in the theorem is depicted in Figure~\ref{fig:rec}.

\begin{theorem}[Recursion]\label{thm:rec}\index{Recursion Theorem}
For every iterative structure $(A,b,f)$, there is a unique function
$h$ from $\N$ to $A$ such that
\begin{compactenum}[(1)]
\item 
$h(1)=b$,
\item
$h(n+1)=f(h(n))$ for all $n$ in $\N$.
\end{compactenum}
\end{theorem}
\begin{figure}[ht]
\begin{equation*}
\xymatrix{
\{1\}\ar[r]^{\included}\ar[d]&\N\ar[r]^{\succn}\ar[d]_{h}&\N\ar[d]^{h}\\
\{b\}\ar[r]_{\included}      &A \ar[r]_{f}               &A
}
\end{equation*}
\caption{Recursion}\label{fig:rec}
\end{figure}

\begin{proof}
I use the set-theoretic conception whereby a function $g$ is just
the set of ordered pairs\footnote{A good definition of an ordered pair is Kuratowski's~\cite{Kuratowski}: $(x,y)=\{\{x\},\{x,y\}\}$.} $(x,y)$ such that $g(x)=y$; so if $(x,y)$ and
$(x,z)$ belong to $g$, then $y=z$.  We now seek $h$ as a particular
subset of $\N\times A$.

Let $\mathscr B$ be the set whose elements are the subsets $C$ of $\N\times
A$ such that, if $(x,y)\in C$, then either 
\begin{compactenum}
\item 
$(x,y)=(1,b)$ or else
\item $C$ has an element
$(u,v)$ such that $(x,y)=(u+1,f(v))$.
\end{compactenum}
Let $R=\bigcup \mathscr B$; so $R$ is a subset of $\N\times A$.  We may say $R$
is a \emph{relation} from $\N$ to $A$.  If
$(x,y)\in R$, we may write also 
\begin{equation*}
x\mathrel Ry.  
\end{equation*}
Since ${(1,b)}\in
\mathscr B$, we have $1\mathrel Rb$.  If $n\mathrel Ry$, then $(n,y)\in C$ for
some $C$ in $\mathscr B$, but then $C\cup\{(n+1,f(y))\}\in \mathscr B$ by definition of $\mathscr B$, so
$(n+1)\mathrel R f(y)$.  Therefore $R$ is the desired function $h$,
provided it is a \emph{function} from $\N$ to $A$.  Proving this has
two stages.
\begin{asparaenum}[1.]
  \item
For all $n$ in $\N$, there is $y$ in $A$ such that $n\mathrel Ry$.
Indeed, let $D$ be the set of such $n$.  Then we have just seen that
$1\in D$, and if $n\in D$, then $n+1\in D$.  By induction, $D=\N$.
\item
For all $n$ in $\N$, if $n\mathrel Ry$ and $n\mathrel Rz$, then $y=z$.
Indeed, let $E$ be the set of such $n$.  Suppose $1\mathrel R y$.  Then
$(1,y)\in C$ for some $C$ in $\mathscr B$.  Since $1$ is not a successor, we
must have $y=b$, by definition of $\mathscr B$.  Therefore $1\in E$.  Suppose
$n\in E$, and $(n+1)\mathrel Ry$.  Then $(n+1,y)\in C$ for some $C$ in
$\mathscr B$.  Again since $1$ is not a successor, we must have
$(n+1,y)=(m+1,f(v))$ for some $(m,v)$ in $C$.  Since succession is
injective, we must have $m=n$.  Since $n\in E$, we know $v$ is
\emph{unique} such that $n\mathrel Rv$.  Since $y=f(v)$, therefore $y$
is unique such that $(n+1)\mathrel Ry$.  Thus $n+1\in E$.  By
induction, $E=\N$.
\end{asparaenum}

So $R$ is the desired function $h$.
Finally, $h$ is unique by induction.
\end{proof}

The function $h$ in the statement of the Recursion Theorem (and in Figure~\ref{fig:rec}) has three properties:
\begin{compactenum}
\item
$h\colon\N\to A$ (that is, $h$ is a function from $\N$ to $A$);
\item
$h(1)=b$;
\item
$h\circ\succn=f\circ h$.
\end{compactenum}
Because it has such properties, $h$ is a 
\textbf{homomorphism}\index{homomorphism} from $(\N,1,\succn)$ to
$(A,b,f)$.  The unique homomorphism guaranteed by the Recursion Theorem is said
to be defined \textbf{recursively}\index{recursive} or defined \textbf{by
  recursion.}\index{recursion}  Indeed, the word \emph{recursion} has
the etymological 
sense of \emph{running back;} and the value of $h(n+1)$ is obtained by
running back to the value of $h(n)$ and applying $f$. 
The iterative structure $(\N,1,\succn)$ itself can be said to
\textbf{admit recursion,} because of the Recursion Theorem.

\begin{corollary}
For every set $A$ with a distinguished element $b$, and for every function
$F$ from $\N\times A$ to $A$, there is a unique function $H$ from $\N$ to
$A$ such that
\begin{compactenum}[(1)]
\item 
$H(1)=b$,
\item
$H(n+1)=F(n,H(n))$ for all $n$ in $\N$.
\end{compactenum}
\end{corollary}

\begin{proof}
Let $h$ be the unique homomorphism from $(\N,1,\succn)$ to
$(\N\times A,(1,b),f)$, where $f$ is the operation
$(n,x)\mapsto(n+1,F(n,x)))$ on $\N\times A$.  In particular, $h(n)$ is always an
ordered pair.  By induction, the 
first entry of $h(n)$ is always $n$; so there is a function $H$ from
$\N$ to $A$ such that $h(n)=(n,H(n))$.  Then $H$ is as desired.  By
induction, $H$ is unique.
\end{proof}

The proof of the Recursion Theorem used each of the three Peano
axioms; induction alone would not be
enough.  This is a consequence of the next two theorems.

An \textbf{isomorphism}\index{isomorphism}\label{isomorphism} of iterative structures is a bijective homomorphism.  Note then that the inverse of an isomorphism is an isomorphism.  Two iterative structures are \textbf{isomorphic}\index{isomorphic} if there is an isomorphism from one to the other.

\begin{theorem}\label{thm:isom}
Every iterative structure that admits recursion is isomorphic to
$(\N,1,\succn)$. 
\end{theorem}

\begin{proof}
Suppose $(A,b,f)$ is an iterative structure admitting recursion.  Then
there is a homomorphism $h$ from this to $(\N,1,\succn)$, and a
homomorphism $h'$ from the latter to the former.  The composition
$h\circ h'$ is a homomorphism from $(\N,1,\succn)$ to itself; but so
is the identity on $\N$.  Such homomorphisms are unique, by definition of admitting recursion; therefore
$h\circ h'$ is the identity.  For the same reason, $h'\circ h$ is the
identity on $A$.  Therefore $(A,b,f)$ and $(\N,1,\succn)$ are
isomorphic. 
\end{proof}

\begin{corollary}\label{cor:RP}
The Recursion Theorem is logically equivalent to the Peano axioms.
\end{corollary}

\begin{theorem}\label{thm:P-ind}
The Peano axioms are
logically independent.  
\end{theorem}

\begin{proof}
$(\Z_n,1,\succn)$
satisfies axioms~\ref{ax:inj} and~\ref{ax:ind}, but not~\ref{ax:0};
and there are examples satisfying~\ref{ax:0} and~\ref{ax:ind}, but
not~\ref{ax:inj}; and satisfying~\ref{ax:0} and~\ref{ax:inj}, but
not~\ref{ax:ind} (finding such examples is an exercise).  
\end{proof}

Therefore no two of the Peano axioms are enough to prove the Recursion
Theorem.  In particular, the induction axiom by itself is not enough. 

\section{Their structure}\label{sect:arith}

\subsection{Addition}

Let $\mathscr F$ be the set of all singulary operations on $\N$.  Then
$\succn$ is a particular element of $\mathscr F$; also, if
$g\in\mathscr F$, then so is $g'$, where $g'$ is given by 
\begin{equation*}
g'(n)=\succn(g(n)).
\end{equation*}
Thus we have an iterative structure $(\mathscr F,\succn,{}')$.  For
the moment, let $h$ be the homomorphism from $(\N,1,\succn)$ to this
structure; but write $h(n)$ as $h_n$.  
Then
% $h_1=\succn$, that is, $h_1(n)=n+1$; and
\begin{align}\label{eqn:hm+1}
h_1(n)&=\succn (n),&
h_{m+1}(n)&=\succn(h_m(n)).
\end{align}
We can now define the binary operation of
\textbf{addition}\index{addition} on $\N$ by 
\begin{equation*}
n+m=h_m(n).
\end{equation*}
Then~\eqref{eqn:hm+1} can be written as
\begin{align}\label{eqn:+}
n+1&=\succn(n),&
n+\succn(m)&=\succn(n+m).
\end{align}
In short, these equations define addition
recursively in its second argument.  The former equation agrees with
the convention established in~\eqref{eqn:Sn=n+1} of \S~\ref{sect:N};
and the latter equation can be rewritten as
\begin{equation*}
  n+(m+1)=(n+m)+1.
\end{equation*}
We can now prove all of the
standard properties of addition: 
\begin{lemma}
For all $n$ and $m$ in $\N$,
\begin{align*}
  1+n&=n+1,&(m+1)+n&=(m+n)+1.
\end{align*}
\end{lemma}

\begin{proof}
Use induction on $n$.  Trivially $1+n=n+1$ when $n=1$, and if it does when $n=k$, then it does when $n=k+1$, since
\begin{align*}
1+(k+1)
&=(1+k)+1&&\text{[by definition of $+$]}\\
&=(k+1)+1&&\text{[by inductive hypothesis].}
\end{align*}
Also trivially $(m+1)+n=(m+n)+1$ when $n=1$, and if it does when $n=k$, then it does when $n=k+1$, since
\begin{align*}
(m+1)+(k+1)
&=((m+1)+k)+1&&\text{[by definition of $+$]}\\
&=((m+k)+1)+1&&\text{[by inductive hypothesis]}\\
&=(m+(k+1))+1&&\text{[by definition of $+$].}\qedhere
\end{align*}
\end{proof}

\begin{theorem}\label{thm:N-+}
Addition on $\N$ is
  \begin{compactenum}[(1)]
  \item 
\textbf{commutative:}\index{commutative} $n+m=m+n$; and
\item
\textbf{associative:}\index{associative} $n+(m+\ell)=(n+m)+\ell$.
  \end{compactenum}
\end{theorem}

\begin{proof}
Use induction and the lemma.  By the lemma, $n+m=m+n$ when $m=1$, and if it does when $m=k$, then
\begin{align*}
n+(k+1)
&=(n+k)+1&&\text{[by definition of $+$]}\\
&=(k+n)+1&&\text{[by inductive hypothesis]}\\
&=(k+1)+n&&\text{[by the lemma].}
\end{align*}
By definition of addition, $n+(m+\ell)=(n+m)+\ell$ when $\ell=1$, and if it does when $\ell=k$, then
\begin{align*}
n+(m+(k+1))
&=n+((m+k)+1)&&\text{[by definition of $+$]}\\
&=(n+(m+k))+1&&\text{[by definition of $+$]}\\
&=((n+m)+k)+1&&\text{[by inductive hypothesis]}\\
&=(n+m)+(k+1)&&\text{[by definition of $+$].}\qedhere
\end{align*}
\end{proof}

Like $(\N,1,\succn)$, the pair $(\N,+)$ is an example of an
\textbf{algebraic structure:}\index{algebraic
  structure}\index{structure} a set with one or more (or even no) 
operations on it.  The set itself is the
\textbf{universe}\index{universe} of the structure.  In particular, by
the theorem, $(\N,+)$ is a \textbf{commutative
  semigroup.}\index{commutative semigroup} 

\subsection{Multiplication}

We can define \textbf{multiplication}\index{multiplication} on $\N$
recursively in its second argument by 
\begin{align}\label{eqn:.}
n\cdot1&=n,& n\cdot(m+1)&=n\cdot m+n.
\end{align}
Note that $n\cdot m+n$ means $(n\cdot m)+n$.

\begin{lemma}\label{lem:.}
For all $n$ and $m$ in $\N$,
\begin{align*}
  1\cdot n&=n,&(m+1)\cdot n&=m\cdot n+n.
\end{align*}
\end{lemma}

\begin{proof}
By definition, $1\cdot n=n$ when $n=1$, and if it does when $n=k$, then
\begin{align*}
1\cdot(k+1)
&=1\cdot k+1&&\text{[by definition of $\cdot$]}\\
&=k+1&&\text{[by inductive hypothesis].}
\end{align*}
Also by definition, $(m+1)\cdot n=m\cdot n+n$ when $n=1$, and if when $n=k$, then
\begin{align*}
(m+1)\cdot(k+1)
&=(m+1)\cdot k+(m+1)&&\text{[by definition of $\cdot$]}\\
&=(m\cdot k+k)+(m+1)&&\text{[by inductive hypothesis]}\\
&=(m\cdot k+(k+m))+1&&\text{[by associativity of $+$]}\\
&=(m\cdot k+(m+k))+1&&\text{[by commutativity of $+$]}\\
&=(m\cdot k+m)+(k+1)&&\text{[by associativity of $+$]}\\
&=m\cdot(k+1)+(k+1)&&\text{[by definition of $\cdot$].}\qedhere
\end{align*}
\end{proof}

Since $1\cdot n=n=n\cdot 1$, the element $1$ is a
\textbf{multiplicative identity}\index{multiplicative
  identity}\index{identity} in $\N$.  We may write $n\cdot m$ as $nm$.

\begin{theorem}\label{thm:N-.}
Multiplication on $\N$ is
  \begin{compactenum}[(1)]
  \item 
commutative: $nm=mn$;
\item
\textbf{distributive}\index{distributive} over addition: $n(m+\ell)=nm+n\ell$; and
\item
associative: $n(m\ell)=(nm)\ell$.
  \end{compactenum}
\end{theorem}

\begin{proof}
By the lemma, $nm=mn$ when $m=1$, and if when $m=k$, then
\begin{align*}
	n(k+1)
	&=nk+n&&\text{[by definition of $\cdot$]}\\
	&=kn+n&&\text{[by inductive hypothesis]}\\
	&=(k+1)n&&\text{[by the lemma]}.
\end{align*}
By definition, $n(m+\ell)=nm+n\ell$ when $\ell=1$, and if when $\ell=k$, then
\begin{align*}
n(m+(k+1))
&=n((m+k)+1)&&\text{[by definition of $+$]}\\
&=n(m+k)+n&&\text{[by definition of $\cdot$]}\\
&=(nm+nk)+n&&\text{[by inductive hypothesis]}\\
&=nm+(nk+n)&&\text{[by associativity of $+$]}\\
&=nm+n(k+1)&&\text{[by definition of $\cdot$].}
\end{align*}
Finally, $n(m\ell)=(nm)\ell$ when $\ell=1$ by definition of $\cdot$,
and if when $\ell=k$, then  
\begin{align*}
n(m(k+1))
&=n(mk+m)&&\text{[by definition of $\cdot$]}\\
&=n(mk)+nm&&\text{[by distributivity]}\\
&=(nm)k+nm&&\text{[by inductive hypothesis]}\\
&=(nm)(k+1)&&\text{[by definition of $\cdot$].}\qedhere
\end{align*}
\end{proof}

Now we know that the structure $(\N,\cdot)$ is a commutative
semigroup.  Because this is so, and $(\N,+)$ is a commutative
semigroup, and multiplication distributes over addition, the
structure $(\N,+,\cdot)$ can be called a \textbf{commutative
 semi-ring.}\index{commutative semi-ring}\index{semi-ring} 
Since also $1$ is a multiplicative identity, $(\N,1,\cdot)$ is a
commutative \textbf{monoid,}\index{monoid} and $(\N,1,+,\cdot)$ is a
\textbf{unital}\index{unital} commutative semi-ring. 

The algebraic terminology here is awkward.  The structure
$(\N,1,+,\cdot)$ is fundamental: just about
everything else of interest to us will be obtained from it.
Unfortunately it has not got a simpler description (that I know of)
than `unital commutative semi-ring'.  But it will be important that we
can look at a set like $\N$ from different points of view: as the semigroup
$(\N,+)$, as the semigroup $(\N,\cdot)$, and so forth.

All lemmas and theorems of this section have been proved by induction
alone.  But they have relied on the recursive definitions of addition
and multiplication, and as we have shown with Corollary~\ref{cor:RP}
and Theorem~\ref{thm:P-ind}, the possibility of recursive definitions
in general requires more than induction.
Nonetheless, in his own development of arithmetic,
Landau \cite{MR12:397m} proves \emph{using induction alone} that
addition and multiplication exist 
as given by the recursive definitions~\eqref{eqn:+} and~\eqref{eqn:.}
above.  For the record, let us 
do the same.

\begin{theorem}
  On any iterative structure $(A,1,\succn)$ that admits proof by
  induction, there are unique binary operations
  satisfying~\eqref{eqn:+} and~\eqref{eqn:.}; then $(A,1,+,\cdot)$ is
  a unital commutative semi-ring. 
\end{theorem}

\begin{proof}
  Let $A'$ be the set of $n$ in $A$ for which there is an operation
  $x\mapsto n+x$ satisfying~\eqref{eqn:+}.  Then $1\in A'$, since if
  we define 
  \begin{equation*}
  1+x=\succn(x), 
  \end{equation*}
  then indeed
  \begin{align*}
    1+1&=\succn(1),&
1+\succn(m)&=\succn(\succn(m))=\succn(1+m).
  \end{align*}
Suppose $k\in A'$.  Then $\succn(k)\in A'$, since if we define
\begin{equation*}
  \succn(k)+x=\succn(k+x),
\end{equation*}
then indeed
\begin{gather*}
  \succn(k)+1=\succn(k+1)=\succn(\succn(k)),\\
\succn(k)+\succn(m)=\succn(k+\succn(m))
=\succn(\succn(k+m))
=\succn(\succn(k)+m).
\end{gather*}
By induction, $A'=A$.
Also, for each $n$ in $A$, by induction there is \emph{at most} one operation
$x\mapsto n+x$ satisfying~\eqref{eqn:+}.  So addition on $A$ exists as
desired.  Moreover, the proof of Theorem~\ref{thm:N-+} goes through,
so that $(A,+)$ is a commutative semigroup.

Now let $A''$ comprise those $n$ in $A$
for which there is an operation $x\mapsto n\cdot x$
satisfying~\eqref{eqn:.}.  Then $1\in A''$, since if we define
\begin{equation*}
  1\cdot x=x,
\end{equation*}
then indeed
\begin{align*}
  1\cdot 1&=1,&
1\cdot(m+1)&=m+1=1\cdot m+1.
\end{align*}
Suppose $k\in A''$.  Then $k+1\in A''$, since if we define
\begin{equation*}
  (k+1)\cdot x=k\cdot x+x,
\end{equation*}
then
\begin{gather*}
  (k+1)\cdot1=k\cdot 1+1=k+1,\\
  \begin{aligned}
(k+1)\cdot(m+1)
&=k\cdot(m+1)+(m+1)\\
&=(k\cdot m+k)+(m+1)\\
&=(k\cdot m+m)+(k+1)\\
&=(k+1)\cdot m+(k+1).
  \end{aligned}
\end{gather*}
By induction, $A''=A$.  Also by induction on the second argument,
multiplication is unique.  Then the proof of Theorem~\ref{thm:N-.}
goes through, and $(A,1,+,\cdot)$ is unital commutative semi-ring.
\end{proof}

In particular, $(\Z_n,1,+,\cdot)$ is a unital commutative semi-ring.
Moreover, one can prove 
now as an exercise that, on $\N$ and on $\Z_n$, addition is
\textbf{cancellative,}\index{cancellative} that is,  
\begin{equation*}
k=\ell\iff k+m=\ell+m;
\end{equation*}
but the proof requires more than induction.  Multiplication also is
cancellative on $\N$, but proving this takes more
work (and it fails on $\Z_n$).  We shall obtain both 
results about $\N$ as a corollary of Theorem~\ref{thm:m+x=n} below. 

\subsection{Exponentiation}

\textbf{Exponentiation}\index{exponentiation} on $\N$ as a binary
operation $(x,y)\mapsto x^y$ given by
\begin{align}\label{eqn:expon}
  n^1&=n,& n^{m+1}&=n^m\cdot n.
\end{align}
The existence of such an operation requires more than induction.
Indeed, exponentiation cannot be 
defined in $(\Z_n,1,\succn)$ by~\eqref{eqn:expon} unless
$n$ is $1$, $2$, $6$, $42$, or $1806$: this results from an exercise
in number theory worked out by Dyer-Bennet~\cite{MR0001234}.  Note that exponentiation on $\N$ is not commutative either.  We shall not make any particular use of exponentiation as a binary operation.  We shall however obtain in~\ref{subsect:nosr}, for each \emph{real} number $b$ that is greater than $1$, the isomorphism $x\mapsto b^x$ from the additive \emph{group}\index{group} of real numbers to the multiplicative group of positive real numbers.

\subsection{Ordering}

Something else that distinguishes $\N$ from the sets $\Z_n$ is the
possibility of \emph{ordering} the former in a way compatible with addition.
The usual ordering $<$ of $\N$ can be defined recursively as follows.
First note that $m\leq n$ means simply $m<n$ or $m=n$.  Then the
definition of $<$ is:
\begin{compactenum}[(1)]
\item 
$m\not<1$;
\item
$m<n+1$ if and only if $m\leq n$.
\end{compactenum}
In particular, $n<n+1$.
Really, it is the function $n\mapsto\{x\in\N\colon x<n\}$ that is defined by
recursion:
\begin{compactenum}[(1)]
\item 
$\{x\in\N\colon x<1\}=\emptyset$;
\item
$\{x\in\N\colon x<n+1\}=\{x\in\N\colon x<n\}\cup\{n\}$.
\end{compactenum}
We now have $<$ as a binary relation on $\N$.
We prove first that it is a \textbf{partial ordering,}\index{partial
  ordering} namely, 
\begin{compactenum}[(1)]
\item
it is \textbf{irreflexive:}\index{irreflexive} $n\not<n$;
\item
it is \textbf{transitive:}\label{transitive}\index{transitive} if $k<m$
  and $m<n$, then $k<n$.
\end{compactenum}

\begin{theorem}\label{thm:<trans}
  The relation $<$ on $\N$ is transitive.
\end{theorem}

\begin{proof}
  It follows by induction on $n$ that if $k<m$
  and $m<n$, then $k<n$.
\end{proof}

\begin{lemma}
  $m\neq m+1$.
\end{lemma}

\begin{proof}
  The claim is true when $m=1$, since $1$ is not a successor.  Suppose
  the claim is true when $m=k$; that is, suppose $k\neq k+1$.  Then $k+1\neq
  (k+1)+1$, by injectivity of succession, so the claim is true when
  $m=k+1$.  By induction, the claim is true for all $m$.
\end{proof}

\begin{theorem}\label{thm:<irr}
  The relation $<$ on $\N$ is irreflexive.
\end{theorem}

\begin{proof}
  The claim is true when $m=1$, since $m\not<1$ by definition.
  Suppose the claim \emph{fails} when $m=k+1$.  This means $k+1<k+1$.
  Therefore $k+1\leq k$ by definition.  By the lemma, $k+1\neq k$, so
  $k+1<k$.  But $k<k+1$ by definition.  So $k<k+1$ and
  $k+1<k$; hence $k<k$ by
  Theorem~\ref{thm:<trans}, that is, the claim fails when $m=k$.  
  Contrapositively, if $k\not<k$, then $k+1\not<k+1$.  By
  induction, the claim holds for all $m$. 
\end{proof}

So we know the relation $<$ is
a \emph{partial} ordering of $\N$.  The pair $(\N,<)$ can therefore be
called a \textbf{partial order.}\index{partial order}  It is an
example of a new kind of structure: not an algebraic structure, but a
\textbf{relational structure.}\index{relational structure}

Every partial ordering is
\textbf{antisymmetric,}\index{antisymmetric} that is, if $x<y$, then
$y\not<x$.  Indeed, if
$x<y$ and $y<x'$, then $x<x'$ by transitivity, so $x\neq x'$ by
irreflexivity.  We now want to show $<$ is simply an
\textbf{ordering}\index{ordering}---or more precisely a \textbf{linear
  ordering}\index{linear ordering}\footnote{Or \emph{total ordering;}
  but \emph{linear} is 
  more suggestive of arranging elements in one line.  In any case,
  since all orderings in these notes will be total or linear, I shall
  generally call them just \emph{orderings.}  A set with an ordering
  is an \textbf{order.}\index{order}}---of 
$\N$, that is, $k\leq m$ or $m\leq k$ (for all $k$ and $m$ in 
$\N$).  Note that, once this linearity is known, the next two lemmas
will be easy consequences of the definition of $<$. 

\begin{lemma}
$1\leq m$.
\end{lemma}

\begin{proof}
Induction.
\end{proof}

\begin{lemma}
If $k<m$, then $k+1\leq m$.
\end{lemma}

\begin{proof}
The claim is vacuously true when $m=1$, since $k\not<1$.  Suppose the
claim is true when
$m=n$.  Say $k<n+1$.  Then $k\leq n$.  If $k=n$, then
$k+1=n+1$.  If $k<n$, then $k+1\leq n$ by inductive hypothesis,
so $k+1<n+1$ by definition.  In either case, $k+1\leq n+1$.  Thus the
claim holds when $m=n+1$. 
By induction, the claim holds for all $m$.
\end{proof}

\begin{theorem}\label{thm:<tot}
The partial ordering $<$ of $\N$ is linear.
\end{theorem}

\begin{proof}
It follows by induction and the last two lemmas that either $\ell\leq m$ or
  $m\leq \ell$.  Indeed, the claim holds by the next-to-last lemma when
$\ell=1$.  Suppose it holds when $\ell=k$, but $k+1\not\leq m$.  Then
$k\not<m$ by the last lemma, so either $k=m$ or $k\not\leq m$, and
then by inductive hypothesis $m\leq k$, so $m\leq k+1$.
\end{proof}

Therefore $(\N,<)$ is simply an \textbf{order.}\index{order}  More is true:

\begin{theorem}\label{thm:wo}
  $\N$ is \textbf{well ordered}\index{well ordered} by $<$: every
  nonempty set of natural 
  numbers has a least element.
\end{theorem}

\begin{proof}
  Suppose $A$ is a set of natural numbers with no least element; we
  show $A$ is empty.  Let 
\begin{equation*}
B=\{x\in\N\colon\Forall y(y<x\lto y\notin A)\}.
\end{equation*}
  Then
  $1\in B$ since nothing is less than $1$.  Suppose $m\in B$.  Then
  $m+1\in B$, since otherwise 
  $m$ would be the least element of $A$.  By induction, $B=\N$, so
  $A=\emptyset$. 
\end{proof}

\subsection{Interaction}

\begin{theorem}\label{thm:m+x=n}
  For all $m$ and $n$ in $\N$, we have $m< n$ if and only if the
  equation
  \begin{equation}\label{eqn:m+x=n}
    m+x=n
  \end{equation}
is soluble in $\N$.
\end{theorem}

\begin{proof}
  By induction on $k$, if $m+k=n$, then $m< n$.  

By induction on $n$, we prove conversely that if $m<n$,
then~\eqref{eqn:m+x=n} is soluble.  This is vacuously true when $n=1$. 
Suppose the equation $m+x=r$ is soluble whenever $m<r$, but now $m<
r+1$.  Then $m\leq r$. 
If $m=r$, then $m+1=r+1$.  If $m<r$, then the
equation $m+x=r$ has a solution $k$, and therefore $m+(k+1)=r+1$.
Thus the equation $m+x=r+1$ is soluble whenever $m<r+1$.
\end{proof}

The theorem means $<$ can be defined in terms of addition by an existential formula:
\begin{equation*}
m<n\iff\Exists xm+x=n.
\end{equation*}

\begin{corollary}\label{cor:ord-add}
On $\N$,
\begin{gather}\label{eqn:k+m<l+m}
k<n\iff k+m<n+m,\\\label{eqn:k+m=l+m}
k=n\iff k+m=n+m.
  \end{gather}
\end{corollary}

\begin{proof}
The forward direction of~\eqref{eqn:k+m=l+m}
is immediate.   
For the forward direction of~\eqref{eqn:k+m<l+m}, if $k<n$, then $k+\ell=n$ for some $\ell$, so
\begin{equation*}
(k+\ell)+m=n+m.
\end{equation*}
By commutativity and associativity,
\begin{equation*}
(k+m)+\ell=n+m,
\end{equation*}
so $k+m<n+m$.  The reverse directions of~\eqref{eqn:k+m<l+m} and~\eqref{eqn:k+m=l+m} follow by the
linearity of the ordering. 
\end{proof}

Note that, also by the linearity of the ordering, \eqref{eqn:k+m<l+m} implies~\eqref{eqn:k+m=l+m}.
It follows from~\eqref{eqn:k+m=l+m} that the equation~\eqref{eqn:m+x=n} has
at most one solution: this can be denoted by 
\begin{equation}\label{eqn:diff}
n-m
\end{equation}
and is the \textbf{difference}\index{difference} of $n$ and $m$.  So, for now, $n-m$ exists if and only if $m<n$.

\begin{corollary}\label{cor:ord-mul}
On $\N$,
\begin{gather}\label{eqn:km<nm}
k<n\iff km<n m,\\\label{eqn:km=nm}
k=n\iff km=n m.
  \end{gather}
\end{corollary}

\begin{proof}
The forward direction of~\eqref{eqn:km=nm}
is immediate.   
For the forward direction of~\eqref{eqn:km<nm}, if $k<n$, then $k+\ell=n$ for some $\ell$, so
\begin{equation*}
(k+\ell)m=nm.
\end{equation*}
By distributivity,
\begin{equation*}
	km+\ell m=nm,
\end{equation*}
so $km<nm$.  The reverse directions of~\eqref{eqn:km<nm} and~\eqref{eqn:km=nm} follow by the
linearity of the ordering. 
\end{proof}

We now have several ways of thinking of $\N$, in addition to those
identified earlier in this section.  For example, we can consider the
triple $(\N,+,<)$.  This is neither a (purely) algebraic structure, nor a
(purely) relational structure; it is an example of a
\textbf{structure,}\index{structure} simply.  Because
\begin{compactenum}[(1)]
  \item
$(\N,+)$ is a commutative semigroup, 
\item
$(\N,<)$ is an order, and
\item
Corollary~\ref{cor:ord-add} holds,
\end{compactenum}
we may say that the structure $(\N,+,<)$ is an \textbf{ordered
  commutative semigroup.}\index{ordered commutative semigroup}
Therefore, because $(\N,\cdot)$ is a commutative semigroup, and
Corollary~\ref{cor:ord-mul} holds, $(\N,\cdot,<)$ too is an ordered
commutative semigroup; we may say further that $(\N,1,\cdot,<)$ is an
\textbf{ordered commutative monoid.}\index{ordered commutative monoid}   

There is stronger terminology.  
Because
\begin{compactenum}[(1)]
  \item
$(\N,+)$ is a commutative semigroup, 
\item
$(\N,<)$ is an order, and
\item
Theorem~\ref{thm:m+x=n} holds,
\end{compactenum}
the ordering $<$ is a \textbf{natural
  ordering}\index{natural ordering}\footnote{This terminology is 
  inspired the survey 
  article~\cite[p.~308]{MR0100641} of Clifford, where naturally
  ordered semigroups are defined.}  
of the commutative semigroup $(\N,+)$, and
$(\N,+,<)$ is a \textbf{naturally ordered commutative
  semigroup.}\index{naturally ordered commutative semigroup}  Then
$<$ is \emph{not} a natural ordering of $(\N,\cdot)$, since for
example $2<3$, but $2x=3$ is insoluble in $\N$. 
However, we may say that $(\N,1,+,\cdot,<)$ is a \textbf{naturally
  ordered unital commutative semi-ring,}\index{naturally ordered
  unital commutative semi-ring} because 
\begin{compactenum}[(1)]
\item
$(\N,1,+,\cdot)$ is a unital commutative semi-ring,
\item
$(\N,<)$ is an order, and
\item
Theorem~\ref{thm:m+x=n} holds.
\end{compactenum}
As such, $(\N,1,+,\cdot,<)$ will turn out to embed in an \emph{ordered
  commutative ring} by Porism~\ref{porism}.
  We do not define the
general notion of an ordered unital commutative semi-ring.


\chapter{Construction of the rational numbers}\label{ch:N2Q}

\section{The positive rational numbers}\label{sect:+rat}

The integers can be constructed from the natural numbers, and the
rational numbers can be constructed from the integers.  However, the
\emph{positive} rational numbers can  also be constructed directly
from the natural numbers, and indeed we are taught some aspects of
this construction from an early age.  If $a$ and $b$ are natural
numbers, then there is a \textbf{fraction}\index{fraction} denoted by 
\begin{equation*}
\frac ab
\end{equation*}
or $a/b$.
Then there are definitions for adding and multiplying fractions:
\begin{align}\label{eqn:Q}
  \frac ab+\frac cd&=\frac{ad+cb}{bd},&
\frac ab\cdot\frac cd&=\frac{ac}{bd}.
\end{align}
Also, an ordering of fractions can be defined by
\begin{equation}\label{eqn:Q<}
\frac ab<\frac cd\iff ad<cb.
\end{equation}
We are taught to \emph{reduce} fractions also: By~\eqref{eqn:Q}
we compute $1/3+1/6=9/18$, which reduces to $1/2$.  In particular,
$9/18$ and $1/2$ are \emph{equal} fractions.  
Equality of fractions may be given by
\begin{equation}\label{eqn:frac=}
\frac ab=\frac cd\iff ad=cb.
\end{equation}
The fraction $a/b$
need not uniquely determine the pair $(a,b)$.  This means that the
validity of~\eqref{eqn:Q} and~\eqref{eqn:Q<} as definitions must be
checked.  Indeed, the validity of~\eqref{eqn:frac=} as a definition of
equality must be checked.
There are two ways to do this.

\subsection{Equality by definition}

In~\eqref{eqn:frac=}, \emph{some} binary relation on
fractions is defined; for the moment, we can give it the arbitrary
name $R$.  So 
\begin{equation*}
\frac ab\mathrel R\frac cd\iff ad=cb.  
\end{equation*}
We can replace $R$ by any name we want; but if we want to refer to $R$
as equality, it will be useful to know that, like the relation of
identity, $R$ is 
\begin{compactenum}[(1)]
\item
\textbf{reflexive}\index{reflexive} ($x\mathrel Rx$), 
\item
\textbf{symmetric}\index{symmetric} (if $x\mathrel Ry$, then $y\mathrel Rx$) and 
\item
transitive (as on p.~\pageref{transitive}: if $x\mathrel Ry$ and
$y\mathrel Rz$, then $x\mathrel Rz$). 
\end{compactenum}
The relation $R$ is indeed so: this is Theorem~\ref{thm:sim-eq} below. 

\subsection{Equality by theorem}

The foregoing approach to equality of fractions avoids the question of
what a fraction \emph{is.}  That 
is fine.  Indeed, we have already avoided the question of what a
natural number is; we have said only that a natural number is a member
of a set $\N$ with the properties expressed in the Peano axioms.  

However, we shall give a set-theoretic definition of $\N$ in \S~\ref{sect:al-prel}.
Meanwhile,
assuming we do have $\N$, we can form the set $\N\times\N$ of ordered
pairs of elements of $\N$; 
then we can define the binary relation $\sim$ on $\N\times\N$ by 
\begin{equation}\label{eqn:sim}
(a,b)\sim(c,d)\iff ad=cb.
\end{equation}
Now we can define
\begin{equation}\label{eqn:a/b}
\frac ab=\{(x,y)\in\N\times\N\colon (a,b)\sim(x,y)\}.
\end{equation}
This definition is useful because of:

\begin{theorem}\label{thm:sim-eq}
The relation $\sim$ on $\N\times\N$ is reflexive, symmetric, and transitive.
\end{theorem}

\begin{proof}
Reflexivity and symmetry of $\sim$ follow immediately from the
corresponding properties of equality; but transitivity needs more.
Suppose $(a,b)\sim(c,d)$ and $(c,d)\sim(e,f)$.  Then $ad=cb$ and
$cf=ed$, so 
\begin{equation*}
(ad)f=(cb)f=c(bf)=c(fb)=(cf)b=(ed)b
\end{equation*}
by commutativity and associativity of multiplication.  By these
properties and also cancellation, we can go on to conclude 
\begin{equation*}
af=eb,
\end{equation*}
hence $(a,b)\sim(e,f)$.
\end{proof}

This means $\sim$ is an
\textbf{equivalence relation,}\index{equivalence relation} and $a/b$ is
the \textbf{equivalence class}\index{equivalence class} of $(a,b)$
with respect to this 
relation.  The set of all such classes can be denoted by 
\begin{equation*}
(\N\times\N)/\mathord{\sim},
\end{equation*}
but we shall usually write simply
\begin{equation*}
\Qp.
\end{equation*}
This is the set of \textbf{positive rational numbers.}\index{positive
  rational numbers}
We can now characterize equality as a relation on $\Qp$:

\begin{corollary}
	$a/b=x/y$ if and only if $(a,b)\sim(x,y)$.
\end{corollary}

%Thus,~\eqref{eqn:frac=} can be understood, not as a definition, but
%as a theorem. 

\subsection{Structure}

We are free to define operations $\oplus$ and $\otimes$ on $\N\times\N$ by
\begin{align*}
				(a,b)\oplus(c,d)&=(ad+cb,bd),&
				(a,b)\otimes(c,d)&=(ac,bd).
\end{align*}
We are free to define a relation $\olt$ on $\N\times\N$ by
\begin{equation*}
(a,b)\olt(c,d)\iff ad<cb.
\end{equation*}
What makes these useful is the following:

\begin{theorem}
If $a/b=a'/b'$
and $c/d=c'/d'$, then
\begin{gather}\notag
(a,b)\oplus(c,d)\sim(a',b')\oplus(c',d'),\\\notag
(a,b)\otimes(c,d)\sim(a',b')\otimes(c',d'),\\\label{eqn:Q+-<}
(a,b)\olt(c,d)\iff(a',b')\olt(c',d').
\end{gather}		
\end{theorem}

\begin{proof}
We assume $ab'=a'b$ and $cd'=c'd$.  To prove~\eqref{eqn:Q+-<} we have
\begin{align*}
(a,b)\olt(c,d)
&\iff ad<cb\\
&\iff adb'c'<cbb'c'\\
&\iff ab'c'd<cbb'c'\\
&\iff a'bcd'<cbb'c'\\
&\iff a'd'<c'b'\\
&\iff(a',b')\olt(c',d').\qedhere
\end{align*}
\end{proof}

\begin{corollary}
On $\Qp$, the equations~\eqref{eqn:Q} define
two binary operations, while the equivalence~\eqref{eqn:Q<} defines a
binary relation. 
\end{corollary}

In passing from $\N$ to $\Qp$, we lose only the being well-ordered.  Denoting $1/1$ in $\Qp$ by $1$, we have

\begin{theorem}\label{thm:Q^+}
%The structure
$(\Qp,1,+,\cdot,<)$ is a naturally ordered unital commutative semi-ring.
\end{theorem}

\begin{proof}
Easily from the definitions, $(\Qp,1,+,\cdot,<)$ is a unital commutative semi-ring.  Also, we have $bda<bda+cb^2=(ad+cb)b$,
and therefore
\begin{equation*}
\frac ab<\frac{ad+cb}{bd}=\frac ab+\frac cd.
\end{equation*}
Conversely, if $a/b<c/d$, then $ad<cb$, so $cb-ad\in\N$ and
\begin{equation*}
\frac ab+\frac{cb-ad}{db}=\frac{adb+cb^2-adb}{db^2}=\frac cd.
\end{equation*}
Thus $<$ naturally orders $(\Qp,1,+,\cdot,<)$.
\end{proof}

The whole point of defining $\Qp$ is the following: 

\begin{theorem}\label{thm:sol-in-Q+}
There is a well-defined operation $x\mapsto x\inv$ on $\Qp$ given by
\begin{equation*}
\left(\frac ab\right)\inv=\frac ba.
\end{equation*}
Then
\begin{equation*}
x\cdot x\inv=1.
\end{equation*}
\end{theorem}

Therefore, since $(\Qp,1,\cdot)$ is a
commutative monoid, $(\Qp,1,{}\inv,\cdot)$ is an \textbf{abelian
  group;}\index{abelian group} since also $(\Qp,\cdot,<)$ is an
ordered commutative monoid, 
$(\Qp,1,{}\inv,\cdot,<)$ is an \textbf{ordered abelian
  group.}\index{ordered abelian group}  If $r$
and $s$ are in $\Qp$, then the equation $r=s\cdot X$ has the unique
solution $s\inv r$, which is written also as a fraction,
\begin{equation*}
\frac rs.
\end{equation*}
If $a,b,c,d\in\N$, then
\begin{equation*}
\frac{a/b}{c/d}=\frac{ad}{bc},
\end{equation*}
and in particular
\begin{equation}\label{eqn:a/1/c/1}
\frac{a/1}{c/1}=\frac ac.
\end{equation}

\subsection{Numbers and fractions}

By our construction, a natural number is not literally a positive
rational number; a positive rational is a class of ordered pairs of natural
numbers.  
One way to understand this is shown in Figure~\ref{fig:grid}, 
\begin{figure}[ht]
\begin{center}
\psset{unit=3mm}
\begin{pspicture}(12,12)
\psgrid[subgriddiv=1,gridlabels=0,griddots=4](12,12)(12,12)(0,0)
\uput[r](12,12){$O$}
\psline(-1,3.333)(12,12)
\uput[l](-1,3.333){$\displaystyle\frac32$}
\psdots(9,10)(6,8)(3,6)(0,4)
\psset{framesep=0pt}
\uput[dr](9,10){\psframebox*{$(3,2)$}}
\uput[dr](6,8){\psframebox*{$(6,4)$}}
\uput[dr](3,6){\psframebox*{$(9,6)$}}
\uput[dr](0,4){\psframebox*{$(12,8)$}}
\psdots[dotstyle=o](12,12)
\end{pspicture}
\end{center}
\caption{Fractions as straight lines}\label{fig:grid}
\end{figure}
where ordered pairs of natural numbers are depicted as points in a
grid; then a fraction is the class of ordered pairs lying on a
particular straight line through the point $O$.   

A fraction may not literally be a natural number; but there are fractions that \emph{behave} like natural numbers:

\begin{theorem}\label{thm:N-in-Q+}
The function $x\mapsto x/1$ is an injection from $\N$ into $\Qp$; moreover,
\begin{align*}
\frac{x+y}1&=\frac x1+\frac y1,&				
\frac{x\cdot y}1&=\frac x1\cdot\frac y1,&
x<y&\iff\frac x1<\frac y1.
\end{align*} 
\end{theorem}

\begin{proof}
Immediate from the definitions.
\end{proof}

In a word, $x\mapsto x/1$ is an
\textbf{embedding}\index{embedding}\label{embedding} of $(\N,1,+,\cdot,<)$ in
$(\Qp,1/1,+,\cdot,<)$.  
We may therefore forget about the distinction between natural numbers and positive rational numbers: we may \emph{identify} a natural number $n$ with its image $n/1$
in $\Qp$.  By~\eqref{eqn:a/1/c/1}, there will be no ambiguity in writing fractions: a fraction of natural numbers as such will be the same as their fraction as positive rational numbers.

Using the idea in Figure~\ref{fig:grid}, we can arrange the positive
rational numbers along a semicircle, according to their ordering, as
in Figure~\ref{fig:Q+}~\eqref{item:circ}. 
\begin{figure}[ht]
\mbox{}\hfill
\begin{inparaenum}[(a)]
\item\label{item:circ}
\begin{pspicture}[](-4.5,-4.5)(0,0)
\psset{unit=1.5cm}
\psgrid[subgriddiv=1,gridlabels=0,griddots=12](0,0)(-3,-3)
\psarc(0,-1){1}{90}{270}
\uput[l](-1,-1){\psframebox*{$1$}}
\psline(-3,-2)(0,0)(-2,-3)
\psdots(-0.923,-0.615)(-0.923,-1.385)(-1,-1)
\uput[l](-0.923,-0.615){$3/2$}
\uput[l](-0.923,-1.385){$2/3$}
\psdots[dotstyle=o](0,0)
\end{pspicture}
\hfill
\item\label{item:line}
\begin{pspicture}[](-4.5,-4.5)(0,0)
\psset{unit=1.5cm}
\psgrid[subgriddiv=1,gridlabels=0,griddots=12](0,0)(-3,-3)
\psline(-3,-2)(0,0)(-2,-3)
\psline(-3,-1)(0,-1)
\psdots(-1.5,-1)(-0.667,-1)(-1,-1)
\uput[ul](-1.5,-1){$3/2$}
\uput[dl](-1,-1){$1$}
\uput[dr](-0.667,-1){$2/3$}
\psdots[dotstyle=o](0,0)
\end{pspicture}
\end{inparaenum}
\hfill\mbox{}
\caption{Positive rationals along a semicircle and a straight
  line}\label{fig:Q+} 
\end{figure}
It is more usual to arrange the positive rational numbers along a
straight line, as in 
Figure~\ref{fig:Q+}~\eqref{item:line}; the point of using a semicircle
is that here, if $k<m$, then $m/k$ lies directly above $k/m$. 
Indeed, in Figure~\ref{fig:geom},
\begin{figure}[ht]
\begin{center}
\begin{pspicture}(-1.5,-3)(0,0)
\psset{unit=1.5cm}
%\psgrid[subgriddiv=1,gridlabels=0](0,0)(-3,-3)
\psarc(0,-1){1}{90}{270}
\psline(-1,0)(0,0)(0,-2)
\psline(0,-2)(-0.923,-0.615)(0,0)
\psline(0,0)(-0.923,-1.385)(-0.923,-0.615)
%\psdots(-0.923,-0.615)(-0.923,-1.385)
\uput[r](0,0){$O$}
\uput[l](-1,0){$A$}
\uput[l](-0.923,-0.615){$B$}
\uput[r](0,-2){$C$}
\uput[l](-0.923,-1.385){$D$}
\end{pspicture}
\end{center}
\caption{Fractions are below their reciprocals}\label{fig:geom}
\end{figure}
since $BDCO$ is a semicircle, the angles $AOB$, $OCB$, and $ODB$ are
equal;  
if also $AOB$ and $COD$ are equal, then $COD$ and $ODB$ are equal, so
the straight lines $BD$ and $OC$ are parallel. 




\section{The integers}

We need only have $(\N,1,\cdot,<)$ as an ordered commutative monoid in order to carry out the following activities in the last section:\footnote{Clifford
  \cite[p.~309]{MR0100641} suggests that this observation is
  `essentially well-known', though it did not appear in general form
  in the literature until the works he cites as Tamari 1949, Alimov 1950, and Nakada 1951.} 
\begin{compactenum}[(1)]
\item
to define $\sim$ on $\N\times\N$, so as to define $\Qp$
as $(\N\times\N)/\mathord{\sim}$;
\item
to define multiplication and an ordering on $\Qp$;
\item
to embed $(\N,\cdot,<)$ in $(\Qp,\cdot,<)$;
\item
to obtain $(\Qp,1,{}\inv,\cdot,<)$ as an ordered abelian group.
\end{compactenum}
But $(\N,+,<)$ is also an ordered commutative semigroup, and it is `almost' a monoid.  With slight modifications to accommodate the lack of an additive inverse, we can carry out the listed activities using addition instead of multiplication, thus obtaining the integers.

In analogy
with~\eqref{eqn:sim}, let us define $\approx$ on $\N\times\N$ by 
\begin{equation}\label{eqn:approx}
(a,b)\approx(c,d)\iff a+d=b+c.
\end{equation}
Then we have a direct analogue of Theorem~\ref{thm:sim-eq}:

\begin{theorem}
The relation $\approx$ on $\N\times\N$ is an equivalence-relation.
\end{theorem}

In analogy with~\eqref{eqn:a/b}, we can define
\begin{equation}\label{eqn:n-m}
n-m=\{(x,y)\in\N\times\N\colon(n,m)\approx(x,y)\}.
\end{equation}
For the moment, this definition disagrees with the one given in
\S~\ref{sect:arith}, at~\eqref{eqn:diff}; ultimately, the two
definitions will be in harmony.  An equivalence-class as
in~\eqref{eqn:n-m} is just an \textbf{integer;}\index{integer} the set of 
all integers is 
\begin{equation*}
\Z.
\end{equation*}
As we have multiplication on $\Qp$ given in the last section
at~\eqref{eqn:Q}, so we 
have:

\begin{theorem}
On $\Z$, there are a well-defined operation of addition and a
well-defined relation $<$ given by 
\begin{align*}
(a-b)+(c-d)&=(a+c)-(b+d),&
(a-b)<(c-d)&\iff a+d<c+b.
\end{align*}
\end{theorem}

The integer $1-1$ is \textbf{zero,}\index{zero} denoted by
\begin{equation*}
  0.
\end{equation*}
Then
\begin{equation}\label{eqn:0}
0<n-m\iff m<n.
\end{equation}
In partial analogy with Theorem~\ref{thm:Q^+}, we have

\begin{theorem}\label{thm:Z-ocm}
$(\Z,0,+,<)$ is an ordered commutative monoid.
\end{theorem}

In analogy with Theorem~\ref{thm:sol-in-Q+}, we have

\begin{theorem}
There is a well-defined operation $x\mapsto-x$ on $\Z$ given by
\begin{equation*}
-(k-n)=n-k,
\end{equation*}
and $(\Z,0,-,+,<)$ is an ordered abelian group.
\end{theorem}

If $a$ and $b$ are in $\Z$, then the equation $a=b+X$ has the unique
solution $-b+a$, which is also denoted by 
\begin{equation*}
a-b.
\end{equation*}
If $k,\ell,m,n\in\N$, then
\begin{equation*}
(k-\ell)-(m-n)=(n+k)+(m+\ell).
\end{equation*}

The elements $a$ of $\Z$ such that $0<a$ are
\textbf{positive;}\index{positive} $a<0$, 
\textbf{negative.}\index{negative}  So $b$ is positive if and only if $-b$ is
negative; also $n-m$ is positive if and only if $m<n$, by~\eqref{eqn:0}.  Similarly, when considering the ordered abelian group
$(\Qp,1,{}\inv,\cdot)$, we may refer to those elements $a$ of $\Qp$
such that $1<a$ as positive, or more precisely
\textbf{multiplicatively positive.}\index{multiplicatively positive}

The embedding of $\N$ in $\Qp$ has no immediate analogue for $\Z$,
since $1$ is a multiplicative identity in $\N$, but there is no
additive identity.  However, if $k$ is an arbitrary element of $\N$,
then the same embedding of $\N$ in $\Qp$ can be defined as $n\mapsto
nk/k$.  In partial analogy with Theorem~\ref{thm:N-in-Q+}, we have

\begin{theorem}
  The function $x\mapsto (x+1)-1$ embeds $(\N,+,<)$ in $(\Z,+,<)$.  
 \end{theorem}

We may identify a natural number $n$ with its image $(n+1)-1$ in
$\Z$.  
What makes $(\Z,+,<)$ different from $(\Qp,\cdot,<)$ is the following.

\begin{theorem}\label{thm:NZ}
The positive elements of $(\Z,0,-,+,<)$ are just the elements of~$\N$.
\end{theorem}

\begin{proof}
As noted, every positive element of $\Z$ is $n-k$ for some $n$ and $k$ in $\N$ such that $k<n$.  Because $<$ is a natural ordering of $\N$, we have $k+m=n$ for some $m$ in $\N$, so $n-k=m$.  Conversely, if $m\in\N$, then $m=(m+1)-1$, and $1<m+1$, so $m$ is positive.
\end{proof}

In short, the ordered commutative semigroup $(\N,+,<)$ is the \textbf{positive part}\index{positive part} of the ordered abelian group $(\Z,0,-,+,<)$.
The elements of $\Z$ are usually depicted on a straight line extending
infinitely in both directions.  Alternatively, we can arrange them in
a circle, as in Figure~\ref{fig:Z}, 
\begin{figure}
\begin{center}
\begin{pspicture}(-1.5,-1.5)(1.5,1.5)
\psset{unit=1.5cm}
\pscircle(0,0){1}
\parametricplot[showpoints=true,plotpoints=11,plotstyle=dots]{-5}{5}{
t neg 2 mul t t mul 1 add div
t t mul 1 sub 1 t t mul add div}
\uput[d](0,-1){$0$}
\uput[l](-1,0){$1$}
\uput[r](1,0){$-1$}
\uput[143](-0.8,0.6){$2$}
\uput[37](0.8,0.6){$-2$}
\uput[127](-0.6,0.8){$3$}
\uput[53](0.6,0.8){$-3$}
%\uput[118](-0.471,0.882){$4$}
%\uput[62](0.471,0.882){$-4$}
\psdots[dotstyle=o](0,1)
\end{pspicture}
\end{center}
\caption{Integers on a circle}\label{fig:Z}
\end{figure}
where, if $0<n$, then $-n$ is directly to its right.  The left half of
the circle is the semicircle in
Figure~\ref{fig:Q+}~\eqref{item:circ}. 

Finally, we can define \textbf{multiplication}\index{multiplication} on $\Z$ as in school, by
\begin{align}\label{eqn:Z-.}
a\cdot0=0\cdot a&=0,&
-m\cdot -n&=m\cdot n,& -m\cdot n&=m\cdot -n=-(m\cdot n),
\end{align}
where $a\in\Z$ and $m$ and $n$ are in $\N$.

\begin{theorem}
$(\Z,1,+,\cdot)$ is a unital commutative semi-ring.
\end{theorem}

\begin{proof}
By Theorem~\ref{thm:Z-ocm}, it is enough to show that multiplication on $\Z$ has the identity $1$, is commutative and associative, and distributes over addition.  Commutativity on $\Z$ with identity $1$ follows immediately from commutativity on $\N$ with identity $1$, along with the definitions~\eqref{eqn:Z-.}.  Associativity follows from considering the several cases, such as 
\begin{equation*}
(x\cdot-y)\cdot-z=-(x\cdot y)\cdot-z=(x\cdot y)\cdot z=x\cdot(y\cdot z)=x\cdot(-y\cdot-z).
\end{equation*}
For distributivity, we have for example, if $-y+z=w>0$, then $z=w+y$, so $x\cdot z=x\cdot w+x\cdot y$, and therefore
\begin{equation*}
x\cdot(-y+z)=-(x\cdot y)+x\cdot z=x\cdot-y+x\cdot z.\qedhere
\end{equation*}
\end{proof}

Since also $(\Z,0,-,+)$ is an abelian group, $(\Z,0,1,-,+,\cdot)$ is a
\textbf{commutative ring.}\index{commutative ring}  Since also $\Z$ is
ordered so that the set 
of positive elements is closed under addition and multiplication,
$(\Z,0,1,-,+,\cdot,<)$ is an \textbf{ordered commutative
  ring.}\index{ordered commutative ring} 
It follows then that
\begin{equation*}
x\cdot y=0\lto x=0\lor y=0,
\end{equation*}
so $(\Z,0,1,-,+,\cdot)$ is an \textbf{integral
  domain.}\index{integral domain}

\section{The rational numbers}

By mimicking the contructions of $\Qp$ and $\Z$, we have two ways to define the \emph{rational numbers} (which can be positive, negative, or $0$):

\subsection{The field of fractions of differences}

Because the integers compose an integral domain, they embed in a
\textbf{quotient field}\index{quotient field} or \textbf{fraction
  field,}\index{fraction field} which is 
constructed almost as $\Qp$ is 
constructed from $\N$ in \S~\ref{sect:+rat}.  The difference is that
now the 
relation $\sim$ defined by~\eqref{eqn:sim} in that section
must be understood as a
relation on $\Z\times(\Z\setminus\{0\})$.  Still, $\sim$ is an
equivalence-relation, and the equivalence-class of $(m,n)$ is denoted
by $m/n$.  We define 
\begin{equation*}
  \Q=(\Z\times(\Z\setminus\{0\}))/\mathord{\sim};
\end{equation*}
the elements of this are the \textbf{rational numbers.}\index{rational numbers}
We obtain addition and multiplication as before, only now defined on $\Q$;
and we obtain multiplicative inversion as before, now defined on
$\Q\setminus\{0\}$.  There is additive inversion on $\Q$ also, namely $x/y\mapsto -x/y$.  Then
$(\Q,0,1,-,+,\cdot,<)$ is an \textbf{ordered field:}\index{ordered
  field} that is, it is an ordered commutative ring, and 
$(\Q\setminus\{0\},1,{}\inv,\cdot)$ is an abelian group. 

\subsection{The field of differences of fractions}

There is an alternative approach to defining $\Q$ that is better for
our purposes and is suggested by
Figures~\ref{fig:Q+}~\eqref{item:circ} and~\ref{fig:Z}. 
In obtaining the ordered abelian group $(\Z,0,-,+,<)$ from $(\N,+,<)$,
we need only that $(\N,+,<)$ is an ordered semigroup.  Thus, to obtain $(\Qp,1,{}\inv,\cdot,<)$ as an ordered abelian group, we need only that $(\N,\cdot,<)$ is an ordered semigroup.  The difference between the two ordered groups is that $(\N,+,<)$ is the positive part of $(\Z,0,-,+,<)$ by Theorem~\ref{thm:NZ}, but $(\N,\cdot,<)$ is not the positive part of $(\Qp,1,{}\inv,\cdot,<)$.  We have Theorem~\ref{thm:NZ}
%$(\N,+,<)$ is the positive part of $(\Z,0,-,+,<)$ 
simply because $(\N,+,<)$ is \emph{naturally} ordered.
In short, we have:\footnote{\emph{Porism} (\Gk{p'orisma}): I use the
  term to mean a corollary of an earlier \emph{proof.}}

\begin{porism}
Every naturally ordered commutative semigroup consists of the positive
elements of an ordered abelian group.  
\end{porism}

Once we have $(\Z,0,+,<)$ as an ordered abelian group whose positive part is $(\N,+,<)$, then in order to define multiplication and so obtain the ordered commutative ring $(\Z,0,1,-,+,\cdot,<)$, all we need is that
$(\N,1,+,\cdot)$ is a unital commutative
semi-ring.  That is, we have

\begin{porism}\label{porism}
Every naturally ordered unital commutative semi-ring consists of the
positive elements of an ordered commutative ring.
\end{porism}

Since $(\Qp,1,+,\cdot,<)$
%, like $(\N,1,+,\cdot,<)$, 
is a naturally
ordered unital commutative 
semi-ring by Theorem~\ref{thm:Q^+}, it determines $(\Q,0,1,-,+,\cdot,<)$ as an ordered
commutative ring.  We now consider $\Qp$ is a subset of $\Q$.
Since $(\Qp,1,{}\inv,\cdot)$ is a group, the operation
$x\mapsto x\inv$ can be extended to $\Q\setminus\{0\}$ by defining
\begin{equation*}
  x\inv=-(-x)\inv
\end{equation*}
when $x<0$.

\begin{theorem}
$(\Q,0,1,+,\cdot,<)$ is an ordered field.
\end{theorem}

\begin{proof}
It is an ordered commutative ring, and $(\Q\setminus\{0\},1,{}\inv,\cdot)$ is an abelian group.
\end{proof}

\subsection{Ordered fields}

On any ordered field, there is an operation $x\mapsto\abs x$, where
\begin{equation*}
  \abs a=
  \begin{cases}
    a,&\text{ if }a\geq0;\\
   -a,&\text{ if }a<0.
  \end{cases}
\end{equation*}
Here $\abs a$ is the \textbf{absolute value}\index{absolute
  value}\label{abs-val} of $a$.  An absolute 
value is always positive or zero.

\begin{theorem}\label{thm:Q-ord}
$\Q$ embeds uniquely in every ordered field.  
\end{theorem}

\begin{proof}
  Suppose $K$ is an ordered field.  Then $K$ contains an element $1$
  and has the singulary operation $x\mapsto x+1$ or $\succn$, so there
  is a unique homomorphism $h$ from $(\N,1,\succn)$
  to $(K,1,\succn)$.  By induction on $n$, if $m<n$ in $\N$,
  then $h(m)<h(n)$.  Therefore $h$ is injective.  Hence we can treat
  $\N$ as a subset of $K$, and then we can construct $\Q$ inside $K$. 
\end{proof}

An order is
\textbf{complete}\index{complete} if 
\begin{compactenum}[(1)]
\item
every nonempty subset with an upper bound has a
\emph{least} upper bound, and 
\item
every nonempty subset with a lower bound has a greatest lower bound.  
\end{compactenum}
If a subset does have a least upper bound,
then it is unique and is called the \textbf{supremum}\index{supremum} of the subset.
Likewise, a greatest lower bound is unique and is called an
\textbf{infimum.}\index{infimum}  Only half of the definition is needed, because of:

\begin{theorem}\label{thm:complete}
  If an order is such that every nonempty subset with an upper bound has a
  supremum, then the order is complete, and moreover the infimum of
  every nonempty subset with a lower bound is the supremum of the set
  of lower bounds. 
\end{theorem}

An order is \textbf{dense}\index{dense} if between any two distinct elements, there
is a third.  So every ordered field is dense, because 
\begin{equation*}
x<y\lto x<\frac{x+y}2<y.
\end{equation*}
However, we shall show that $\Q$ is not complete.

\begin{theorem}\label{thm:2}
  The equation
  \begin{equation}\label{eqn:2}
    x^2=2
  \end{equation}
has no solution in $\Q$.
\end{theorem}

\begin{proof}
We use the method of \textbf{infinite descent.}\index{infinite descent}
  Suppose there were a solution, $n/m$.  We may assume $m$ and $n$ are
  positive integers.  Then $n^2=2m^2$, so $n$ must be \emph{even:} say
  $n=2k$.  So $4k^2=2m^2$, hence $2k^2=m^2$.  Thus $m/k$ is also a
  solution to~\eqref{eqn:2}.  But $0<m<n$.  Thus there is no
  \emph{least} $n$ in $\N$ such that, for
  some $m$ in $\N$, $n/m$ solves~\eqref{eqn:2}.
  Therefore~\eqref{eqn:2} has no solution, by Theorem~\ref{thm:wo}.
\end{proof}

\begin{theorem}\label{thm:sqrt2}
  The set $\{x\in\Q\colon x^2<2\}$ has an upper bound in $\Q$, but no
  supremum.
\end{theorem}

\begin{proof}
  Call the set $A$.  It has $2$ as an upper bound.  Suppose $b$ is an
  upper bound.  We show:
  \begin{compactenum}[(1)]
  \item \label{part:2<b^2}
$2<b^2$;
\item\label{part:Ab}
$A$ has upper bounds less than $b$.
  \end{compactenum}
For~\eqref{part:2<b^2}, suppose $c\in\Q$ and $c^2\leq 2$.  We show $c$
is \emph{not} an 
upper bound of $A$ by finding some  positive $h$ in $\Q$ such that
$(c+h)^2<2$. 
For all $h$, we have
\begin{equation*}
  (c+h)^2=c^2+2ch+h^2=c^2+(2c+h)h.
\end{equation*}
We have $c^2<2$ by Theorem~\ref{thm:2}, and moreover $c<2$.
If also $0<h<1$, then $2c+h<5$, so
\begin{equation*}
  (c+h)^2<c^2+5h.
\end{equation*}
Thus, if we require also $h<(2-c^2)/5$, then $(c+h)^2<2$.  We can
certainly find such $h$; just let $h$ be the lesser of $1/2$ and
$(2-c^2)/6$.  Therefore
$c$ is not an upper bound of $A$.  This proves~\eqref{part:2<b^2}.

For~\eqref{part:Ab}, since $2$ is an upper bound for $A$, we may assume
$b\leq2$.  If $k>0$, then
\begin{equation*}
  (b-k)^2=b^2-2bk+k^2>b^2-2bk\geq b^2-4k.
\end{equation*}
Since $b^2>2$, we can require
$0<k<(b^2-2)/4$; then $(b-k)^2>2$, so $b-k$ is an upper bound
of $A$ that is less than $b$.
\end{proof}



\chapter{Construction of the real numbers}\label{ch:reals}

\section{Dedekind cuts}

As a consequence of Theorem~\ref{thm:sqrt2}, we can write $\Q$ as the
union of two 
nonempty disjoint sets $A$ and $B$, where
\begin{compactenum}[(1)]
\item 
each element of $A$ is less than each element of $B$;
\item
$A$ has no greatest element;
\item
$B$ has no least element.
\end{compactenum}
Indeed, just let $A=\{x\in\Q\colon x<0\lor x^2<2\}$, and
$B=\{x\in\Q\colon x>0\land x^2>2\}$.  See Figure~\ref{fig:cut}.
\begin{figure}[ht]
\begin{center}
  \begin{pspicture}(-5,-0.1)(5,0.5)
\psset{dotsize=3pt 3}
\psline{o->}(-1,0)(-5,0)
\psline{o->}(1,0)(5,0)
\uput[u](-3,0){$A$}
\uput[u](3,0){$B$}
  \end{pspicture}
  \end{center}
  \caption{A cut made by no point}\label{fig:cut}
\end{figure}
Here the pair $(A,B)$ is an example of a \emph{cut} in the sense of
Dedekind \cite[I, IV., pp.~12~f.]{MR0159773}.  Since $B$ can be
obtained from $A$ as $\Q\setminus A$, we may just refer to $A$ as a
cut.  To be precise then, we define a
\textbf{cut}\index{cut} of $\Q$ to be a nonempty proper subset $A$ of $\Q$ such
that 
\begin{compactenum}[(1)]
\item 
every element of $A$ is less than every element of $\Q\setminus A$,
\item\label{item:no-least}
$A$ has no greatest element.
\end{compactenum}
So a cut may be as in Figure~\ref{fig:cut} \emph{or}~\ref{fig:cut2}.
\begin{figure}[ht]
\begin{center}
  \begin{pspicture}(-5,-0.1)(5,0.5)
\psset{dotsize=3pt 3}
\psline{o->}(-1,0)(-5,0)
\psdot(1,0)
\psline{->}(1,0)(5,0)
\uput[u](-3,0){$A$}
\uput[u](3,0){$B$}
  \end{pspicture}
  \end{center}
  \caption{A cut made by a point}\label{fig:cut2}
\end{figure}
Note that condition~\ref{item:no-least} is somewhat arbitrary; one might alternatively require a supremum of $A$, if it exists, to belong to $A$.
We denote the set of cuts of $\Q$ by
\begin{equation*}
  \R.
\end{equation*}
That is, a cut of $\Q$ is precisely a \textbf{real number.}\index{real number}

Dedekind \cite[I]{MR0159773} observes that this construction of $\R$
results in the complete ordered field that we want.  Details are
worked out in Landau~\cite{MR12:397m}, and also in
 Spivak's \emph{Calculus} \cite[ch.~28]{Spivak-Calc}.
Spivak writes,
\begin{quote}
  The mass of drudgery which this chapter necessarily contains is
  relieved by one truly first-rate idea
\end{quote}
---namely, the idea of what Dedekind calls a cut.  My own view is
that, in mathematics, if you think something is drudgery, then perhaps
you are not looking at it the right way.

\section{Topology}\label{sect:top}

\subsection{Cuts}

In the interest of finding some insight in the construction of $\R$, I
note that the notion of a cut makes sense in 
any order.  
Suppose $A$ is an order.  More precisely, $(A,<)$ is the order; but I
shall no longer follow the practice in previous chapters of writing
out explicitly all of the operations and relations of a structure. 
If $b\in A$, let us define
\begin{equation*}
	\pred{b}=\{x\in A\colon x<b\};
\end{equation*}
this is the set of \textbf{predecessors}\index{predecessor} of $b$.
If $A$ is dense, then $b$ is the supremum of $\pred{b}$.
In any case, we have
\begin{equation*}
\pred{x}\cap \pred{y}=\pred{z},
\end{equation*}
where $z=\min(x,y)$.
We define a subset of $A$ to be \textbf{open}\index{open} if it is
either $A$ itself or a 
union 
\begin{equation*}
\bigcup\{\pred{x}\colon x\in Y\}, 
\end{equation*}
where $Y\included A$.  Note that $A=\bigcup\{\pred x\colon x\in A\}$ if and only if $A$ has no greatest element; and this is the case we shall be interested in.  In any case,
\begin{compactenum}[(1)]
  \item
the union of a family of open subsets of $A$ is open;
\item
the intersection of two open sets is open;
\item
$A$ itself is open.
\end{compactenum}
In a word, the open subsets of $A$ compose a \textbf{topology}\index{topology} on $A$.
The subsets $\pred b$ of $A$, together with $A$ itself,
are \textbf{basic}\index{basic} open subsets of $A$, because
every open subset of $A$ is the union of a family of such subsets, and moreover we have:

\begin{theorem}
If $X$ and $Y$ are open subsets of $A$, one of them is not $A$, and $b\in X\cap Y$, then there is $z$ in $A$ such that $b\in\pred z$ and $\pred z\included X\cap Y$.
\end{theorem}

\begin{proof}
We may assume that neither $X$ nor $Y$ is $A$.  Then there are $x$ and $y$ in $A$ such that $\pred x\included X$ and $\pred y\included Y$ and $b\in\pred x\cap\pred y$.  Now let $z=\min(x,y)$.
\end{proof}

\begin{theorem}\label{thm:comp-ord}
  The family of open subsets of an order is itself linearly ordered by
  proper inclusion. 
\end{theorem}

\begin{proof}
  Proper inclusion is automatically irreflexive and transitive.
To establish linearity, suppose
$X$ and $Y$ are distinct open subsets of $A$.  We may assume
$Y\setminus X$ has an element $b$.  Then 
\begin{equation*}
X\included \pred{b}\pincluded Y.\qedhere
\end{equation*}
\end{proof}

An open subset $X$ of $A$ is a \textbf{cut}\index{cut} of $A$ if, for some $b$
and $c$ in $A$,
\begin{equation*}
  \pred b\included X\included\pred c.
\end{equation*}
That is,
\begin{compactenum}[(1)]
  \item
$A$ is not a cut;
\item
$\emptyset$ is not a cut, unless $A$ has a least element;
\item
every other open subset of $A$ is a cut.
\end{compactenum}

\subsection{Completions}

Let us denote the set of all cuts of $A$ by
\begin{equation*}
\completion A.
\end{equation*}
An \textbf{embedding}\index{embedding} of $A$
in an order $B$ is an
injective function $f$ from $A$ to $B$ such that  
\begin{equation}\label{eqn:<to<}
x<y\iff f(x)<f(y).
\end{equation}
This is consistent with the usage on p.~\pageref{embedding} and later.  Since our orderings are linear, the reverse direction of~\eqref{eqn:<to<} is implied by the forward.

\begin{theorem}\label{thm:<-embed}
An order $A$ embeds in $\completion A$ under the map
$x\mapsto\pred{x}$.  The orders $A$ and $\completion A$ alike 
\begin{compactenum}[(1)]
 \item
have a
greatest element or not, 
\item
have a least element or not,
\item
are dense or not.
\end{compactenum}
\end{theorem}

\begin{proof}
If $x<y$, then $\pred{x}\pincluded\pred{y}$.  If $A$ has the greatest
element $b$, then $\pred b$ is the greatest element of $\completion
A$.  If on the other hand $b$ is not greatest, so that $b<c$ for some $c$, then $\pred b\pincluded\pred c$, so $\pred b$ is not greatest in $\completion A$.
Similarly for least elements.  Suppose $X\pincluded Y$ in
$\completion A$.  Then $X\included\pred b\pincluded Y$ for some $b$ as
in the proof of Theorem~\ref{thm:comp-ord}.  In particular, $\pred b$ is not the greatest basic open subset of $A$ that is included in $Y$, so
\begin{equation}\label{eqn:XbcY}
  X\included\pred b\pincluded \pred c\included Y
\end{equation}
for some $c$, where $b<c$.  If $A$ is dense, then $b<d<c$ for some
$d$, and then $X\pincluded\pred d\pincluded Y$.  If, on the contrary,
$A$ is not dense, then $A$ has elements $e$ and $f$ such that $e<f$,
but nothing lies between; then no element of $\completion A$ lies between $\pred e$ and
$\pred f$.
\end{proof}

\begin{comment}



We aim to show that $\completion A$ is complete.

\begin{lemma}
If $A$ is an order, and $\mathscr B$ is a subset of $\completion A$ such
that the subset 
\begin{equation*}
\{\pred x\colon \pred x\in\mathscr B\} 
\end{equation*}
of $\mathscr B$ has a
supremum, then this is also the supremum of $\mathscr B$. 
\end{lemma}

\begin{theorem}
If $A$ is an order, then $\completion A$ is complete; indeed, if
$\mathscr B$ and $\mathscr C$ are non-empty subsets of $\completion A$
with an upper and a lower bound respectively, then  
	\begin{align*}
	\sup(\mathscr B)&=\bigcup\mathscr B,&
\inf(\mathscr C)&=\bigcup\{\pred{x}\colon \pred
x\included\textstyle\bigcap \mathscr C\}. 
\end{align*}
\end{theorem}

\begin{proof}
Since $\bigcup\mathscr B$ is the union of a set of open subsets of
$A$, it is open too.  Let $X$ be a member of $\mathscr B$, and $Y$, an
upper bound of $\mathscr B$.  Then $X\included Y$, so 
\begin{equation*}
X\included\bigcup\mathscr B\included Y.
\end{equation*}
Thus $\bigcup\mathscr B=\sup(\mathscr B)$.  The other claim follows
from Theorem~\ref{thm:complete} and the lemma, since $\{\pred
x\colon\pred x\included\bigcap\mathscr C\}$ is the set of basic open
subsets that are lower bounds of $\mathscr C$. 
\end{proof}




\end{comment}

\begin{theorem}\label{thm:sup-B}
If $A$ is an order, then $\completion A$ is complete; indeed, if
$\mathscr B$ is a non-empty subset of $\completion A$
with an upper bound, then  
	\begin{equation}\label{eqn:sup-B}
	\sup(\mathscr B)=\bigcup\mathscr B.
\end{equation}
\end{theorem}

\begin{proof}
Since $\bigcup\mathscr B$ is the union of a set of open subsets of
$A$, it is open too.  Let $X$ be a member of $\mathscr B$, and $Y$, an
upper bound of $\mathscr B$.  Then $X\included Y$, so 
\begin{equation*}
X\included\bigcup\mathscr B\included Y.
\end{equation*}
Thus~\eqref{eqn:sup-B}.  Then $\completion A$ is complete by Theorem~\ref{thm:complete}.
\end{proof}

\begin{theorem}\label{thm:completions}
Suppose $f$ is an embedding of the ordered set $A$ in a complete
ordered set $B$.  Then there is an embedding $\completion f$ of
$\completion A$ in $B$ such that 
\begin{equation}\label{eqn:f-bar-x}
\completion f(\pred x)=f(x)
\end{equation}
for all $x$ in $A$.
\end{theorem}

\begin{proof}
Define $\completion f$ by
\begin{equation*}
\completion f(X)=\sup(\{f(y)\colon \pred y\included X\}).
\end{equation*}
Then in particular $\completion f(\pred x)=\sup(\{f(y)\colon y\leq x\})$, so~\eqref{eqn:f-bar-x} holds since $f$ is order-preserving.
We also have
\begin{equation*}
X\included Y\implies\completion f(X)\leq\completion f(Y).
\end{equation*}
Suppose $X\pincluded Y$ in $\completion A$.  As in the proof of Theorem~\ref{thm:<-embed}, for some $b$ and $c$ we have~\eqref{eqn:XbcY} and therefore
\begin{equation*}
\completion f(X)\leq\completion f(\pred b)=f(b)<f(c)=\completion f(\pred c)\leq\completion f(Y).\qedhere
\end{equation*}
\end{proof}

The situation of the theorem is shown in Figure~\ref{fig:completion}.
\begin{figure}[ht]
\begin{equation*}
\xymatrix{
A\ar[r]^{\operatorname{pred}}\ar[d]_f&\completion A\ar[dl]^{\completion f}\\
B&
}
\end{equation*}
\caption{Completion of an order}\label{fig:completion}
\end{figure}
Because of the theorem, $\completion A$ can be called a
\textbf{completion}\index{completion} of $A$ with respect to the embedding
$x\mapsto\pred x$.  Note that the function $\completion f$ may not be
unique; such a function could be defined also by (for example) 
\begin{equation*}
\completion f(X)=\inf\{f(y)\colon X\included\pred y\}.
\end{equation*}
But $\completion f$ is unique if $B$ is also a completion of $A$, by the next theorem.  First note that an \textbf{isomorphism}\index{isomorphism} is a surjective embedding, which implies that its inverse is also an embedding.  (This is consistent with the usage on p.~\pageref{isomorphism} and later.)

\begin{theorem}
Suppose $B$ is a completion of the ordered set $A$ with respect to an embedding $f$.  Then there is a unique embedding $\completion f$ of $\completion A$ in $B$ such that~\eqref{eqn:f-bar-x} holds.  Also, $\completion f$ is an isomorphism.
\end{theorem}

\begin{proof}
By Theorem~\ref{thm:completions}, there is \emph{some} such embedding $\completion f$.
By definition, there is an embedding $g$ of $B$ in $\completion A$ such that
\begin{equation*}
g\circ f(x)=\pred{x}.
\end{equation*}
Then by~\eqref{eqn:f-bar-x} we have 
\begin{equation*}
g\circ\completion f(\pred{x})=\pred{x}.  
\end{equation*}
We shall show that $g\circ\completion f$ is the identity on $\completion A$.   
Since $g$ is injective, it will follow that $\completion f$ is surjective; also
$\completion f=g\inv$, so $\completion f$ is uniquely determined.

Say $X\in \completion A$.  Then $g\circ\completion f(X)$ is an upper bound of $\{\pred y\colon \pred y\included X\}$, so by Theorem~\ref{thm:sup-B},
\begin{equation*}
X
=\bigcup\{\pred y\colon\pred y\included X\}
=\sup(\{\pred y\colon \pred y\included X\})\included g\circ\completion f(X).
\end{equation*}
To see the reverse inequality, say $X\pincluded Y$ in $\completion A$.
Then $X\included\pred b\pincluded Y$ for some $b$ in $A$, so that  
\begin{equation*}
g\circ\completion f(X)\included g\circ\completion f(\pred b)=\pred
b\pincluded Y. 
\end{equation*}
This shows $g\circ\completion f(X)\included X$.  Therefore $g\circ\completion f(X)=X$, as desired.
\end{proof}

We may now refer to $\completion A$ as \textbf{the completion}\index{the completion} of $A$.
Now we can define $\R$ as $\completion{\Q}$, the completion of
$\Q$---that is, the completion of $\Q$ considered solely as an order.

\section{Structure}

We want to make $\R$ into an ordered field so that the embedding of $\Q$
in $\R$ is an embedding of ordered fields.  Then $\R$ will be a
\textbf{complete ordered field:}\index{complete ordered field} an ordered field that, as an
order, is complete.

Let us denote by 
\begin{equation*}
\Qpp
\end{equation*}
the set of \textbf{improper fractions,}\index{improper
  fraction}\footnote{The \emph{Oxford 
    English Dictionary} \cite{OED}
  defines a proper fraction as `a fraction whose numerator is greater
  than (or equal to) its denominator', but quotes Robert Recorde from
  \emph{The ground of artes, teachyng the worke and practise of
    arithetike,} 1575 edition: `An Improper Fraction\dots a fraction
  in forme, which in dede is greater than an Unit.'  The point is
  presumably that, etymologically speaking, a fraction is something
  \emph{broken off} from something else; something greater than a
  unit cannot be broken off from a unit, so it is not properly a fraction.}  namely, those elements $x$
of $\Qp$ such that $1<x$.  Then $\Qpp$ is an archimedean naturally ordered 
commutative multiplicative semigroup and is the positive part of the
ordered multiplicative abelian group $\Qp$.  But $\Qp$ is moreover a
naturally ordered commutative semi-ring and is the positive part of the ordered field $\Q$.
The procession from $\Qpp$ to $\Qp$ to $\Q$ was suggested by
Figures~\ref{fig:Q+}~\eqref{item:circ} and~\ref{fig:Z}; we can finally
depict the whole thing as in Figure~\ref{fig:Q}.
\begin{figure}[ht]
\begin{center}
\begin{pspicture}(-3,-4)(3,4)
\psset{unit=2cm}
%\psarcn{>->}(0,0){1}{85}{95}
\pscircle(0,0){1}
\psdots[dotstyle=o](0,1)
\rput(-0.7,0){$\xymatrix{x\ar@{|->}[d]\\\displaystyle\frac1x}$}
\rput(0,0){$\xymatrix{x\ar@{|->}[r]& -x}$}
\psdots
(1,0)(0.8,0.6)(0.471,0.882)(0.246,0.969)
(-1,0)(-0.8,0.6)(-0.471,0.882)(-0.246,0.969)
(0,-1)(0.8,-0.6)(0.471,-0.882)(0.246,-0.969)
(0,-1)(-0.8,-0.6)(-0.471,-0.882)(-0.246,-0.969)
%\psdots[dotstyle=o](0,1)
\uput[l](-1,0){$1$}
\uput[d](0,-1){$0$} 
\uput[r](1,0){$-1$}
\uput[143](-0.8,0.6){$2$}
\uput[118](-0.471,0.882){$4$}
\uput[104](-0.246,0.969){$8$}
\uput[217](-0.8,-0.6){$\displaystyle\frac12$}
\uput[242](-0.471,-0.882){$\displaystyle\frac14$}
\uput[256](-0.246,-0.969){$\displaystyle\frac18$}
\uput[37](0.8,0.6){$-2$}
\uput[62](0.471,0.882){$-4$}
\uput[76](0.246,0.969){$-8$}
\uput[-37](0.8,-0.6){$-\displaystyle\frac12$}
\uput[-62](0.471,-0.882){$-\displaystyle\frac14$}
\uput[-76](0.246,-0.969){$-\displaystyle\frac18$}
\psset{linestyle=dotted}
\psarc{<->}(0,0){1.33}{90}{180}
\rput*(-0.92,0.92){$\Qpp$}
\psarc{<->}(0,0){1.67}{90}{270}
\rput*(-1.67,0){$\Qp$}
\psarc{<->}(0,0){2}{90}{450}
\rput*(0,-2){$\Q$}
\end{pspicture}
\end{center}
\caption[From improper fractions to rationals]{From $\Qpp$ to $\Qp$ to
  $\Q$}\label{fig:Q} 
\end{figure}
We shall show now:
\begin{compactenum}[(1)]
\item
$\completion{\Qpp}$ can be made into a naturally ordered commutative multiplicative semigroup;
\item
$\completion{\Qp}$ can be made into an ordered multiplicative abelian group, of which $\completion{\Qpp}$ is the positive part;
\item
$\completion{\Qp}$ can be made also into a naturally ordered additive semigroup, so that it is a naturally ordered unital commutative ring;
\item
$\completion{\Q}$ can be made into a field, of which $\completion{\Qp}$ is the positive part.
\end{compactenum}

We may relate our work to ancient mathematics by noting that
a naturally ordered commutative semigroup has characteristics of a set
of \emph{magnitudes}\index{magnitude} that have a \emph{ratio}\index{ratio} in the sense of Euclid (see
p.~\pageref{have-a-ratio}).  Similarly, naturally ordered unital
commutative semi-rings have characteristics of ratios themselves. 

\subsection{Ordered semigroups}\label{subsect:ord-semig}

We shall consider the completion of an arbitrary naturally ordered
commutative semigroup; this could be $\N$ as well as $\Qpp$.  A
difference between these two structures as orders is that, while
$\Qpp$ is dense, $\N$ is \emph{discrete.} Discreteness is a
topological notion. In addition to the topology used in \S~\ref{sect:top} for constructing the completion, an order has the \textbf{order topology,}\index{order
  topology} defined by 
taking the \textbf{open intervals}\index{open interval} as basic open
sets.  The open intervals are 
defined as in calculus: they have four possible forms,
\begin{align*}
&(-\infty,\infty),&&(-\infty,b),&&(a,\infty),&&(a,b),
\end{align*}
where $(-\infty,\infty)$ is the whole order, and
\begin{align*}
(-\infty,b)&=\{x\colon x<b\},&
(a,\infty)&=\{x\colon a<x\},&
(a,b)=(-\infty,b)\cap(a,\infty).
\end{align*}
Here possibly $b\leq a$, in which case $(a,b)$ is empty.  In any case,
the open interval $(a,b)$ is completely different from the ordered
pair $(a,b)$.  An element $b$ of an order is
\textbf{isolated}\index{isolated} if $\{b\}$ is an open interval. 

\begin{theorem}
In a naturally ordered commutative semigroup, the following are equivalent:
\begin{compactenum}[(1)]
\item
there is an isolated element;
\item
there is a least element;
\item
every element is isolated.
\end{compactenum}
\end{theorem}

\begin{proof}
Suppose $b$ is isolated.  Then $b$ is the greatest element of some open interval $(-\infty,c)$.  In particular, $b<c$; but then $c-b$ is the least element of the order.

Suppose $d$ is a least element of the order.  Then $(-\infty,d+d)=\{d\}$, and if $d<b$, then $(b-d,b+d)=\{b\}$.
\end{proof}

An order in which every element is isolated is called \textbf{discrete.}\index{discrete}

\begin{theorem}\label{thm:Z-complete}
$\Z$ is complete, and every complete discrete ordered abelian group is
  isomorphic to it. 
\end{theorem}

\begin{proof}
It is enough to prove the corresponding claim about $\N$.
If $X$ is a subset of $\N$ with an upper bound, then $X$ has a least
upper bound because $\N$ is well-ordered by Theorem~\ref{thm:wo}; so
$\N$ is complete.  Suppose $(A,+,<)$ is a naturally ordered commutative
semigroup with least element $1$.  By recursion, there is a
homomorphism $h$ from $(\N,1,\succn)$ to $(A,1,\succn)$.  By induction, $h$ is a \emph{homomorphism}\index{homomorphism} from $(\N,+)$ to $(A,+)$, that is, 
\begin{equation*}
h(m+n)=h(m)+h(n);
\end{equation*}
for, this equation holds immediately when $n=1$, and if it holds when $n=k$, then $h(m+k+1)=h(m+k)+1=h(m)+h(k)+1=h(m)+h(k+1)$.
Moreover,
$h$ preserves the ordering.  Indeed, if $k<n$, then $k+m=n$ for some
$m$, and therefore 
\begin{equation*}
h(k)<h(k)+h(m)=h(k+m)=h(n),
\end{equation*}
since $(A,+,<)$ is naturally ordered.
In particular, $h$ is injective;
we may assume it is an inclusion.  

Suppose $b\in A$ and $b$ is less than some element of $\N$.  If $n$ is the \emph{least} element of $\N$ that is greater than $b$, then $b=n-1$; in particular, $b\in\N$.
Suppose that there is some $c$ in $A\setminus\N$.  Then $c$ is an upper bound for $\N$, but not a least upper bound, since $c-1$ is also an upper bound.
Therefore $(A,<)$ is not complete.  Contrapositively, if it is complete, then $(A,+,<)$ is isomorphic to $(\N,+,<)$. 
\end{proof}

There are discrete ordered abelian groups that are not
isomorphic to $\Z$.  One example is $\Z\times\Z$ 
with the \textbf{left lexicographic ordering,}\index{left
  lexicographic ordering} so that
\begin{equation*}
  (a,b)<(c,d)\iff (a<c\lor(a=c\land b<d)).
\end{equation*}
Written in order, the positive elements are
\begin{equation*}
 (0,1),(0,2),(0,3), \dots,
 (1,-1), (1,0), (1,1), \dots;
\end{equation*}
these compose the naturally ordered semigroup $(\{0\}\times\N)\cup(\N\times\Z)$.  This and $\Z\times\Z$ are not complete.
Indeed, the subset
$\{0\}\times\N$ has an upper bound, but no supremum.  Moreover, by
Theorem~\ref{thm:Z-complete}, the completion $\completion{\Z\times\Z}$ cannot be
an ordered abelian group in such a way that $x\mapsto\pred x$ is an embedding of groups. 

The problem with the example is that it is not \emph{archimedean.}  An
ordered abelian group is \textbf{archimedean}\index{archimedean} if for all positive
elements $a$ and $b$, there is $n$ in $\N$ such that $b\leq na$.   
The same definition holds for an ordered commutative semigroup,
provided all elements are considered as positive. 
Compare this definition with the Archimedean Axiom on
p.~\pageref{Arch-ax}.  From Theorem~\ref{thm:Z-complete} we
have:\footnote{Compare Huntington \cite{MR1500598,MR1500599}, as 
  quoted by Clifford 
  \cite{MR0100641}:  `Let $S$ be a cancellative, naturally ordered
  semigroup without identity element and having a least element.  If
  $S$ is archimedean, then it is complete, and is isomorphic with $Z$
  [that is, $\N$].'} 

\begin{porism}\label{por:arch}
No non-archimedean ordered abelian group is complete.  Every discrete
archimedean ordered abelian group is isomorphic to $\Z$ and is
therefore complete. 
\end{porism}

The semigroups $\Qpp$ and $\Qp$ are archimedean, but not discrete.  We have to show how to extend multiplication and addition respectively to the completions.

Suppose $A$ is an arbitrary an
ordered commutative additive semigroup.  We want to define an addition on $\completion A$ this becomes a semigroup and $x\mapsto\pred x$ is an embedding of semigroups.  The latter condition is just
\begin{equation}\label{eqn:predx+y}
\pred x+\pred y=\pred{x+y}.
\end{equation}
By the porism, we cannot hope that $\completion A$ will always be an \emph{ordered} semigroup.  However, we can aim for something weaker, namely that $\completion A$ is a semigroup, and
\begin{equation}\label{eqn:leq}
X\included Y\iff X+Z\included Y+Z.
\end{equation}
In particular, suppose $\pred x\included X\included\pred{x'}$ and $\pred y\included Y\included\pred{y'}$; then we want
\begin{equation*}
\pred{x+y}\included X+Y\included\pred{x'+y'}.
\end{equation*}
One way to achieve this will be to define addition on $\completion A$ by
\begin{equation}\label{eqn:comp+def}
X+Y=\bigcup\{\pred{x+y}\colon \pred x\included X\land\pred y\included Y\}.
\end{equation}
Another possibility is
\begin{equation}\label{eqn:comp+'def}
X+'Y=\inf\{\pred{x'+y'}\colon X\included\pred{x'}\land Y\included\pred{y'}\};
\end{equation}
however, we shall use~\eqref{eqn:comp+def} as our official definition of addition on the completion of an ordered semigroup.

\begin{theorem}\label{thm:sg-compn}
The completion of an ordered commutative semigroup is a commutative semigroup on which~\eqref{eqn:predx+y} and~\eqref{eqn:leq} hold.
\end{theorem}

\begin{proof}
Let the ordered commutative semigroup be $A$.
Immediately from~\eqref{eqn:comp+def}, on $\completion A$ we have~\eqref{eqn:predx+y} and
\begin{equation*}
X+Y=Y+X.
\end{equation*}
Also, if $\pred x\included X$ and $\pred y\included Y$, then by
definition, 
\begin{equation*} 
\pred{x+y}\included X+Y.  
\end{equation*}
Conversely, suppose $\pred u\included X+Y$.  Then 
for some $x$ and $y$ such that $\pred x\included X$ and $\pred
y\included Y$, we have $\pred u\included\pred{x+y}$, that is, $u\leq
x+y$.  In this case, $u+z\leq (x+y)+z$, so
$\pred{u+z}\included\pred{(x+y)+z}$.  Therefore 
\begin{align*}
&\phantom{{}={}}(X+Y)+Z\\
&=\bigcup\{\pred{u+z}\colon\pred u\included X+Y\land\pred z\included Z\}\\
&=\bigcup\{\pred{(x+y)+z}\colon\pred x\included X\land\pred y\included Y\land\pred z\included Z\}\\
&=\bigcup\{\pred{x+(y+z)}\colon\pred x\included X\land\pred y\included Y\land\pred z\included Z\}\\
&=\bigcup\{\pred{x+v}\colon\pred x\included X\land\pred v\included Y+Z\}\\
&=X+(Y+Z).
\end{align*}
Thus $\completion A$ is a commutative semigroup.  The forward direction
of~\eqref{eqn:leq} follows directly from~\eqref{eqn:comp+def},
and the converse is by linearity of the ordering. 
\end{proof}

We can complete the left-lexicographically ordered group $\Z\times\Z$ by inserting elements $(n,\infty)$, where
$n\in\Z$ and 
\begin{equation*}
(n,x)<(n,\infty)<(n+1,x).
\end{equation*}
Then
\begin{equation*}
  (m,x)+(n,\infty)=(m+n,\infty).
\end{equation*}
In particular,
 $(0,1)<(0,2)$, but $(0,1)+(0,\infty)=(0,\infty)=(0,2)+(0,\infty)$; so $\Z\times\Z$ is not an \emph{ordered} semigroup.  Also, using the definition~\eqref{eqn:comp+'def}, we have
\begin{equation*}
  (m,x)+'(n,\infty)=
\begin{cases}
  (m+n,\infty),&\text{ if }x\in\Z;\\
  (m+n+1,\infty),&\text{ if }x=\infty;
  \end{cases}
\end{equation*}
so $+$ and $+'$ are different.
 

\begin{theorem}\label{thm:arch-sg-comp}
The completion of an archimedean naturally ordered commutative
semigroup is an archimedean naturally ordered commutative semigroup. 
\end{theorem}

\begin{proof}
First, given arbitrary elements $X$ and $Y$ of the completion, we show $X\pincluded X+Y$.  To this end, we can find $y$ so that $\pred y\included X\cap Y$, and $z$ so that $X\included\pred z$.  Then there is $n$ in $\N$ such that $z\leq  ny$.  Let $k$ be the least $n$ such that $\pred{ny}\included X$.  Then $\pred{ky+y}\not\included X$, but $\pred{ky+y}\included X+Y$.

Next, given elements $X$ and $Z$ of the completion such that $X\pincluded Z$, define
\begin{equation*}
Y=\bigcup\{\pred y\colon\Forall x(\pred x\included X\lto\pred{x+y}\included Z)\}.
\end{equation*}
Immediately $X+Y\included Z$.  To prove $Z\included X+Y$, it is enough to show
\begin{equation*}
\pred z\pincluded Z\implies\pred z\pincluded X+Y.
\end{equation*}
Indeed, if $X+Y\pincluded Z'$, then $Z'\setminus(X+Y)$ contains some $w$, and then
\begin{equation*}
X+Y\included\pred w\pincluded Z'.
\end{equation*}
So we assume $\pred z\pincluded Z$.  To show $\pred z\pincluded X+Y$,
it is enough to find $u$ such that 
\begin{compactenum}[(1)]
\item
$\pred u\pincluded X$;
\item
$\pred{z-u}\included Y$.  
\end{compactenum}

The first condition requires $X$ to be nonempty.  However, suppose $X$
is empty.  Then the original naturally ordered semigroup has a least
element: call this $1$.  Then $X=\pred 1$ and 
\begin{equation*}
Y=\bigcup\{\pred y\colon\pred{1+y}\included Z\}.
\end{equation*}
Since $Z$ is not all of $A$, there is $v$ such that $Z\included\pred
v$, and then, by the archimedean property, there is $k$ in $\N$ such that $v\leq k\cdot1$.  If $n$
is the least $k$ such that $Z\included\pred{k\cdot 1}$, then
$Z=\pred{n\cdot 1}$, so $Y=\pred{(n-1)\cdot1}$ and $X+Y=Z$. 
We may now assume that $X$ is not empty.

The second condition requires $u<z$, so that $z-u$ is defined.  This
is impossible if $z$ is the least element of $A$.  But in this case,
$z\in X$ (since this is nonempty), so $\pred z\pincluded X+Y$.  We may
now assume that $z$ is not the least element of $A$. 

By definition of $Y$, the second condition now means
\begin{equation*}
\pred x\included X\implies\pred{z+x-u}\included Z.  
\end{equation*}
Loosely, $u$ must be closer to the top of $X$ than $z$ is to the top
of $Z$.  Using the archimedean property, we can achieve this.   

To do so, note first that there is $w$ such that $\pred
z\pincluded\pred w\included Z$; and there is $v$ such that
$X\included\pred v$.  Then there is $k$ in $\N$ such that $v\leq
k(w-z)$ and hence  
\begin{equation*}
X\included\pred{k(w-z)}.  
\end{equation*}
Let $n$ be the \emph{least} $k$ such that this inclusion holds.

If $n=1$, let $u$ be an arbitrary element of $X$ such that $u<z$.  If
$\pred x\included X$, then  
\begin{align*}
x&\leq w-z,&z+x&\leq w,&z+x-u&\leq w,
\end{align*}
 and hence $\pred{z+x-u}\included Z$.
 
Suppose now $n>1$.  Let $u=(n-1)(w-z)$.  If $\pred x\included X$, then 
\begin{align*}
x&\leq n(w-z),&z+x-u&\leq z+(w-z)= w,
\end{align*}
and again $\pred{z+x-u}\included Z$.  Therefore in all cases $X+Y=Z$.  
Thus the completion is naturally ordered as a commutative semigroup.

This ordered commutative semigroup is archimedean, because if it contains $X$ and $Y$, then it contains some $\pred x$ and $\pred y$ such that $\pred x\included X$ and $Y\included\pred y$; then for some $n$ in $\N$ we have $y\leq nx$, so
\begin{equation*}
Y\included\pred y\included\pred{nx}\included nX.\qedhere
\end{equation*}
\end{proof}

\begin{theorem}\label{thm:usg}
If $A$ is an archimedean ordered abelian group, there is only one way to make $\completion A$ a semigroup so that~\eqref{eqn:leq} holds and $x\mapsto\pred x$ is an embedding of semigroups.
\end{theorem}

\begin{proof}
The official definition~\eqref{eqn:comp+def} of $X+Y$ in $\completion A$ is the least possible.  Therefore, supposing $X+Y\pincluded Z$, we need only find $x'$ and $y'$ in $A$ such that $X\included\pred{x'}$ and $Y\included\pred{y'}$, but
\begin{equation*}
\pred{x'+y'}\pincluded Z.
\end{equation*}
There are $w$ and $z$ in $A$ such that
\begin{equation*}
X+Y\included\pred w\pincluded\pred z\included Z.
\end{equation*}
We may assume $A$ is dense.  Then there are positive $u$ and $v$ in $A$ such that $u+v<z-w$.
By the archimedean property, there are $m$ and $n$ in $\Z$ such that
\begin{align*}
	\pred{mu}&\pincluded X\included\pred{(m+1)u},&
	\pred{nv}&\pincluded Y\included\pred{(n+1)v}.	
\end{align*}
Let $x'=(m+1)u$ and $y'=(n+1)v$.  Since
\begin{equation*}
\pred{mu+nv}\pincluded X+Y\included\pred w,
\end{equation*}
we have
\begin{equation*}
\pred{x'+y'}\included\pred{w+u+v}\pincluded\pred z\included Z.\qedhere
\end{equation*}
\end{proof}

Suppose $S$ is the positive part of an archimedean ordered abelian group $G$.  Then $\completion S$ is the positive part of some ordered abelian group.  We want to show that this ordered group is isomorphic to $\completion G$.
To this end, we note that,
for every order $A$, there is an \textbf{opposite order,}\index{opposite
  order} $\opp A$: this
means $x<y$ in $\opp A$ if and only if $y<x$ in $A$. 

\begin{lemma}
Let $f$ be the embedding $x\mapsto\pred x$ of an order $A$ in the completion $\completion A$.  Then $\opp{\completion A}$ is a completion of $\opp A$ with respect to $f$.
\end{lemma}

\begin{proof}
All of the relevant definitions are symmetric in the sense that they are equivalent if $<$ is replaced with $>$ throughout.
In particular, the order
$\opp{\completion A}$ is complete, and $f$ embeds $\opp A$ in this, and then the claim follows.
\end{proof}

\begin{lemma}
If $A$ and $B$ are orders, and every element of $A$ is less than every element of $B$, then there is an isomorphism from $\completion{A\cup B}$ to $\completion A\cup\completion B$,
where, in the latter, every element of $\completion A$ is less than every element of $\completion B$.  The isomorphism is
\begin{equation*}
X\mapsto\begin{cases}
X,&\text{ if }X\pincluded A,\\
B\cap X,&\text{ if }A\included X.
\end{cases}
\end{equation*}
\end{lemma}

\begin{proof}
The given function is well-defined, since
$A$ is an open subset of $A\cup B$, and also, for every element $x$ of $B$, the predecessors of $x$ in $B$ are just the predecessors of $x$ in $A\cup B$ that are actually in $B$.  Then the function is order-preserving and bijective.
\end{proof}

\begin{theorem}\label{thm:sg-g-comp}
  Let $G$ be an archimedean ordered abelian group with positive part
  $S$.  Then $\completion G$ is an archimedean ordered abelian group, and the induced embedding of $\completion S$ in $\completion G$ is an isomorphism of $\completion S$ with the positive part of $\completion G$.
\end{theorem}

\begin{proof}
We can understand $G$ as the disjoint union 
$-S\cup\{0\}\cup S$,
where 
\begin{equation*}
-S=\{-x\colon x\in S\}.
\end{equation*}  
By the last lemma, $\completion G$ as an order can be considered as the disjoint union 
\begin{equation*}
\completion{-S}\cup\{\emptyset\}\cup\completion S.
\end{equation*}
Here both $S$ and $-S$ are ordered commutative semigroups, so $\completion S$ and $\completion{-S}$ are commutative semigroups as in Theorem~\ref{thm:sg-compn}; moreover, $\completion S$ is a naturally ordered commutative semigroup, by Theorem~\ref{thm:arch-sg-comp}.
The map $x\mapsto-x$ is an
isomorphism of the ordered semigroups $\opp S$ and $-S$.  
By this and the next-to-last lemma, there is an order isomorphism from $\completion S$ to $\opp{\completion{-S}}$ that takes $\{x\colon x<a\}$ to $\{y\colon y<-a\}$.  Then we can make $\completion G$ into a group of which $\completion S$ is the positive part, and moreover $x\mapsto\pred x$ is an embedding of $G$ in $\completion G$ as groups.  By Theorem~\ref{thm:usg}, the group-structure on $G$ must be the semigroup-structure given by Theorem~\ref{thm:sg-compn}
\end{proof}

\subsection{Naturally ordered semi-rings}\label{subsect:nosr}

\begin{theorem}\label{thm:sr-comp}
  The completion of a naturally ordered commutative semi-ring is a commutative semi-ring.
\end{theorem}

\begin{proof} 
If $A$ is a naturally ordered commutative semi-ring, then on
$\completion A$ we have, as in the proof of Theorem~\ref{thm:sg-compn},
\begin{align}\notag
&\phantom{{}={}}X\cdot(Y+Z)\\\notag
&=\bigcup\{\pred{x\cdot w}\colon\pred x\included X\land\pred
  w\included Y+Z\}\\\notag 
&=\bigcup\{\pred{x\cdot(y+z)}\colon\pred x\included X\land\pred
  y\included Y\land \pred z\included Z\}\\\notag
&=\bigcup\{\pred{x\cdot y+x\cdot z}\colon\pred x\included X\land\pred
  y\included Y\land \pred z\included Z\}\\\label{eqn:xx'}
&\begin{aligned}[t]=\bigcup\{\pred{x\cdot y+x'\cdot z}\colon\pred
   x&\included X\land\pred y\included Y\\
&\land \pred{x'}\included X\land\pred z\included Z\}
\end{aligned}\\\notag
&=\bigcup\{\pred{u+v}\colon\pred u\included X\cdot Y\land\pred
   v\included X\cdot Z\}\\\notag
&=X\cdot Y+X\cdot Z.
\end{align}
Indeed,~\eqref{eqn:xx'} is justified by noting 
\begin{equation*}
x\cdot y+x'\cdot z\leq\max(x,x')\cdot y+\max(x,x')\cdot z.\qedhere
\end{equation*}
\end{proof}

Now we have what was described at the beginning of the section:

\begin{theorem}\label{thm:R}
$\R$ is a complete ordered field.
\end{theorem}

\begin{proof}
Because $\Qp$ is an archimedean naturally ordered commutative semigroup and, as such, is the positive part of $\Q$, also $\completion{\Qp}$ is an archimedean  naturally ordered commutative semigroup by Theorem~\ref{thm:arch-sg-comp}; we can consider it as the positive part of $\completion Q$, by Theorem~\ref{thm:sg-g-comp}.
Because $\Qp$ is an archimedean ordered abelian multiplicative group, so is $\completion{\Qp}$, by Theorem~\ref{thm:sg-g-comp}.
Because $\Qp$ is a naturally ordered commutative semi-ring, so is $\completion{\Qp}$, by  Theorem~\ref{thm:sr-comp}; it is unital, because it is a multiplicative group.
Then the multiplication on this extends to $\completion{\Q}$, making this an ordered commutative ring, by Porism~\ref{porism}.  Since $\completion{\Qp}$ is a multiplicative group, $\completion{\Q}$ must be a field.
\end{proof}

We may denote by 
\begin{align*}
&\Rp,&&\Rpp,
\end{align*}
the subsets $\{x\colon 0<x\}$ and $\{x\colon 1<x\}$ of $\R$,
respectively; we can identify these subsets with $\completion{\Qp}$ and
$\completion{\Qpp}$.  Say $b\in\Rpp$.  By recursion, we have a homomorphism $x\mapsto b^x$ of ordered
semigroups from $\N$ to $\Rpp$ 
given by 
\begin{align*}
				b^1&=b,& b^{n+1}&=b^n\cdot b.
\end{align*}
This extends uniquely to a homomorphism of ordered abelian groups from $\Z$ to $\Rp$, where
\begin{equation*}
b^{-x}=(b^x)\inv.
\end{equation*}
We can extend further, to an isomorphism of ordered abelian groups
from $\R$ to $\Rp$, by Theorem~\ref{thm:AA1} below.

A commutative group is \textbf{divisible}\index{divisible} if for every element $a$
and every $n$ in $\Z$ there is a solution of the equation
\begin{equation*}
  nx=a
\end{equation*}
in the group.

\begin{lemma}
   Every complete dense ordered abelian group is
   divisible. 
\end{lemma}

\begin{proof}
Let $A$ be such a group, $b\in A$, and $n\in\Z$.  It is enough to suppose $b>0$ and $n\in N$. 
By density, there are elements $a_k$ of $A$ such that
\begin{equation*}
  0=a_0<a_1<\cdots<a_{n-1}<a_n=b.
\end{equation*}
Let $a$ be the least of the differences $a_k-a_{k-1}$.  Then $na\leq b$.
Therefore the set $\{x\in A\colon nx\leq b\}$ contains $a$; it also
has $b$ as an upper bound; so it has a supremum, $c$.  Then $nc=b$.
Indeed, if $nc'<b$, then for some $x_k$ we have
\begin{equation*}
  nc'=x_0<x_1<\cdots<x_{n-1}<x_n=b;
\end{equation*}
if $d$ is the least of the $x_k-x_{k-1}$, then $n(c'+d)\leq b$, and
therefore $c'<c'+d\leq c$.  Similarly, if $b<nc''$, then $c<c''$.
\end{proof}

\begin{theorem}[H\"older]\label{thm:AA1}\index{H\"older's Theorem}
If $A$ is a complete dense ordered abelian group,
and $b$ is a positive element of $A$, then there is a unique embedding of ordered abelian
groups from $\R$ to $A$
that takes $1$ to $b$; and this embedding is an isomorphism.
\end{theorem}

\begin{proof}
It is enough to find a unique embedding of $\Rp$ in the positive part $A^+$ of $A$, and then to show that this embedding is an isomorphism.\footnote{Compare H\"older
  \cite{Hoelder,MR1423724,MR1609942} as quoted by 
  Clifford \cite{MR0100641}: `Let $S$ be a cancellative, naturally ordered
  semigroup without identity element and without a least element.  (A)
  $S$ is isomorphic with $P$ [namely $\R^+$] if and only if it is
  complete.  (B) $S$ can be embedded in $P$ if and only if it is
  archimedean.'}  
Let $\phi$ be the embedding of $\N$ in $A^+$
that takes $1$ to $b$.
If $m/n=m'/n'$ in $\Q^+$, then $mn'=m'n$, so in $A^+$,
\begin{equation*}
nx=mb\iff mn'nx=m'nmb\iff n'x=m'b.
\end{equation*}
Therefore we can define $\phi$ on $\Q^+$ by letting $\phi(m/n)$ be the unique solution of $nx=mb$.  Then $\phi$ is the unique embedding of $\Q^+$ in $A^+$ that takes $1$ to $b$.

We show now that $A^+$ is the completion of the image of $\Q^+$ under $\phi$.
If $c\in A^+$, let 
\begin{equation*}
c'=\sup(\{\phi(x)\colon\phi(x)\leq c\}).  
\end{equation*}
Then $c'=c$.  
Indeed, immediately $c'\leq c$.  Suppose $d<c$.  Since $A^+$ is archimedean by Porism~\ref{por:arch}, for some $n$ in $\N$ we have $b<n(c-d)$, so $nd+b<nc$.  If $m$ is the least $k$ in $\N$ such that $nc<kb$, then
\begin{gather*}
nd<(m-1)b\leq nc,\\
d<\phi\Bigl(\frac{m-1}n\Bigr)\leq c,
\end{gather*}
so $d<c'$.  Therefore $c'=c$.
This shows that $A^+$ is the completion of $\phi[\Qp]$.  Therefore $\phi$
extends to an isomorphism from $\Rp$ to $A^+$ by
Theorem~\ref{thm:completions}. 
\end{proof}

Hence, for any choice of $b$ in $\Rpp$, we have the isomorphism $x\mapsto b^x$
 of ordered abelian groups from $\R$ to $\Rp$.

\begin{theorem}\label{thm:R-unique}
The ordered field $\R$ embeds uniquely in every complete ordered field, and this embedding is an isomorphism.
\end{theorem}

\begin{proof}
Let $K$ be a complete ordered field.
By Theorem~\ref{thm:AA1}, there is an embedding $\phi$ of ordered
abelian groups from $\R$ to $K$ that takes $1$ to $1$, and this is an
isomorphism.  But the ring-structure on $\Q$ is uniquely determined by
the group-structure.  Also, by Theorem~\ref{thm:usg}, the
group-structure on $\Rp$ is uniquely determined by the group-structure
on $\Qp$; and then the field-structure on $\R$ is determined by the
additive homomorphism $x\mapsto-x$ on $\Rp$.  Therefore $\phi$ must be
a field-isomorphism. 
\end{proof}

Henceforth we may say $\R$ is \textbf{the complete ordered
  field.}\index{the complete ordered field}   

\section{Sequences}\label{sect:seq}

Another way to construct $\R$ is by means of \emph{Cauchy sequences.}   
First of all, a sequence $(a_n\colon n\in\N)$
\textbf{converges}\index{converges} to
the real number 
$b$ if, for all positive real numbers $\epsilon$, there is a natural
number $M$ such that, for all $n$ in $\N$, if $n\geq M$, then
\begin{equation*}
  \abs{a_n-b}<\epsilon.
\end{equation*}
In this case, we write
\begin{equation*}
  \lim_{n\to\infty}a_n=b,
\end{equation*}
saying $b$ is the \textbf{limit}\index{limit} of the sequence.  If we
denote the sequence $(a_n\colon n\in\N)$ by the single letter $a$,
then we may write simply 
\begin{equation*}
\lim(a)=b.
\end{equation*}

\begin{theorem}\label{thm:bm}
  A bounded monotone sequence in $\R$ converges.
\end{theorem}

\begin{proof}
  Let $a$ be a bounded increasing sequence, and let
  $b=\sup(a)$.  Suppose $\epsilon>0$.  Then
  $b-\epsilon$ is not an upper bound of $a$, so for
  some $M$ in $\N$, we have
  \begin{equation*}
    b-\epsilon<a_M\leq b.
  \end{equation*}
Since the sequence is increasing, if $n\geq M$, we have
  \begin{equation*}
    b-\epsilon<a_M\leq a_n\leq b,
  \end{equation*}
and therefore
\begin{equation*}
  \abs{a_n-b}=b-a_n<\epsilon.
\end{equation*}
Thus $a$ converges to $b$.  Similarly, bounded
decreasing sequences converge.
\end{proof}

  A sequence $a$ of
real numbers is a \textbf{Cauchy sequence}\index{Cauchy sequence} if, for every positive real
number $\epsilon$, there is a natural number $M$ such that, for all
$m$ and $n$ in $\N$, if $m\geq M$ and $n\geq M$, then
\begin{equation*}
  \abs{a_m-a_n}<\epsilon.
\end{equation*}
For example, let sequences $p$ and $q$ be defined recursively\footnote{Strictly, we are defining $((p_n,q_n)\colon n\in\N)$ recursively.}  by
\begin{align*}
  p_1&=1,&
p_{n+1}&=p_n+2q_n,\\
q_1&=1,
&q_{n+1}&=p_n+q_n.
\end{align*}
Let $a_n=p_n/q_n$.  Then
\begin{equation*}
  a=
\Bigl(1,\frac32,\frac75,\frac{17}{12},\frac{41}{29},\dots\Bigr). 
\end{equation*}
It is an exercise show that
\begin{equation*}
  p_nq_{n+1}-q_np_{n+1}=(-1)^n,
\end{equation*}
and hence
\begin{equation*}
    a_{n+1}-a_n=\frac{(-1)^{n+1}}{q_{n+1}q_n}.
\end{equation*}
Since $q$ is increasing, it follows that
\begin{equation*}
  a_1<a_3<a_5<\cdots<a_6<a_4<a_2,
\end{equation*}
and moreover $a$ is a Cauchy sequence.  The two subsequences $(a_{2n-1}\colon n\in\N)$ and $(a_{2n}\colon n\in\N)$ of $a$ converge by Theorem~\ref{thm:bm}.  Moreover, since
\begin{equation*}
  p_n{}^2-2q_n{}^2=(-1)^n,
\end{equation*}
the two sequences must have the same limit, which is therefore $\lim(a)$.  This limit is $\surd 2$, which however is not
in $\Q$, by Theorem~\ref{thm:2}.

\begin{theorem}\label{thm:cs}
  Every Cauchy sequence in $\R$ is bounded.
\end{theorem}

\begin{proof}
  Let $a$ be a Cauchy sequence.  Let $M$ be such
  that, if $m\geq M$ and $n\geq M$, then $\abs{a_m-a_n}\leq 1$.  In
  particular, if $m\geq M$, then
  \begin{equation*}
    \abs{a_m}\leq\abs{a_m-a_M}+\abs{a_M}\leq 1+\abs{a_M}.
  \end{equation*}
Thus each $\abs{a_n}$ is bounded by
$\max(\abs{a_0},\dots,\abs{a_{M-1}},1+\abs{a_M})$. 
\end{proof}

\begin{theorem}\label{thm:Cc}
  Every Cauchy sequence in $\R$ converges.
\end{theorem}

\begin{proof}
  Let $a$ be a Cauchy sequence.  By Theorem~\ref{thm:cs}, the sequence is bounded below by some $A$.  We can also define
  \begin{equation*}
    b_k=\sup(\{a_n\colon n\geq k\}).
  \end{equation*}
Then $(b_k\colon k\in\N)$ is decreasing, but bounded below by $A$; so the sequence
converges to some $c$ by Theorem~\ref{thm:bm}.  We have
\begin{equation}\label{eqn:3}
  \abs{a_m-c}\leq\abs{a_m-a_n}+\abs{a_n-b_k}+\abs{b_k-c}.
\end{equation}
Let $\epsilon>0$.  
There is some $M$ such
that, if $k\geq M$, $m\geq M$, and $n\geq M$, then
$\abs{a_m-a_n}<\epsilon/3$
and $\abs{b_k-c}<\epsilon/3$.  For all $k$, there is $n$ such that
$n\geq k$ and
$\abs{a_n-b_k}<\epsilon/3$.  Therefore, if $m\geq M$, then there are some $k$ and $n$ such that the right-hand side of~\eqref{eqn:3} is less than $\epsilon$; so
$\abs{a_m-c}<\epsilon$.  Thus $a$ converges to $c$.
\end{proof}

For the alternative construction of $\R$, let us denote by
\begin{equation*}
  \mapset{\N}{\Q}
\end{equation*}
the set of functions from $\N$ to $\Q$, that is, rational sequences.
This becomes a commutative ring when we let $0$ be $(0,0,0,\dots)$ and $1$ be $(1,1,1,\dots)$ and, writing $a$ for $(a_n\colon
n\in\N)$ as before, we define $a+b$, $-a$, and $ab$ by
\begin{align*}
  (a+b)_n&=a_n+b_n,&
(-a)_n&=-a_n,&
(ab)_n&=a_nb_n.
\end{align*}
Then the commutative ring $\Q$ embeds in $\mapset{\N}{\Q}$ under the map that takes $x$ to the
sequence $(x,x,x,\dots)$.  Let $S$ be the set of Cauchy sequences in
$\mapset{\N}{\Q}$.  In particular, the sequences $(x,x,x,\dots)$ belong to $S$.  Moreover:

\begin{theorem}
  $S$ is a sub-ring of $\mapset{\N}{\Q}$.
\end{theorem}

\begin{proof}
Since $\Q$ embeds in $S$, so that $0$ and $1$ are in $S$,
we need only show in addition that $S$
 is closed under the ring-operations of addition, additive inversion, and multiplication.
  The most difficult part is multiplication.  Let $a$
  and $b$ be in $S$.  By Theorem~\ref{thm:cs}, there is $M$ such that,
  for all $n$ in $\N$, we 
  have $\abs{a_n}\leq M$ and $\abs{b_n}\leq M$.  Hence
  \begin{align*}
    \abs{a_mb_m-a_nb_n}
    &=\abs{a_mb_m-a_nb_m+a_nb_m-a_nb_n}\\
&\leq\abs{a_m-a_n}\abs{b_m}+\abs{a_n}\abs{b_m-b_n}\\
&\leq M(\abs{a_m-a_n}+\abs{b_m-b_n}).
  \end{align*}
Then $ab$ is Cauchy.
\end{proof}

By Theorem~\ref{thm:Cc}, we have a map $x\mapsto\lim(x)$ from $S$ to $\R$.  

\begin{theorem}
The function $x\mapsto\lim(x)$ from $S$ to $\R$ is a homomorphism.
\end{theorem}

Let $I$ be the set
of sequences in $S$ that converge to $0$; so
$I$ is the kernel of the homomorphism $x\mapsto\lim(x)$.
Then $I$ is
an \textbf{ideal}\index{ideal} of $S$.

\begin{theorem}
The homomorphism $x\mapsto\lim(x)$ from $S$ to $\R$ is surjective, inducing an isomorphism from
  $S/I$ onto $\R$.  In particular, $I$ is a maximal
  ideal of $S$.
\end{theorem}

\begin{proof}
  Let $A\in\R$.  Then $A=\sup(\{x\in\Q\colon x<A\})$.   By the
  \emph{Axiom of
    Choice,}\index{Axiom of Choice} there is a sequence $a$ in $\mapset{\N}{\Q}$ such that
  \begin{align*}
    a_0&<A,& a_n+\frac{A-a_n}2&<a_{n+1}<A.
  \end{align*}
Then $\lim(a)=A$.
\end{proof}

Independently of the theorem---that is, without having previously
defined $\R$---, one can show that $I$ is a maximal ideal of $S$.
Then $S/I$ is a field, and one can show that it is a complete ordered
field.  Thus there is an alternative construction of $\R$.  The
construction is carried out more generally in
Theorem~\ref{thm:abs-comp} in the next chapter. 




\chapter{Non-archimedean fields and valuations}\label{ch:non-Arch}

One purpose of this chapter, as suggested at the end of the last
chapter, is to give an alternative construction of $\R$ from $\Q$.
This construction can be understood as being generally applicable to
\emph{normed fields}\index{normed field}---fields with a \textbf{norm
  function.}  Ordered fields are examples of these, their norm
function being the absolute value function; but there are other normed
fields, namely the \emph{valued fields.}\index{valued field}  Every
normed field has a completion (\ref{subsect:completions}).  In
particular, non-archimedean ordered fields have completions as normed
fields, and these completions are non-archimedean: thus $\R$ is not
unique as a complete normed field or even as a complete field with
absolute value function. 

Essential to non-standard analysis is the non-archimedean ordered
field $\sR$, an instance of the general construction to be given in
Ch.~\ref{ch:ultra}.  A second purpose of this chapter is to give a
simpler example of a non-archimedean ordered field.  This example also
leads to the general notion of a valued field. 

\section{Non-archimedean fields}\label{sect:non-Arch}

Given an ordered field $K$, by Theorem~\ref{thm:Q-ord} we may assume
$\N\pincluded\Z\pincluded\Q\included K$.  An element $x$ of $K$ is: 
\begin{compactenum}[(1)]
\item
\textbf{infinite,}\index{infinite} if $n<\abs x$ for all $n$ in $\N$;
\item
\textbf{finite,}\index{finite} if not infinite;
\item
\textbf{infinitesimal,}\index{infinitesimal} if $\abs x<1/n$ for all $n$ in $\N$.
\end{compactenum}

\begin{theorem}
The following are equivalent conditions on an ordered field $K$.
\begin{compactenum}[1.]
\item
$K$ is non-archimedean. 
\item
$K$ has infinite elements.
\item
$K$ has nonzero infinitesimal elements.
\end{compactenum}
\end{theorem}

\begin{proof}
Immediately $x$ is infinite if and only if $x\inv$ is a nonzero infinitesimal, and such $x$ exist in ordered field only if it is non-archimedean.
Conversely, in such a field, there are positive elements $a$ and $b$ such that $na<b$ for all $n$ in $\N$.  If $a$ is infinitesimal, we are done.  Suppose $a$ is not infinitesimal.  Then $1/n\leq a$ for some $n$ in $\N$.  Hence
\begin{equation*}
k=\frac{kn}n\leq kna<b
\end{equation*}
for all $k$ in $\N$, so $b$ is infinite.
\end{proof}

Another way to prove the theorem is to suppose $K$ is non-archimedean, so that there is a positive element $a$ of $K\setminus\R$.  If $a$ is not infinite, then $\{x\in\R\colon x<a\}$ is nonempty and bounded above, so it has a supremum, $b$; then $b-a$ is a nonzero infinitesimal.

\subsection{Rational functions}

An example of a non-archimedean ordered field can be obtained by ordering the field
\begin{equation*}
\R(X)
\end{equation*}
of \textbf{rational functions}\index{rational functions} over $\R$ in one variable, $X$.
Here $\R(X)$ is the quotient field of the commutative ring
\begin{equation*}
  \R[X]
\end{equation*}
of \textbf{polynomials}\index{polynomials} in $X$ over $\R$.  Such a polynomial, if it is not $0$, can be written uniquely as
\begin{equation}\label{eqn:poly}
  a_0+a_1X+a_2X^2+\dotsb+a_nX^n
\end{equation}
or
\begin{equation*}
  \sum_{k=0}^na_kX^k,
\end{equation*}
where $n\in\N\cup\{0\}$, the coefficients $a_k$ are in $\R$, and $a_n\neq0$.
\begin{comment}


Every polynomial in $X$ can be written uniquely as an
\textbf{infinite series}\index{infinite series}
\begin{equation*}
  \sum_{k=0}^{\infty}a_kX^k,
\end{equation*}
where all but finitely many of the coefficients $a_k$ are $0$.


\end{comment}
Then $\R(X)\setminus\{0\}$
consists of the fractions
\begin{equation}\label{eqn:rat}
  \frac{a_0+\dots+a_nX^n}{b_0+\dotsb+b_mX^m},
\end{equation}
where $a_nb_m\neq0$.  

\begin{theorem}
The field $\R(X)$ can be ordered by defining the fraction in~\eqref{eqn:rat} to be positive if and only if $a_nb_m>0$.
Then for
all $n$ in $\N$,
\begin{equation}
0<\cdots<\frac1{X^3}<\frac1{X^2}<\frac1X<\frac1n\leq n<X<X^2<X^3<\cdots,
\end{equation}
so the positive powers of $X$ are infinite, and
the negative powers of $X$ are infinitesimal.
\end{theorem}

\subsection{Valuation rings}

The \textbf{units}\index{units} or multiplicatively invertible elements
of a commutative ring $R$ compose a multiplicative group denoted by
\begin{equation*}
  \units R.
\end{equation*}

\begin{theorem}\label{thm:non-arch-val-ring}
Let $K$ be an arbitrary non-archimedean ordered field.  The finite elements of $K$ compose a sub-ring $R$, and the infinitesimal elements compose a maximal ideal $I$ of $R$.  
An element $a$ of $\units K$ is infinite if and only
if $a\inv\in I$.  In particular, either $a$ or $a\inv$ is
finite, so it belongs to $R$.
\end{theorem}

An arbitrary commutative ring $R$ is called a \textbf{valuation ring}\index{valuation ring} if, for every nonzero element $a$ of its quotient field, either $a$ or $a\inv$ is in $R$.
The reason for the terminology will be seen below.  
Meanwhile, the finite elements of a non-archimedean field compose a valuation ring.
Trivially, fields are valuation rings. A commutative ring $R$ is a \textbf{local ring}\index{local ring} if it has a unique maximal ideal; if this ideal is $I$, then $R/I$ must be a field.

\begin{theorem}\label{thm:vrlr}
Every nontrivial valuation ring is a local ring whose unique maximal ideal consists of the elements of the ring that are not units.
\end{theorem}

\begin{proof}
Suppose $R$ is a valuation ring and $I=R\setminus\units R$.  Let $a$
and $b$ be nonzero elements of $R$.  Then we may assume $a/b\in R$.
But $(a+b)/b=a/b+1$, which is now also in $R$.  Hence, if
$a+b\in\units R$, then also $b\in\units R$.  Contrapositively, if both
$a$ and $b$ are in $I$, then $a+b\in I$; so $I$ is closed under addition.
Similarly, if $r\in R$, and $1/rb\in R$, then $b\in\units R$; so $I$
is closed under multiplication by members of $R$.  If $I$ is not all
of $R$, then it is a maximal ideal, since every ideal containing an
element of $R\setminus I$ contains a unit and is therefore all of
$R$. 
\end{proof}

\begin{theorem}\label{thm:RR/I}
  Let $K$ be an ordered field that includes $\R$, and let $R$ be the
  ring of finite elements of $K$, with maximal ideal $I$ of
  infinitesimals. Then the quotient map $x\mapsto x+I$ determines an
  isomorphism from $\R$ onto $R/I$.
\end{theorem}

\begin{proof}
  Let $h$ be $x\mapsto x+I$ on $\R$.  Then $\ker(h)=I\cap\R$, which is
  $\{0\}$.  Thus $h$ is injective.  It remains to show $h$ is
  surjective onto $R/I$.

Let $a\in R$.  Since $a$ is finite, the set $\{x\in\R\colon x<a\}$ has
an upper bound in $\R$, hence a supremum, $a'$.  We shall show
$h(a')=a+I$.  To this end, suppose $b\in\R$, but $h(b)\neq a+I$.  This
means $b-a$ is not infinitesimal.  In particular, for some real number
$\delta$, we have
\begin{equation*}
  0<\delta<\abs{b-a}.
\end{equation*}
If $b<a$, then $b<b+\delta<a$, so $b$ is not an upper bound of
$\{x\in\R\colon x<a\}$.  If $a<b$, then $a<b-\delta$, so $b$ is not
the supremum of $\{x\in\R\colon x<a\}$.  In either case, $b\neq a'$.
\end{proof}

In the notation of the theorem, if $a$ and $b$ are arbitrary elements
of $K$ such that $a-b\in I$, 
then $a$ and $b$ are \textbf{infinitely close,}\index{infinitely
  close} and we write 
\begin{equation}\label{eqn:simeq}
  a\simeq b.
\end{equation}
By the theorem, if $a$ is finite, then $a$ is infinitesimally close to
some \emph{unique} real number; this number is called the
\textbf{standard part}\index{standard part} of $a$.  In particular, the infinisimals are
the elements whose standard part is $0$.

For example, the finite elements of $\R(X)$
are those of the form
\begin{equation*}
  \frac{a_nX^n+\dotsb+a_0}{b_nX^n+\dotsb+ b_0},
\end{equation*}
where $b_n\neq0$.  The standard part of this element is $a_n/b_n$,
since
\begin{equation*}
  \frac{a_nX^n+\dotsb+a_0}{b_nX^n+\dotsb+ b_0}-\frac{a_n}{b_n}
=\frac{(a_{n-1}-a_nb_{n-1}/b_n)X^{n-1}+\dotsb}{b_nX^n+\dotsb+b_0}.
\end{equation*}

\subsection{Power series}

Using the division algorithm taught in school, we can formally compute
the quotient of two nonzero elements of $\R[X]$, getting a possibly
infinite series 
\begin{equation*}
  c_0+c_1X\inv+c_2X^{-2}+\dotsb
\end{equation*}
or simply
\begin{equation*}
  \sum_{n=0}^{\infty}c_kX^{-k};
\end{equation*}
this is a \textbf{formal power series}\index{formal power series}\index{power series} in
$X\inv$ with coefficients from 
$\R$. 
For example, formally,
\begin{equation*}
  \frac{X}{X-1}=1+X\inv+X^{-2}+\dotsb
\end{equation*}
The set of all formal power series in $X\inv$ over $\R$ is denoted by
$\R[[X\inv]]$ or 
rather
\begin{equation*}
  \R[[T]],
\end{equation*}
where $T=X\inv$.  This set is an integral domain in the obvious way,
and its quotient field is denoted by
\begin{equation*}
  \R((T));
\end{equation*}
this is the field of \textbf{formal Laurent series}\index{formal
  Laurent series}\index{formal Laurent series}\index{Laurent series} in $T$ with
coefficients from $\R$, namely series
\begin{equation}\label{eqn:L}
  \sum_{n=k}^{\infty}a_nT^n,
\end{equation}
where $k\in\Z$, and each $a_n$ is in $\R$.  This field includes
$\R(T)$, which is $\R(X)$.

The ordering of $\R(T)$, in which $T$ is a positive infinitesimal, extends to $\R((T))$.  Indeed, let $a$ be the
element in~\eqref{eqn:L}, and assume $a_k\neq0$.  Then $a$ is 
\begin{compactenum}
\item 
positive
if and only if $a_k>0$,
\item
finite if and only if $k\geq0$,
\item
infinitesimal if and only if $k>0$.
\end{compactenum}
If $a$ is finite, then its standard part is $a_0$ (which is $0$ if $k>0$).




\section{Valuations}


\subsection{Power series}

The construction of $\R((T))$ as a field uses only that $\R$ is a
field.  Let $K$ be an arbitrary field, not necessarily ordered; then
we can form the field
\begin{equation*}
  K((T))
\end{equation*}
of formal Laurent series in $T$ with coefficients from $K$.  This has
the sub-ring
\begin{equation*}
  K[[T]]
\end{equation*}
of formal power series in $T$ with coefficients from $K$.  

\begin{theorem}\label{thm:K[[t]]}
If $K$ is a field, then the ring $K[[T]]$
is a valuation ring; its unique maximal ideal is $(T)$, comprising
the series $\sum_{n=1}^{\infty}a_nT^n$ with no constant term.  Then $K$ is isomorphic to
\begin{equation*}
K[[T]]/(T)
\end{equation*}
under $\xi\mapsto\xi+(T)$.
\end{theorem}

\begin{proof}
The given map is an isomorphism since $\sum_{n=0}^{\infty}a_nT^n+(T)=a_0+(T)$, but $a+(T)\neq b+(T)$ if $a$ and $b$ are distinct elements of $K$.  Hence $(T)$ is a maximal ideal.  It is unique as such since every non-element can be formally inverted.
\end{proof}

There is another quotient we can form, namely
\begin{equation*}
  \units{K((T))}/\units{K[[T]]}.
\end{equation*}
Here $\units{K((T))}$ is just $K((T))\setminus\{0\}$, and
$\units{K[[T]]}=K[[T]]\setminus (T)$ as in Theorem~\ref{thm:vrlr}.
If $a_k\neq0$, then
\begin{equation*}
  \frac1{T^k}\sum_{n=k}^{\infty}a_nT^n=\sum_{n=0}^{\infty}a_{k+n}T^n,
\end{equation*}
which is in $\units{K[[T]]}$; so we may write
\begin{equation*}
  \sum_{n=k}^{\infty}a_nT^n\equiv T^k\pmod{\units{K[[T]]}}.
\end{equation*}
Thus the quotient map $\xi\mapsto\xi\units{K[[T]]}$ on $\units{K((T))}$ gives a bijection between $\gpgen T$ (that is,
$\{T^n\colon n\in\Z\}$) and $\units{K((T))}/\units{K[[T]]}$.
By defining
\begin{equation*}
  0<\dotsb<T^2<T<1<T\inv<\dotsb,
\end{equation*}
we induce an ordering on $\{0\}\cup\units{K((T))}/\units{K[[T]]}$.
The field $K((T))$ thus provides an example of the following general situation.

\subsection{Valuations}

Assume the following data:
\begin{compactenum}[(1)]
\item
$K$ is an arbitrary field;
\item 
$\Gamma$ is an ordered abelian group written multiplicatively;
\item
the
ordering and multiplication are extended to $\{0\}\cup\Gamma$ so that
\begin{align*}
	0&<v,& 0\cdot0&=0,& 0\cdot v&=v\cdot0=0,
	\end{align*}
	 for all $v$ in $\Gamma$; and
\item
there is a function $x\mapsto\abs x$ from $K$ to $\{0\}\cup\Gamma$ so
that  
\begin{gather}\notag
\abs{xy}=\abs x\abs y,\\\notag
\abs x=0\iff x=0,\\\label{eqn:sti}
\abs{x+y}\leq\max(\abs x,\abs y).
\end{gather}
\end{compactenum}
Then the function $x\mapsto\abs x$ is a \textbf{valuation}\index{valuation}
on $K$.\footnote{Sometimes $\Gamma$ is written additively and the
  opposite ordering is used, while $0$ is written as $\infty$; I
  follow the practice of Lang \cite[\S~I.2]{MR0344244}.}  The
inequality~\eqref{eqn:sti} is the \textbf{strong triangle
  inequality.}\index{strong triangle inequality}
  
There is a related notion.  In the same situation, if $\Gamma$ is the
positive part of an ordered field, but the triangle inequality is
assumed to hold only in its standard form 
\begin{equation*}
\abs{x+y}\leq\abs x+\abs y,
\end{equation*}
then the function $x\mapsto\abs x$ on $K$ is an \textbf{absolute value
  function}\index{absolute value function} or \textbf{norm.}\index{norm}\footnote{It is usually assumed that
  $\Gamma$ here is the positive part of a subfield of $\R$; but I do
  not make this assumption.} 
This generalizes the definition on p.~\pageref{abs-val}: 
every ordered field has an absolute value function, but so does the
non-orderable field $\C$.  (For definiteness, let $\C$ be the field
$\R(X)/(X^2+1)$, which, as a real vector space, has basis consisting
of $1$ and $X+(X^2+1)$; but we write the latter basis element as
$\ii$.  Then $\abs{x+y\ii}=\sqrt{x^2+y^2}$.) 

\begin{theorem}
Let $\vo$ be a valuation ring with 
unique maximal ideal $\mi$ and quotient field $K$.
The multiplicative group $\units K/\units{\vo}$ can be ordered by the rule
\begin{equation*}
  a\units{\vo}\leq b\units{\vo}\iff a/b\in\vo.
\end{equation*}
Say then that $0$ is less than all elements of this group.
Then the function $\xi\mapsto\abs{\xi}_{\mi}$ from $K$ to
$\{0\}\cup\units K/\units{\vo}$ defined by 
\begin{equation*}
\abs{\xi}_{\mi}=\begin{cases}
\xi\units{\vo},&\text{ if }\xi\neq0,\\
0,&\text{ if } x=0
\end{cases}
\end{equation*}
is a valuation.
\end{theorem}

\begin{proof}
If $b\neq0$, then
  \begin{equation*}
    \abs{a+ b}_{\mi}\leq\abs b_{\mi}
\iff\frac ab +1=\frac{a+ b}b\in\vo\iff
 \frac ab\in\vo
\iff\abs a_{\mi}\leq\abs b_{\mi},
  \end{equation*}
  so the strong triangle inequality holds.
\end{proof}

The valuation in the theorem is the \textbf{$\mi$-adic
  valuation.}\index{valuation}   If
$R$ happens to be a \textbf{discrete valuation ring,}\index{discrete
  valuation ring} so that its
maximal ideal is $(\pi)$ for some element $\pi$ of $R$, then the
valuation is the \textbf{$\pi$-adic valuation,} denoted by
$\xi\mapsto\abs{\xi}_{\pi}$. 
In particular, by Theorem~\ref{thm:K[[t]]}, $K((T))$ has the $T$-adic
valuation. 

Since a value group is written multiplicatively, we write $1$ for the
identity in a value group.  Two valuations $x\mapsto\abs x$ and
$x\mapsto\abs x'$ on a field are \textbf{equivalent}\index{equivalent} if  
\begin{equation*}
\abs x<\abs y\iff \abs x'<\abs y',
\end{equation*}
which means the same thing as
\begin{equation*}
\abs x<1\iff\abs x'<1.
\end{equation*}
As a valuation can be obtained from a valuation ring, so a valuation ring can be recovered from a valuation:

\begin{theorem}\label{thm:svf-vr}
Given a field $K$ with valuation $x\mapsto\abs x$, let
\begin{align*}
  \vo&=\{x\in K\colon\abs x\leq 1\},&
%\units{\vo}&=\{x\in K\colon\abs x=1\},&
\mi&=\{x\in K\colon\abs x<1\}.
\end{align*}
Then $K$ is the quotient field of $\vo$, which is a valuation ring with maximal ideal $\mi$, and $x\mapsto\abs x$ is equivalent to the $\mi$-adic valuation.
\end{theorem}

In the notation of the theorem, the pair $(K,\vo)$ is a \textbf{valued
  field,}\index{valued field} and the associated valuation on $K$ is
the $\mi$-adic 
valuation.  Note that $\mi=\vo\setminus\units{\vo}$ by
Theorem~\ref{thm:vrlr}. 
The ordered group $\units K/\units{\vo}$ is the \textbf{value
  group,}\index{value group}
and the field $\vo/\mi$ is
the \textbf{residue field.}\index{residue field}  So $(K((T)),K[[T]])$
is a valued field with 
residue field (isomorphic to) $K$, by Theorem~\ref{thm:K[[t]]}; the
value group is infinite cyclic.   
In case $K$ is an
arbitrary ordered field extending $\R$, and $\vo$ is the ring of
finite elements, then $(K,\vo)$ is a valued field with residue field
(isomorphic to) $\R$, by  
Theorem~\ref{thm:RR/I}. 

\begin{theorem}\label{thm:val-prop}
Given a valued field $(K,\vo)$ with associated valuation be $x\mapsto\abs x$, we have
\begin{gather}\label{eqn:1=1}
	\abs 1=1,\\\label{eqn:-x=x}
	\abs{-x}=\abs x,\\\label{eqn:1+...+1}
	\abs{1+\cdots+1}\leq1,\\\label{eqn:x<y}
	\abs x<\abs y\lto \abs{x\pm y}=\abs y.
\end{gather}
\end{theorem}

\begin{proof}
In the value group, $1$ is $\units{\vo}$.  In the field, $1$ and $-1$ belong to $\units{\vo}$.  This gives~\eqref{eqn:1=1} and~\eqref{eqn:-x=x}.  Then~\eqref{eqn:1+...+1} is by definition of valuation.
For~\eqref{eqn:x<y},
since
\begin{equation*}
  \abs y=\abs{\pm y}=\abs{x\pm y-
    x}\leq\max(\abs{x\pm y},\abs x), 
\end{equation*}
if $\abs x<\abs y$,
we have
$\abs y\leq\abs{x\pm y}\leq\abs y$. 
\end{proof}

Because of this theorem, we may refer to a non-constant valuation as
a \textbf{non-archimedean}\index{non-archimedean} norm, even though the value group itself is
usually archimedean.  
Then an absolute value function is an \textbf{archimedean}\index{archimedean} norm, at
least when its codomain is the archimedean field $\R$.  A
\textbf{normed field}\index{normed field} is then a field with a norm, archimedean or
not. 

\subsection{Completions}\label{subsect:completions}

In any normed field, there is the notion of \textbf{Cauchy sequence}\index{Cauchy sequence}
and \textbf{convergent sequence:}\index{convergent sequence} the
definitions are formally the 
same as in \S~\ref{sect:seq} for sequences in $\R$.  Convergent
sequences are Cauchy sequences, but the converse may fail. 
For example, the sequence $(T^n\colon n\in N)$ in $K(T)$ converges to
$0$ with respect to the $T$-adic valuation, while the sequence
$(\sum_{m=k}^{k+n}a_mT^m\colon n\in\N)$ converges to
$\sum_{m=k}^{\infty}a_mT^m$, which is in $K((T))$, but need not be in
$K(T)$.  Note that the values of the terms in the latter sequence are all the
same, namely $T^k$ (if $a_k\neq0$).  This illustrates a general rule:  

\begin{theorem}\label{thm:val-const}
In a valued field, if a Cauchy sequence $(a_n\colon n\in\N)$ does not
converge to $0$, then the sequence $(\abs{a_n}\colon n\in\N)$ of
values is eventually constant. 
\end{theorem}

\begin{proof}
Let $a=(a_n\colon n\in\N)$.  Since this does not converge to $0$, for
some non-zero value 
$\epsilon$, for all positive integers $M$, there is an integer $n$
such that $n>M$ and $\abs{a_n}\geq\epsilon$.  Since $a$ is Cauchy, for
some positive integer $N$, if $m>N$ and $n>N$, then
$\abs{a_m-a_n}<\epsilon$.  But then there is $k$ such that $k>N$ and
$\abs{a_k}\geq\epsilon$.  In this case, if $m>N$, then 
\begin{equation*}
\abs{a_m-a_k}<\epsilon\leq\abs{a_k},
\end{equation*}
so $\abs{a_m}=\abs{a_m-a_k+a_k}=\abs{a_k}$
by Theorem~\ref{thm:val-prop}.
\end{proof}

A normed field is \textbf{complete}\index{complete} with respect to its norm
if every Cauchy sequence of its elements converges.  

\begin{theorem}
The following normed fields are complete:
\begin{compactenum}[(1)]
\item
$K((T))$ with the $T$-adic valuation;
\item
$\R$ and $\C$ with the absolute value function;
\item
$\R((T))$ with the absolute value
  function induced by letting $T$ be infinitesimal. 
\end{compactenum}
\end{theorem}

A set is \textbf{countable}\index{countable} if it is the range of a function on $\N$.  So $\N$, $\Z$, and $\Q$ are countable, but $\R$ is not.

\begin{theorem}\label{thm:val-count}
Suppose $K$ is a normed field such that every countable set of values has a positive lower bound.  Then $K$ is complete with respect to the norm.
\end{theorem}

\begin{proof}
In such a field, every Cauchy sequence is eventually constant, so it
already converges.  Indeed, let $a$ be a Cauchy sequence in such a
field, and let $A$ be the set of all \emph{positive} values
$\abs{a_n-a_m}$.  Then $A$ has a positive lower bound $\epsilon$.  Let
$L$ be such that, when $m\geq L$ and $n\geq L$, then
$\abs{a_n-a_m}<\epsilon$.  Then, for such $m$ and $n$, we must have
$a_n=a_m$. 
\end{proof}

An example of a normed field as in the theorem can be contrived by
means of the theory of \textbf{ordinal numbers.}\index{ordinal
  numbers}  The ordinal numbers, or just \textbf{ordinals,} compose a
well-ordered class,\index{class} $\on$.  Then $\on$ is also an
iterative structure: the least ordinal is denoted by 
\begin{equation*}
0,
\end{equation*}
and for every ordinal $\alpha$, its successor, $\alpha+1$, is the
least ordinal that is greater than $\alpha$.  There are ordinals that
are neither successors nor $0$; these are \textbf{limit
  ordinals.}\index{limit ordinals}  The ordinals can be constructed so
that each ordinal $\alpha$ is actually the set of ordinals that are
less than $\alpha$.  Then 
\begin{align*}
 0&=\emptyset,&\alpha+1&=\alpha\cup\{\alpha\};
\end{align*}
also, the least infinite ordinal is denoted by one of
\begin{align*}
	&\vnn,&&\aleph_0.
\end{align*}
We shall define $\vnn$ in more detail in~\ref{subsect:vnn}.
Meanwhile, the least \emph{uncountable} ordinal is denoted by 
\begin{equation*}
\aleph_1.
\end{equation*}
Then every countable subset of $\aleph_1$ has an upper bound in $\aleph_1$, since if $A$ is such a subset, then $\bigcup A$ is a countable ordinal and an upper bound of $A$.

Given an ordered field $K$, we can define an extension $K(T_{\alpha}\colon\alpha<\aleph_1)$ by \textbf{transfinite recursion:}\index{recursion}\index{transfinite recursion}
\begin{compactenum}
	\item 
	$K(T_{\alpha}\colon\alpha<0)=K$,
	\item
	$K(T_{\alpha}\colon\alpha<\beta+1)=K(T_{\alpha}\colon\alpha<\beta)(T_{\beta})$,
	\item	$K(T_{\alpha}\colon\alpha<\gamma)=\bigcup_{\beta<\gamma}K(T_{\alpha}\colon\alpha<\beta)$, if $\beta$ is a limit.
\end{compactenum}
We order $K(T_{\alpha}\colon\alpha<\aleph_1)$ by letting each $T_{\alpha}$ be positive but less than each positive element of $K$, and also
\begin{equation*}
T_{\beta}<T_{\alpha}\iff \alpha<\beta.
\end{equation*}
Then every countable set of the $T_{\alpha}$ has a positive lower bound, so $K(T_{\alpha}\colon\alpha<\aleph_1)$ is complete with respect to the absolute value function, by Theorem~\ref{thm:val-count}.



An \textbf{embedding}\index{embedding} of a valued field $(K,\vo)$ in a valued field
$(K_1,\vo_1)$ is an embedding $\phi$ of $K$ in $K_1$ such that
$\phi[\vo]=\phi[K]\cap\vo_1$.   

\begin{theorem}
An embedding of valued fields induces embeddings of the value groups
and the residue fields. 
\end{theorem}

\begin{proof}
  Let $\phi$ be an embedding of the valued field $(K,\vo)$ in the
  valued field $(K_1,\vo_1)$.  We may assume that $\phi$ is just an
  inclusion, so 
  \begin{align*}
  K&\included K_1,&\vo&=K\cap\vo_1.  
  \end{align*}
  Since
  $\vo\included\vo_1$, we have also
  $\units{\vo}\included\units{\vo_1}$, so the function
 $x\units{\vo}\mapsto x\units{\vo_1}$ is a well-defined
  homomorphism from the value group $\units K/\units{\vo}$ to the value
  group $\units{K_1}/\units{\vo_1}$.
Suppose $x\units{\vo}$ is in the kernel.  Then $x\in\units K\cap\units{\vo_1}$, and
also $x\inv\in\units K\cap\units{\vo_1}$, so $x\inv\in\vo$ and hence
$x\in\units{\vo}$.  Therefore the homomorphism of value groups is an
embedding. 

Let $\mi=\vo\setminus\units{\vo}$ and
$\mi_1=\vo_1\setminus\units{\vo_1}$.  If $x\in\mi$, then either $x=0$
or $x\inv\in K\setminus\vo$.  In the latter case, $x\inv\notin\vo_1$;
hence in either case, $x\notin\units{\vo_1}$, so $x\in\mi_1$.
Therefore the function
$x+\mi\mapsto x+\mi_1$ is a well-defined homomorphism from
  the residue field $\vo/\mi$ to the residue field $\vo_1/\mi_1$.
  Since the homomorphism takes $1+\mi$ to $1+\mi_1$, which is not $0$,
  the homomorphism must be an embedding.
\end{proof}

A \textbf{completion}\index{completion} of a valued field $(K,\vo)$ is a complete valued
field $(\completion K,\completion{\vo})$, together with an embedding
$\psi$ of the former in the latter, such that, whenever $\phi$ is an
embedding of $(K,\vo)$ in a complete valued field $(K_1,\vo_1)$, then
there is an embedding $\completion{\phi}$ of $(\completion
K,\completion{\vo})$ in $(K_1,\vo_1)$ such that
$\completion{\phi}\circ\psi=\phi$.  The situation is as in
Figure~\ref{fig:val-comp}, which is analogous to
Fig.~\ref{fig:completion}.
\begin{figure}[ht]
  \begin{equation*}
    \xymatrix{
(K,\vo)\ar[r]^{\psi}\ar[d]_{\phi}&(\completion K,\completion{\vo})\ar[dl]^{\completion{\phi}}\\
(K_1,\vo_1)&
}
  \end{equation*}
  \caption{Completion of a valued field}\label{fig:val-comp}
\end{figure}


\begin{theorem}\label{thm:val-comp}
Every valued field has a completion, and the corresponding
  embeddings of value groups and residue fields are isomorphisms.  
\end{theorem}

\begin{proof}
  Let $(K,\vo)$ be a valued field, let $R$ consist of its Cauchy
  sequences, and let $I$ consist of those sequences that converge to
  $0$.  Then $R$ is a ring with ideal $I$.  Moreover, $I$ is a
  \emph{maximal} ideal of $R$: that is, if $a\in R\setminus I$, then
  there are elements $b$ of $R$ and $c$ of $I$ such that 
  \begin{equation}\label{eqn:ab+c=1}
  ab+c=1.
  \end{equation}
  Indeed, suppose 
  $a$ is an element $(a_n\colon n\in \N)$ of $R\setminus I$.  By
  Theorem~\ref{thm:val-const}, the sequence of values of the $a_n$ is eventually
  some nonzero constant $\abs A$.  Hence, if $m$ and $n$ are large enough,
  then $a_ma_n\neq0$ and 
  \begin{equation*}
    \abs{\frac 1{a_n}-\frac1{a_m}}=\abs{\frac{a_m-a_n}{a_na_m}}
=\frac{\abs{a_m-a_n}}{\abs A^2}.
  \end{equation*}
So we have~\eqref{eqn:ab+c=1} as desired when
  \begin{align*}
    b_n&=
    \begin{cases}
      a_n{}\inv,&\text{ if }a_n\neq0,\\
      0,&\text{ if }a_n=0,
    \end{cases}&
    c_n&=
    \begin{cases}
      0,&\text{ if }a_n\neq0,\\
      1,&\text{ if }a_n=0.
    \end{cases}
  \end{align*}
Now $R/I$ is a field $\completion K$, in which $K$ embeds under the map $x\mapsto(x,x,\dots)+I$.  Whenever $a$ and $b$ are in $R$, and $a+I=b+I$, then either $\abs{a_n}=\abs{b_n}$ when $n$ is large enough, or else both $a$ and $b$ are in $I$.  For, suppose $a\notin I$.  Then again by Theorem~\ref{thm:val-const}, for some $A$ in $\units K\setminus\units{\vo}$, if $n$ is large enough, then $\abs{a_n}=\abs A$.  Since $b-a\in I$, if $n$ is large enough, we have both $\abs{b_n-a_n}<\abs A$ and also
\begin{equation*}
\abs{b_n}=\abs{a_n+b_n-a_n}=\abs{a_n}=\abs A.
\end{equation*}
Now we can define a valuation on $\completion K$ by letting $\abs{a+I}=\abs A$, if $a$ eventually takes the value $\abs A$, and $\abs I=0$.  Letting $\completion{\vo}$ comprise those $a+I$ in $\completion K$ such that $\abs{a+I}\leq1$, we have a valued field $(\completion K,\completion{\vo})$ by Theorem~\ref{thm:svf-vr}, and, identifying $K$ with its image in $\completion K$, we have
$K\cap\completion{\vo}=\vo$, so $(K,\vo)\included(\completion
K,\completion{\vo})$. 
Immediately the
embedding of value groups is surjective.  Now let
$\mi=\vo\setminus\units{\vo}$, and
$\completion{\mi}=\completion{\vo}\setminus\units{\completion{\vo}}$.
If $a+I\in\units{\completion K}$,
and $m$ and $n$ are large enough, we have $\abs{a_m-a_n}<1$, that is,
$a_m-a_n\in\mi$, so $(a+I)+\completion{\mi}=(a_n+I)+\completion{\mi}$.
Thus the embedding of residue fields is surjective.

By Theorem~\ref{thm:val-count}, we may assume there is a decreasing sequence $(\delta_n\colon n\in\N)$ of values such that, for all values $\epsilon$, there is $n$ such that $\delta_n\leq\epsilon$. 
Suppose $(a^n+I\colon n\in\N)$ is a Cauchy sequence of elements of $\completion K$.  Then there is a strictly increasing function $f$ from $\N$ to itself such that, if $k\geq f(n)$ and $\ell\geq f(n)$, then
\begin{equation*}
\abs{a^k-a^{\ell}+I}<\delta_n.
\end{equation*}
Then there is a strictly increasing function $g$ from $\N$ to itself such that, if
\begin{align*}
f(n)&\leq j\leq f(n+1),&f(n)&\leq k\leq f(n+1),&\ell&\geq g(n),&m&\geq g(n), 
\end{align*}
then
\begin{equation*}
\absn{a^j_{\ell}-a^k_m}
\leq\max(\absn{a^j_{\ell}-a^k_{\ell}},\absn{a^k_{\ell}-a^k_m})
<\delta_n.
\end{equation*}
Now define a sequence $b$ of elements of $K$ by
\begin{equation*}
b_m=\begin{cases}
a^1_m,&\text{ if } m<g(1);\\
a^{f(n)}_m,&\text{ if }g(n)\leq m<g(n+1).
\end{cases}
\end{equation*}
Then $b\in R$, since, if $g(n)\leq m<g(n+1)$ and $g(n+i-1)\leq m+j<g(n+i)$, then
\begin{multline*}
\abs{b_{m+j}-b_m}\\
\begin{aligned}
&\leq\max(\absn{b_{m+j}-b_{g(n+i)}},
\absn{b_{g(n+i)}-b_{g(n+i-1)}},
\dots,
\absn{b_{g(n+1)}-b_{g(n)}},
\absn{b_{g(n)}-b_m})\\
&\leq\max(\delta_{n+i-1},\delta_{n+i-1},\dots,\delta_n,\delta_n)\\
&=\delta_n.
\end{aligned}
\end{multline*}
Moreover, $(a^n+I\colon n\in\N)$ converges to $b+I$, since if $f(n)\leq k<f(n+1)$ and $g(n+i-1)\leq m<g(n+i)$, then
\begin{multline*}
\absn{a^k_m-b_m}=\absn{a^k_m-a^{f(n+i-1)}_m}\\
\begin{aligned}
&\leq\max(
\absn{a^k_m-a^{f(n)}_m},
\absn{a^{f(n)}_m-a^{f(n-1)}_m},
\dots,
\absn{a^{f(n+i-2)}_m-a^{f(n+i-1)}_m})\\
&\leq\max(\delta_n,\delta_n,\dots,\delta_{n+i-2})\\
&=\delta_n.
\end{aligned}
\end{multline*}
Therefore $(\completion K,\completion{\vo})$ is complete.
It is a completion of $(K,\vo)$, because
we can extend an inclusion of $(K,\vo)$ in a complete valued
field $(K_1,\vo_1)$ to an embedding of $(\completion
K,\completion{\vo})$ by sending $(a_n\colon n\in\N)+I$ to the limit of
$(a_n\colon n\in\N)$ in $K_1$. 
\end{proof}

For example, $K((T))$ is the completion of $K(T)$ with respect to the
$T$-adic valuation. 

If $p$ is a prime number, let $\Z_{(p)}$ be the \textbf{localization}\index{localization}
of $\Z$ at $(p)$: this is the sub-ring of $\Q$ comprising those $a/b$
such that $b$ is not a multiple of $p$.  Then $\Z_{(p)}$ is a
valuation ring with maximal ideal generated by $p$, and
$(\Q,\Z_{(p)})$ is a valued field.   
Usually the corresponding \textbf{$p$-adic valuation}\index{valuation} on $\Q$ is given
by 
\begin{equation*}
  \abs{p^n\cdot\frac ab}_p=\frac 1{p^n},
\end{equation*}
where $a$ and $b$ are indivisible by $p$; 
in particular, the value group is taken as a subgroup of $\Qp$ with
the usual ordering. 
The completion of $(\Q,\Z_{(p)})$ is denoted by $(\Q_p,\Z_p)$.  Here,
each element of $\Q_p$ is
called a \textbf{$p$-adic number}\index{padic number@$p$-adic number} and is a
formal sum
\begin{equation*}
  \sum_{n=k}^{\infty}a_np^n,
\end{equation*}
where $k\in\Z$ and $a_n\in\{0,1,\dots,p-1\}$; the $p$-adic value of
this element is $1/p^k$, assuming $a_k\neq0$.
We have for example
\begin{equation*}
  -1=\sum_{n=0}^{\infty}(p-1)p^k.
\end{equation*}
Elements of $\Z_p$ are \textbf{$p$-adic integers.}\index{padic
  integer@$p$-adic integer}  
Even though $\Q_p$ is of characteristic $0$, its residue field is
finite, with $p$ elements. 

A \textbf{completion}\index{completion} of an ordered field $K$ with respect to the absolute value function now has the obvious definition: it is an ordered field $\completion K$ such that
\begin{compactenum}
\item
 $K$ embeds in $\completion K$,
 \item
 $\completion K$ is complete with respect to its absolute value function,
 \item
every embedding of $K$ in an ordered field that is complete with respect to its absolute value function extends to an embedding of $\completion K$ in that ordered field.
\end{compactenum}

\begin{theorem}\label{thm:abs-comp}
Every ordered field has a completion with respect to its absolute value function.
\end{theorem}

\begin{proof}
Follow the proof of the last theorem.
In the proof
that $I$ is a maximal ideal, the sequence of
values of $a$ need not be eventually constant; but
for some nonzero value $\epsilon$, if $m$ and $n$ are large enough,
then $\abs{a_n},\abs{a_n}\geq\epsilon$, so
\begin{equation*}
  \abs{\frac1{a_n}-\frac1{a_m}}\leq\frac{\abs{a_m-a_n}}{\epsilon^2}.
\end{equation*}
So $I$ is still a maximal ideal, so $R/I$ is a field $\completion K$.  This can be ordered, since every element of $R\setminus I$ is eventually either positive or negative.  To prove completeness, we may assume that the sequence $(\delta_n\colon n\in\N)$ satisfies also $2\delta_{n+1}\leq\delta_n$, so that
\begin{equation*}
\delta_{n+1}+\delta_{n+2}+\cdots\leq\delta_n.\qedhere
\end{equation*}
\end{proof}

For example, $\R((T))$ is the completion of $\R(T)$ with respect to the
absolute value function induced by the ordering in which $T$ is
infinitesimal. 



In sum:
\begin{compactenum}
\item 
The field $\R$ is the unique complete ordered field.
\item
The field $\R$ is complete with respect to the absolute value function, but so too
  is $\C$.
\item
There are non-archimedean ordered fields.  The completion of one of these with respect to the ordering is never a field.  But there is a completion with respect to the absolute value function determined by the ordering, and this completion is always a field.
%\item
%there are many fields, even fields that include $\Q$, that are complete with
%respect to a strong valuation. 
\end{compactenum}




\chapter{Ultrapowers and logic}\label{ch:ultra}

\section{Algebraic preliminaries}\label{sect:al-prel}

\subsection{Natural numbers constructed}\label{subsect:vnn}

The simplest set is the empty set, $\emptyset$.  One of the simplest
things we can do with a set $x$ (aside from doing nothing at all) is
to make a new set, $\{x\}$, with only $x$ as a member.  Then we can
form the set $x\cup\{x\}$, comprising the elements of $x$, along with
$x$ itself.  Hence one of the simplest nontrivial functions defined
recursively on $\N$ is the function $f$ given by\footnote{Here $f$ is
  the unique homomorphism from $(\N,1,\succn)$ into
  $(\universe,\emptyset,x\mapsto x\cup\{x\})$, where $\universe$ is
  the universe of all sets.  Now, $\universe$ is not a set itself, but
  is a \emph{proper class,}\index{class}\index{proper class} since, by
  the Russell Paradox, the subclass $\{x\colon x\notin x\}$ of
  $\universe$ cannot be a set. 
  But the proof of the Recursion Theorem (Theorem~\ref{thm:rec}) does
  not actually require $A$ to be a set.} 
\begin{align}\label{eqn:f}
  f(1)&=\emptyset,&f(n+1)&=f(n)\cup\{f(n)\}.
\end{align}

\begin{theorem}\label{thm:f-inj}
The function $f$ on $\N$ defined as in~\eqref{eqn:f} is injective.
\end{theorem}

\begin{proof}
By induction, each set $f(n)$ includes its elements, that is, if $x\in f(n)$, then $x\included f(n)$.

Hence $f(n+1)\nincluded f(n)$.  For, this is trivially true when $n=1$.  Suppose it is false when $n=m+1$, that is, $f(m+2)\included f(m+1)$.  
But $f(m+2)=f(m+1)\cup\{f(m+1)\}$, so
$f(m+1)\in f(m+1)$.  Thus either $f(m+1)=f(m)$ or $f(m+1)\in f(m)$, and in either case, $f(m+1)\included f(m)$; hence the claim fails when $n=m$.  By induction, the claim is true for all $n$ in $\N$.

Also by induction, if $k\leq n$, then $f(k)\included f(n)$.

Suppose if possible that $f(k)=f(m)$, although $k<m$.  But then $k\leq m-1$, so $f(m)\included f(m-1)$, contrary to what we have just shown.  Therefore $f$ is injective.
\end{proof}

The image $f[\N]$ of $\N$ under $f$ is denoted by
\begin{equation*}
  \vnn.
\end{equation*}
Writing $x'$ for $x\cup\{x\}$, and $0$ for $\emptyset$, we have that
$(\vnn,0,{}')$ is isomorphic to $(\N,1,\succn)$.
It will be convenient to treat $\vnn$ as $\N$, although now $1$ will
denote $0'$, that is, $\{\emptyset\}$, and $n'$ will be $n+1$.  With
this understanding, we still define addition on $\vnn$
by~\eqref{eqn:+} in \S~\ref{sect:arith}.  The ordering of $\vnn$ is
induced from $\N$ by $f$, that is, $f(k)<f(n)\iff k<n$. 

\begin{theorem}
If $n\in\vnn$, then
\begin{equation*}
n=\{0,\dots,n-1\};
\end{equation*}
that is, $k<n\iff k\in n$.
\end{theorem}

\begin{proof}
With $f$ as in~\eqref{eqn:f}, by induction, if $k<n$, then $f(k)\in
f(n)$.  Also by induction, if $x\in f(n)$, then $x=f(k)$ for some $k$
such that $k<n$.  Since $f$ is injective by Theorem~\ref{thm:f-inj},
if $f(k)\in f(n)$, then $k<n$. 
\end{proof}

This, for us, is the point of defining $\vnn$.  Given a natural number
$n$, we shall want a set with $n$ elements; now $n$ itself is such a
set. 

\subsection{Powers of sets}\label{subsect:set-pow}

Let $\Omega$ be a set, and $n\in\vnn$.  We can now define
\begin{equation*}
  \Omega^n
\end{equation*}
as the set of functions from $n$ to
$\Omega$; this is the $n$th \textbf{Cartesian power}\index{Cartesian power} of $\Omega$.  
The definition is consistent with that of $\Q^{\N}$ in \S~\ref{sect:seq}.
Since $0$ is empty, $\Omega^0$ consists of the empty set; but
$\{\emptyset\}=\{0\}=1$, so 
\begin{equation*}
  \Omega^0=1.
\end{equation*}
A typical element of $\Omega^n$ might be denoted by
\begin{equation*}
  (x^0,\dots,x^{n-1})
\end{equation*}
or more simply
\begin{equation*}
  \tuple x;
\end{equation*}
then $x^k$ is the $k$th \textbf{coordinate}\index{coordinate} of $\tuple x$.

A subset of $\Omega^n$ is an \textbf{$n$-ary relation}\index{nary
  relation@$n$-ary relation}\index{relation} on $\Omega$.
On any set, there are just two $0$-ary relations,
namely $\emptyset$ and $\{\emptyset\}$, that is, $0$ and $1$.
A function from $\Omega^n$ to $\Omega$ is an \textbf{$n$-ary
  operation}\index{nary operation@$n$-ary operation}\index{operation}
on $\Omega$.  In particular, a $0$-ary operation on 
$\Omega$ is a \textbf{constant}\index{constant} and can be identified with an
element of $\Omega$.  Also, an 
$n$-ary operation can be identified with an $n+1$-ary relation. 

The set of functions from $\vnn$ into $\Omega$ is denoted by
\begin{equation*}
  \seq{\Omega}.
\end{equation*}
Given an indexed family $(\Omega_k\colon k\in\vnn)$ of sets, we can form
the product
\begin{equation*}
  \prod_{k\in\vnn}\Omega_k;
\end{equation*}
this is the subset of
$\seq{(\bigcup_{k\in\vnn}\Omega_k)}$ comprising those $f$ such that
$f(k)\in\Omega_k$ in each case.  A \textbf{relation}\index{relation}
on the family 
$(\Omega_k\colon k\in\vnn)$ is a subset of some finite product
$\prod_{k<n}\Omega_{g(k)}$, where $n\in\vnn$ and
$g\in\vnn^n$.  Similarly, an operation on
the family is a function from some
$\prod_{k<n}\Omega_{g(k)}$ into some $\Omega_{g(n)}$; this can be
understood as a relation on $\prod_{k\leq n}\Omega_{g(k)}$.

Some \emph{structures} were identified in \S~\ref{sect:arith}.
In the most general sense, a \textbf{structure}\index{structure}
is a set, or even an indexed 
family of sets, with some operations and
relations on it.  The most common structure based on more than one set
is perhaps the \emph{vector space,}\index{vector space} which will come up in
Ch.~\ref{ch:analysis}.  We shall identify another example presently.

We have seen in Ch.~\ref{ch:N} that,
given the structure $(\N,1,\succn)$, we can define new operations and
relations, such as $+$, $\cdot$, and $<$.  The \textbf{full
  structure}\index{full structure} on the set $\Omega$ is just
$\Omega$ together with \emph{every} $n$-ary relation on $\Omega$, for
\emph{every} $n$ in $\vnn$.  That is, the full structure on $\Omega$
is $\Omega$ together with the elements of all of the sets
$\pow{\Omega^n}$. 
We shall now consider some operations on the
indexed family 
$(\pow{\Omega^n}\colon n\in\vnn)$. 

The \textbf{diagonal}\index{diagonal} on $\Omega$ is the element
$\Delta_{\Omega}$ of $\pow{\Omega^2}$ given by 
\begin{equation*}
\Delta_{\Omega}=\{(x,x)\colon
x\in\Omega\}.
\end{equation*}
The set $\pow{\Omega}$ (and hence
each of the sets $\pow{\Omega^n}$) can be equipped with the
\textbf{Boolean operations,}\index{Boolean operation}
namely
\begin{align*}
  (X,Y)&\mapsto X\cap Y,&
(X,Y)&\mapsto X\setminus Y
\end{align*}
and their compositions, possibly involving the constants $\Omega$ and
$\emptyset$.  So for example we have
\begin{align*}
  \compl X&=\Omega\setminus X,&
X\cup Y&=\compl{(\compl X\cap\compl Y)}.
\end{align*}
Of particular interest is the operation $(X,Y)\mapsto X\symdiff Y$,
where
\begin{equation*}
  X\symdiff Y=(X\setminus Y)\cup(Y\setminus X);
\end{equation*}
this is the \textbf{symmetric difference}\index{symmetric difference} of $X$ and $Y$.
The operation is commutative; also, 
\begin{equation*}
X\symdiff X=\emptyset.
\end{equation*}

In order to move between different powers of $\Omega$,
suppose $m$ and $n$ are in $\vnn$, and
\begin{equation*}
  f\colon m\to n.
\end{equation*}
If $n=0$, then $m$ must be $0$.  In any case, a function from $\Omega^n$ to
$\Omega^m$ is induced, namely
\begin{equation*}
  \tuple x\mapsto \tuple x\circ f.
\end{equation*}
Let us denote this function
by
\begin{equation*}
f^*.
\end{equation*}
%or more precisey $f^*_{\Omega}$.  
Then\footnote{In the language of category
  theory, the pair $(m\mapsto\Omega^m,f\mapsto f^*)$ is a
  \emph{contravariant functor} 
  from the category $(\vnn,\{\text{functions}\})$ to the
  category $(\{\text{sets}\},\{\text{functions}\})$.} 
\begin{equation*}
  f^*(x^0,\dots,x^{n-1})=(x^{f(0)},\dots,x^{f(m-1)}).
\end{equation*}
An important example arises when $f$ is the inclusion of $m$ in $m+1$.
In this case, 
$f^*(x^0,\dots,x^{m-1},x^m)=(x^0,\dots,x^{m-1})$, or more simply
\begin{equation*}
f^*(\tuple x,y)=\tuple x;
\end{equation*}
that is, $f^*$ is \textbf{projection}\index{projection} onto the first $m$ coordinates.  

In general, the function $f$ from $\Omega^n$ to $\Omega^m$ induces two
new functions.  First we have the function
$X\mapsto f^*[X]$ from $\pow{\Omega^n}$ to $\pow{\Omega^m}$, given by
\begin{equation*}
  f^*[A]=\{f^*(\tuple x)\colon \tuple x\in A\}.
\end{equation*}
When $f$ is the inclusion of $m$ in $m+1$, then
\begin{equation*}
f^*[A]=\{\tuple x\colon\Exists y(\tuple x,y)\in A\}.
\end{equation*}
So applying $f^*$ in this case corresponds to applying $\exists$, the
\textbf{existential quantifier.}\index{existential quantifier}  If $f$
is just a permutation of $m$, then $f^*$ is a permutation of coordinates. 

In the general case, we also have a function $Y\mapsto f_*(Y)$ from
$\pow{\Omega^m}$ to $\pow{\Omega^n}$, given by
\begin{equation*}
  f_*(B)=(f^*)\inv[B].
\end{equation*}
If again $f$ is the inclusion of $m$ in $m+1$, then
\begin{equation*}
f_*(B)=\{(\tuple x,y)\colon\tuple x\in B\land y\in\Omega\},
\end{equation*}
which can be identified with $B\times\Omega$.  Also, if $f$ is a
permutation of $m$, then  
\begin{equation*}
  f^*[A]=(f\inv)_*(A).
\end{equation*}

When we equip the family $(\pow{\Omega^n}\colon n\in\vnn)$ with the
diagonal, the Boolean operations, and the various operations $f_*$ and
$f^*$, let us denote the resulting structure by
\begin{equation*}
  \ls{\Omega}.
\end{equation*}
The point of the notation is to simplify the statement of
Theorem~\ref{thm:*K} on p.~\pageref{thm:*K} below. 

\subsection{Boolean rings}

So that the \emph{proof} of Theorem~\ref{thm:*K} makes sense,
suppose $R$ is a commutative ring.  As in \S~\ref{sect:seq}, we
obtain the commutative ring
\begin{equation*}
  \seq R
\end{equation*}
of sequences of elements of $R$ (only now the sequences are
$(x_0,x_1,x_2,\dots)$ rather than $(x_1,x_2,x_3,\dots)$). 
If $a$ is an element $(a_n\colon n\in\vnn)$ of $\seq R$, let
\begin{equation*}
  \supp a=\{n\in\vnn\colon a_n\neq0\};
\end{equation*}
this is the \textbf{support}\index{support} of $a$.  In one case of interest, $R$ is $\B$,
where
\begin{equation*}
\B=\{0,1\},
\end{equation*}
considered as a two-element field.

\begin{theorem}
  The map $x\mapsto\supp x$ on $\seq{\B}$ is a bijection onto
  $\pow{\vnn}$.  Also
  \begin{gather*}
    \supp 0=\emptyset,\\
\supp 1=\vnn,\\
\supp{xy}=\supp x\cap\supp y,\\
\supp{x+y}=\supp x\symdiff\supp y,
  \end{gather*}
Thus  $(\pow{\vnn},\emptyset,\vnn,\symdiff,\cap)$ is a commutative
unital ring in which each element is its own additive inverse. 
\end{theorem}

A ring is called \textbf{Boolean}\index{Boolean} if in
it
\begin{equation}\label{eqn:x^2=x}
  x^2=x.
\end{equation}
So $\B$, $\seq{\B}$, and $\pow{\vnn}$ are Boolean rings.

\begin{theorem}\label{thm:Br}
Let $R$ be a Boolean ring.  In this ring,
\begin{equation}\label{eqn:2x=0}
  2x=0,
\end{equation}
and hence
\begin{equation*}
  -x=x.
\end{equation*}
Also $R$ is commutative, and $R$ can be partially ordered by the rule
\begin{equation*}
  x\leq y\iff xy=x.
\end{equation*}
Then a nonempty subset $I$ of $R$ is an ideal of $R$ if and only if
\begin{gather}\label{eqn:x+y-in-I}
  x\in I\land y\in I\implies x+y\in I,\\
x\in I\land y\leq x\implies y\in I.\label{eqn:I<}
\end{gather}
All prime ideals of $R$ are maximal, and and ideal $I$ is maximal if
and only if 
\begin{equation*}
  x\in I\iff x+1\notin I.
\end{equation*}
\end{theorem}

\begin{proof}
  For~\eqref{eqn:2x=0}, compute
  \begin{equation*}
    2x=(2x)^2=4x^2=4x.
  \end{equation*}
For commutativity then, compute
\begin{gather*}
  x+y=(x+y)^2=x^2+xy+yx+y^2=x+xy+yx+y,\\
0=xy+yx.
\end{gather*}
Immediately from the definitions, $x\leq x$. If $x\leq y$ and $y\leq
x$, then $x=xy=yx=y$.  If $x\leq y$ and $y\leq z$, then $xz=xyz=xy=x$,
so $x\leq z$.  Thus $\leq$ partially orders $R$.

For the characterization of ideals, note that~\eqref{eqn:I<} is
equivalent to $x\in I\implies xz\in I$. 

From~\eqref{eqn:x^2=x}, we get
\begin{equation*}
  x(x-1)=0,
\end{equation*}
so in every Boolean integral domain, the only elements are $0$ and
$1$.  In short, every Boolean integral domain is a field, so prime
ideals of $R$ are maximal.  Moreover, an ideal $I$ of $R$ is maximal
if and only if $R/I$ is the disjoint union of two cosets, $I$ and
$1+I$; this yields the characterization of maximal ideals.
\end{proof}

\begin{theorem}\label{thm:IPw}
  A subset $I$ of $\pow{\vnn}$ is an ideal if and only if
  \begin{gather}\label{eqn:union}
x\in I\land y\in I\implies x\cup y\in I,\\\label{eqn:y-in-I}
x\in I\land y\included x\implies y\in I;
\end{gather}
an ideal $M$ of $\pow{\vnn}$ is maximal if and only if
\begin{equation*}
x\in M\iff\vnn\setminus x\notin M.
  \end{equation*}
A principal ideal $(A)$ of $\pow{\vnn}$ is maximal if and
only if $A=\vnn\setminus\{n\}$ for some $n$ in $\vnn$.
A maximal ideal of $\pow{\vnn}$ is non-principal
if and only if it contains all finite subsets of $\vnn$.
\end{theorem}

\begin{proof}
The conditions~\eqref{eqn:union} and~\eqref{eqn:y-in-I} are equivalent
to~\eqref{eqn:x+y-in-I} and~\eqref{eqn:I<} since, in $\pow{\vnn}$, 
\begin{gather*}
y\included x\iff y\cap x=y\iff y\leq x,\\
x\cup y=x+y+xy,\\
x+y\included x\cup y.\qedhere
\end{gather*}
\end{proof}

\begin{theorem}\label{thm:11I}
  Let $K$ be a field.  The function $X\mapsto\Supp X$ gives a one-to-one
  correspondence between the ideals of $\Ko$ and the ideals of
  $\pow{\vnn}$. 
\end{theorem}

\begin{proof}
If $X\included\vnn$, let $u(X)$ be the element of $\Ko$ defined by
\begin{equation*}
  u(X)_n=
  \begin{cases}
    1,&\text{ if }n\in X,\\
    0,&\text{ if }n\notin X.
  \end{cases}
\end{equation*}
Then
\begin{equation*}
  X=\supp{u(X)}.
\end{equation*}
Suppose $I$ is an ideal of $\Ko$, and
$a\in I$.  Then $u(\supp a)\in I$.
If $b\in\Ko$, and $\supp b=\supp a$,
then $b=bu(\supp a)$, so $b\in I$.
This shows
$\Suppinv{\Supp I}=I$.  Therefore $X\mapsto\Supp X$ is injective on
the set of ideals of $\Ko$. 

If $X\included\supp a$, then $X=\supp{au(X)}$.  Also,
\begin{equation*}
  \supp a\symdiff\supp b\included\supp{a+b}.
\end{equation*}
This shows $\Supp I$ is an ideal of $\pow{\vnn}$.

Finally, if $J$ is an ideal of $\pow{\vnn}$, then $\Suppinv J$ is an
ideal of $\Ko$ by Theorem~\ref{thm:IPw}, since
  \begin{equation*}
\supp{a+b}\included\supp a\cup\supp b.\qedhere
  \end{equation*}
\end{proof}

\section{Ultrapowers}\label{sect:ultrap}

Throughout this section, $\maxi$ is a maximal ideal of $\pow{\vnn}$.  For now,
$K$ is a field.\footnote{The approach here is inspired by a lecture of
  Angus Macintyre \cite{Macintyre-Berkeley}.}  
Then by Theorem~\ref{thm:11I},
$\Suppinv {\maxi}$ is a maximal ideal of $\Ko$; for ease of writing and reading, let us denote this
ideal also by $\maxi$.  Then we can form the quotient
\begin{equation*}
  \Ko/\maxi,
\end{equation*}
which must be a field; it is called an
  \textbf{ultrapower}\index{ultrapower} of $K$.    
If $a$ and $b$ are in $\Ko$, and $a+\maxi=b+\maxi$, then $a$ and $b$ are
\textbf{congruent}\index{congruent} \emph{modulo} $\maxi$, and we may write
\begin{equation*}%\label{eqn:a=b}
  a\equiv b
\end{equation*}
or more precisely $a\equiv b\pmod {\maxi}$.

The elements of the ideal $\maxi$ of $\pow{\vnn}$ should be considered as
\textbf{small}\index{small} subsets of $\vnn$; every other subset is
\textbf{large.}\index{large}  This means, by Theorem~\ref{thm:IPw}: 
\begin{compactenum}[(1)]
\item
 a subset of a small set
is small, 
\item
the union of two small sets is small, and 
\item
a set is small if and only if its complement is large.
\end{compactenum}
In particular, the empty set is small, but $\vnn$ itself is large. 

\begin{theorem}\label{thm:small}
  If $a,b\in\Ko$, then
\begin{align*}
a\equiv b&\iff\{n\in\vnn\colon a_n\neq b_n\}\in \maxi\\
&\iff\{n\in\vnn\colon a_n= b_n\}\notin \maxi.
\end{align*}
If $a$ and $b$ are constant as functions on $\vnn$, then $a\equiv b$
if and only if $a=b$. 
\end{theorem}

In other words, two elements of $\Ko$ are congruent if and only if the
set of
indices where they differ is small, that is, the set of indices where
they agree is large; in particular, the \textbf{diagonal map}\index{diagonal map}
\begin{equation*}
  x\mapsto(x,x,\dots)+\maxi
\end{equation*}
is an embedding of $K$ in $\Ko/\maxi$.  Let us identify $K$ with its
image in $\Ko/\maxi$, so that we may write
\begin{equation}\label{eqn:KKoM}
K\included\Ko/\maxi.
\end{equation}
The theorem shows how congruence can be defined independently of the
field structure of $K$.  We shall usually be interested only in the
case where $K$ is a field, and in particular $K$ is the complete
ordered field $\R$.  However, \S~\ref{sect:higher} will consider a
different structure, albeit one derived from a field.  In any case,
the question of whether the inclusion in~\eqref{eqn:KKoM} is proper is
settled by means of the next theorem below. 

\begin{lemma}
If $\omega=X_0\cup\cdots\cup X_n$, then one of the sets $X_k$ is large.
\end{lemma}

\begin{proof}
By induction, if each set $X_i$ is small, then so is $X_0\cup\cdots\cup X_{n-1}$.
\end{proof}

\begin{theorem}\label{thm:proper}
The inclusion~\eqref{eqn:KKoM} of $K$ in $\Ko/\maxi$ is proper if and only if $K$ is infinite and the maximal ideal $\maxi$ of $\Ko$ is not principal.
\end{theorem}

\begin{proof}
If $K$ is finite, and $a\in\Ko$, then, by the lemma, the set $\{k\colon a_k=b\}$ is large for some $b$ in $K$; but then $a\equiv(b,b,\dots)$.

In case $K$ is infinite, there is (by the Axiom of Choice) an element $(a_0,a_1,\dots)$ of $\Ko$ such that $a_j\neq a_k$ whenever $j<k$.  If $(a_0,a_1,\dots)\equiv(b,b,\dots)$, then $a_n=b$ for some $n$, and $\{n\}$ is a large subset of $\vnn$, so
$\vnn\setminus\{n\}$ is small; but in this case every subset of $\vnn$ that does not contain $n$ is small, so $\maxi$ is generated by $\vnn\setminus\{n\}$.
Conversely, by Theorem~\ref{thm:IPw}, if $\maxi$ is principal, then
$\maxi=(\vnn\setminus\{n\})$ for some $n$ in $\vnn$, and then $(a_0,a_1,\dots)\equiv(a_n,a_n,\dots)$. 
\end{proof}

We assume henceforth that $K$ is infinite and $\maxi$ is not
principal.  We shall show that $\Ko/\maxi$ still has the features of
$K$; to be precise, $\ls K$ (as defined in~\ref{subsect:set-pow})
embeds in $\ls{\Ko/\maxi}$.  Then
an element of $\Ko/\maxi$ that is not in $K$ will have `generic' or
`ideal' properties that no one element of $K$ has; for example, in
case $K$ is $\R$, and $a\in K$, then there will be elements $b$ of $\Ko/\maxi\setminus K$ that are `absolutely' close to $a$ in the sense that no elements of $K$ lie between $a$ and $b$.

To work this all out, some notational conventions will be useful.
There is a bijection
\begin{equation*}
%((x^0_0,x^0_1,\dots),\dots,(x^{n-1}_0,x^{n-1}_1,\dots))
  \bigl((x^0_k\colon k\in\vnn),\dots,(x^{n-1}_k\colon k\in\vnn)\bigr)
\mapsto
\bigl((x^0_k,\dots,x^{n-1}_k)\colon k\in\vnn\bigr)
\end{equation*}
from $(\Ko)^n$ onto $\seq{(K^n)}$; we may write the bijection more
simply as
\begin{equation*}
  (x^0,\dots,x^{n-1})\mapsto(\tuple x_k\colon k\in\vnn).
\end{equation*}
So a plainface $x^j$ may denote $(x^j_k\colon k\in\vnn)$ in $\Ko$ (and $x$ may
denote $(x_k\colon k\in\vnn)$); while a
boldface $\tuple x_k$ denotes $(x_k^0,\dots,x_k^{n-1})$ in $K^n$ for some $n$ in
$\vnn$ (and $\tuple x$ denotes $(x^0,\dots,x^{n-1})$). 
Now write
\begin{equation}\label{eqn:sKKoM}
  \sK=\Ko/\maxi.
\end{equation}
There is a well-defined isomorphism
\begin{equation*}
  (x^0+\maxi,\dots,x^{n-1}+\maxi)\mapsto
(x^0,\dots,x^{n-1})+\maxi^n
\end{equation*}
from $(\sK)^n$, that is, $(\Ko/\maxi)^n$, onto $(\Ko)^n/\maxi^n$.  We may treat this isomorphism as an identity and write $\maxi$ for $\maxi^n$, so that
\begin{equation*}
  (x^0+\maxi,\dots,x^{n-1}+\maxi)=(x^0,\dots,x^{n-1})+\maxi.
\end{equation*}
Instead of
$x^0\equiv y^0\land\dotsb\land x^{n-1}\equiv y^{n-1}$,
we may write
\begin{equation*}
(x^0,\dots,x^{n-1})\equiv(y^0,\dots,y^{n-1}).
\end{equation*}
Then there is an analogue of Theorem~\ref{thm:small}:

\begin{theorem}
 If $(a^0,\dots,a^{n-1})$ and $(b^0,\dots,b^{n-1})$ are in $(\Ko)^n$, then
 \begin{equation*}
(a^0,\dots,a^{n-1})\equiv(b^0,\dots,b^{n-1})\iff\{n\in\vnn\colon\tuple a_n\neq\tuple b_n\}\in \maxi.
\end{equation*} 
\end{theorem}

For each $n$ in $\vnn$, there is a function $S\mapsto\sS$ from
$\pow{K^n}$ to $\pow{(\sK)^n}$ given by
\begin{equation}\label{eqn:*S}
  \sS=\{(x^0,\dots,x^{n-1})+\maxi\colon(\tuple
  x_k\colon k\in\vnn)\in \seq S\}.
\end{equation}
This function does indeed take $K$ to the set $\sK$ defined
by~\eqref{eqn:sKKoM}; also, 
\begin{equation*}
\starred{(K^n)}=(\sK)^n,  
\end{equation*}
so we may write simply $\sK^n$ for either member of this equation.
The function $S\mapsto\sS$ will be a way to carry any
structure on $K$ over to $\sK$: if $S$ is an $n$-ary relation on $K$,
then $\sS$ is an $n$-ary relation on $\sK$.

If $(x^0,\dots,x^{n-1})+\maxi\in\sS$, it need not be the case that 
$(x^0,\dots,x^{n-1})\in\seq S$; but it is necessary and sufficient that 
$(x^0,\dots,x^{n-1})$ be congruent to a member of $\seq S$.

The following theorem is fundamental.\footnote{An ultrapower is a
  special case of an \emph{ultraproduct.}  When generalized to
  ultraproducts and formulated in terms of logical symbolism, the
  next theorem is known as \emph{\L o\'s's Theorem} and can be traced to
  \L o\'s's paper~\cite{MR0075156}.}
Notation
introduced in~\ref{subsect:set-pow} is used.

\begin{theorem}\label{thm:*K}
The function $S\mapsto\sS$ is an embedding of $\ls K$ in $\ls{\sK}$, and
\begin{equation}\label{eqn:SRS}
\sS\cap K^n=S
\end{equation}
whenever $n\in\vnn$ and $S\included K^n$.  
\end{theorem}

\begin{proof}
We have $S\included\sS\cap K^n$ simply because,
if $\tuple x\in S$, then $(\tuple x,\tuple x,\dots)\in\seq S$.  Conversely, if $(\tuple x,\tuple
x,\dots)\in\sS$, then $(\tuple x,\tuple x,\dots)$ is congruent
to an element $(\tuple y_0,\tuple y_1,\dots)$ of $\seq S$; but then
$\tuple x=\tuple y_k$ for some $k$, and therefore $\tuple x\in S$.
Thus $\sS\cap K^n\included S$, and~\eqref{eqn:SRS} holds. 

To show that $S\mapsto\sS$ is an embedding, it is enough to show
\begin{equation*}%\label{eqn:*=}
\starred{(\Delta_K)}=\Delta_{(\sK)}
\end{equation*}
(which is immediate from the definitions),
and for all $n$ in $\vnn$ and all subsets $S$ and $T$ of $K^n$,
\begin{gather}
\label{eqn:st-neg}
\starred{(\compl S)}=\compl{(\sS)},\\
%\starred{( K^n\setminus S)}=\sK^n\setminus\sS,\\
\label{eqn:st-and}
  \starred{(S\cap T)}=\sS\cap\sT,
\end{gather}
and for all $m$ in $\vnn$ and all subsets $U$ of $K^m$, 
if $f:m\to n$ and $g:n\to m$, then
\begin{gather}
\label{eqn:upper}
  \starred{(g^*[U])}=g^*[\sU],\\
\label{eqn:lower}
  \starred{(f_*(S))}=f_*(\sS).
\end{gather}
To prove these, let $(x^0,\dots,x^{n-1})\in(\Ko)^n$.
For~\eqref{eqn:st-neg} we have
\begin{align*}
%&\phantom{{}\iff{}}
(x^0,\dots,x^{n-1})+\maxi\in\starred{(\compl S)}
&\iff\{k\colon\tuple x_k\notin\compl S\}\in \maxi\\
&\iff\{k\colon\tuple x_k\notin S\}\notin \maxi\\
&\iff  (x^0,\dots,x^{n-1})+\maxi\notin\sS\\ 
&\iff  (x^0,\dots,x^{n-1})+\maxi\in\compl{(\sS)},
\end{align*}
and for~\eqref{eqn:st-and}, 
\begin{align*}
&%\phantom{{}\iff{}}
(x^0,\dots,x^{n-1})+\maxi\in\starred{(S\cap T)}\\
&\iff\{k\colon\tuple x_k\notin S\cap T\}\in \maxi\\
&\iff\{k\colon\tuple x_k\notin S\}
\cup\{k\colon\tuple x_k\notin T\}\in \maxi\\
&\iff\{k\colon\tuple x_k\notin S\}\in \maxi\land
\{k\colon\tuple x_k\notin T\}\in \maxi\\
&\iff  
(x^0,\dots,x^{n-1})+\maxi\in\sS\land
  (x^0,\dots,x^{n-1})+\maxi\in\sT\\
&\iff  (x^0,\dots,x^{n-1})+\maxi\in\sS\cap\sT.
\end{align*}
For~\eqref{eqn:upper},
\begin{align*}
  g^*[\sU]
&=g^*(\{(y^0+\maxi,\dots,y^{m-1}+\maxi)\colon(\tuple y_k\colon
  k\in\vnn)\in\seq U\})\\
&=\{g^*(y^0+\maxi,\dots,y^{m-1}+\maxi)\colon(\tuple y_k\colon k\in\vnn)\in\seq U\})\\
&=\{g^*(y^0,\dots,y^{m-1})+\maxi\colon(\tuple y_k\colon k\in\vnn)\in\seq U\}\\
&=\{(t^0,\dots,t^{n-1})+\maxi\colon(\tuple t_k\colon
  k\in\vnn)\in\seq{(g^*[U])}\}\\
&=\starred{(g^*[U])},
\end{align*}
and for~\eqref{eqn:lower},
\begin{align*}
f_*(\sS)
&=\{(t^0,\dots,t^{n-1})+\maxi\colon f^*(t^0,\dots,t^{n-1})+\maxi\in\sT\}\\
&=\{(t^0,\dots,t^{n-1})+\maxi\colon (f^*(\tuple t_k)\colon
k\in\vnn)\in\seq S\}\\
&=\{(t^0,\dots,t^{n-1})+\maxi\colon (\tuple t_k\colon
k\in\vnn)\in\seq{(t_*(S))}\}\\
&=\starred{(f_*(S))}.
\qedhere
\end{align*}
\end{proof}

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

Given some relations $S_0$, \dots, $S_{n-1}$ on $K$, we may apply some
of the operations defined in~\ref{subsect:set-pow} repeatedly in order to get a
new relation $U$.  If we apply the same
operations to $\sS_0$, \dots, $\sS_{n-1}$, then,
by Theorem~\ref{thm:*K},
 we must get the relation $\sU$.  For example, if $S\included K^n$,
 and $T\included K^{n+1}$, and $f$ is the inclusion of $n$ in $n+1$,
 then
 \begin{equation*}
   \starred{(\compl{(f^*(\compl{(\compl S\cup f_*(T))}))})}
=\compl{(f^*(\compl{(\compl{(\sS)}\cup f_*(\sT))}))}.
 \end{equation*}
We now develop an alternative notation for such equations and their
members.  

Different people can have the same name.  Supposing $S\included K^n$,
we want a symbol that can denote both $S$ and $\sS$, depending on the
context.  A person is
different from the name of the person; but we shall use $S$ as a symbol
for both itself and $\sS$.
To distinguish which of these two relations is meant by $S$, we
can write $S^K$ for the relation $S$, and $S^{(\sK)}$ for $\sS$.  We
may say $S$ is \textbf{interpreted}\index{interpreted} in $K$ as $S$, and in $\sK$ as
$\sS$.  (Of course we have already been using $\sS$ as a name for
$\sS$; but the name does not show clearly that the relation is to be
understood as being on
$\sK$, rather than on $\starred L$ for some field $L$ that is
different from $K$.) 

Considered as a symbol for relations, $S$ here is a
\textbf{predicate.}\index{predicate} 
Since $S^K\included K^n$, we may say in particular that $S$ is an
\textbf{$n$-ary}\index{nary predicate@$n$-ary predicate} predicate.
Then we can write down the string 
\begin{equation*}
Sx^0\cdots x^{n-1}
\end{equation*}
of $n+1$ symbols.  This string is an example of a
\textbf{formula,}\index{formula} and it too has interpretations: it is interpreted in
$K$ as $S$, and in $\sK$ as $\sS$.  We may say also that the string
\textbf{defines}\index{defines} its interpretations.
The symbols
$x^k$ are \textbf{variables,}\index{variables} and the point of introducing them is to
be able to write down new formulas that define new relations.  So
for example if $g\colon n\to m$, then the formula
\begin{equation*}
  Sx^{g(0)}\cdots x^{g(n-1)}
\end{equation*}
defines in $K$ the $m$-ary relation $g^*(S^K)$.  We may also replace
variables with \textbf{constants,}\index{constants} namely symbols for elements of $K$.
Usually the symbol is the 
same as the element, so that if $a^0$, \dots, $a^{n-1}$ are elements
of $K$, then we can write the formula 
\begin{equation*}
Sa^0\cdots a^{n-1}.
\end{equation*}
Having no variables, this formula is a
\textbf{sentence;}\index{sentence} the sentence is 
\textbf{true}\index{true} in $K$ if 
\begin{equation*}
(a^0,\dots,a^{n-1})\in S^K. 
\end{equation*}
A set of predicates is a \textbf{signature.}  The predicates we are
considering come from $\bigcup_{n\in\vnn}\pow{K^n}$, which might be
called the \textbf{full signature}\index{full signature} signature of
$K$.  The formulas 
introduced so far are more precisely examples of \emph{atomic}
formulas in this signature.  In general, an \textbf{atomic
  formula}\index{atomic formula} in the full signature of $K$ is a
string 
\begin{equation*}
  St^0\dotsb t^{n-1}
\end{equation*}
for some $n$ in $\vnn$,
where $S\included K^n$, and each $t^k$ is either a variable or a constant.  
In case $n=2$, instead of $Stu$ we customarily write 
\begin{equation*}
t\mathrel Su.
\end{equation*}
All variables appearing in an atomic formula are called
\textbf{free.}\index{free} 
The \textbf{formulas}\index{formulas} of our signature, along with their free variables, are defined
recursively:
\begin{compactenum}
\item 
Atomic formulas are formulas, and all of their variables are free.
\item
If $\phi$ is a formula, then so is its \textbf{negation,}\index{negation} $\lnot\phi$,
and every free variable in $\phi$ is free in $\lnot\phi$.
\item
Suppose $\phi$ and $\psi$ are formulas, and no variable that occurs in
$\phi$, but is not free in $\phi$, is free in $\psi$. 
Then the \textbf{conjunctions}\index{conjunctions}
$(\phi\land\psi)$ and $(\psi\land\phi)$ are formulas, and every
variable that is free in 
$\phi$ or $\psi$ is free in the conjunctions.
\item
If $\phi$ is a formula, and $x$ is a free variable of $\phi$, then the
\textbf{instantiation}\index{instantiation}\footnote{I don't know of a common term for
  formulas $\Exists x\phi$; \emph{instantiation} seems to work,
  though, since the formula will be interpreted as saying that $\phi$
  is true for some \emph{instance} of $x$.} $\Exists x\phi$ is
a formula.
\end{compactenum}
More precisely, the formulas so defined are the \emph{good}
formulas;\footnote{Such terminology is used for example by Cohen in
  his treatment of logic in \cite{MR0232676}.}
but the validity of their definition must be justified.  Usually formulas are
defined as above, but without any restrictions on their variables.
This means the set $F$ of 
formulas is $\bigcap\mathscr A$, where $\mathscr A$ consists of
the sets $B$ of strings such that $B$ contains the atomic formulas and
is closed under the operations of negation, conjunction, and
instantiation.  Then $F$ admits induction, in the sense that no proper
subset has the same closure properties.  Also each formula has a set
of free variables, and this is defined recursively.
But an analogue of
Theorem~\ref{thm:P-ind} shows that induction is not enough to ensure
that such recursive definitions are valid: one needs in addition the
following: 

\begin{theorem}[Unique Readability]
  Every formula is \emph{uniquely} an atomic formula, a negation, a
  conjunction. or an instantiation.  Every conjunction is
  $(\phi\land\psi)$ for some \emph{unique} formulas $\phi$ and $\psi$.
\end{theorem}

Then free variables of formulas can be defined; then one can go back
and make the more restrictive definition of formulas as above.

We can introduce the other customary symbols as abbreviations:
\begin{gather*} 
(\phi\lto\psi)\text{ means }\lnot(\phi\land\lnot\psi),\\
(\phi\lor\psi)\text{ means }(\lnot\phi\lto\psi),\\
(\phi\liff\psi)\text{ means }((\phi\lto\psi)\land(\psi\lto\phi)),\\
\Forall x\phi\text{ means }\lnot\Exists x\lnot\phi.
\end{gather*}
If the free variables appearing in a formula are all on the list
$(x^0,\dots,x^{n-1})$, then the formula can be called
\textbf{$n$-ary.}\index{nary formula@$n$-ary formula}  In this case,
if $n\leq r$, then the formula is 
also $r$-ary.  If we want to understand a formula $\phi$ \emph{as}
$n$-ary, we may write it as $\phi(x^0,\dots,x^{n-1})$.

Suppose $t^k$ is in $K$ or is a variable for each
$k$ in $\vnn$.  For each $n$-ary formula $\theta$, a formula
$\theta(t^0,\dots,t^{n-1})$ is defined.  The definition is recursive: 
\begin{compactenum}
\item 
If $\theta$ is atomic, then $\theta(\tuple t)$ is the result of
replacing each $x^k$ with $t^k$.
\item
If $\theta$ is $\lnot\phi$, then $\theta(\tuple t)$ is $\lnot\psi$,
where $\psi$ is
$\phi(\tuple t)$.
\item
If $\theta$ is $(\phi\land\psi)$, then $\theta(\tuple t)$ is
$(\phi(\tuple t)\land\psi(\tuple t))$.
\item
If $\theta$ is $\Exists{x^{\ell}}\phi$, then we can understand $\phi$
as $r$-ary, where $r=\max(\ell+1,n)$.  In this case,
 $\theta(\tuple t)$ is $\Exists{x^{\ell}}\psi$, where $\psi$ is
$\phi(\tuple u)$, where
\begin{equation*}
  u^k=
  \begin{cases}
x,&\text{ if }k=\ell,\\
    t^k,&\text{ if }k\neq\ell.
  \end{cases}
\end{equation*}
\end{compactenum}
The case $n=0$ is not excluded; in this case,
$\theta(t^0,\dots,t^{n-1})$ is simply $\theta$.

The \textbf{parameters}\index{parameters} of a formula are the (symbols of) elements of
$K$ that appear in the formula.  A \textbf{sentence}\index{sentence} is a formula
with no free variables, namely a $0$-ary or \textbf{nullary}\index{nullary} formula.  

A sentence $\sigma$ with parameters from $K$
may be \textbf{true}\index{true} in $K$, in which case we write
\begin{equation*}
  K\models\sigma;
\end{equation*}
otherwise $\sigma$ is \textbf{false}\index{false} in $K$, and we write
\begin{equation*}
  K\nmodels\sigma.
\end{equation*}
The definition is recursive:
\begin{compactenum}
\item 
$K\models Sa^0\dotsb a^{n-1}$ if and only if $(a^0,\dots,a^{n-1})\in
  S$.
\item
$K\models\lnot\sigma$ if and only if $K\nmodels\sigma$.
\item
$K\models(\sigma\land\tau)$ if and only if $K\models\sigma$ and
  $K\models\tau$.
\item
$K\models\Exists x\phi$ if and only if, assuming $\phi$ is $n$-ary,
 there is $\tuple a$
in $K^n$ such that $K\models\phi(\tuple a)$.
\end{compactenum}
All of the foregoing holds also with $K$ replaced by $\sK$.

The definition of truth shows why formulas as we have defined them are
more precisely called formulas of \textbf{first-order
  logic.}\index{first-order logic}  In our
formulas, variables stand only for \emph{elements} of $K$.  If we
allowed variables standing for \emph{relations} on $K$, then our
formulas would be \emph{second order.}  The third of the Peano axioms
in \S~\ref{sect:N} is apparently second order; so is the definition of
completeness of an ordered field.  In Corollaries~\ref{cor:arch-not-1} and~\ref{cor:Peano-not-1} of Chapter~\ref{ch:analysis}, we shall
note that there is no first-order axiomatization of $\N$ or $\R$.

If $S=\{(x,x)\colon x\in K\}$, then, instead of $t\mathrel Su$, we
may write
\begin{equation*}
  t=u.
\end{equation*}
Then $K\models a=b$ if and only if $a=b$; and likewise in
$\sK$, by Theorem~\ref{thm:*K}.
An $n$-ary formula~$\phi$ \textbf{defines}\index{defines} an $n$-ary relation
on $K$, namely $\{\tuple a\in K^n\colon\sK\models\phi(\tuple
a)\}$; this relation can be denoted by
\begin{equation*}
  \phi^K.
\end{equation*}
In case $\sigma$ is nullary, we have
  $\sigma^K=\{x\in\{0\}\colon K\models\sigma\}$,
so that
\begin{equation*}
  K\models\sigma\iff\sigma^K=1.
\end{equation*}
In the same way, the
formula with parameters from $\sK$ defines a relation on $\sK$,
denoted by $\phi^{(\sK)}$. 

\begin{theorem}\label{thm:*}
  Let $\theta$ be a formula with parameters from $K$.  Then
  \begin{equation*}
    \starred{(\theta^K)}=\theta^{(\sK)}.
  \end{equation*}
\end{theorem}

\begin{proof}
  Since formulas are defined recursively, we can argue inductively,
  using Theorem~\ref{thm:*K}.  Indeed, by this theorem,
  the claim is true when $\theta$ is atomic.  If
  the claim is true when $\theta$ is $\phi$, then
  \begin{equation*}
\starred{((\lnot\phi)^K)}
=\starred{(\compl{(\phi^K)})}
=\compl{(\starred{(\phi^K)})}
=\compl{(\phi^{(\sK)})}
=(\lnot\phi)^{(\sK)}.                         
  \end{equation*}
so the claim is true when $\theta$ is $\lnot\phi$.
Similarly, if the claim is true when $\theta$ is $\phi$ or $\psi$,
then the claim is true when $\theta$ is
$(\phi\land\psi)$.  

For the final case, let us first note that, if the claim is true when
$\theta$ is considered as $m$-ary, and $m\leq n$, then the claim is
still true when $\theta$ is considered as $n$-ary.  Indeed, let $f$ be
the inclusion of $m$ in $n$.  Then
\begin{equation*}
  \theta(x^0,\dots,x^{n-1})^K
=\theta(x^0,\dots,x^{m-1})^K\times K^{n-m}
=f_*(\theta(x^0,\dots,x^{m-1})^K),
\end{equation*}
and likewise with $\sK$ in place of $K$.
To finish then,
we suppose the claim is true when $\theta$
is $\phi$, and we prove the claim when $\theta$ is
$\Exists{x^{\ell}}\phi$.

We may assume $\phi$ and $\Exists{x^{\ell}}\phi$ are both $n$-ary,
where $\ell<n$.  Then we can understand $(x^0,\dots,x^{n-1})$ as
$(\tuple x,y,\tuple z)$, where
$\tuple x$ is $(x^0,\dots,x^{\ell-1})$,
and $y$ is $x^{\ell}$, and
$\tuple z$ is $(x^{\ell+1},\dots,x^{n-1})$.
Let $f$ be the function from $n-1$ to $n$ given by
\begin{equation*}
  f(k)=
  \begin{cases}
    k,&\text{ if }k<\ell,\\
k+1,&\text{ if }\ell\leq k<n-1.
  \end{cases}
\end{equation*}
Then
\begin{equation}\label{eqn:_*^*}
  (\Exists{x^{\ell}}\phi)^K=f_*(f^*[\phi^K]),
\end{equation}
which yield the claim when
$\theta$ is $\Exists{x^{\ell}}\phi$.  
To prove~\eqref{eqn:_*^*}, we have
\begin{align*}
  (\Exists{x^{\ell}}\phi)^K
&=\{(\tuple a,b,\tuple c)\in
  K^n\colon K\models(\Exists{x^{\ell}}\phi)(\tuple a,b,\tuple c)\}\\
&=\{(\tuple a,b,\tuple c)\in
  K^n\colon K\models\Exists{x^{\ell}}\phi(\tuple a,x^{\ell},\tuple c)\}\\
&=f_*(
\{(\tuple a,\tuple c)\in
  K^{n-1}\colon K\models\Exists{x^{\ell}}\phi(\tuple
  a,x^{\ell},\tuple c)\}), 
\end{align*}
We have also that $K\models\Exists{x^{\ell}}\phi(\tuple
a,x^{\ell},\tuple c)$ if and only if $K\models\phi(\tuple a,b,\tuple
c)$ for some $b$ in $K$.  Then
\begin{equation*}
  \{(\tuple a,\tuple c)\in
  K^{n-1}\colon K\models\Exists{x^{\ell}}\phi(\tuple
  a,x^{\ell},\tuple c)\}
=f^*[\phi^K].
\end{equation*}
Combining these results, we have~\eqref{eqn:_*^*}.
\end{proof}

\begin{theorem}\label{thm:elsub}
  Let $\sigma$ be a sentence with parameters from $K$.
  Then\footnote{In model-theoretic terms, the theorem is that the full
    structure on $K$ is an \emph{elementary
      substructure}\index{elementary substructure} of the
    structure induced on $\sK$ by $X\mapsto\sX$.}
  \begin{equation*}
    K\models\sigma\iff\sK\models\sigma.
  \end{equation*}
\end{theorem}

\begin{proof}
  When $n=0$, then equation~\eqref{eqn:SRS} in Theorem~\ref{thm:*K} is
  simply $\sS=S$. 
\end{proof}

\section{Mock higher-order logic}\label{sect:higher}

We may want our logic to be able to refer to relations on $K$,
relations on sets of relations of $K$, and so forth.  To achieve this, we
can enlarge $K$ to a set that contains, as \emph{elements,} all of the
relations just mentioned.

Each of the relations that we want to consider is of a certain
\textbf{type.}\index{type} Formally, a type is a string, and the set
of types is 
defined recursively: 
\begin{compactenum}
\item 
$0$ is a type.
\item
If $n\in\vnn\setminus\{0\}$, and $(t_0,\dots,\tau_{n-1})$ is a list of
$n$ types, then the string 
\begin{equation*}
n\tau_0\dotsb\tau_{n-1}
\end{equation*}
is a type.
\end{compactenum}
These two conditions are really one, since the type $0$ is the unique type of the form $n\tau_0\dotsb\tau_{n-1}$ where $n=0$.  So that we can define functions \emph{on} the set of types by recursion, we observe:

\begin{theorem}[Unique Readability]
  Every type has the form $n\tau_0\dotsb\tau_{n-1}$ for some
  \emph{unique} $n$ in $\vnn$ and some \emph{unique} list
  $(\tau_0,\dots,\tau_{n-1})$ of types.
\end{theorem}

Given the set $K$, we can now define a function $\tau\mapsto K_{\tau}$ recursively by:
\begin{compactenum}[(1)]
\item 
$K_0=K$;
\item
if $\tau$ is a type $n\tau_0\dotsb\tau_{n-1}$, where $n>0$, then 
\begin{equation*}
K_{\tau}=\pow{K_{\tau(0)}\times\dotsb\times K_{\tau(n-1)}}.
\end{equation*}
\end{compactenum}
Here $\tau(j)$ is just $\tau_j$ when written as a subscript.
The first part of the definition is not a special case of the second: if $\tau$ is
not $0$, then elements of $K_{\tau}$ are \emph{relations;} but
elements of $K_0$ are just elements of $K$.
Letting $T$ be the set of types, we define
\begin{equation*}
  \tilde K=\bigcup_{\tau\in T}K_{\tau}.
\end{equation*}
Letting $\maxi$ be a non-principal maximal ideal of $\pow{\vnn}$ as in \S~\ref{sect:ultrap}, we have a
special case of~\eqref{eqn:sKKoM} there:
\begin{equation*}
  \stK=\seq{\tilde K}/\maxi.
\end{equation*}

Now we have an apparent ambiguity. In \S~\ref{sect:ultrap}, we first
defined $\sK$ in~\eqref{eqn:sKKoM}, and then, if $S\included K^n$, we
defined $\sS$ in~\eqref{eqn:*S}.  As we noted, when $S=K$, then
the two definitions agree.  However, the definition of $\sS$ in general depends
on the prior choice of $K$, in the sense that $\sS$ is a set of
congruence-classes of elements of $(\Ko)^n$. 
But now there is another possibility: since $K\included\tilde K$, we
can understand $\sS$ also as a set of congruence-classes of elements
of $(\seq{\tilde K})^n$.  A congruence-class of 
elements of $(\Ko)^n$ is never identical to a congruence-class of elements
of $(\seq{\tilde K})^n$, since every element of $(\Ko)^n$ is congruent to
elements of $(\seq{\tilde K})^n$ that are not in $(\Ko)^n$.

In the notation introduced in the last section, the two possibilities
for $\sS$ can be distinguished as $S^{(\sK)}$ and $S^{(\stK)}$.
However, we need not worry about the distinction, once we observe the
following. 

\begin{theorem}
$\sK$ embeds in $\stK$ under a map $i$ given by
  \begin{equation*}
i(\{x\in\seq K\colon x\equiv a\})=\{x\in\seq{\tilde
  K}\colon x\equiv a\}.
  \end{equation*}
Then $\pow{\sK^n}$ embeds in $\pow{\stK^n}$ under $X\mapsto i[X]$,
and the following diagram commutes.
\begin{equation*}
  \begin{CD}
\pow{K^n}       @>*>>  \pow{\sK^n}\\
@V{\included}VV        @VViV\\
\pow{\tilde K^n}@>>*>  \pow{\stK^n}
  \end{CD}
\end{equation*}
In particular, if $S\included K^n$, then 
\begin{equation}\label{eqn:i}
i[S^{(\sK)}]=S^{(\stK)}. 
\end{equation}
%where $\sS$ is computed in $\sK$ and $\stK$ respectively.
\end{theorem}

\begin{proof}
Everything follows from the observation that the congruence of two
sequences depends only on the sequences themselves, by
Theorem~\ref{thm:small}.  In particular, if $a$ and $b$ are in $\Ko$,
and $\{x\in\seq{\tilde K}\colon x\equiv a\}=\{x\in\seq{\tilde K}\colon
x\equiv b\}$, then $a\equiv b$, so $\{x\in\Ko\colon x\equiv
a\}=\{x\in\Ko\colon x\equiv b\}$; thus $i$ is injective.  Then we
have~\eqref{eqn:i} since 
\begin{gather*}
S^{(\sK)}=\bigl\{\{y\in\Ko\colon y\equiv x\}\colon x\in\seq S\bigr\},\\
S^{(\stK)}=\bigl\{\{y\in\seq{\tilde K}\colon y\equiv x\}\colon
x\in\seq S\bigr\}.\qedhere 
\end{gather*}
\end{proof}

Now suppose $\tau$ is a type $n\tau_0\dotsb\tau_{n-1}$, where $n>0$,
and $S\in K_{\tau}$, so that
\begin{equation*}
S\included K_{\tau(0)}\times\cdots\times K_{\tau(n-1)}.
\end{equation*}
 Then $S$ is both an element of $\tilde K$ and an $n$-ary relation on
 $\tilde K$.  
As, by Theorem~\ref{thm:small}, we may and do assume $K\included\sK$,
so we may assume $\tilde K\included\stK$.  In particular, $S$ is now both
an element of $\stK$ and an $n$-ary relation on $\stK$.  But we have
also the $n$-ary relation $\sS$ on $\stK$, and this is different from
$S$.  Nonetheless, when $S$ is considered as an element of $\stK$, we
shall want to identify it with the relation $\sS$ on $\stK$,
and \emph{not} with the relation $S$.  We shall be able to do this by
Theorem~\ref{thm:*K*K} below.

Given the nonzero type $\tau$ as above, we define
\begin{equation*}
  E_{\tau}=\{(\tuple a,S)\in\tilde K^n\times K_{\tau}\colon\tuple a\in S\},
\end{equation*}
an element of $K_{\upsilon}$, where
$\upsilon=r\tau_0\cdots\tau_{n-1}\tau$, where $r=n+1$.  So $E_{\tau}$
is a a relation of membership.
Using $S$ as a constant, we can construct the formula $E_{\tau}\tuple
xS$, and we have then 
\begin{equation}\label{eqn:ExS}
(E_{\tau}\tuple xS)^{\tilde K}=S^{\tilde K}=S.
\end{equation}
Using $S$ also as a predicate, we can construct also the sentence
\begin{equation*}
\Forall{\tuple x}(E_{\tau}\tuple xS\iff S\tuple x);
\end{equation*}
by~\eqref{eqn:ExS}, the sentence is true in $\tilde K$.  Therefore, by
Theorem~\ref{thm:elsub}, the sentence is true in $\stK$, which means 
\begin{equation*}
(E_{\tau}\tuple xS)^{\stK}=S^{\stK}=\sS.
\end{equation*}
Thus $S$, when considered as an element of $\stK$, interacts with the
other elements as if it were the relation $\sS$ on $\stK$.  This is
not a contradiction: $(E_{\tau}\tuple xS)^{\stK}$ is not literally
the set of elements of $S$, since $\starred{\! E_{\tau}}$ is not literally
a relation of membership.  

In the following, if $\tuple a=(a^0,\dots,a^{n-1})$, we use the notation 
\begin{equation*}
\iota(\tuple a)=(\iota(a^0),\dots,\iota(a^{n-1})).
\end{equation*}

  \begin{theorem}\label{thm:*K*K}
For each type $\tau$, there is an embedding $\iota$ of $\sKt{\tau}$ in
$(\sK)_{\tau}$ such that, if $\tau=0$, then $\iota$ is the identity,
while if $\tau>0$, then
\begin{equation*}
%\stK\models E_{\tau}\tuple aR
(\tuple a,R)\in\starred{\!E_{\tau}}
\iff\iota(\tuple a)\in\iota(R).
\end{equation*}
  \end{theorem}

\begin{proof}
The sentence
\begin{equation*}
  \Forall{\tuple x}\Forall y(E_{\tau}\tuple xy\lto
  K_{\tau(0)}x^0\land\dotsb\land K_{\tau(n-1)}x^{n-1}\land K_{\tau}y)
\end{equation*}
is true in $\tilde K$, so by Theorem~\ref{thm:elsub}, it is true in
$\stK$.
By Theorem~\ref{thm:*}, for all types~$\sigma$,
\begin{equation*}
  (K_{\sigma}x)^{(\stK)}=\sKt{\sigma}.
\end{equation*}
Hence, if $R\in\sKt{\tau}$, then
\begin{equation*}
(E_{\tau}\tuple xR)^{\stK}
\included\sKt{\tau(0)}\times\dotsb\times\sKt{\tau(n-1)}.
\end{equation*}
We can now define~$\iota$ recursively: 
\begin{compactenum}
\item 
$\iota(x)=x$ if $x\in \sKt0$,
\item
if $\tau=n\tau_0\dotsb\tau_{n-1}$, and $R\in\sKt{\tau}$, then 
\begin{equation*}
\iota(R)=\iota[(E_{\tau}\tuple xR)^{(\stK)}].
\end{equation*}
\end{compactenum}
The sentence
\begin{equation*}
  \Forall y\Forall z\Exists{\tuple x}(y\neq z\lto(E_{\tau}\tuple
  xy\liff\lnot E_{\tau}\tuple xz))
\end{equation*}
is true in $\tilde K$, hence in $\stK$;
therefore $\iota$ is injective.
\end{proof}

As we shall see in Chapter~\ref{ch:analysis}, $\iota$ is not generally
surjective. 
Also, even though every element of $\tilde K$ is an element of some
$K_{\tau}$, not 
every element of $\stK$ is an element of some $\sKt{\tau}$. 



\chapter{Analysis}\label{ch:analysis}

\emph{Limits} of sequences were defined in \S~\ref{sect:seq}.  The aim
of the definition is to formalize the understanding that, if $a$ is a
sequence $(a_n\colon n\in\N)$ of real 
numbers, and $L$ is a real number, then $L$ is a
\textbf{limit}\index{limit} of $a$ if $a_n$ is \emph{close} to $L$
when $n$ is \emph{large.}  In a first attempt to make this define
precise, we may say that $a_n$ is \textbf{close}\index{close} to $L$
if $\abs{a_n-L}<\epsilon$, where $\epsilon>0$; and $n$ is
\textbf{large}\index{large} if $n> M$.  Of course these definitions
are still imprecise, since they depend on the unquantified variables
$\epsilon$ and $M$.  In the usual or `standard' definition (given on
p.~\pageref{sect:seq}) of when $L$ is a limit of $a$, the variables
are quantified thus, in the symbolism of \S~\ref{sect:logic}:  
\begin{equation*}
\Forall{\epsilon}\bigl(\epsilon>0\lto\Exists M\Forall n(n\in\N\land
n>M\lto\abs{a_n-L}<\epsilon)\bigr). 
\end{equation*}
The `non-standard' alternative is to quantify the variables in the
individual definitions of closeness and largeness: $a_n$ is close to
$L$ if $\abs{a_n-L}<\epsilon$ for \emph{all} positive real numbers
$\epsilon$, and $n$ is large if $n>M$ for \emph{all} real numbers $M$.
Such definitions cannot be satisfied by ordinary or `standard' real
numbers $a_n$ and $n$; however, they can be satisfied by
`non-standard' real numbers. 

The original inspiration for this chapter is Robinson's book
\cite{MR1373196}; but I have made use of \cite{MR1999278} and
\cite{MR49:9123}. 

\section{Non-standard numbers and relations}

Everything we do now will be based on Ch.~\ref{ch:ultra} in case
$K=\R$.  We fix a non-principal maximal ideal $\maxi$ of $\pow{\vnn}$:
this gives us $\sR$, namely the ultrapower $\seq{\R}/\maxi$.  Then
$\R$ embeds properly in $\sR$, by Theorem~\ref{thm:proper}
(p.~\pageref{thm:proper}), and we have the function $S\mapsto\sS$, defined in~\eqref{eqn:*S} on p.~\pageref{eqn:*S}, from each $\pow{\R^n}$
to $\pow{\sR^n}$; it is an embedding by Theorem~\ref{thm:*K}
(p.~\pageref{thm:*K}).  Every $\sS$ that arises thus is called a 
\textbf{standard relation.}\index{standard relation}
Also, elements of $\R^n$ are called \textbf{standard
  elements.}\index{standard element}  Note then that a  
standard relation might have nonstandard elements.  The standard
relation $\sS$ is the \textbf{extension}\index{extension} of $S$.

We can think of the standard relation $\sS$ as what we see when we
look at $S$ more closely.  Then $\sS$ will be the main object of
interest, although we can recover $S$ by restricting attention to the
standard real numbers, again by Theorem~\ref{thm:*K}. 
The first-order properties of $S$ in $\R$ are the same as those of
$\sS$ in $\sR$, by Theorem~\ref{thm:*} (p.~\pageref{thm:*}).  The
usefulness of $\sS$ lies in its potentially having non-standard
elements.  Now, we cannot talk about these non-standard elements in
the full signature of $\R$.  Still, we \emph{can} talk about them in
$\sR$, given a predicate for the subset $\R$ of $\sR$.  In this way,
there are statements about $\R$ in $\sR$ that cannot be expressed in $\R$.

In general, the first-order properties of $\R$ are also properties of
$\sR$, by Theorem~\ref{thm:elsub} (p.~\pageref{thm:elsub}). 
One such
feature is being an ordered field, by Theorem~\ref{thm:*R-field}
below.  Towards proving this, suppose $S\included\R^n$, and $f$
is a function from $S$ to $\R$.  The \textbf{graph}\index{graph} of $f$ is the
relation $\{(\tuple x,f(\tuple x))\colon\tuple x\in S\}$; by
identifying $f$ with this relation, we obtain the $n+1$-ary relation $\stf$ on
$\sR$. 
  
\begin{theorem}\label{thm:*f}
If $S\included\R^n$, and $f\colon S\to\R$, then $\stf\colon\sS\to\sR$, and
\begin{equation}\label{eqn:*f}
  \stf\restriction S=f.
\end{equation}
\end{theorem}

\begin{proof}
Let $T$ be the graph of $f$.  Then the sentences
\begin{gather*}
\Forall{\tuple x}\Forall y(T\tuple xy\lto S\tuple x),\\
  \Forall{\tuple x}\Exists y(S\tuple x\lto T\tuple xy),\\
\Forall{\tuple x}\Forall y\Forall z(T\tuple
xy\land T\tuple xz\lto y=z))
\end{gather*}
are true in $\R$; by Theorem~\ref{thm:elsub}, they
are true in $\sR$.  Therefore $\sT$ is the graph of a
function---namely $\stf$---from $\sS$ to $\sR$, and~\eqref{eqn:*f}
follows since $T\included\sT$.  
\end{proof}

The function $f$ in the theorem is a \textbf{standard
  function.}\index{standard function}
In place of an atomic formula $T\tuple xy$ as in the proof of the
theorem, we may now write 
\begin{equation*}
  f(\tuple x)=y.
\end{equation*}
In case $n=2$, instead of $Txyz$ or $f(x,y)=z$ we usually write
\begin{equation*}
x\mathbin fy=z,
\end{equation*}
as for example in $x+y=z$.
In the general case, if in addition $U_k$ is the graph of a function $g_k$, then the expression
\begin{equation*}
f(g_0(\tuple x_0),\dots,g_{n-1}(\tuple x_{n-1}))=y
\end{equation*}
can be used to stand for the formula
\begin{equation*}
\Exists{\tuple z}(f(\tuple z)=y\land U_0\tuple x_0z^0\land\cdots\land
U_{n-1}\tuple x_{n-1}z^{n-1}), 
\end{equation*}
where $\Exists{\tuple z}$ means $\Exists{z^0}\cdots\exists{z^{n-1}}$.
This means we can use a polynomial equation, such as $x(-y+z)=w$ in
place of a more complicated formula, like
\begin{equation*}
\Exists u\Exists v(-y=u\land u+z=v\land xv=w). 
\end{equation*}

\begin{theorem}\label{thm:*R-field}
  $\sR$ is a non-archimedean ordered field with respect to
  ${}^*\mathord{<}$, $\starred +$, $\starred -$, and
  $\starred{\cdot}$, and $\R$ is an ordered subfield of $\sR$.
\end{theorem}

\begin{proof}
There is a first-order sentence $\sigma$ saying that $\R$ is an
ordered field; but then $\sR\models\sigma$ by Theorem~\ref{thm:elsub}.  By Theorems~\ref{thm:*K}
and~\ref{thm:*f}, $\R$ is an ordered subfield of $\sR$.  Since $\R$
is a \emph{proper} subset of $\sR$, the latter must be
non-archimedean as an ordered field by Theorem~\ref{thm:R-unique} (p.~\pageref{thm:R-unique}).
\end{proof}

\begin{corollary}\label{cor:arch-not-1}
Being archimedean is not a first-order property of fields.
\end{corollary}

To understand how the corollary can be true, note that every subset $S$ of $\R$ with an element $y$
and an upper bound $z$ has a least upper bound $w$:
in the notation of \S~\ref{sect:higher}, since $\pow{\R}=\R_{10}$, we
can write this statement formally as
\begin{multline*}
  \Forall S\biggl(
\Exists yE_{10}yS\land\Exists z\Forall y(E_{10}yS\lto y\leq z)
\lto\\
\Exists w\Bigl(\Forall y(E_{10}yS\lto y\leq w)
  \land
\Forall z\bigl(\Forall y(E_{10}yS\lto y\leq z)
\lto 
w\leq z\bigr)\Bigr)\biggr).
\end{multline*}
This is true in $\tilde{\R}$, so
the same sentence is
true in $\stR$.  But more precisely, in $\tilde{\R}$,  the
sentence is 
not about \emph{subsets} $S$ of $\R$, but about \emph{elements} $S$ of
$\R_{10}$, which is $\pow{\R}$. 
In $\stR$, the sentence says that every nonempty element of
$\starsub{\R}{10}$ with an upper bound has a least upper bound.  By
Theorem~\ref{thm:*K*K} (p.~\pageref{thm:*K*K}), we may assume
$\starsub{\R}{10}\included(\sR)_{10}$, which is 
$\pow{\sR}$.  Some nonempty elements of this do have upper bounds, but
no least upper bound, since $\sR$ is non-archimedean.
Therefore the inclusion of
$\starsub{\R}{10}$ in $(\sR)_{10}$ is proper, and moreover the latter
is non-standard as a relation on $\stR$. 


In the terminology of \S~\ref{sect:non-Arch}, the \emph{finite}
elements of $\sR$ are those $x$ such that, for some \emph{standard}
natural number $n$, we have $\abs x<n$; the non-finite elements are
\emph{infinite.}  We show now that the elements of $\sN\setminus\N$
are infinite.  In doing so, we may write $x\in\N$ in place of the
formula $\N x$; this means $x\in\sN$ in $\sR$. 


\begin{theorem}
  $\N$ is a proper initial segment of $\sN$.  In particular, $\N$
  consists of the finite elements of $\sN$.
\end{theorem}

\begin{proof}
  For each $n$ in $\N$, the sentence
\begin{equation*}
  \Forall x(x\in\N\lto x=1\lor x=2\lor\dotsb\lor x=n\lor x>n)
\end{equation*}
is true in $\R$, hence in $\sR$, so that $\{1,2,\dots,n\}$ is an
initial segment of $\sN$.  Therefore $\N$ itself is an initial segment of $\sN$.  
The elements of $\N$ are finite by definition.  The sentence
\begin{equation*}
\Forall x\Forall y(x\in\N\land y\in\N\land x\leq y<x+1\lto x=y)
\end{equation*}
is true in $\R$, hence in $\sR$, so all finite elements of $\sN$ are in $\N$.  Finally,
the sentence
\begin{equation*}
  \Forall x\Exists y(y\in\N\land x<y)
\end{equation*}
is true in $\R$ and hence in $\sR$.  In particular, let $a$ be a
positive infinite element of $\sR$. Then there is $n$ in $\sN$ such
that $a<n$.  Such $n$ must be infinite, so they are not in $\N$.
Therefore $\N$ is a proper subset of $\sN$. 
\end{proof}

\begin{corollary}\label{cor:Peano-not-1}
Satisfying the Peano Axioms is not a first-order property of iterative
structures. 
\end{corollary}

\begin{theorem}
  A standard relation has nonstandard elements if and only if it is
  infinite. 
\end{theorem}

\begin{proof}
Let $S\included\R^m$.  If $S$ is finite, then $S=\{\tuple
a_0,\dots,\tuple a_{n-1}\}$ for some $\tuple a_k$; but then 
  the sentence
  \begin{equation*}
    \Forall{\tuple x}(\tuple x\in S\liff\tuple x=\tuple
    a_0\lor\dotsb\lor\tuple a_{n-1})
  \end{equation*}
is true in $\R$ and $\sR$, so $\sS=S$.  Suppose now $S$ is infinite, so that there is an injective function $f$ from $\N$ into $S$.  By a generalization of Theorem~\ref{thm:*f}, we have an injective function
$\stf$ from $\sN$ into $\sS$. If, for some $n$ in $\sN$, the element $\stf(n)$ of $\sS$ is an element $\tuple a$ of $S$, then the
sentence 
\begin{equation*}
  \Exists x(x\in\N\land f(x)=\tuple a),
\end{equation*}
being true in $\sR$, is true in $\R$,
so $n\in\N$ by injectivity of $f$.  Thus, if $n\in\sN\setminus\N$, then
$\stf(n)\in\sS\setminus S$. 
\end{proof}

\section{Sequences}\label{sect:st-seq}

A sequence $(a_n\colon n\in\N)$ of standard real numbers is
\textbf{bounded}\index{bounded} if none of its entries are large.  In standard terms,
this means 
 \begin{equation}\label{eqn:bdd}
 \Exists M   \Forall n(n\in\N\lto \abs{a_n}<M).
  \end{equation}
This is a first-order condition, so it is true of $(a_n\colon n\in\N)$
in $\R$ if and only if it is true of the extension $\starred(a_n\colon
n\in\N)$ in $\sR$.   Now, this extension is a sequence $(a_n\colon
n\in\sN)$, by Theorem~\ref{thm:*f}; the extension can be called a
\textbf{standard sequence.}\index{standard sequence}   If we denote
this by $a$,  
then the original sequence $(a_n\colon n\in\N)$ is
$a\restriction{\N}$.  Now we can say that $a$ is \textbf{bounded}\index{bounded}
if~\eqref{eqn:bdd} holds in $\sR$; then $a$ is bounded if and only if
$a\restriction{\N}$ is bounded.  However, a
simpler definition of boundedness is possible:

\begin{theorem}\label{thm:bdd}
A standard sequence is bounded if and only if each of its terms is finite.
\end{theorem}

\begin{proof}
If~\eqref{eqn:bdd} holds in $\R$, then for some standard $M$, the sentence
  \begin{equation*}
    \Forall n(n\in\N\lto \abs{a_n}<M)
  \end{equation*}
is true in $\R$; then the sentence is true in $\sR$, so every entry in $a$ is
bounded by $M$, hence finite. 

Suppose~\eqref{eqn:bdd} fails in $\R$.  This means the sentence
\begin{equation*}
  \Forall M\Exists n(n\in\N\land\abs{a_n}\geq M)
\end{equation*}
is true in $\R$, hence in $\sR$.  In particular, if $M$ is positive
and infinite, then there is $n$ in $\sN$ such that $\abs{a_n}\geq M$,
so $a_n$ is infinite. 
\end{proof}

By Theorem~\ref{thm:non-arch-val-ring}
(p.~\pageref{thm:non-arch-val-ring}), the finite elements of $\sR$
compose a valuation ring.  This ring has the maximal ideal (which is
unique by Theorem~\ref{thm:vrlr})
consisting of the \emph{infinitesimal} elements of $\sR$, namely those
$x$ in $\sR$ such that $\abs x<1/n$ for all \emph{standard} natural
numbers $n$.  In the notation introduced in~\eqref{eqn:simeq} on
p.~\pageref{eqn:simeq}, this maximal ideal is $\{x\colon x\simeq0\}$,
and 
\begin{equation*}
  a\simeq b\iff a-b\simeq0.
\end{equation*}

A sequence $(a_n\colon n\in\N)$ of standard real numbers
\textbf{converges}\index{converges} to the standard real number $L$,
and $L$ is a \textbf{limit}\index{limit} of the sequence,
if $a_n$ is close to $L$ when
$n$ is large.  In standard terms (as noted on
p.~\pageref{ch:analysis}), this means  
\begin{equation}\label{eqn:conv}
\Forall{\epsilon}
\bigl(\epsilon>0\lto\Exists M\Forall n
(n\in\N\land n>M\lto\abs{a_n-L}<\epsilon)\bigr).
\end{equation}
Again, the same definition applies to standard sequences, so that such
a sequence $a$ converges to $L$ if and only if $a\restriction{\N}$
converges; but a simpler definition is possible:

\begin{theorem}\label{thm:conv}
A standard sequence $a$ has the standard limit $L$ if and only if, for all
infinite $n$ in $\sN$,  
\begin{equation*}
a_n\simeq L.
\end{equation*}
\end{theorem}

\begin{proof}
Suppose~\eqref{eqn:conv} holds in $\R$.  Then
for all standard positive $\epsilon$, there is a standard $M$ such
that the sentence 
\begin{equation*}
\Forall n(n\in\N\land n>M\lto\abs{a_n-L}<\epsilon)
\end{equation*}
holds in $\R$, hence in $\sR$.  Suppose now $n$ is an infinite element
of $\sN$.  since $M$ is standard, we have $n>M$, and therefore
$\abs{a_n-L}<\epsilon$.  This is so for \emph{all} standard positive
$\epsilon$. therefore $a_n\simeq L$.  

Suppose~\eqref{eqn:conv} fails in $\R$.  Then
there is some standard positive $\epsilon$ such that the sentence 
\begin{equation*}
\Forall M\Exists n(n\in\N\land n>M\land\abs{a_n-L}\geq\epsilon)
\end{equation*}
holds in $\R$, hence in $\sR$.  In particular, when $M$ is positive
and infinite, we have in $\sR$ 
\begin{equation*}
\Exists n(n\in\sN\land n>M\land\abs{a_n-L}\geq\epsilon);
\end{equation*}
in particular, for some infinite $n$, $\abs{a_n-L}\geq\epsilon$, so
$a_n\not\simeq L$. 
\end{proof}

The theorem fails if $a$ is not standard: such is the case when, for
example, 
\begin{equation*}
  a_n=
  \begin{cases}
    0,&\text{ if $n$ is finite;}\\
    n,&\text{ if $n$ is infinite.}
  \end{cases}
\end{equation*}
Here $(a_n\colon n\in\N)$ converges to $0$, but $a_n\not\simeq0$.

An arbitrary function from $\sN$ to $\sR$ might have a nonstandard
limit.  However, such is not the case for standard sequences:

\begin{theorem}
A standard sequence has at most one limit.
\end{theorem}

\begin{proof}
$L$ and $M$ are standard, and
If $a_n\simeq L$ and $a_n\simeq M$, then $L\simeq M$, so $L=M$.  Hence
it is a theorem of $\R$ that a sequence has at most one limit.
Therefore a standard sequence has at most one limit.
\end{proof}

If a standard sequence $a$ converges to $L$, we now know that $L$ is
\textbf{the limit}\index{the limit} of $a$, and we can write one of 
\begin{align*}
\lim_{n\to\infty}a_n&=L,&\lim(a)&=L.
\end{align*}
Now for example $\lim_{n\to\infty}1/n=0$, simply because $1/n$ is
infinitesimal when $n$ is infinite.

\begin{theorem}\label{thm:conv-bdd}
Convergent standard sequences are bounded.
\end{theorem}

\begin{proof}
If $a$ converges to the limit $L$, then $L$ is standard and, in
particular, finite; also, when $n$ is infinite, $a_n\simeq L$, and
therefore $a_n$ is also finite.  By Theorem~\ref{thm:bdd}, $a$ is bounded.
\end{proof}

An \textbf{vector space}\index{vector space} over a field is an abelian group together
with an embedding of the field in the ring of endomorphisms of the
group; in particular, if $a$ and $b$ are in the field, then
\begin{align*}
  a(x+y)&=ax+ay,&
1(x)&=x,&
(a+b)x&=ax+bx,&
(ab)x&=a(bx).
\end{align*}
Vector-spaces over $\R$ include the powers $\R^n$.
An \textbf{algebra}\index{algebra} over a field is both a vector-space over
the field, and a ring, with the same underlying abelian group in each
case, such that
\begin{equation*}
  a(xy)=(ax)y.
\end{equation*}
Examples of algebras over $\R$ are $\C$ and also $\Ham$ (the \emph{quaternions}\index{quaternions}).

\begin{theorem}\label{thm:seq-alg}
The convergent standard sequences compose an algebra over $\R$, and
the function $a\mapsto\lim(a)$ is a homomorphism from this algebra
onto $\R$.  That is, if $a$ and $b$ are convergent standard sequences,
and $r\in\R$, then $a+b$, $ra$, and $ab$ converge, and 
\begin{gather}\label{eqn:lim+}
\lim(a+b)=\lim(a)+\lim(b),\\\label{eqn:lim-r}
\lim(ra)=r\lim(a),\\\label{eqn:lim.}
  \lim(ab)=\lim(a)\lim(b).
\end{gather}
Moreover, if $\lim(a)\neq0$, and $a_n$ is never $0$ when $n$ is standard, then it is never $0$ for any $n$ in $\sN$, and
$(a_n{}\inv\colon n\in\sN)$ converges, and 
\begin{equation}\label{eqn:inv}
\lim_{n\to\infty}\frac1{a_n}=\frac1L.
\end{equation}
\end{theorem}

\begin{proof}
We use that the infinitesimals compose an ideal of the ring
  $A$ of finite members of $\sR$.  Suppose $\lim(a)=L$
  and $\lim(b)=M$; so 
  these are in $A$. If $n$ is infinite, then $a_n-L$ and $b_n-M$ are
  infinitesimal, hence so are $(a_n+b_n)-(L+M)$ and 
  $ra_n-rL$.   This shows~\eqref{eqn:lim+} and~\eqref{eqn:lim-r}.
  For~\eqref{eqn:lim.}, note
  \begin{equation*}
    \abs{a_nb_n-LM}=
    \abs{a_nb_n-a_nM+a_nM-LM}\leq
    \abs{a_n}\abs{b_n-M}+\abs{a_n-L}\abs{M}.
  \end{equation*}
But the last is infinitesimal since $\abs{a_n}\in A$ by
Theorems~\ref{thm:bdd} and~\ref{thm:conv-bdd}, and $\abs M\in A$.
For~\eqref{eqn:inv}, if $a_n\neq0$, then $1/L$ and $1/a_n$ are both
finite, so, since $a_n\simeq L$, we have $a_n/L\simeq1$ and therefore
\begin{equation*}
\left|\frac1{a_n}-\frac1L\right|=\frac{\abs{L-a_n}}{\abs{a_nL}}
\simeq\frac{\abs{L-a_n}}{L^2}\simeq0.\qedhere
\end{equation*}
\end{proof}

The following theorem should be compared with Theorem~\ref{thm:Cc}
(p.~\pageref{thm:Cc}).  
Recall that, by Theorem~\ref{thm:RR/I} (p.~\pageref{thm:RR/I})
and the ensuing discussion, every finite element $a$ of $\sR$ has a
unique \emph{standard part,} namely the standard real number $b$ such
that $a\simeq b$.  




\begin{theorem}
  A standard sequence $a$ converges if and only if, for all
  infinite $m$ and~$n$,
  \begin{equation*}
    a_m\simeq a_n.
  \end{equation*}
\end{theorem}

\begin{proof}
If $a$ converges to $L$, then $a_n\simeq L$ for all infinite $n$,
and therefore $a_m\simeq a_n$ for all infinite $m$ and $n$, since
$\simeq$ is an equivalence relation. 

Suppose conversely $a_m\simeq a_n$ for all infinite $m$ and $n$.  If
each $a_n$ is \emph{finite,} and $m$ is infinite, then
$a$ converges to the standard part of $a_m$.  Suppose however that some $a_n$ is
infinite.  Then by Theorem~\ref{thm:bdd}, $a\restriction{\N}$ is
unbounded.  Hence the sentence
\begin{equation*}
  \Forall m\Exists n(m\in\N\lto n\in\N\land m<n\land\abs{a_m}+1\leq\abs{a_n}) 
\end{equation*}
is true in $\R$ and $\sR$, so $a_m$ and $a_n$ fail to be infinitely
close for some infinite $m$ and $n$.
\end{proof}

\section{Topology}

We may refer to real numbers as \textbf{points.}\index{point}
A standard real number $b$ is an \textbf{accumulation
  point}\index{accumulation point}\footnote{The term \emph{limit
    point} is also used, but this 
  can be confused with \emph{limit.}  I follow Apostol
  \cite{MR49:9123} in using \emph{accumulation point.}} of a 
subset $A$ of $\R$ if $A$ has elements distinct from, but close to,
$b$.  In standard terms, this means 
\begin{equation}\label{eqn:acc-pt}
\Forall{\epsilon}\bigl(\epsilon>0\lto\Exists x(x\in
A\land0<\abs{x-b}<\epsilon)\bigr). 
\end{equation}
So $0$ is an accumulation point of $\{1/n\colon n\in\N\}$, but not of $\Z$.
As usual, since the definition is first-order, it holds for a set of real
numbers if and only if holds for the extension of the set.
Such an extension can be called a \textbf{standard
  set.}\index{standard set}  If $A$ is a standard set, we may let $A$
denote also $A\cap\R$, as in the proof of the following.

\begin{theorem}\label{thm:l-point}
A standard point $b$ is an accumulation point of a standard set $A$
if and only if $A$ has an element $c$ such that
\begin{equation}\label{eqn:c-b}
  c\neq b\land c\simeq b.
\end{equation}
\end{theorem}

\begin{proof}
  If $b$ is a standard accumulation point of $A$, then the
  sentence~\eqref{eqn:acc-pt} is true in $\R$ and $\sR$, so for an
  infinitesimal $\epsilon$ there is $c$ in $A$ such that
  $0<\abs{c-b}<\epsilon$ and hence~\eqref{eqn:c-b}.

Suppose $b$ is not an accumulation point of $A$.  Then there is some
standard positive $\epsilon$ such that the sentence
\begin{equation*}
\Forall c(c\in A\lto c=b\lor\abs{c-b}\geq\epsilon)
\end{equation*}
is true in $\R$ and $\sR$.  Since $\epsilon$ is standard,
$\abs{c-b}\geq\epsilon$ implies $c\not\simeq b$. 
\end{proof}

The theorem may fail if $b$ is not standard.  For example, if $b$ is a
positive infinitesimal, then $b$ is not an accumulation point of
$\{x\colon x\leq 0\}$, although the set contains $0$ and $b\simeq0$.

An accumulation point of a set may, but need not, be an element of the
set.  Also, an element of the set need not be an accumulation point:
if it is not, then it is an \textbf{isolated point}\index{isolated
  point} of the set.  So, a standard point $b$ is an isolated point of
a standard set $A$ if and only if  
\begin{equation*}
\{x\colon x\simeq b\}\cap A=\{b\}.
\end{equation*}

\begin{theorem}[Bolzano--Weierstra\ss]\index{Bolzano--Weierstra\ss\ Theorem}
  Every bounded infinite standard set has a standard accumulation point.
\end{theorem}

\begin{proof}
A bounded infinite standard set includes the range of a bounded standard
non-repeat\-ing sequence $a$.  Let $n$ be infinite.
By Theorem~\ref{thm:bdd}, $a_n$ is finite, so it has a standard part,
$b$.  If $a_n=b$, then the sentence $\Exists m(m\in\N\land a_m=b)$ is
true in $\sR$, so it is true also in $\R$, contradicting that $a$ is
non-repeating.  So $a_n\neq b$.  Therefore $b$ is an accumulation
point of the original set by Theorem~\ref{thm:l-point}.  
\end{proof}

In the standard proof of this theorem, if $X$ is an infinite subset of
the interval $[a,b]$, then there is a sequence $(e_1,e_2,\dots)$,
where each $e_k$ is $0$ or $1$, and if  
\begin{equation*}
t_n=\frac{e_1}2+\frac{e_2}4+\cdots+\frac{e_n}{2^n},
\end{equation*}
then the interval
\begin{equation*}
[t_na+(1-t_n)b,t_na+(1-t_n)b+2^{-n}]
\end{equation*}
contains infinitely many points of $X$; then
$\lim_{n\to\infty}\bigl(t_na+(1-t_n)b\bigr)$ is an accumulation point
of $X$. 

A point $b$ is an \textbf{interior
  point}\index{interior point} of a set $A$ if all points
close to $b$, including $b$ itself, are in $A$.  This means precisely
that $b$ is not an accumulation point of the complement of $B$.  By
Theorem~\ref{thm:l-point} then we have

\begin{theorem}
  A standard point $b$ is an interior point of a standard set $A$ if
  and only if
  \begin{equation*}
    \{x\colon x\simeq a\}\included B.
  \end{equation*}
\end{theorem}

Recall that in the \emph{order topology} defined
in~\ref{subsect:ord-semig}, an \textbf{open subset}\index{open set} of
$\R$, or simply an \textbf{open set,} is the union of a family of open
intervals.

\begin{theorem}\label{thm:open}
  A subset of $\R$ is open if and only if each of its points is an
  interior point.
\end{theorem}

\begin{proof}
  Each point of an open interval is an interior point; therefore the
  same is true for open sets in general.  Suppose conversely every
  point $b$ of $O$ is interior.  Then for such $b$ there is some
  positive $\epsilon_b$ such that
  $(b-\epsilon_b,b+\epsilon_b)\included O$.  Hence
  \begin{equation*}
    O=\bigcup_{b\in O}(b-\epsilon_b,b+\epsilon_b),
  \end{equation*}
so $O$ is open.
\end{proof}

A subset $A$ of an order is
\textbf{convex}\index{convex} if $z\in A$ whenever
$x<z<y$ and $x$ and $y$ are in $A$.  An
\textbf{interval}\index{interval} of an order is a convex subset that,
if it has an upper bound, has a supremum, and, if it has a lower
bound, has an infimum.  Then open intervals in the earlier sense are
intervals. 
We have the usual notation, so that for example
$[a,b)=\{x\colon a\leq x<b)$, and $(-\infty,b]=\{x\colon x\leq b\}$.

\begin{theorem}\label{thm:int-conv}
  The intervals of $\R$ are precisely the convex subsets.
\end{theorem}

\begin{proof}
  Completeness of $\R$.
\end{proof}

Now an open set can be understood as the
union of a family of convex open sets.
There are nonstandard subsets of $\sR$, such as $\{x\colon x\simeq
a\}$, that are convex and open, but are not intervals. 

The complement of an open set is a
\textbf{closed set;}\index{closed set} so a closed set is just the
intersection of a set of closed intervals.  We have immediately from
Theorem~\ref{thm:open}: 

\begin{theorem}\label{thm:closed}
  A subset of $\R$ is closed if and only if it contains all of its
  accumulation points.
\end{theorem}

\begin{theorem}[Cantor Intersection Theorem]\label{Cantor Intersection Theorem}
Suppose $(F_n\colon n\in\N)$ is a sequence of bounded nonempty closed subsets
of $\R$ such that
\begin{equation*}
F_1\includes F_2\includes\cdots
\end{equation*}
  Then $\bigcap_{n\in\N}F_n$ is nonempty.
\end{theorem}

\begin{proof}
There is a sequence $(a_n\colon n\in\N)$ such that $a_n\in F_n$.  By
the Bolzano--Weierstra\ss\ Theorem, being bounded, the sequence has an
accumulation point $b$.  By Theorem~\ref{thm:closed}, $b$ is in each
of the sets $F_n$, so it is in the intersection. 
\end{proof}

For a non-standard proof, by Theorem~\ref{thm:*K*K} we can consider
$\starred{(F_n\colon n\in\N)}$ as $(G_n\colon n\in\sN)$, where
$G_n=\sF_n$ when $n$ is finite.  Then $G_n$ is nonempty for every $n$.
For some infinite $n$, let $a\in G_n$.  Then $a$ is finite and is an
element of each $\sF_k$ (where $k$ is finite).  Then the standard part
of $a$ is an accumulation point of $\sF_k$, so it belongs to this set
and therefore to $F_k$. 

The remainder of this section makes no new use of non-standard
methods; but the Heine--Borel Theorem will be used in the
(non-standard) proof of the Heine--Cantor Theorem in the next section.

A subset $\mathcal A$ of $\pow{\R}$ is a
\textbf{covering}\index{covering} of a subset $B$ of $\R$, and
$\mathcal A$ \textbf{covers} $B$, if 
\begin{equation*}
B\included\bigcup\mathcal A.
\end{equation*}
In this case, $\mathcal A$ is an \textbf{open covering}\index{open
  covering} of $B$ if each element of $\mathcal A$ is open. 

\begin{theorem}[Lindel\"of Covering Theorem]\index{Lindel\"of Covering Theorem}
If $\mathcal A$ is an open covering of a subset $B$ of $\R$, then some
countable subset of $\mathcal A$ covers $B$. 
\end{theorem}

\begin{proof}
Each point $c$ of $B$ belongs to some $O$ in $\mathcal A$, and then
there is a positive number $\epsilon_c$ such that
$(c-\epsilon_c,c+\epsilon_c)\included O$.  There are \emph{rational}
numbers $a$ and $b$ such that 
\begin{equation*}
c-\epsilon_c\leq a<c<b\leq c+\epsilon,
\end{equation*}
so that $c\in (a,b)$ and $(a,b)\included O$.  Denote $(a,b)$ by $I_c$.
Let $\mathcal D$ be the set $\{I_c\colon c\in B\}$.  Then $\mathcal D$
is countable, simply because there are only countably many rational
numbers and therefore only countably many intervals with rational
endpoints.  But $\mathcal D$ also covers $B$. For each $I$ in
$\mathcal D$, let $O_I$ be an element of $\mathcal A$ that includes
it.  Then $\{O_I\colon I\in\mathcal D\}$ is a countable subset of
$\mathcal A$ that covers $B$. 
\end{proof}

A subset $A$ of $\R$ is \textbf{compact} if every open covering of $A$
has a finite subset that also covers $A$. 

\begin{theorem}[Heine--Borel Theorem]\label{thm:HB}\index{Heine--Borel Theorem}
A subset of $\R$ is compact if and only if it is closed and bounded.
\end{theorem}

\begin{proof}
Suppose $A$ is compact.  Since $A$ is covered by $\{(-n,n)\colon
n\in\N\}$, it is included in some $(-n,n)$, so it is bounded.  Let $b$
be an accumulation point of $A$.  Then
$\{A\setminus(b-1/n,b+1/n)\colon n\in\N\}$ is an open covering of
$A\setminus\{b\}$, but no finite subset covers it.  Therefore
$A\setminus\{b\}=A$; in particular, $b\in A$. 

Suppose now $A$ is not compact.  By the Lindel\"of Covering Theorem,
there is a countable open covering $\{B_n\colon n\in\N\}$ of $A$ of
which no finite subset covers $A$.  For each $n$ in $\N$, there is an
element $a_n$ of $A\setminus(B_1\cup\cdots\cup B_n)$.  If $\{a_n\colon
n\in\N\}$ is unbounded, then so is $A$.  Suppose it is bounded.  Since
it is infinite, it has an accumulation point $b$, by the
Bolzano--Weierstra\ss\ Theorem.  Then $b$ is an accumulation point of
each set $\{a_n\colon n\geq k\}$ and hence of
$A\setminus(B_1\cup\cdots\cup B_k)$.  Since $\compl{(B_1\cup\cdots\cup
  B_k)}$ is closed, it contains $b$.  Then
$\compl{\Bigl(\bigcup_{n\in\N}B_n\Bigr)}$ contains $b$, so $b\notin
A$.  Thus $A$ does not contain all of its accumulation points, so it
is not closed. 
\end{proof}

\section{Continuity}

Henceforth the domain of every standard function is a subset of $\sR$.
Suppose $f$ is a standard function, and $c$ and $L$ are standard real numbers.
Then $L$ is a
\textbf{limit}\index{limit} of $f$ at $c$ if $c$ is an accumulation
point of the domain, and $f(x)$ is close to $L$
whenever $x\in\dom f$ and is close, but not equal, to $c$.  In
traditional terms, the latter condition is 
\begin{equation*}
\Forall{\epsilon}
\bigl(\epsilon>0\lto\Exists{\delta}\Forall x
(x\in\dom f\land 0<\abs{x-c}<\delta\lto\abs{f(x)-L}<\epsilon)\bigr).
\end{equation*}
We proceed just as in \S~\ref{sect:st-seq}.

\begin{theorem}\label{thm:lim}
A standard function $f$ has the standard limit $L$ at a standard
accumulation point $a$ of the domain of $f$ if and only 
if, when $x\in\dom f\setminus\{c\}$ and $x\simeq c$, then $f(x)\simeq
L$.   
\end{theorem}

\begin{theorem}
A standard function has at most one limit at a point.
\end{theorem}

If $f$ has a limit $L$ at $c$, then $L$ is now \textbf{the
  limit}\index{the limit} of $f$
at $a$, and we may write one of 
\begin{align*}
\lim_{x\to c}f(x)&=L,&\lim_cf&=L.
\end{align*}
There is now an analogue of Theorem~\ref{thm:seq-alg}:

\begin{theorem}
The standard functions on a given domain with limits at a standard
accumulation point $c$ of this domain compose an algebra over $\R$,
and the function $f\mapsto\lim_c(f)$ is a homomorphism from the
algebra onto $\R$.  If $f$ is in the algebra and is never $0$, and
$\lim_c(f)\neq0$, then $1/f$ is in the algebra, and
$\lim_c(1/f)=1/\lim_c(f)$. 
\end{theorem}

The function $f$ is \textbf{continuous at}\index{continuous at} a
non-isolated point $c$ of its domain if $\lim_c(f)=f(c)$,
equivalently, $f(x)\simeq f(c)$ whenever $x\simeq c$ (and $x$ is in
the domain).  Then $f$ is
\textbf{continuous on}\index{continuous on} a subset of its domain, if continuous at every point of that subset. 

\begin{theorem}[Intermediate Value Theorem]
  If a standard function $f$ is continuous on $[a,b]$, and $d$ lies between $f(a)$ and $f(b)$, then for some $c$ in $(a,b)$, 
  \begin{equation*}
    f(c)=d.
  \end{equation*}
\end{theorem}

\begin{proof}
  Suppose $f(a)<d<f(b)$. For all $n$ in $\N\setminus\{0\}$, there is some
  $j$ in $\N$ such that
  \begin{equation}\label{eqn:IVT}
    f\bigl(a+\frac jn(b-a)\bigr)<d\leq f\bigl(a+\frac{j+1}n(b-a)\bigr).
  \end{equation}
  Let $n$ be an \emph{infinite} element of $\sN$.  Then~\eqref{eqn:IVT} holds for some $j$ in $\sN$.  Let $c$ be the standard part of
$a+(j/n)(b-a)$.  Then
\begin{equation*}
a+\frac jn(b-a)\simeq c\simeq a+\frac{j+1}n(b-a),
\end{equation*}
so by continuity
\begin{equation*}
      f\bigl(a+\frac jn(b-a)\bigr)\simeq f(c)\simeq f\bigl(a+\frac{j+1}n(b-a)\bigr).
\end{equation*}
By~\eqref{eqn:IVT} then we must also have
\begin{equation*}
      f\bigl(a+\frac jn(b-a)\bigr)\simeq d,
\end{equation*}
so $f(c)\simeq d$.
Therefore $f(c)=d$ since both are standard.
\end{proof}

\begin{corollary}
The image of a convex set under a continuous function is a convex set.
\end{corollary}

\begin{theorem}
If $f$ is monotone on a convex set $I$, and $f[I]$ is convex, then $f$ is continuous on $I$.
\end{theorem}

\begin{proof}
We may assume $f$ is increasing.  Suppose $a$ and $x$ are in $I$, and $a$ is standard, but $f(a)\not\simeq f(x)$.  We may assume $a<x$, so $f(a)<f(x)$.  If $f(x)$ is infinite, then there is some standard $c$ such that 
\begin{equation}\label{eqn:acx}
f(a)<c<f(x).
\end{equation}
  If $f(x)$ is finite, let $d$ be its standard part; then $f(a)<d$, so there is some standard $c$ such that $f(a)<c<d$, and then again~\eqref{eqn:acx} holds.  But then $c=f(b)$ for some standard $b$ such that $a<b<x$.  In particular, $a\not\simeq x$.
\end{proof}

\begin{corollary}\label{cor:fcm}
If $f$ is continuous and monotone on a convex set $I$, then $f\inv$ is continuous on $f[I]$.
\end{corollary}

\begin{theorem}[Extreme Value]\label{thm:EVT}
  If $f$ is continuous on $[a,b]$, then it attains a maximum and
  minimum value on the interval.
\end{theorem}

\begin{proof}
  For all positive natural numbers $n$, for some natural number $j$
  such that $j\leq n$, the value of
  \begin{equation*}
    f(a+\frac jn(b-a))
  \end{equation*}
is maximized.  In particular, this is so when $n$ is infinite.  
If $i\leq n$, we now have
  \begin{equation*}
f(a+\frac in(b-a))\leq    f(a+\frac jn(b-a)).
  \end{equation*}
Let $d$ be the standard part of $a+(j/n)(b-a)$. 
For every $c$ in $[a,b]$, there is a natural number $i$ such that
\begin{equation*}
  a+\frac in(b-a)\leq c<a+\frac{i+1}n(b-a).
\end{equation*}
Then these three numbers are infinitely close, so
\begin{equation*}
  f(c)\simeq f(a+\frac in(b-a)).
\end{equation*}
Therefore $f(c)\leq f(d)$.
\end{proof}

Again, a standard function $f$ is continuous on a standard convex set
$I$ if 
\begin{multline*}
  \Forall{\epsilon}\Forall x
\Bigl(\epsilon>0\land x\in I\lto\\
\Exists{\delta}
\bigl(\delta>0\land\Forall y
(y\in I\land\abs{x-y}<\delta\lto\abs{f(x)-f(y)}<\epsilon)\bigr)\Bigr).
\end{multline*}
If we make a slight change, we get a stronger condition:
\begin{multline*}
  \Forall{\epsilon}
\Bigl(\epsilon>0\lto\\
\Exists{\delta}
\bigl(\delta>0\land\Forall x\Forall y
(x\in I\land y\in
I\land\abs{x-y}<\delta\lto\abs{f(x)-f(y)}<\epsilon)\bigr)\Bigr). 
\end{multline*}
If $f$ satisfies this, it is \textbf{uniformly continuous} on $I$.

\begin{theorem}\label{thm:uc}
  A standard function $f$ is uniformly continuous on a standard convex
  set $I$ if and only if, for all $x$ and $y$ in $I$,
  \begin{equation}\label{eqn:xyfxfy}
    x\simeq y\implies f(x)\simeq f(y).
  \end{equation}
\end{theorem}

\begin{proof}
  Suppose $f$ is uniformly continuous on $I$.  Then for every standard
  positive~$\epsilon$, there is a standard positive $\delta$ such
  that, for all $x$ and $y$ in $I$,
  \begin{equation*}
    \abs{x-y}<\delta\implies\abs{f(x)-f(y)}<\epsilon.
  \end{equation*}
In particular, for every standard positive $\epsilon$, for all $x$ and
$y$ in $I$,
  \begin{equation*}
    x\simeq y\implies\abs{f(x)-f(y)}<\epsilon.
  \end{equation*}
Then~\eqref{eqn:xyfxfy} follows.  Suppose now $f$ is \emph{not}
uniformly continuous on $I$.  Then for some standard positive
$\epsilon$, if $\delta$ is a positive infinitesimal, there are $x$ and
$y$ in $I$ such that $\abs{x-y}<\delta$, but
$\abs{f(x)-f(y)}\geq\epsilon$.  Then $x\simeq y$, but $f(x)\not\simeq
f(y)$. 
\end{proof}

For example, the function $x\mapsto 1/x$ is continuous on $(0,1]$, but
  not uniformly continuous, since if $x$ is a positive
  infinitesimal, then $x$ and $2x$ are in $(0,1]$, and $x\simeq 2x$, but
  \begin{equation*}
    \frac1x-\frac1{2x}=\frac1{2x},
  \end{equation*}
which is infinite.  The function $x\mapsto x^2$ is continuous on
$[0,\infty)$, but not uniformly continuous, since if $x$ is infinitesimal,
  then $1/x$ and $1/x+x$ are in $[0,\infty)$, but
    \begin{equation*}
      \Bigl(\frac1x+x\Bigr)^2-\frac1{x^2}=2+x^2,
    \end{equation*}
which is not infinitesimal.

\begin{theorem}[Heine--Cantor]\label{thm:HC}\index{Heine--Cantor Theorem}
  If $f$ is continuous on a standard convex set $I$, and $I$ is
  compact, then $f$ is uniformly continuous on $I$.
\end{theorem}

\begin{proof}
  Suppose $x$ and $y$ are in $I$, and $x\simeq y$.  Since $I$ is
  compact, it is bounded, by the Heine--Borel Theorem
  (Theorem~\ref{thm:HB}).  Therefore $x$ and $y$ are finite, so they
  have standard parts; indeed, they have the same standard part, $a$.
  Then $a$ is an accumulation point of $I$, so $a\in I$ since $I$ is
  closed, again by the Heine--Borel Theorem.  Since $f$ is continuous
  at $a$, we have
  \begin{equation*}
    f(x)\simeq f(a)\simeq f(y).
  \end{equation*}
Thus $f$ is uniformly continuous by Theorem~\ref{thm:uc}.
\end{proof}


\section{Derivatives}

If $f$ is a standard function whose domain contains a non-isolated
point $c$, and
\begin{equation*}
  \lim_{x\to c}\frac{f(x)-f(c)}{x-c}=d,
\end{equation*}
then we write
\begin{equation*}
  f'(c)=d,
\end{equation*}
saying $f$ is \textbf{differentiable}\index{differentiable} at $c$, with \textbf{derivative}\index{derivative}
$d$ at $c$.
So
$f'(c)$ is that standard real number $d$ such that, whenever $x\in\dom f\setminus\{c\}$ and $x\simeq c$,
\begin{equation*}
  \frac{f(x)-f(c)}{x-c}\simeq d.
\end{equation*}

\begin{theorem}\label{thm:diff-cont}
A standard function differentiable at $c$ is continuous at $c$.
\end{theorem}

\begin{proof}
If $f$ is differentiable at $c$ and $x\simeq c$, then
\begin{equation*}
  f(x)-f(c)\simeq (x-c)f'(c)\simeq0;
\end{equation*}
so $f$ is continuous at $c$.
\end{proof}

\begin{theorem}
If $f$ and $g$ are differentiable at $c$, then so are $f+g$ and $fg$,
and
\begin{align*}
  (f+g)'(c)&=f'(c)+g'(c),& (fg)'(c)&=f'(c)g(c)+f(c)g'(c).
\end{align*}
\end{theorem}

\begin{proof}
The former equation is easy; for the latter, 
if $x\simeq c$, then 
  \begin{align*}
    \frac{(fg)(x)-(fg)(c)}{x-c}
&=\frac{f(x)-f(c)}{x-c}g(c)+
f(x)\frac{g(x)-g(c)}{x-c}\\
&\simeq f'(c)g(c)+f(x)g'(c)\\
&\simeq f'(c)g(c)+f(c)g'(c)
  \end{align*}
  by Theorem~\ref{thm:diff-cont}.
\end{proof}

\begin{theorem}[Chain Rule]
If $g$ is differentiable at $c$, and $f$ differentiable at $g(c)$, 
while $g(c)$ is an interior point of the domain of $f$, then $f\circ g$ is differentiable at $c$, and
\begin{equation*}
(f\circ g)'(c)=f'(g(c))\cdot g'(c).
\end{equation*}
\end{theorem}

\begin{proof}
The conditions ensure that $c$ is a non-isolated point of the domain of $f\circ g$.  Suppose $x\in\dom{f\circ g}$ and
$x\simeq c$, so $g(x)\simeq g(c)$.  
We want to show
\begin{equation*}
\frac{(f\circ g)(x)-(f\circ g)(c)}{x-c}
\simeq f'(g(c))\cdot g'(c).
\end{equation*}
This holds if $g(x)=g(c)$, since then $g'(c)=0$.
It holds also if $g(x)\neq g(c)$, since in this case
\begin{equation*}
\frac{(f\circ g)(x)-(f\circ g)(c)}{x-c}
=\frac{f(g(x))-f(g(c))}{g(x)-g(c)}\cdot\frac{g(x)-g(c)}{x-c}.
%\simeq f'(g(c))\cdot g'(c).
\qedhere
\end{equation*}
\end{proof}

A \textbf{neighborhood}\index{neighborhood} of a standard real number $a$ is a set of which $a$ is an interior point.  

\begin{theorem}
A standard set $N$ is a open neighborhood of a standard real number $a$ if and only if 
\begin{equation*}
\{x\colon x\simeq a\}\included N.  
\end{equation*}
\end{theorem}

\begin{theorem}[Inverse Function Theorem]\label{thm:IFT}
If $f$ is monotone and continuous on a neighborhood of a standard real number $a$, and $f$ is differentiable at $a$, but $f'(a)\neq0$, then $f\inv$ is differentiable at $f(a)$ and
\begin{equation*}
(f\inv)'(f(a))=\frac1{f'(a)}.
\end{equation*}
\end{theorem}

\begin{proof}
By Corollary~\ref{cor:fcm}, $f\inv$ is continuous at $f(a)$.  Suppose $y\simeq f(a)$, but $y\neq f(a)$.  Then $f\inv(y)\simeq a$, but $f\inv(y)\neq a$ by monotonicity, so
\begin{equation*}
f'(a)\simeq\frac{y-f(a)}{f\inv(y)-a},
\end{equation*}
since $f(f\inv(y))=y$.  Since $f'(a)\neq0$, we have
\begin{equation*}
\frac{f\inv(y)-f\inv(f(a))}{y-f(a)}=
\frac{f\inv(y)-a}{y-f(a)}\simeq\frac1{f'(a)}
\end{equation*}
\end{proof}

A standard function $f$ has a \textbf{local maximum}\index{local maximum} at $a$ if $a$ is an interior point of the domain of $f$ and, for some neighborhood $N$ of $a$, $f(a)$ is the greatest element of $\{f(x)\colon x\in N\}$.

\begin{theorem}\label{thm:lm}
If $a$ is an interior point of the domain of $f$, then $f$ has a local maximum at $a$ if and only if 
\begin{equation*}
f(a)=\max\{f(x)\colon x\simeq a\}.
\end{equation*}
\end{theorem}

\begin{proof}
If $a$ is an interior point of $\dom f$, but $f$ does not have a local maximum at $a$, then the sentence
\begin{equation*}
\Forall{\epsilon}\Bigl(\epsilon>0\lto\Exists x\bigl(\abs{a-x}<\epsilon\land f(a)<f(x)\bigr)\Bigr)
\end{equation*}
is true in $\R$ and $\sR$, so $f(a)<f(x)$ for some $x$ such that $x\simeq a$.
\end{proof}

\begin{theorem}\label{thm:lmd}
  If $f$ has a local maximum at $a$ and is differentiable at $c$, then 
  \begin{equation*}
  f'(c)=0.
  \end{equation*}
\end{theorem}

\begin{proof}
By Theorem~\ref{thm:lm}, if $x\simeq c$, but $x\neq c$, then $f(x)\leq f(c)$, so
  \begin{equation*}
    \frac{f(x)-f(c)}{x-c}
    \begin{cases}
      \geq0,&\text{ if }x<c,\\
\leq0,&\text{ if }x>c.
    \end{cases}
  \end{equation*}
Since $(f(x)-f(c))/(x-c)\simeq f'(c)$, we can conclude that $f'(c)=0$.
\end{proof}

\begin{theorem}[Rolle's Theorem]
  If $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$, and
  $f(a)=f(b)$, then,
  for some $c$ in $(a,b)$,
  \begin{equation*}
    f'(c)=0.
  \end{equation*}
\end{theorem}

\begin{proof}
  Theorems~\ref{thm:EVT} (the Extreme Value Theorem) and~\ref{thm:lmd}.
\end{proof}

\begin{theorem}[Mean Value Theorem]
  If $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$, then,
  for some $c$ in $(a,b)$,
  \begin{equation*}
    f'(c)=\frac{f(b)-f(a)}{b-a}.
  \end{equation*}
\end{theorem}

\begin{proof}
Apply Rolle's Theorem to the function 
\begin{equation*}
x\mapsto f(x)-f(a)-\frac{x-a}{b-a}\cdot(f(b)-f(a)).\qedhere
\end{equation*}
\end{proof}

\begin{corollary}
If $f$ is continuous on $[a,b]$, and $f'(x)>0$ for all $x$ in $(a,b)$, then $f$ is increasing on $[a,b]$.
\end{corollary}

In particular, for the hypothesis of the Inverse Function Theorem (Theorem~\ref{thm:IFT}), it is sufficient that $f$ have a continuous derivative on a neighborhood of $a$, and $f'(a)\neq0$.

\begin{corollary}\label{cor:f'=0}
If $f$ is continuous on $[a,b]$, and $f'(x)=0$ for all $x$ in $(a,b)$, then $f$ is constant on $[a,b]$.
\end{corollary}

\section{Integrals}

Suppose $f$ is a standard function defined on $[a,b]$.  A \textbf{partition}\index{partition} of $[a,b]$ is a list
$(a_0,\xi_1,a_1,\dots,a_{n-1},\xi_n,a_n)$ of real numbers such that
\begin{equation}\label{eqn:axa}
  a=a_0\leq\xi_1\leq a_1\leq\dotsb\leq a_{n-1}\leq\xi_n\leq a_n=b.
\end{equation}
Then an \textbf{integral}\index{integral} of $f$ on $[a,b]$ is a standard real number $I$ such that, 
for all $n$ in $\N$, for all partitions $(a_0,\xi_1,a_1,\dots,a_{n-1},\xi_n,a_n)$ of $[a,b]$ such that
the differences $a_k-a_{k-1}$ are small, the sum
\begin{equation*}
\sum_{i=1}^nf(\xi_i)(a_i-a_{i-1})
\end{equation*}
is close to $I$.
If it does exist, then such $I$ is indeed unique and is denoted by
\begin{equation*}
\int_a^bf,
\end{equation*}
and we say $f$ is \textbf{integrable}\index{integrable} on $[a,b]$.
In standard terms then, $\int_a^bf$---if it exists---is the real number $I$ such that,
for all positive $\epsilon$, 
there is a positive $\delta$ such that, 
for all $n$ in $\N$, for all partitions $(a_0,\xi_1,a_1,\dots,a_{n-1},\xi_n,a_n)$ of $[a,b]$ 
such that
$\min(a_1-a_0,\dots,a_n-a_{n-1})\leq\delta$,
we have
\begin{equation*}
  \Bigl|I-\sum_{i=1}^nf(\xi_i)(a_i-a_{i-1})\Bigr|<\epsilon.
\end{equation*}
This definition is not a first-order statement in $\R$, so we move to $\tilde{\R}$.
Let $A_{[a,b]}$ be the set of partitions $(a_0,\xi_1,a_1,\dots,a_{n-1}\xi_n,a_n)$ of $[a,b]$.  Such sequences can be understood as binary relations on
  $\R$, so that $A_{[a,b]}\in\R_{200}$.
 If $f$ is a bounded function on $[a,b]$, let $S_{f,a,b}$ be the function
  \begin{equation*}
 (a_0,\xi_1,a_1,\dots,a_{n-1},\xi_n,a_n)\mapsto\sum_{i=1}^nf(\xi_i)\cdot(a_i-a_{i-1})
  \end{equation*}
on $A_{[a,b]}$.  So $S_{f,a,b}\in\R_{22000}$.  An element of $\sA_{[a,b]}$
also takes the form 
\begin{equation*}
(a_0,\xi_1,a_1,\dots,a_{n-1},\xi_n,a_n), 
\end{equation*}
where
again~\eqref{eqn:axa} holds; but now $n\in\sN$.  Such an element can
be called \textbf{fine}\index{fine} if $a_{i-1}\simeq a_i$ for each $i$ in
$\{1,\dots,n\}$. 
It must be noted that fine elements of $\sA$ do exist: for example,
\begin{equation*}
\bigl(a,a+\frac1{2n}(b-a),a+\frac1n(b-a),\dots,a+\frac{2n-1}{2n}(b-a),b\bigr),
\end{equation*}
where $n$ is infinite.

\begin{theorem}
  A bounded function $f$ on $[a,b]$
is integrable on $[a,b]$ if and only if, for any two fine
elements $P$ and $P'$ of $\sA_{[a,b]}$,
\begin{equation*}
  \sS_{f,a,b}(P)\simeq
\sS_{f,a,b}(P').
\end{equation*}
In this case, $\int_a^bf$ is the standard part of either of these sums.
\end{theorem}

\begin{theorem}
A function continuous on an interval is differentiable there.
\end{theorem}

\begin{proof}
Say $f$ is continuous on $[a,b]$, and let
$P$ and $P'$ be fine elements of $\sA_{[a,b]}$.  We may write
\begin{align*}
P&=(a_0,\xi_1,a_1,\dots,a_{\ell-1},\xi_{\ell},a_{\ell}), &
P'&=(a'_0,\xi'_1,a'_1,\dots,a'_{m-1},\xi'_m,a'_m).
\end{align*}
Then there is a partition $(c_0,\dots,c_n)$ of $[a,b]$ such that
\begin{equation*}
\{c_0,\dots,c_n\}=\{a_0,\dots,a_{\ell},a'_0,\dots,a'_m\}.
\end{equation*}
If $1\leq i\leq n$, let $\eta_i=\xi_j$, where $[c_{i-1},c_i]\included[a_{j-1},a_j]$; likewise, $\eta'_i=\xi'_k$, where
$[c_{i-1},c_i]\included[a'_{k-1},a'_k]$.  Since the intervals $[a_{j-1},a_j]$ and $[a'_{k-1},a'_k]$ are overlapping, their union is an interval of length no greater than $a_j-a_{j-1}+a'_k-a'_{k-1}$, which is infinitesimal.  Hence $\eta_i$ and $\eta'_i$ are infinitesimally close.  If $\epsilon$ is a standard positive real number, then
\begin{align*}
\abs{\sS_{f,a,b}(P)-\sS_{f,a,b}(P')}
&=\abs{\sum_{i=1}^{\ell}f(\xi_i)\cdot(a_i-a_{i-1})
-\sum_{i=1}^mf(\xi'_i)\cdot(a'_i-a'_{i-1})}\\
&=\abs{\sum_{i=1}^nf(\eta_i)\cdot(c_i-c_{i-1})
-\sum_{i=1}^nf(\eta'_i)\cdot(c_i-c_{i-1})}\\
&=\abs{\sum_{i=1}^n(f(\eta_i)-f(\eta'_i))\cdot(c_i-c_{i-1})}\\
&\leq\sum_{i=1}^n\abs{f(\eta_i)-f(\eta'_i)}\cdot(c_i-c_{i-1})\\
&\leq\epsilon\cdot\sum_{i=1}^n(c_i-c_{i-1})\\
&=\epsilon\cdot(b-a).
\end{align*}
Thus $\sS_{f,a,b}(P)\simeq\sS_{f,a,b}(P')$.
\end{proof}

\begin{theorem}
If $f$ and $g$ are integrable on $[a,b]$, and $f(x)\leq g(x)$ for all $x$ in $[a,b]$, then $\int_a^bf\leq\int_a^bg$.
\end{theorem}

If $\int_a^bf$ exists, we can write
\begin{equation*}
\int_b^af=-\int_a^bf.
\end{equation*}

\begin{theorem}
If $a$, $b$, and $c$ belong to an interval on which $f$ is integrable, then
\begin{equation*}
\int_a^bf+\int_b^cf=\int_a^cf.
\end{equation*}
\end{theorem}

If $f$ is differentiable on an interval $I$, and $f$ has the derivative $g$ (that is, $f'=g$), then $f$ is a \textbf{primitive}\index{primitive} of $g$.

\begin{theorem}[Fundamental Theorem of Calculus]
  If $f$ is continuous on $[a,b]$, then the function
  \begin{equation*}
    x\mapsto\int_a^xf
  \end{equation*}
is a primitive of $f$.
If also $G$ is a primitive of $f$, then
\begin{equation*}
\int_a^bf=G(b)-G(a).
\end{equation*}
\end{theorem}

\begin{proof}
Suppose $c$ and $x$ are distinct but infinitesimally close elements of $[a,b]$.  Then
\begin{equation*}
\frac{\int_a^xf-\int_a^cf}{x-c}=\frac{\int_c^xf}{x-c}.
\end{equation*}
Let $m$ be the minimum, and $M$ the maximum, value that $f$ takes on the interval bounded by $x$ and $c$; then
\begin{equation*}
m\leq\frac{\int_c^xf}{x-c}\leq M.
\end{equation*}
Since $m\simeq f(c)\simeq M$, the first claim follows.  For the second claim, we know $x\mapsto\int_a^xf-G(x)$ is constant by Corollary~\ref{cor:f'=0}, so
\begin{equation*}
\int_a^bf-G(b)=\int_a^af-G(a)=-G(a).\qedhere
\end{equation*}
\end{proof}

\section{Sequences of functions}

If $(f_n\colon n\in\N)$ is a sequence of functions on a convex set
$I$, and $f$ is a function on $I$, and for each $x$ in $I$, the
sequence $(f_n(x)\colon n\in\N)$ converges to $f(x)$, then the
sequence of functions can be said to \textbf{converge}\index{converge}
to the \textbf{limit}\index{limit} $f$.  Formally the condition is
\begin{equation*}
  \Forall{\epsilon}\Forall x
\bigl(\epsilon>0\land x\in I\lto
\Exists M\Forall n
(n\in\N\land n>M\lto\abs{f_n(x)-f(x)}<\epsilon)\bigr);
\end{equation*}
equivalently, for infinite $n$ in $\sN$, for all \emph{standard} $x$
in $I$,
\begin{equation}\label{eqn:fnx}
  f_n(x)\simeq f(x).
\end{equation}
This is not a strong
property.  For example, suppose $f_n(x)=x^n$, and $I=[0,1]$, and $f$
is given by
    \begin{equation*}
      f(x)=
      \begin{cases}
        0,&\text{ if } 0\leq x<1;\\
        1,&\text{ if } x=1. 
      \end{cases}
    \end{equation*}
Then the sequence of $f_n$ converges to $f$ on $I$, and
each $f_n$ is continuous, even uniformly continuous by the
Heine--Cantor Theorem (Theorem~\ref{thm:HC}); but $f$ is not
continuous on $I$.  Note that, in this example, if $M$ is infinite, we
have
\begin{equation*}
f_M\Bigl(1-\frac1{2M}\Bigr)
\simeq\lim_{n\to\infty}\Bigl(1-\frac1{2n}\Bigr)^n=\me^{-1/2}\neq0
=f\Bigl(1-\frac1{2M}\Bigr).
\end{equation*}

In general, the sequence $(f_n\colon n\in\N)$ \textbf{converges
  uniformly}\index{converge uniformly} to $f$ on $I$ if
\begin{equation*}
  \Forall{\epsilon}
\Bigl(\epsilon>0\lto
\Exists M\Forall n
\bigl(n\in\N\land n>M\lto
\Forall x(x\in I\lto\abs{f_n(x)-f(x)}<\epsilon)\bigr)\Bigr).
\end{equation*}

\begin{theorem}\label{thm:u-conv}
The sequence $(f_n\colon n\in\N)$ converges
  uniformly to $f$ on $I$ if and only if~\eqref{eqn:fnx} holds for all
  $x$ in $I$ and all infinite $n$ 
  in $\sN$.
\end{theorem}

To prove Theorem~\ref{thm:nsuc} by nonstandard methods, we pass to
$\starred{(\sR)}$.  If $x$ and $y$ are elements of this, and
$\abs{x-y}$ is less than every positive element of $\sR$, we may write
\begin{equation*}
  x\approxeq y.
\end{equation*}
This is a stronger condition than $x\simeq y$.

\begin{lemma}
  A standard function $f$ is continuous at a standard point $a$ if and
  only if
  \begin{equation*}
    x\approxeq a\implies f(x)\simeq f(a).
  \end{equation*}
\end{lemma}

\begin{proof}
  The forward direction follows immediately from the definition and
  Theorem~\ref{thm:lim}.  For the reverse, suppose $f$ is not
  continuous at $a$.  Then for some positive $\epsilon$ in $\sR$, 
  \begin{equation*}
    \Forall{\delta}\bigl(\delta>0\lto\Exists
    x(\abs{x-a}<\delta\land\abs{f(x)-f(a)}\geq\epsilon)\bigr). 
  \end{equation*}
This holds also in $\starred{(\sR)}$; hence for some positive $\delta$ such
that $\delta\approxeq0$, there is $x$ such that $\abs{x-a}<\delta$,
but $\abs{f(x)-f(a)}\geq\epsilon$.  In particular, $x\approxeq a$, but
$f(x)\not\simeq f(a)$.
\end{proof}

\begin{theorem}\label{thm:nsuc}
If $(f_n\colon n\in\N)$ converges uniformly to $f$ on $I$, and each
$f_n$ is continuous, then so is $f$.  
\end{theorem}

\begin{proof}
  Given $a$ and $x$ in $I$ such that $x\approxeq a$, we show
  $f(x)\simeq f(a)$.  By Theorem~\ref{thm:u-conv}, if $n$ is infinite, 
  \begin{align*}
    f(x)&\simeq f_n(x),&f_n(a)&\simeq f(a).
  \end{align*}
Now, $f_n$ is not a standard function, unless we put $\sR$ in place of
$\R$.  When we do this, then,
since $f_n$ is continuous at $a$, we have $f_n(x)\approxeq f_n(a)$, so
$f(x)\simeq f(a)$.  By the lemma, $f$ is continuous at $a$.
\end{proof}

Under the same hypothesis, the limit of the integrals is the integral
of the limits, and the limit of the derivatives is the derivative of
the limit\dots

\appendix

%\addchap{The Greek alphabet}
\chapter{The Greek alphabet}\label{app:Gk}

  \begin{center}
      \begin{tabular}{c c c c}
capital&minuscule&transliteration&name\\\hline
\Gk{A}& \Gk{a} & a & alpha \\ 
\Gk{B}& \Gk{b} & b & beta   \\ 
\Gk{G}& \Gk{g} & g & gamma \\ 
\Gk{D}& \Gk{d} & d & delta \\ 
\Gk{E}& \Gk{e} & e & epsilon\\ 
%&\Gk{\stigma}& stigma\\
\Gk{Z}& \Gk{z} & z & zeta   \\ 
\Gk{H}& \Gk{h} & \^e & eta \\ 
 \Gk{J}& \Gk{j} & th & theta \\
%\hline 
 \Gk{I}& \Gk{i} & i & iota\\ 
\Gk{K}& \Gk{k} & k & kappa\\ 
 \Gk{L}& \Gk{l} & l & lambda\\ 
 \Gk{M}& \Gk{m} & m & mu \\
 \Gk{N}& \Gk{n} & n & nu \\ 
 \Gk{X}& \Gk{x} & x & xi \\ 
 \Gk{O}& \Gk{o} & o & omicron\\ 
 \Gk{P}& \Gk{p} & p & pi\\ 
%&\Gk{\qoppa}& koppa\\
%\hline
 \Gk{R}& \Gk{r} & r & rho\\ 
 \Gk{S}& \Gk{sv, c} & s & sigma \\
 \Gk{T}& \Gk{t} & t & tau \\ 
 \Gk{U}& \Gk{u} & y, u & upsilon \\ 
 \Gk{F}& \Gk{f} & ph & phi\\ 
 \Gk{Q}& \Gk{q} & ch & chi\\ 
 \Gk{Y}& \Gk{y} & ps & psi\\ 
 \Gk{W}& \Gk{w} & \^o & omega\\
%&\Gk{\sampi}& sampi\\
\hline
  \end{tabular}
  \end{center}
The following remarks pertain to \emph{ancient} Greek.
The vowels are 
\begin{center}
\Gk{a, e, h, i, o, u, w,} 
\end{center}
where
\Gk h is a long \Gk e, and \Gk w is a long \Gk o; the other vowels
(\Gk{a, i, u}) can be long or short.  
Some vowels may be given tonal accents
(\Gk{'a, ~a, `a}).  
An initial vowel takes either a rough\-{}-breathing mark (as in
\Gk{<a}) or a 
smooth\-{}-breathing mark (\Gk{>a}): the former mark is transliterated
by a preceding
\lett h, and the latter can be ignored, as in
\begin{center}
  \Gk{<uperbol'h} hyperbol\^e \emph{hyperbola,}\\
\Gk{>orjog'wnion} orthog\^onion \emph{rectangle.}
\end{center}
Likewise, \Gk{<r} is
transliterated as \lett{rh}, as in
\begin{center}
  \Gk{<r'omboc} rhombos \emph{rhombus.}
\end{center}
A long vowel may have an iota subscript (\Gk{a|, h|, w|}), especially
in case-endings of nouns.
Of the two forms of minuscule sigma, the \Gk{c} appears at
the ends of words; elsewhere, \Gk{sv} appears, as in
\begin{center}
\Gk{b'asic} basis \emph{base.}
\end{center}

\begin{comment}











\chapter{Structures}

A \textbf{structure} is a set with some (or no) distinguished elements, operations, and relations.  A \textbf{signature} of the structure is a set of symbols used to denote these elements, operations, and relations.
Here are some axiomatic definitions of some kinds of structures mentioned in the text.  In the belief that any mathematical definition ought to have some reason for being made, I suggest also some examples.

First, binary operations and relations may have some named properties.  A binary operation $\cdot$ is \textbf{associative} if it satisfies
\begin{equation*}
x\cdot(y\cdot z)=(x\cdot y)\cdot z.
\end{equation*}
A binary operation $+$ is \textbf{commutative} if it satisfies
\begin{align*}
				x+y&=y+x,& x+(y+z)&=(x+y)+z.
\end{align*}

A \textbf{semigroup} is a set with an associative operation.
An example is $(A,\circ)$, where $A$ is a set of functions from a set to itself that is closed under composition.

A \textbf{monoid} in the signature $\{1,\cdot\}$ is a semigroup that satisfies
\begin{align*}
				1\cdot x&=x,& x\cdot 1&=x.
\end{align*}
An example is $(A,\id A,\circ)$, where $A$ is a set of functions from a set to itself that contains the identity and is closed under composition.

A \textbf{group} in the signature $\{1,{}\inv,\cdot\}$ is a semigroup that satisfies
\begin{align*}
				x\inv\cdot x&=1,&x\cdot x\inv&=1.
\end{align*}
An example is $(\Sym A,\id A,{}\inv,\circ)$, where $\Sym A$ is the set of permutations of the set $A$.

A \textbf{commutative semigroup}\index{commutative semigroup} is a semigroup whose operation is commutative.
An example is $(\N,+)$.

A \textbf{commutative monoid}\index{commutative monoid} in the signature $\{0,+\}$ is a commutative semigroup satisfying
\begin{equation*}
x+0=x.
\end{equation*}
An example is $(\N,1,\cdot)$.

An \textbf{abelian group}\index{abelian group} in the signature $\{0,-,+\}$ is a commutative monoid satisfying
\begin{equation*}
x+-x=0.
\end{equation*}
An example is $(\Z,0,-,+)$.

A \textbf{semi-ring} in the signature $\{+,\cdot\}$ is a commutative semigroup in $\{+\}$ and a semigroup in $\{\cdot\}$ satisfying
\begin{align*}
x\cdot(y+z)&=x\cdot y+x\cdot z,&(x+y)\cdot z&=x\cdot z+y\cdot z.
\end{align*}
An example is the set of $2\times 2$ matrices with entries from $\N$.

A \textbf{commutative semi-ring} in the signature $\{+,\cdot\}$ is a semi-ring in which $\cdot$ is commutative.
An example is $(\N,+,\cdot)$.

A \textbf{ring} in the signature $\{0,-,+,\cdot\}$ is a semi-ring in $\{+,\cdot\}$ and an abelian group in $\{0,-,+\}$.
An example is the set of $2\times 2$ matrices with entries from $\Z$.

A \textbf{commutative ring}\index{commutative ring} in the signature $\{0,-,+,\cdot\}$ is a ring and a commutative semi-ring.

An \textbf{integral domain}\index{integral domain} in the signature $\{0,1,-,+,\cdot\}$ is a commutative ring satisfying
\begin{equation*}
x\cdot y=0\land x\neq0\lto y=0.
\end{equation*}
An example is $(\Z,0,-,+,\cdot)$.

An \textbf{order,}\index{order} in the signature $\{<\}$, satisfies
\begin{align*}
				x&\not<x,& x<y\land y<z&\implies x<z.
\end{align*}
Examples include:
\begin{compactenum}[(1)]
\item
$(\N,\mid)$, where $x\mid y$ means $x$ divides $y$;
\item
$(\pow A,\pincluded)$.
\end{compactenum}

A \textbf{linear order}\index{linear order} in the signature $\{<\}$ is an order that satisfies
\begin{equation*}
x<y\lor x=y\lor y<x.
\end{equation*}
If $\ell$ is a horizontal line, and $P<Q$ means point $P$ is to the left of $Q$, then $(\ell,<)$ is an order.

An \textbf{ordered semigroup}\index{ordered semigroup}\footnote{In Clifford \cite{MR0100641} axiom~\eqref{eqn:os} is replaced with the weaker condition $x\leq y\implies x\cdot z\leq y\cdot z\land z\cdot x\leq z\cdot y$.} in the signature $\{\cdot,<\}$ is a semigroup in $\{\cdot\}$ and an order in $\{<\}$ satisfying
\begin{equation}\label{eqn:os}
x<y\implies x\cdot z<y\cdot z\land z\cdot x<z\cdot y.
\end{equation}

An \textbf{ordered commutative semigroup} is an ordered semigroup that is commutative as a semigroup.

An \textbf{ordered commutative monoid} is an ordered commutative semigroup that is a monoid.

An \textbf{ordered abelian group} is an ordered commutative monoid that is a group.

An \textbf{ordered ring}\index{ordered ring} in the signature $\{0,-,+,\cdot,<\}$ is a ring in $\{0,-,+,\cdot\}$ and an ordered abelian group in $\{0,-,+,<\}$ satisfying
\begin{equation*}
0<x\land 0<y\lto 0<x\cdot y.
\end{equation*}













\end{comment}


%\bibliographystyle{amsplain}
%\bibliography{../../../../TeX/references}
%\bibliography{references}

\def\cprime{$'$} \def\cprime{$'$}
\providecommand{\bysame}{\leavevmode\hbox to3em{\hrulefill}\thinspace}
\providecommand{\MR}{\relax\ifhmode\unskip\space\fi MR }
% \MRhref is called by the amsart/book/proc definition of \MR.
\providecommand{\MRhref}[2]{%
  \href{http://www.ams.org/mathscinet-getitem?mr=#1}{#2}
}
\providecommand{\href}[2]{#2}
\begin{thebibliography}{10}

\bibitem{MR1660991}
{Apollonius of Perga}, \emph{Conics. {B}ooks {I}--{III}}, revised ed., Green
  Lion Press, Santa Fe, NM, 1998, Translated and with a note and an appendix by
  R. Catesby Taliaferro, With a preface by Dana Densmore and William H.
  Donahue, an introduction by Harvey Flaumenhaft, and diagrams by Donahue,
  Edited by Densmore. \MR{MR1660991 (2000d:01005)}

\bibitem{MR49:9123}
Tom~M. Apostol, \emph{Mathematical analysis}, second ed., Addison-Wesley
  Publishing Co., Reading, Mass.-London-Don Mills, Ont., 1974. \MR{49 \#9123}

\bibitem{MR2000800}
Archimedes, \emph{The works of {A}rchimedes}, Dover Publications Inc., Mineola,
  NY, 2002, Reprint of the 1897 edition and the 1912 supplement, Edited by T.
  L. Heath. \MR{MR2000800 (2005a:01003)}

\bibitem{MR2093668}
\bysame, \emph{The works of {A}rchimedes. {V}ol. {I}}, Cambridge University
  Press, Cambridge, 2004, The two books on the sphere and the cylinder,
  Translated into English, together with Eutocius' commentaries, with
  commentary, and critical edition of the diagrams by Reviel Netz.
  \MR{MR2093668 (2005g:01006)}

\bibitem{MR0100641}
A.~H. Clifford, \emph{Totally ordered commutative semigroups}, Bull. Amer.
  Math. Soc. \textbf{64} (1958), 305--316. \MR{MR0100641 (20 \#7070)}

\bibitem{MR0232676}
Paul~J. Cohen, \emph{Set theory and the continuum hypothesis}, W. A. Benjamin,
  Inc., New York-Amsterdam, 1966. \MR{MR0232676 (38 \#999)}

\bibitem{Collingwood-Auto}
R.~G. Collingwood, \emph{An autobiography}, Clarendon Press, c.~1938, Reprinted
  2002.

\bibitem{MR0159773}
Richard Dedekind, \emph{Essays on the theory of numbers. {I}: {C}ontinuity and
  irrational numbers. {II}: {T}he nature and meaning of numbers}, authorized
  translation by Wooster Woodruff Beman, Dover Publications Inc., New York,
  1963. \MR{MR0159773 (28 \#2989)}

\bibitem{MR0001234}
John Dyer-Bennet, \emph{A theorem on partitions of the set of positive
  integers}, Amer. Math. Monthly \textbf{47} (1940), 152--154. \MR{MR0001234
  (1,201b)}

\bibitem{MR17:814b}
Euclid, \emph{The thirteen books of {E}uclid's {E}lements translated from the
  text of {H}eiberg. {V}ol. {I}: {I}ntroduction and {B}ooks {I}, {I}{I}. {V}ol.
  {I}{I}: {B}ooks {I}{I}{I}--{I}{X}. {V}ol. {I}{I}{I}: {B}ooks
  {X}--{X}{I}{I}{I} and {A}ppendix}, Dover Publications Inc., New York, 1956,
  Translated with introduction and commentary by Thomas L. Heath, 2nd ed.
  \MR{17,814b}

\bibitem{MR1932864}
\bysame, \emph{Euclid's {E}lements}, Green Lion Press, Santa Fe, NM, 2002, All
  thirteen books complete in one volume, the Thomas L. Heath translation,
  edited by Dana Densmore. \MR{MR1932864 (2003j:01044)}

\bibitem{MR1999278}
James~M. Henle and Eugene~M. Kleinberg, \emph{Infinitesimal calculus}, Dover
  Publications Inc., Mineola, NY, 2003, Reprint of the 1979 original [MIT
  Press, Cambridge, MA; MR0564651 (82b:26026)]. \MR{MR1999278}

\bibitem{Hoelder}
O.~H{\"{o}}lder, \emph{Die {A}xiome der {Q}uantit{\"{a}}t and die {L}ehre vom
  {M}ass}, Ber. uber d. Verh. d. K. S{\"{a}}chsischen Ges. d. Wiss. zu Leipzig,
  Math.-Phys. Cl. \textbf{53} (1901), 1--64.

\bibitem{MR1423724}
Otto H{\"o}lder, \emph{The axioms of quantity and the theory of measurement},
  J. Math. Psych. \textbf{40} (1996), no.~3, 235--252, Translated from the 1901
  German original and with notes by Joel Michell and Catherine Ernst, With an
  introduction by Michell. \MR{MR1423724 (98c:00001)}

\bibitem{MR1609942}
\bysame, \emph{The axioms of quantity and the theory of measurement}, J. Math.
  Psych. \textbf{41} (1997), no.~4, 345--356, Translated from the 1901 German
  original and with notes by Joel Michell and Catherine Ernst, With an
  introduction by Michell. \MR{MR1609942 (99i:00003)}

\bibitem{MR1500598}
Edward~V. Huntington, \emph{A complete set of postulates for the theory of
  absolute continuous magnitude}, Trans. Amer. Math. Soc. \textbf{3} (1902),
  no.~2, 264--279. \MR{MR1500598}

\bibitem{MR1500599}
\bysame, \emph{Complete sets of postulates for the theories of positive
  integral and positive rational numbers}, Trans. Amer. Math. Soc. \textbf{3}
  (1902), no.~2, 280--284. \MR{MR1500599}

\bibitem{Kuratowski}
Casimir Kuratowski, \emph{Sur la notion d'ordre dans la th{\'e}orie des
  ensembles}, Fundamenta Mathematicae (1921), 161--71.

\bibitem{MR12:397m}
Edmund Landau, \emph{Foundations of analysis. {T}he arithmetic of whole,
  rational, irrational and complex numbers}, third ed., Chelsea Publishing
  Company, New York, N.Y., 1966, translated by F. Steinhardt; first edition
  1951; first German publication, 1929. \MR{12,397m}

\bibitem{MR0344244}
Serge Lang, \emph{Introduction to algebraic geometry}, Addison-Wesley
  Publishing Co., Inc., Reading, Mass., 1972, Third printing, with corrections.
  \MR{MR0344244 (49 \#8983)}

\bibitem{MR0075156}
Jerzy {\L}o{\'s}, \emph{Quelques remarques, th\'eor\`emes et probl\`emes sur
  les classes d\'efinissables d'alg\`ebres}, Mathematical interpretation of
  formal systems, North-Holland Publishing Co., Amsterdam, 1955, pp.~98--113.
  \MR{MR0075156 (17,700d)}

\bibitem{Macintyre-Berkeley}
Angus Macintyre, \emph{Finite fields and model theory}, lecture notes,
  \url{http://www.msri.org/communications/ln/hosted/ucb/1998/macintyre/1/index%
.html}, 1998, MSRI/Evans Hall Lectures.

\bibitem{OED}
Murray et~al. (eds.), \emph{The compact edition of the {O}xford {E}nglish
  {D}ictionary}, Oxford University Press, 1973.

\bibitem{Peano}
Giuseppe Peano, \emph{The principles of arithmetic, presented by a new method
  (1889)}, From {F}rege to {G}{\"o}del (Jean van Heijenoort, ed.), Harvard
  University Press, 1976, pp.~83--97.

\bibitem{MR1373196}
Abraham Robinson, \emph{Non-standard analysis}, Princeton Landmarks in
  Mathematics, Princeton University Press, Princeton, NJ, 1996, Reprint of the
  second (1974) edition, With a foreword by Wilhelmus A. J. Luxemburg.
  \MR{MR1373196 (96j:03090)}

\bibitem{MR2038833}
Lucio Russo, \emph{The forgotten revolution}, Springer-Verlag, Berlin, 2004,
  How science was born in 300 BC and why it had to be reborn, Translated from
  the 1996 Italian original by Silvio Levy. \MR{MR2038833 (2004k:01006)}

\bibitem{Spivak-Calc}
Michael Spivak, \emph{Calculus}, 2nd ed., Publish or Perish, Berkeley,
  California, 1980.

\bibitem{MR83e:04002}
Robert~R. Stoll, \emph{Set theory and logic}, Dover Publications Inc., New
  York, 1979, corrected reprint of the 1963 edition. \MR{83e:04002}

\bibitem{MR13:419b}
Ivor Thomas (ed.), \emph{Selections illustrating the history of {G}reek
  mathematics. {V}ol. {II}. {F}rom {A}ristarchus to {P}appus}, Harvard
  University Press, Cambridge, Mass, 1951, With an English translation by the
  editor. \MR{13,419b}

\end{thebibliography}


\printindex

%\layout

\end{document}
