\documentclass{beamer}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathrsfs}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{calc,decorations.markings,positioning,arrows.meta}

\tikzset{->-/.style={decoration={
  markings,
  mark=at position #1 with {\arrow{>}}},postaction={decorate}}}
  
\author{Tom Cuchta}
\title{}
\mode<presentation> {
\usetheme{Warsaw}
\setbeamertemplate{navigation symbols}{}
}
\begin{document}

\begin{frame}{Sets}
A common theme in mathematics in general: ``group together the items of discussion into an object/word/symbol so that you can talk about them all simultaneously". \\
\vspace{1cm}
\textbf{\underline{Examples:}} \\
\begin{itemize}
\item ``the real numbers" $\mathbb{R}$, ``the integers" $\mathbb{Z}$, ``surreal numbers" \\
\item ``even numbers", ``prime numbers", ``vampire numbers"
\item ``the continuous functions", ``the differentiable functions", ``the locally integrable functions"
\item ``Khinchin's constant", ``Mills' constant", ``the number $\displaystyle\sum_{k=1}^{\infty} \dfrac{1}{k^3}$"
\item ``all objects $x$ in the universe with the property that the predicate $Px$ is true"
\end{itemize}
\hrule
\vspace{0.1cm}
\textbf{Sets} are the formal objects we are describing here.
\end{frame}

\begin{frame}{Sets}
\textit{Sets} are an ``unordered collection" of objects. This distinguishes a set from a sequence: \\
$a_n=(-1)^n$ ``is" $1,-1,1,-1,1,\ldots$, which is an ``ordered collection" of \textit{members} of the set $\{-1,0\}$. \\
\vspace{1cm}
We would like to have $\{-1,-1,0\}=\{-1,0\}$ to reflect that sets do not have ``repeat" members (``multisets" allow this!).\\
\vspace{1cm}
Natural idea: let's try to make a ``set theory". 
\end{frame}

\begin{frame}{Sets}
What properties do ``unordered collections" have? Fundamentally: \\
\begin{enumerate}
\item two sets have the same members if and only if they are the same set 
\item given any predicate $P$, the set of $x$ in the universe such that $Px$ is true should be a set
\end{enumerate}
(note: we can't write $(\forall P)$ where $P$ is a predicate in first order logic... we ``cheat" and use an ``axiom schema", meaning we accept the axiom for any $P$ we need in a given proof)
\end{frame}


\begin{frame}{A ``naive" set theory}
This theory has a two term predicate $\in$ ($x \in y$ is pronounced ``$x$ is an element of $y$") along with the following axioms: \\ 
1.) \textbf{Axiom of Extensionality} \\
$(\forall z)(z \in x \leftrightarrow z \in y) \leftrightarrow x=y$ \\
2.) \textbf{Axiom Schema of (Unrestricted) Comprehension} \\
For any (one-place) predicate $P$, we take the following as an axiom: \\
$(\exists z)(\forall x)(x \in z \leftrightarrow Px)$ \\
\hrule
\vspace{1cm}
note: ``schema" refers to the idea that we are allowing this as an axiom for every predicate $P$ of first order logic (either all at once, or ``as needed") -- we may \textbf{\textit{never}} write $(\forall P)$, where $P$ is a predicate, in first order logic!
\end{frame}

\begin{frame}{A ``naive" set theory}
An ``abbreviation": we \textit{define} the symbols ``$x \subseteq y$" as an abbreviation for ``$(\forall z)(z \in x \rightarrow z \in y)$". We may cite this definition in order to replace abbreviated symbols. \\
\vspace{1cm} 
In other words, $x\subseteq y = (\forall z)(z \in x \rightarrow z \in y)$. Now we can prove a simple theorem: $(x \subseteq y) \wedge (y \subseteq x) \rightarrow x=y$.
\end{frame}

\begin{frame}{A ``naive" set theory}
Prove $(\exists z)(\forall x)(\neg (x \in z))$. Let $Px$ be a predicate that denotes ``$\neg(x=x)$". Then prove \\
\begin{tabular}{|lll|}
\hline 
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (1) $(\exists z)(\forall x)(x \in z \leftrightarrow Px)$ & Axiom 2 \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (2) $(\forall x)(x \in \alpha \leftrightarrow Px)$ & 1 ES \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (3) $x \in \alpha \leftrightarrow \neg (x=x)$ & 2 US \& Def of $P$ \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (4) $x \in \alpha \rightarrow \neg (x=x)$ & 3 Bicond., Commutative, \& Simplification \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (5) $\neg (\neg (x=x)) \rightarrow \neg (x\in \alpha)$ & 4 Contraposition \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (6) $x=x \rightarrow \neg (x \in \alpha)$ & 5 TE (Double negation) \\
$\{ \}$ & (7) $x=x$ & Identity law \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (8) $\neg (x \in \alpha)$ & 6 7 Detachment \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (9) $(\forall x)(\neg (x \in \alpha))$ & 8 UG \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (10) $(\exists z)(\forall x)(\neg (x \in z))$ & 9 EG \\
\hline
\end{tabular} \\
We give a special symbol for this important set we proved to exist: $\emptyset$ (``empty set") \\
\textbf{Empty Set Theorem}: $(\forall x)(\neg (x\in \emptyset))$ 
\end{frame}

\begin{frame}{A ``naive" set theory}
Prove $(x \subseteq y) \wedge (y \subseteq x) \rightarrow x=y$ in naive set theory: \\
\begin{center}
\hspace*{-0.38in}
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $(x \subseteq y) \wedge (y \subseteq x)$ & Premise \\
$\{1\}$ & (2) $x \subseteq y$ & 1 Simplification \\
$\{1\}$ & (3) $(y \subseteq x) \wedge (x \subseteq y)$ & 1 Commutative law of $\wedge$ \\
$\{1\}$ & (4) $y \subseteq x$ & 3 Simplification \\
$\{1\}$ & (5) $(\forall z)(z \in x \rightarrow z \in y) $ & 2 Definition of $\subseteq$ \\
$\{1\}$ & (6) $(\forall z)(z \in y \rightarrow z \in x)$ & 4 Definition of $\subseteq$ \\
$\{1\}$ & (7) $z \in x \rightarrow z \in y$ & 5 US \\
$\{1\}$ & (8) $z \in y \rightarrow z \in x$ & 6 US \\
$\{1\}$ & (9) $z \in x \leftrightarrow z \in y$ & 7 8 Adjunction \& Biconditional \\
$\{1\}$ & (10) $(\forall z)(z \in x \leftrightarrow z \in y)$ & 9 UG \\
$\{\mathrm{Ax \hspace{2pt}} 1\}$ & (11) $(\forall z)(z \in x \leftrightarrow z \in y) \leftrightarrow x=y$ & Axiom of Extensionality \\
$\{\mathrm{A.}1\}$ & (12) $(\forall z)(z \in x \leftrightarrow z \in y) \rightarrow x=y$ & 11 Bicond., Comm. \& Simplification \\
$\{1, \mathrm{Ax \hspace{2pt}} 1\}$ & (13) $x=y$ & 10 12 Detachment \\
$\{\mathrm{Ax \hspace{2pt}} 1\}$ & (14) $(x \subseteq y) \wedge (y \subseteq x) \rightarrow x=y$ & 1 13 C.P. \\
\hline
\end{tabular}
\end{center}
\end{frame}

\begin{frame}{A ``naive" set theory}
Prove $(\forall y)(\emptyset \subseteq y)$ in naive set theory. We will proceed with proof by contradiction: \\
\hspace*{-0.38in}
\begin{tabular}{|lll|}
\hline
$\{1\}$ & (1) $\neg (\forall y)(\emptyset \subseteq y)$ & Premise \\
$\{1\}$ & (2) $\neg \neg(\exists y)(\neg ((\forall z)(z \in \emptyset \rightarrow z \in y)))$ & 1 Q \& Def of $\subseteq$ \\
$\{1\}$ & (3) $(\exists y)(\neg \neg (\exists z)\neg (z \in \emptyset \rightarrow z \in y))$ & 2 Q \& TE (Double negation) \\
$\{1\}$ & (4) $(\exists y)(\exists z)(z \in \emptyset \wedge \neg (z \in y))$ & 3 TE(Neg.imp \& Dbl neg) \\
$\{1\}$ & (5) $(\exists z)(z \in \emptyset \wedge \neg (z \in \alpha))$ & 4 ES \\
$\{1\}$ & (6) $\beta \in \emptyset \wedge \neg (\beta \in \alpha)$ & 5 ES \\
$\{1\}$ & (7) $\beta \in \emptyset$ & 6 Simplification \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (8) $(\forall y)(\neg (y \in \emptyset))$ & \textbf{Empty Set Theorem} \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (9) $\neg (\beta \in \emptyset)$ & 8 US \\ 
$\{1, \mathrm{Ax \hspace{2pt}} 2\}$ & (10) $\beta \in \emptyset \wedge \neg(\beta \in \emptyset)$ & 7 9 Adjunction \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (11) $(\forall y)(\emptyset \subseteq y)$ & 1 10 R.A.A.\\
\hline
\end{tabular}
\end{frame}

\begin{frame}{A ``naive" set theory}
Prove $(\exists z)(\emptyset \in z)$. Let $Px$ denote the predicate ``$x=\emptyset$". Then prove \\
\begin{tabular}{|lll|}
\hline
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (1) $(\exists z)(\forall x)(x \in z \leftrightarrow Px)$ & Axiom 2 \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (2) $(\forall x)(x \in \alpha \leftrightarrow Px)$ & 1 ES \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (3) $\emptyset \in \alpha \leftrightarrow \emptyset=\emptyset$ & 2 US \& Def of $P$ \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (4) $\emptyset = \emptyset \rightarrow \emptyset \in \alpha$ & 3 Bicond. \& Simplify \\ 
$\{\}$ & (5) $\emptyset = \emptyset$ & Identity Law \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (6) $\emptyset \in \alpha$ & 4 5 Detachment \\
$\{\mathrm{Ax \hspace{2pt}} 2\}$ & (7) $(\exists z)(\emptyset \in z)$ & 6 EG \\
\hline
\end{tabular}
\end{frame}

\begin{frame}{The Liar Paradox}
``This sentence is false." \\
\vspace{1in}
Is the sentence true or is it false?
\end{frame}

\begin{frame}{The Barber paradox}
Imagine a town with precisely one barber. The barber obeys the property ``the barber shaves anyone who does not shave themselves". \\
\vspace{1in}
Who in the town shaves the barber?
\end{frame}

\end{document}
