\documentclass{amsart}

% The following AMS packages are automatically loaded with amsart 
% documentclass:
%\usepackage{amsmath}
%\usepackage{amssymb}
%\usepackage{amsthm}

% For commutative diagrams you can use
\usepackage{amscd}
% but Jason prefers xypic
% \usepackage[all]{xy}

% To put source file link in headers.
% Change "template.tex" to "this_filename.tex"
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{Source file: \url{src/sets.tex}}
\lfoot{}
\cfoot{\thepage}
\rfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\headheight}{12pt}

% For cross-file-references
\usepackage{xr-hyper}

% Package for hypertext links:
\usepackage[colorlinks=true]{hyperref}
% For any local file, say "hello.tex" you want to refer to please use
% \externaldocument[hello-]{hello}
\externaldocument[conventions-]{conventions}
\externaldocument[categories-]{categories}


% The macro \autoref uses the macros \figurename, etc.
% We list the default values and we change some of them
% to start with a captial.
% Figure	\figurename
% Table		\tablename
% Part		\partname
% Appendix	\appendixname
% Equation	\equationname
% item		\Itemname
% \renewcommand{\Itemname}{Item}
\renewcommand{\Itemautorefname}{Item}
% chapter	\Chaptername
% \renewcommand{\Chaptername}{Chapter}
% \renewcommand{\Chapterautorefname}{Chapter}
% section	\sectionname
\renewcommand{\sectionname}{Section}
\renewcommand{\sectionautorefname}{Section}
% subsection	\subsectionname
\renewcommand{\subsectionname}{Subsection}
\renewcommand{\subsectionautorefname}{Subsection}
% subsubsection	\subsubsectionname
\renewcommand{\subsubsectionname}{Subsubsection}
\renewcommand{\subsubsectionautorefname}{Subsubsection}
% paragraph	\paragraphname
\renewcommand{\paragraphname}{Paragraph}
\renewcommand{\paragraphautorefname}{Paragraph}
% footnote	\Hfootnotename
% \renewcommand{\Hfootnotename}{Footnote}
\renewcommand{\Hfootnoteautorefname}{Footnote}
% Equation	\AMSname
% Theorem	\theoremname


% Theorem environments.
%
\newtheorem{theorem}{Theorem}[subsection]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{situation}[theorem]{Situation}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{remarks}[theorem]{Remarks}

\numberwithin{equation}{subsection}


% OK, start here.
%
\begin{document}

\title{Set theory}

%\begin{abstract}
%\end{abstract}

\maketitle
\thispagestyle{fancy}

\tableofcontents

\section{Introduction}
\label{section-introduction}

\noindent
We need some set theory every now and then. We use Zermelo-Fraenkel set theory
with the axiom of choice as described in \cite{Kunen}. Since we are talking
about potentially large objects (categories and categories of categories)
we should be carefull.

\section{Everything is a set}
\label{section-sets-everything}

\noindent
Explain how everything is a set.

\subsection{The hierarchy of sets}
\label{subsection-sets-hierarchy}

\noindent
A set $T$ is transitive if $x\in T$ implies $x\subset T$.
A set $\alpha$ is an ordinal if it is transitive and wellordered by $\in$.
We define, by transfinite induction, $V_0 = \emptyset$,
$V_{\alpha + 1} = P(V_\alpha)$, and for a limit ordinal $\alpha$,
$$
V_\alpha = \bigcup_{\beta < \alpha} V_\beta.
$$
Every set is contained in one of the $V_\alpha$.

\subsection{Everything is is contained in some ordinal}
\label{subsection-ordinal}

\noindent
The title says it all.

\section{Reflection principle}
\label{section-reflection-principle}

\noindent
This explains how we deal with set theoretical difficulties. 

\subsection{Statement of the theorem}
\label{subsection-reflection-theorem}

\noindent
Let $\phi(x_1,\ldots,x_n)$ be a formula of set theory. Let $V$ be a set.
The formula $V \models \phi(x_1,\ldots,x_n)$ is the formula obtained 
from $\phi(x_1,\ldots,x_n)$ replacing all the $\forall x$ and $\exists x$
by $\forall x\in S$ and $\exists x\in S$. (So the formula
$\phi(x_1,x_2) = \exists x, (x\in x_1 \wedge x\in x_2)$ is turned 
into $S \models \phi(x_1,x_2) = \exists x, ((x\in S) \wedge 
(x\in x_1 \wedge x\in x_2))$.

\begin{theorem}
\label{theorem-reflection-principle}
Let $\phi(x_1,\ldots,x_n)$ be a formula of set theory, and let $T$ be a set.
There exists an $\alpha$ such that $\forall x_1,\ldots,x_n \in V_\alpha$,
$$
V_\alpha \models \phi(x_1,\ldots,x_n) \Leftrightarrow \phi(x_1,\ldots,x_n).
$$
\end{theorem}

\smallskip\noindent
To continue reading, 
\begin{enumerate}

\item visit the next section: Categories,
\autoref{categories-section-introduction}, or 

\item go back to the
table of contents: \url{index.html#contents}.

\end{enumerate}


\bibliography{my}
\bibliographystyle{alpha}

\end{document}
