\documentclass[11pt]{article}
\pdfsuppresswarningpagegroup=1
\usepackage{amsmath,amssymb,amsthm,amscd,amsfonts}
\usepackage{epsfig,pinlabel,paralist}
\usepackage{mathtools}
\usepackage[vmargin=1in, hmargin=1.25in]{geometry}
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}
\usepackage{calc}
\usepackage{etoolbox}
\usepackage{microtype}
\usepackage[all,cmtip]{xy}
\usepackage{bbm}
\usepackage[bookmarks, bookmarksdepth=2, colorlinks=true, linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref}
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}
\apptocmd{\thebibliography}{\raggedright}{}{}
\numberwithin{equation}{section}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{maintheorem}{Theorem}
\newtheorem{maincorollary}[maintheorem]{Corollary}
\newtheorem{maintheoremprime}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem*{unnumberedlemma}{Lemma}
\newtheorem{sublemma}[theorem]{Sublemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{question}[theorem]{Question}
\newtheorem{problem}[theorem]{Problem}
\newtheorem*{claim}{Claim}
\newtheorem{claims}{Claim}
\newtheorem{casea}{Case}
\newtheorem{caseb}{Case}
\newtheorem{steps}{Step}
\newtheorem{subcase}{Subcase}
\renewcommand{\themaintheorem}{\Alph{maintheorem}}
\renewcommand{\themaincorollary}{\Alph{maincorollary}}
\renewcommand{\themaintheoremprime}{\Alph{maintheoremprime}$'$}
\newcommand{\margin}[1]{\marginpar{\scriptsize #1}}
\theoremstyle{definition}
\newtheorem{assumption}{Assumption}
\newtheorem{defn}[theorem]{Definition}
\newenvironment{definition}[1][]{\begin{defn}[#1]\pushQED{\qed}}{\popQED \end{defn}}
\newtheorem{notation}[theorem]{Notation}
\theoremstyle{remark}
\newtheorem{rmk}[theorem]{Remark}
\newenvironment{remark}[1][]{\begin{rmk}[#1] \pushQED{}}{\popQED \end{rmk}}
\newtheorem{remarks}[theorem]{Remarks}
\newtheorem{eg}[theorem]{Example}
\newenvironment{example}[1][]{\begin{eg}[#1] \pushQED{\qed}}{\popQED \end{eg}}
\newtheorem{warning}[theorem]{Warning}
\newtheorem{numberedremark}[theorem]{Remark}
% Sets of Functions
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\Diff}{Diff}
\DeclareMathOperator{\Emb}{Emb}
\DeclareMathOperator{\Homeo}{Homeo}
\DeclareMathOperator{\Ker}{ker}
\DeclareMathOperator{\Coker}{coker}
\DeclareMathOperator{\Image}{Im}
% Matrix groups
\DeclareMathOperator{\GL}{GL}
\newcommand\GLp{GL^{>0}}
\DeclareMathOperator{\PGL}{PGL}
\DeclareMathOperator{\SL}{SL}
\DeclareMathOperator{\PSL}{PSL}
\DeclareMathOperator{\Sp}{Sp}
\DeclareMathOperator{\OO}{O}
\DeclareMathOperator{\SO}{SO}
\DeclareMathOperator{\UU}{U}
\DeclareMathOperator{\SU}{SU}
\DeclareMathOperator{\Mat}{Mat}
% Lie algberas
\DeclareMathOperator{\fgl}{\mathfrak{gl}}
\DeclareMathOperator{\fsl}{\mathfrak{sl}}
\DeclareMathOperator{\fsp}{\mathfrak{sp}}
\DeclareMathOperator{\fo}{\mathfrak{o}}
\DeclareMathOperator{\fu}{\mathfrak{u}}
% Number Systems
\newcommand\R{\ensuremath{\mathbb{R}}}
\newcommand\C{\ensuremath{\mathbb{C}}}
\newcommand\Z{\ensuremath{\mathbb{Z}}}
\newcommand\Q{\ensuremath{\mathbb{Q}}}
\newcommand\N{\ensuremath{\mathbb{N}}}
\newcommand\Field{\ensuremath{\mathbb{F}}}
\DeclareMathOperator{\Char}{char}
% (Co-)Homology
\DeclareMathOperator{\HH}{H}
\newcommand\RH{\ensuremath{\widetilde{\HH}}}
\DeclareMathOperator{\CC}{C}
\DeclareMathOperator{\Tor}{Tor}
\DeclareMathOperator{\Ext}{Ext}
% Misc
\DeclareMathOperator{\RP}{R\mathbb{P}}
\DeclareMathOperator{\Dim}{dim}
\DeclareMathOperator{\Max}{max}
\DeclareMathOperator{\Min}{min}
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\Out}{Out}
\DeclareMathOperator{\Inn}{Inn}
\DeclareMathOperator{\Ind}{Ind}
\DeclareMathOperator{\Res}{Res}
\DeclareMathOperator{\Interior}{Int}
\DeclareMathOperator{\Isom}{Isom}
\newcommand\Span[1]{\ensuremath{\langle #1 \rangle}}
\newcommand\Set[2]{\ensuremath{\left\{\text{#1 $|$ #2}\right\}}}
% Script/Fraktur/Overlined/etc letters
\newcommand\cA{\ensuremath{\mathcal{A}}}
\newcommand\cB{\ensuremath{\mathcal{B}}}
\newcommand\cC{\ensuremath{\mathcal{C}}}
\newcommand\cD{\ensuremath{\mathcal{D}}}
\newcommand\cE{\ensuremath{\mathcal{E}}}
\newcommand\cF{\ensuremath{\mathcal{F}}}
\newcommand\cG{\ensuremath{\mathcal{G}}}
\newcommand\cH{\ensuremath{\mathcal{H}}}
\newcommand\cI{\ensuremath{\mathcal{I}}}
\newcommand\cJ{\ensuremath{\mathcal{J}}}
\newcommand\cK{\ensuremath{\mathcal{K}}}
\newcommand\cL{\ensuremath{\mathcal{L}}}
\newcommand\cM{\ensuremath{\mathcal{M}}}
\newcommand\cN{\ensuremath{\mathcal{N}}}
\newcommand\cO{\ensuremath{\mathcal{O}}}
\newcommand\cP{\ensuremath{\mathcal{P}}}
\newcommand\cQ{\ensuremath{\mathcal{Q}}}
\newcommand\cR{\ensuremath{\mathcal{R}}}
\newcommand\cS{\ensuremath{\mathcal{S}}}
\newcommand\cT{\ensuremath{\mathcal{T}}}
\newcommand\cU{\ensuremath{\mathcal{U}}}
\newcommand\cV{\ensuremath{\mathcal{V}}}
\newcommand\cW{\ensuremath{\mathcal{W}}}
\newcommand\cX{\ensuremath{\mathcal{X}}}
\newcommand\cY{\ensuremath{\mathcal{Y}}}
\newcommand\cZ{\ensuremath{\mathcal{Z}}}
\newcommand\fA{\ensuremath{\mathfrak{A}}}
\newcommand\fB{\ensuremath{\mathfrak{B}}}
\newcommand\fC{\ensuremath{\mathfrak{C}}}
\newcommand\fD{\ensuremath{\mathfrak{D}}}
\newcommand\fE{\ensuremath{\mathfrak{E}}}
\newcommand\fF{\ensuremath{\mathfrak{F}}}
\newcommand\fG{\ensuremath{\mathfrak{G}}}
\newcommand\fH{\ensuremath{\mathfrak{H}}}
\newcommand\fI{\ensuremath{\mathfrak{I}}}
\newcommand\fJ{\ensuremath{\mathfrak{J}}}
\newcommand\fK{\ensuremath{\mathfrak{K}}}
\newcommand\fL{\ensuremath{\mathfrak{L}}}
\newcommand\fM{\ensuremath{\mathfrak{M}}}
\newcommand\fN{\ensuremath{\mathfrak{N}}}
\newcommand\fO{\ensuremath{\mathfrak{O}}}
\newcommand\fP{\ensuremath{\mathfrak{P}}}
\newcommand\fQ{\ensuremath{\mathfrak{Q}}}
\newcommand\fR{\ensuremath{\mathfrak{R}}}
\newcommand\fS{\ensuremath{\mathfrak{S}}}
\newcommand\fT{\ensuremath{\mathfrak{T}}}
\newcommand\fU{\ensuremath{\mathfrak{U}}}
\newcommand\fV{\ensuremath{\mathfrak{V}}}
\newcommand\fW{\ensuremath{\mathfrak{W}}}
\newcommand\fX{\ensuremath{\mathfrak{X}}}
\newcommand\fY{\ensuremath{\mathfrak{Y}}}
\newcommand\fZ{\ensuremath{\mathfrak{Z}}}
\newcommand\tA{\ensuremath{\widetilde{A}}}
\newcommand\tB{\ensuremath{\widetilde{B}}}
\newcommand\tC{\ensuremath{\widetilde{C}}}
\newcommand\tD{\ensuremath{\widetilde{D}}}
\newcommand\tE{\ensuremath{\widetilde{E}}}
\newcommand\tF{\ensuremath{\widetilde{F}}}
\newcommand\tG{\ensuremath{\widetilde{G}}}
\newcommand\tH{\ensuremath{\widetilde{H}}}
\newcommand\tI{\ensuremath{\widetilde{I}}}
\newcommand\tJ{\ensuremath{\widetilde{J}}}
\newcommand\tK{\ensuremath{\widetilde{K}}}
\newcommand\tL{\ensuremath{\widetilde{L}}}
\newcommand\tM{\ensuremath{\widetilde{M}}}
\newcommand\tN{\ensuremath{\widetilde{N}}}
\newcommand\tO{\ensuremath{\widetilde{O}}}
\newcommand\tP{\ensuremath{\widetilde{P}}}
\newcommand\tQ{\ensuremath{\widetilde{Q}}}
\newcommand\tR{\ensuremath{\widetilde{R}}}
\newcommand\tS{\ensuremath{\widetilde{S}}}
\newcommand\tT{\ensuremath{\widetilde{T}}}
\newcommand\tU{\ensuremath{\widetilde{U}}}
\newcommand\tV{\ensuremath{\widetilde{V}}}
\newcommand\tW{\ensuremath{\widetilde{W}}}
\newcommand\tX{\ensuremath{\widetilde{X}}}
\newcommand\tY{\ensuremath{\widetilde{Y}}}
\newcommand\tZ{\ensuremath{\widetilde{Z}}}
\newcommand\ta{\ensuremath{\widetilde{a}}}
\newcommand\tb{\ensuremath{\widetilde{b}}}
\newcommand\tc{\ensuremath{\widetilde{c}}}
\newcommand\td{\ensuremath{\widetilde{d}}}
\newcommand\te{\ensuremath{\widetilde{e}}}
\newcommand\tf{\ensuremath{\widetilde{f}}}
\newcommand\tg{\ensuremath{\widetilde{g}}}
\newcommand\tth{\ensuremath{\widetilde{h}}}
\newcommand\ti{\ensuremath{\widetilde{i}}}
\newcommand\tj{\ensuremath{\widetilde{j}}}
\newcommand\tk{\ensuremath{\widetilde{k}}}
\newcommand\tl{\ensuremath{\widetilde{l}}}
\newcommand\tm{\ensuremath{\widetilde{m}}}
\newcommand\tn{\ensuremath{\widetilde{n}}}
\newcommand\tto{\ensuremath{\widetilde{o}}}
\newcommand\tp{\ensuremath{\widetilde{p}}}
\newcommand\tq{\ensuremath{\widetilde{q}}}
\newcommand\tr{\ensuremath{\widetilde{r}}}
\newcommand\ts{\ensuremath{\widetilde{s}}}
\newcommand\ttt{\ensuremath{\widetilde{t}}}
\newcommand\tu{\ensuremath{\widetilde{u}}}
\newcommand\tv{\ensuremath{\widetilde{v}}}
\newcommand\tw{\ensuremath{\widetilde{w}}}
\newcommand\tx{\ensuremath{\widetilde{x}}}
\newcommand\ty{\ensuremath{\widetilde{y}}}
\newcommand\tz{\ensuremath{\widetilde{z}}}
\newcommand\tcA{\ensuremath{\widetilde{\cA}}}
\newcommand\tcB{\ensuremath{\widetilde{\cB}}}
\newcommand\tcC{\ensuremath{\widetilde{\cC}}}
\newcommand\tcD{\ensuremath{\widetilde{\cD}}}
\newcommand\tcE{\ensuremath{\widetilde{\cE}}}
\newcommand\tcF{\ensuremath{\widetilde{\cF}}}
\newcommand\tcG{\ensuremath{\widetilde{\cG}}}
\newcommand\tcH{\ensuremath{\widetilde{\cH}}}
\newcommand\tcI{\ensuremath{\widetilde{\cI}}}
\newcommand\tcJ{\ensuremath{\widetilde{\cJ}}}
\newcommand\tcK{\ensuremath{\widetilde{\cK}}}
\newcommand\tcL{\ensuremath{\widetilde{\cL}}}
\newcommand\tcM{\ensuremath{\widetilde{\cM}}}
\newcommand\tcN{\ensuremath{\widetilde{\cN}}}
\newcommand\tcO{\ensuremath{\widetilde{\cO}}}
\newcommand\tcP{\ensuremath{\widetilde{\cP}}}
\newcommand\tcQ{\ensuremath{\widetilde{\cQ}}}
\newcommand\tcR{\ensuremath{\widetilde{\cR}}}
\newcommand\tcS{\ensuremath{\widetilde{\cS}}}
\newcommand\tcT{\ensuremath{\widetilde{\cT}}}
\newcommand\tcU{\ensuremath{\widetilde{\cU}}}
\newcommand\tcV{\ensuremath{\widetilde{\cV}}}
\newcommand\tcW{\ensuremath{\widetilde{\cW}}}
\newcommand\tcX{\ensuremath{\widetilde{\cX}}}
\newcommand\tcY{\ensuremath{\widetilde{\cY}}}
\newcommand\tcZ{\ensuremath{\widetilde{\cZ}}}
\newcommand\tfA{\ensuremath{\widetilde{\fA}}}
\newcommand\tfB{\ensuremath{\widetilde{\fB}}}
\newcommand\tfC{\ensuremath{\widetilde{\fC}}}
\newcommand\tfD{\ensuremath{\widetilde{\fD}}}
\newcommand\tfE{\ensuremath{\widetilde{\fE}}}
\newcommand\tfF{\ensuremath{\widetilde{\fF}}}
\newcommand\tfG{\ensuremath{\widetilde{\fG}}}
\newcommand\tfH{\ensuremath{\widetilde{\fH}}}
\newcommand\tfI{\ensuremath{\widetilde{\fI}}}
\newcommand\tfJ{\ensuremath{\widetilde{\fJ}}}
\newcommand\tfK{\ensuremath{\widetilde{\fK}}}
\newcommand\tfL{\ensuremath{\widetilde{\fL}}}
\newcommand\tfM{\ensuremath{\widetilde{\fM}}}
\newcommand\tfN{\ensuremath{\widetilde{\fN}}}
\newcommand\tfO{\ensuremath{\widetilde{\fO}}}
\newcommand\tfP{\ensuremath{\widetilde{\fP}}}
\newcommand\tfQ{\ensuremath{\widetilde{\fQ}}}
\newcommand\tfR{\ensuremath{\widetilde{\fR}}}
\newcommand\tfS{\ensuremath{\widetilde{\fS}}}
\newcommand\tfT{\ensuremath{\widetilde{\fT}}}
\newcommand\tfU{\ensuremath{\widetilde{\fU}}}
\newcommand\tfV{\ensuremath{\widetilde{\fV}}}
\newcommand\tfW{\ensuremath{\widetilde{\fW}}}
\newcommand\tfX{\ensuremath{\widetilde{\fX}}}
\newcommand\tfY{\ensuremath{\widetilde{\fY}}}
\newcommand\tfZ{\ensuremath{\widetilde{\fZ}}}
\newcommand\oA{\ensuremath{\overline{A}}}
\newcommand\oB{\ensuremath{\overline{B}}}
\newcommand\oC{\ensuremath{\overline{C}}}
\newcommand\oD{\ensuremath{\overline{D}}}
\newcommand\oE{\ensuremath{\overline{E}}}
\newcommand\oF{\ensuremath{\overline{F}}}
\newcommand\oG{\ensuremath{\overline{G}}}
\newcommand\oH{\ensuremath{\overline{H}}}
\newcommand\oI{\ensuremath{\overline{I}}}
\newcommand\oJ{\ensuremath{\overline{J}}}
\newcommand\oK{\ensuremath{\overline{K}}}
\newcommand\oL{\ensuremath{\overline{L}}}
\newcommand\oM{\ensuremath{\overline{M}}}
\newcommand\oN{\ensuremath{\overline{N}}}
\newcommand\oO{\ensuremath{\overline{O}}}
\newcommand\oP{\ensuremath{\overline{P}}}
\newcommand\oQ{\ensuremath{\overline{Q}}}
\newcommand\oR{\ensuremath{\overline{R}}}
\newcommand\oS{\ensuremath{\overline{S}}}
\newcommand\oT{\ensuremath{\overline{T}}}
\newcommand\oU{\ensuremath{\overline{U}}}
\newcommand\oV{\ensuremath{\overline{V}}}
\newcommand\oW{\ensuremath{\overline{W}}}
\newcommand\oX{\ensuremath{\overline{X}}}
\newcommand\oY{\ensuremath{\overline{Y}}}
\newcommand\oZ{\ensuremath{\overline{Z}}}
\newcommand\ocA{\ensuremath{\overline{\cA}}}
\newcommand\ocB{\ensuremath{\overline{\cB}}}
\newcommand\ocC{\ensuremath{\overline{\cC}}}
\newcommand\ocD{\ensuremath{\overline{\cD}}}
\newcommand\ocE{\ensuremath{\overline{\cE}}}
\newcommand\ocF{\ensuremath{\overline{\cF}}}
\newcommand\ocG{\ensuremath{\overline{\cG}}}
\newcommand\ocH{\ensuremath{\overline{\cH}}}
\newcommand\ocI{\ensuremath{\overline{\cI}}}
\newcommand\ocJ{\ensuremath{\overline{\cJ}}}
\newcommand\ocK{\ensuremath{\overline{\cK}}}
\newcommand\ocL{\ensuremath{\overline{\cL}}}
\newcommand\ocM{\ensuremath{\overline{\cM}}}
\newcommand\ocN{\ensuremath{\overline{\cN}}}
\newcommand\ocO{\ensuremath{\overline{\cO}}}
\newcommand\ocP{\ensuremath{\overline{\cP}}}
\newcommand\ocQ{\ensuremath{\overline{\cQ}}}
\newcommand\ocR{\ensuremath{\overline{\cR}}}
\newcommand\ocS{\ensuremath{\overline{\cS}}}
\newcommand\ocT{\ensuremath{\overline{\cT}}}
\newcommand\ocU{\ensuremath{\overline{\cU}}}
\newcommand\ocV{\ensuremath{\overline{\cV}}}
\newcommand\ocW{\ensuremath{\overline{\cW}}}
\newcommand\ocX{\ensuremath{\overline{\cX}}}
\newcommand\ocY{\ensuremath{\overline{\cY}}}
\newcommand\ocZ{\ensuremath{\overline{\cZ}}}
\newcommand\ofA{\ensuremath{\overline{\fA}}}
\newcommand\ofB{\ensuremath{\overline{\fB}}}
\newcommand\ofC{\ensuremath{\overline{\fC}}}
\newcommand\ofD{\ensuremath{\overline{\fD}}}
\newcommand\ofE{\ensuremath{\overline{\fE}}}
\newcommand\ofF{\ensuremath{\overline{\fF}}}
\newcommand\ofG{\ensuremath{\overline{\fG}}}
\newcommand\ofH{\ensuremath{\overline{\fH}}}
\newcommand\ofI{\ensuremath{\overline{\fI}}}
\newcommand\ofJ{\ensuremath{\overline{\fJ}}}
\newcommand\ofK{\ensuremath{\overline{\fK}}}
\newcommand\ofL{\ensuremath{\overline{\fL}}}
\newcommand\ofM{\ensuremath{\overline{\fM}}}
\newcommand\ofN{\ensuremath{\overline{\fN}}}
\newcommand\ofO{\ensuremath{\overline{\fO}}}
\newcommand\ofP{\ensuremath{\overline{\fP}}}
\newcommand\ofQ{\ensuremath{\overline{\fQ}}}
\newcommand\ofR{\ensuremath{\overline{\fR}}}
\newcommand\ofS{\ensuremath{\overline{\fS}}}
\newcommand\ofT{\ensuremath{\overline{\fT}}}
\newcommand\ofU{\ensuremath{\overline{\fU}}}
\newcommand\ofV{\ensuremath{\overline{\fV}}}
\newcommand\ofW{\ensuremath{\overline{\fW}}}
\newcommand\ofX{\ensuremath{\overline{\fX}}}
\newcommand\ofY{\ensuremath{\overline{\fY}}}
\newcommand\ofZ{\ensuremath{\overline{\fZ}}}
% Figures
\newcommand\Figure[4]{
\begin{figure}[t]
\centering
\centerline{\psfig{file=#2,scale=#4}}
\caption{#3}
\label{#1}
\end{figure}}
% Document specific macros go here
\DeclareMathOperator{\Mod}{Mod}
\DeclareMathOperator{\Fr}{Fr}
\DeclareMathOperator{\Triv}{Triv}
\DeclareMathOperator{\HTriv}{HTriv}
\DeclareMathOperator{\Tw}{Twist}
\DeclareMathOperator{\Sphere}{\mathbb{S}}
\newcommand\tGLp{\widetilde{\GL}^{>0}}
\title{\vspace{-40pt}Pre-Spivak Notes for Honors Calculus I\vspace{-15pt}}
\author{}
\date{}
\begin{document}
\vspace{-10pt}
\maketitle
I decided to write up some notes for the portion of this class that comes before we start
following Spivak. Spivak starts with the real numbers, and our goal is to build up
some basic language so we can appreciate what he does.
\section{Day 2}
The basic idea is that we want to start with something very primitive and build our way
up to the real numbers. The progression is as follows:
\begin{compactenum}
\item The real numbers $\R$ (e.g.\ numbers like $-4$ and $\pi$ and $4/5$) are built
from the rational numbers $\Q$ (i.e.\ fractions like $4/5$; whole numbers like $-4$ also count as fractions since
we can write $-4/=-4/1$).
\item The rational numbers $\Q$ are built from the integers $\Z = \{\ldots,-2,-1,0,1,2,\ldots\}$.
\item The integers $\Z$ are built from the natural numbers $\N = \{1,2,3,\ldots\}$.
\item The natural numbers $\N$ are built from the theory of {\em sets}.
\end{compactenum}
The theory of sets is the primitive language underlying all modern mathematics. We will not
give a formal treatment of it since that would be a course unto itself, but we will try to give
you a taste of what is going on.
A set is simply a collection of things. Here are some examples:
\begin{compactitem}
\item The set of all Honors Calculus students. Here we specify the set by simply giving a
verbal description of it.
\item The set $\{\text{apple, orange, banana}\}$ is a finite set whose elements we list.
\item The sets $\{1,3,5,7,\ldots\}$ and $\{2,4,6,8,\ldots\}$ of odd and even natural numbers. These
sets are infinite, so we can't list them all, but the $\ldots$ indicate that the pattern continues.
\item The {\em empty set} $\emptyset$, which has no elements in it.
\end{compactitem}
One important piece of notation we will use is {\em set-builder notation}. I will illustrate
this using the even and odd numbers:
\[\{2,4,6,8,\ldots\} = \Set{$n$}{there exists $k \geq 1$ such that $n = 2k$}\]
and
\[\{1,3,5,7,\ldots\} = \Set{$n$}{there exists $k \geq 1$ such that $n = 2k-1$}.\]
Here you should read the ``$|$'' symbols as ``such that''.
We will write $\in$ to say that an element is a member of a set, and $\notin$ to say that it is not.
For instance,
\[2 \in \{2,4,6,8,\ldots\} \quad \text{but} \quad 3 \notin \{2,4,6,8,\ldots\}.\]
One important feature of sets is that there elements can be very general; in fact, it is important
to allow sets to contain sets as elements! For instance, we have a set
\[\{\{1,2\}, \{1,3\}, \{2,3\}\}\]
containing all sets of size $2$ consisting of numbers from $1,2,3$. We can even have the empty set as
an element of a set. For instance, we might have
\[\{\emptyset,\{1,2\},\{1,3\},\{2,3\}\}\]
which is different from the above set since it contains a new element:
\[\emptyset \in \{\emptyset,\{1,2\},\{1,3\},\{2,3\}\}.\]
We will encounter lots of different kinds of sets as the course progresses, and you will gain
experience with them. They seem pretty abstract at first!
Here is an important cautionary example.
\begin{example}
This example is called Russell's Paradox. Let $X$ the set of all sets $S$ such that $S \notin S$.
In other words,
\[X = \Set{$S$}{$S$ a set such that $S \notin S$}.\]
Question: does $X$ contain itself? If $X$ does not contain itself, then by definition $X \in X$, which
means that it does contain itself, which means that $X \notin X$, etc. We keep going round
and round in logical circles!
\end{example}
The point of this example is that we have to be somewhat careful when specifying sets if we want
to avoid introducing contradictions to the foundations of mathematics. The set of rules that
most mathematicians follow is called the ``Zermelo-Frankel Axioms'', and they are set up
so that you are not allowed to talk about things like ``the set of all sets'', or introduce
self-reference. We will not state these axioms, but we promise that all the constructions
we do this semester will be consistent with them!
We now introduce some basic language for manipulating sets. We start with the following definition:
\begin{definition}
For sets $A$ and $B$, the {\em union} of $A$ and $B$, denoted $A \cup B$, is the set of all
things that lie in either $A$ or $B$. In set-builder notation, this is
\[A \cup B = \Set{$x$}{$x \in A$ or $x \in B$}.\qedhere\]
\end{definition}
In this definition, I want to emphasize that we are using the {\em inclusive or}: when we
say that $x \in A$ or $x \in B$, we allow $x$ to be contained in both $A$ and $B$. We will use
this sense of ``or'' throughout this class. It is helpful to think about it using a {\em true table}.
For statements $P$ and $Q$ (e.g.\ we might have $P$ equal to $x \in A$ and $Q$ equal to $x \in B$),
we have that ``$P$ or $Q$'' is true if $P$ is true and $Q$ is false, if $P$ is true and $Q$ is true, and
if $P$ is false but $Q$ is true; however, we have that ``$P$ or $Q$'' is false if $P$ is false and $Q$ is
false. It is traditional to use $\vee$ as a shorthand for ``or'', so the above rules are summarized
in the following table:
\begin{center}
\begin{tabular}{l|l|l}
$P$ & $Q$ & $P \vee Q$ \\
\hline
$T$ & $F$ & $T$ \\
$F$ & $T$ & $T$ \\
$T$ & $T$ & $T$ \\
$F$ & $F$ & $F$
\end{tabular}
\end{center}
Here are some examples of unions:
\begin{compactitem}
\item If $A = \{1,2,3\}$ and $B = \{2,3,4\}$, then $A \cup B = \{1,2,3,4\}$.
\item If $E$ is the set of even natural numbers and $O$ is the set of odd natural numbers, then
$E \cup O = \N$.
\end{compactitem}
The next operation is as follows:
\begin{definition}
For sets $A$ and $B$, the {\em intersection} of $A$ and $B$, denoted $A \cap B$, is the set of all
things that lie in either $A$ or $B$. In set-builder notation, this is
\[A \cap B = \Set{$x$}{$x \in A$ and $x \in B$}.\qedhere\]
\end{definition}
The logical connective ``and'' here functions just like you think it does, but just in case
here is a truth table for it. In this table, we use $\wedge$ to denote ``and'':
\begin{center}
\begin{tabular}{l|l|l}
$P$ & $Q$ & $P \wedge Q$ \\
\hline
$T$ & $F$ & $F$ \\
$F$ & $T$ & $F$ \\
$T$ & $T$ & $T$ \\
$F$ & $F$ & $F$
\end{tabular}
\end{center}
Here are some examples of intersections:
\begin{compactitem}
\item If $A = \{1,2,3\}$ and $B = \{2,3,4\}$, then $A \cap B = \{2,3\}$.
\item If $E$ is the set of even natural numbers and $O$ is the set of odd natural numbers, then
$E \cap O = \emptyset$. By the way, in this case we say that $E$ and $O$ are {\em disjoint}.
\end{compactitem}
We close with the first small lemma of this course. Its proof is a good illustration of how
you prove simple things using the definitions.
\begin{lemma}
If $A$ and $B$ and $C$ are sets, then $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$.
\end{lemma}
\begin{proof}
We have to show two things: every element of $A \cap (B \cup C)$ lies in $(A \cap B) \cup (A \cap C)$,
and every element of $(A \cap B) \cup (A \cap C)$ lies in $A \cap (B \cup C)$.
We start by showing that every element of $A \cap (B \cup C)$ lies in $(A \cap B) \cup (A \cap C)$.
Consider some $x \in A \cap (B \cup C)$. We want to show that $x \in (A \cap B) \cup (A \cap C)$.
Since $x \in A \cap (B \cup C)$, we have $x \in A$ and $x \in B \cup C$. Since $x \in B \cup C$, we
have that $x \in B$ or $x \in C$. We consider these two possibilities separately:
\begin{compactitem}
\item If $x \in B$, then since we know $x \in A$ we can deduce that $x \in A \cap B$, and thus
that $x \in (A \cap B) \cup (A \cap C)$.
\item If $x \in C$, then since we know $x \in A$ we can deduce that $x \in A \cap C$, and thus
that $x \in (A \cap B) \cup (A \cap C)$.
\end{compactitem}
In both cases, we have achieved our goal of showing that $x \in (A \cap B) \cup (A \cap C)$.
We next show that every element of $(A \cap B) \cup (A \cap C)$ lies in $A \cap (B \cup C)$.
Consider some $x \in (A \cap B) \cup (A \cap C)$. We want to show that $x \in A \cap (B \cup C)$.
Since $x \in (A \cap B) \cup (A \cap C)$, we either have $x \in A \cap B$ or $x \in A \cap C$. We
consider these two possibilities separately:
\begin{compactitem}
\item If $x \in A \cap B$, we have $x \in A$ and $x \in B$. Since $x \in B$, we have $x \in B \cup C$.
Since $x \in A$ and $x \in B \cup C$, we can conclude that $x \in A \cap (B \cup C)$.
\item If $x \in A \cap C$, we have $x \in A$ and $x \in C$. Since $x \in C$, we have $x \in B \cup C$.
Since $x \in A$ and $x \in B \cup C$, we can conclude that $x \in A \cap (B \cup C)$.
\end{compactitem}
In both cases, we have achieved our goal of showing that $x \in A \cap (B \cup C)$.
\end{proof}
This proof is perhaps not the most exciting proof, but it illustrates some important things:
\begin{compactenum}
\item The first step to proving something is usually to try to carefully state your goal.
\item You then carefully state what your assumptions are.
\item You then use logic to carefully transform your assumptions into your goal.
\end{compactenum}
Often quite a bit of creativity is needed along the way, but it is important to get used
to boring examples like the one above first! Over the next week or so, we will give
a number of other simple examples of set-theoretic proofs (plus a couple of interesting
and surprising ones to entertain you and make this worth your intellectual time!). You
will also have to produce some in the homework.
\section{Day 3}
Last time we introduced sets and discussed intersections (denoted with $\cap$) and unions (denoted
with $\cup$). We also discussed some logical symbols ($\wedge$ for ``and'', $\vee$ for ``or''). In today's
lecture, we will spend some more time discussing basic logic.
Our first order of business will be to talk about {\em negation}. If $P$ is a statement (i.e.\ a sentence
with a definite truth value), then $\neg P$ will denote the statement with the opposite truth value. You
should read ``$\neg P$'' as ``not $P$''. For instance, if $P$ is the true statement ``Humans are animals'',
then $\neg P$ is the false statement ``Humans are not animals''.
To further illustrate this, consider the following examples. Let $P$ be the statement ``You are rich''
and $Q$ be the statement ``You are happy''.
\begin{compactitem}
\item The statement $P \wedge Q$ is ``You are rich and you are happy''. Its negation $\neg(P \wedge Q)$
is the statement ``You are {\em not} both rich and happy'', or equivalently ``You are not rich or you are not happy''.
We have discovered that $\neg(P \wedge Q)$ is completely equivalent to $(\neg P) \vee (\neg Q)$. This could
also be illustrated by examining truth tables as follows:
\begin{center}
\begin{tabular}{l|l|l|l|l|l|l}
$P$ & $Q$ & $P \wedge Q$ & $\neg (P \wedge Q)$ & $\neg P$ & $\neg Q$ & $(\neg P) \vee (\neg Q)$\\
\hline
$T$ & $T$ & $T$ & $F$ & $F$ & $F$ & $F$\\
$T$ & $F$ & $F$ & $T$ & $F$ & $T$ & $T$\\
$F$ & $T$ & $F$ & $T$ & $T$ & $F$ & $T$\\
$F$ & $F$ & $F$ & $T$ & $T$ & $T$ & $T$\\
\end{tabular}
\end{center}
You'll observe that the columns corresponding to $\neg (P \wedge Q)$ and $(\neg P) \vee (\neg Q)$ are identical.
\item The statement $P \vee Q$ is ``You are rich or you are happy''. Its negation $\neg(P \vee Q)$
is the statement ``You are not rich or happy'', or equivalently ``You are not rich and you are not happy''.
We have discovered that $\neg(P \vee Q)$ is completely equivalent to $(\neg P) \wedge (\neg Q)$. This could
also be illustrated by examining truth tables as follows:
\begin{center}
\begin{tabular}{l|l|l|l|l|l|l}
$P$ & $Q$ & $P \vee Q$ & $\neg (P \vee Q)$ & $\neg P$ & $\neg Q$ & $(\neg P) \wedge (\neg Q)$\\
\hline
$T$ & $T$ & $T$ & $F$ & $F$ & $F$ & $F$\\
$T$ & $F$ & $T$ & $F$ & $F$ & $T$ & $F$\\
$F$ & $T$ & $T$ & $F$ & $T$ & $F$ & $F$\\
$F$ & $F$ & $F$ & $T$ & $T$ & $T$ & $T$\\
\end{tabular}
\end{center}
You'll observe that the columns corresponding to $\neg (P \vee Q)$ and $(\neg P) \wedge (\neg Q)$ are identical.
\end{compactitem}
The next logical statement we will introduce is $\Rightarrow$, which means ``implies''. The statement
$P \Rightarrow Q$ means that $P$ being true implies that $Q$ is true, or equivalently ``If $P$, then $Q$''.
Here are some examples:
\begin{compactitem}
\item Returning to the case where $P$ is ``You are rich'' and $Q$ is ``You are happy'', the statement
$P \Rightarrow Q$ means ``You are rich implies you are happy'', or equivalently ``If you are rich, then you are
happy''. This is (according to most philosophical systems) a false statement!
\item Here is a more mathematical example. Let $P$ be the statement ``$n$ is an even integer'' and let
$Q$ be the statement ``$n$ is an integer''. The statement $P \Rightarrow Q$ means ``If $n$ is an even
integer, then $n$ is an integer''. This is true, albeit not very interesting!
\item This last example illustrates an important and at-first subtle point. Let $P$ be the
statement ``$n$ is an even integer and an elephant'' and $Q$ be the statement
``$n$ is rhino''. The statement $P \Rightarrow Q$ means ``If $n$ is an even integer and an elephant, then
$n$ is a rhino''. Is this true or false? It is actually {\bf true}, but for silly reasons: the statement
``$n$ is an even integer and an elephant'' is false, so it is true that $P \Rightarrow Q$ is true,
but just because it is completely empty! This is the rare fact in mathematics that is so trivial
that it is confusing...
\end{compactitem}
These examples illustrate what it means for $P \Rightarrow Q$ to be true: if $P$ is true, then $Q$ must be true, but
if $P$ is false then $Q$ can be either true or false. So it has the following truth table:
\begin{center}
\begin{tabular}{l|l|l}
$P$ & $Q$ & $P \Rightarrow Q$ \\
\hline
$T$ & $T$ & $T$ \\
$T$ & $F$ & $F$ \\
$F$ & $T$ & $T$ \\
$F$ & $F$ & $T$
\end{tabular}
\end{center}
Just to emphasize again: if $P$ is false, then $P \Rightarrow Q$ is true no matter what truth-value
$Q$ has!!!
If you reflect on the meaning of $P \Rightarrow Q$, you'll see that it is true precisely when either $P$
is false or when $Q$ is true. So $P \Rightarrow Q$ is equivalent to the statement
$(\neg P) \vee Q$, as is illustrated in the following truth table:
\begin{center}
\begin{tabular}{l|l|l|l|l|l}
$P$ & $Q$ & $P \Rightarrow Q$ & $\neg P$ & $Q$ & $(\neg P) \vee Q$\\
\hline
$T$ & $T$ & $T$ & $F$ & $T$ & $T$ \\
$T$ & $F$ & $F$ & $F$ & $F$ & $F$ \\
$F$ & $T$ & $T$ & $T$ & $T$ & $T$ \\
$F$ & $F$ & $T$ & $T$ & $F$ & $T$ \\
\end{tabular}
\end{center}
Let's now think about what happens when we negate $P \Rightarrow Q$. Since $P \Rightarrow Q$ is true
when either $P$ is false or $Q$ is true, $\neg (P \Rightarrow Q)$ is true when $P$ is true
and $Q$ is false. In other words, $\neg (P \Rightarrow Q)$ is equivalent to the logical statement
$P \wedge (\neg Q)$, as is illustrated in the following truth table:
\begin{center}
\begin{tabular}{l|l|l|l|l|l|l}
$P$ & $Q$ & $P \Rightarrow Q$ & $\neg (P \Rightarrow Q)$ & $P$ & $\neg Q$ & $P \wedge (\neg Q)$\\
\hline
$T$ & $T$ & $T$ & $F$ & $T$ & $F$ & $F$\\
$T$ & $F$ & $F$ & $T$ & $T$ & $T$ & $T$\\
$F$ & $T$ & $T$ & $F$ & $F$ & $F$ & $F$\\
$F$ & $F$ & $T$ & $F$ & $F$ & $T$ & $F$\\
\end{tabular}
\end{center}
The {\em converse} of an implication $P \Rightarrow Q$ is the implication $Q \Rightarrow P$. These
are very different statements, as is illustrated in the following examples:
\begin{compactitem}
\item Let $P$ be the statement ``$n$ is an even integer'' and $Q$ be the statement ``$n$ is an integer''.
The implication $P \Rightarrow Q$ is ``If $n$ is an even integer, then $n$ is an integer''. This is
true. However, its converse $Q \Rightarrow P$ is ``If $n$ is an integer, then $n$ is an even integer''. This
is false!!!
\item Here is a silly example. If $P$ is the statement ``A person is a Texan'' and $Q$ is the statement
``A person owns a gun'', then $P \Rightarrow Q$ is the statement ``If a person is a Texan, then they
own a gun''. This very well might be true (I lived in Texas for 10 years, and I think every native
Texan I met owned a gun...). However, its converse $Q \Rightarrow P$ is the statement
``If a person owns a gun, then they are a Texan''. This is definitely false.
\end{compactitem}
We can illustrate the difference between $P \Rightarrow Q$ and $Q \Rightarrow P$ by examining their
quite different truth tables:
\begin{center}
\begin{tabular}{l|l|l|l}
$P$ & $Q$ & $P \Rightarrow Q$ & $Q \Rightarrow P$ \\
\hline
$T$ & $T$ & $T$ & $T$\\
$T$ & $F$ & $F$ & $T$\\
$F$ & $T$ & $T$ & $F$\\
$F$ & $F$ & $T$ & $T$\\
\end{tabular}
\end{center}
The final logical notion we will introduce is the symbol $\iff$. The statement $P \iff Q$ should be
read ``$P$ is true if and only if $Q$ is true''. It means that $P$ is true/false precisely when
$Q$ is true/false. Another way of saying it is that $P \iff Q$ is true if {\em both} $P \Rightarrow Q$
and its converse $Q \Rightarrow P$ are true. Here are some examples:
\begin{compactitem}
\item Let $P$ be the statement ``$n$ is an even integer'' and $Q$ be the statement ``$n$ is an integer''.
The statement $P \iff Q$ means that ``$n$ is an even integer if and only if it is an integer'', which is
utterly false!
\item Here is a true $\iff$ statement from the theory of sets. You should reflect on why it is true.
Let $P$ be the statement ``The sets $A$ and $B$ are equal'' and let $Q$ be the statement
``$A \cap B = A$ and $A \cap B = B$''. Then $P \iff Q$ means that ``Sets $A$ and $B$ are equal if
and only if $A \cap B = A$ and $A \cap B = B$''. You might want to try to write a formal proof of this,
but at the very least you should convince yourself that it is true.
\end{compactitem}
To close, here is the truth table for $P \iff Q$ and $(P \wedge Q) \vee ((\neg P) \wedge (\neg Q))$ to
illustrate the fact that they are equivalent statements:
\begin{center}
\begin{tabular}{l|l|l|l|l|l}
$P$ & $Q$ & $P \iff Q$ & $P \wedge Q$ & $(\neg P) \wedge (\neg Q)$ & $(P \wedge Q) \vee ((\neg P) \wedge (\neg Q))$\\
\hline
$T$ & $T$ & $T$ & $T$ & $F$ & $T$ \\
$T$ & $F$ & $F$ & $F$ & $F$ & $F$ \\
$F$ & $T$ & $F$ & $F$ & $F$ & $F$ \\
$F$ & $F$ & $T$ & $F$ & $T$ & $T$ \\
\end{tabular}
\end{center}
\section{Day 4}
Our last lecture was devoted to logic. The main topic was implications like $P \Rightarrow Q$. Today we
will start with a little bit of set theory to illustrate this. We start with the following definition.
\begin{definition}
A set $A$ is a {\em subset} of a set $B$ if every element of $A$ is also an element of $B$.
We will write this by $A \subset B$. We allow the possibility that $A = B$. If $A \subset B$
but $A \neq B$, then we will say that $A$ is a {\em proper subset} of $B$ and write $A \subsetneq B$.
\end{definition}
\begin{example}
If $B$ is the set of Honors Calculus students and $A$ is the set of Honors Calculus students
who live in Alumni Hall, then $B \subsetneq A$.
\end{example}
\begin{example}
For a more mathematical example, we have the following inclusions between the sets
of numbers we have briefly talked about:
\[\N \subset \Z \subset \Q \subset \R.\]
It is clear that $\N \subsetneq \Z$ since $-1 \in \Z$ but $-1 \neq \N$. Similarly, it is clear
that $\Z \subsetneq \Q$. It is also true that $\Q \subsetneq \R$. You've probably been told
that numbers like $\sqrt{2}$ and $\pi$ are not rational numbers, but this is not obvious! Rather
than asking you to trust an authority figure like me, I promise to prove these facts to you
during the course!
\end{example}
This is a good opportunity to introduce another logical symbol. We will use the symbol
$\forall$ to denote ``for all''. Its use is illustrated in the following symbolic
statement that is true precisely when $A \subset B$:
\[\forall x(x \in A \Rightarrow x \in B).\]
You should reflect on why this is {\em exactly} the same as the definition of $A \subset B$.
If $A$ is {\em not} a subset of $B$, then we will write $A \not\subset B$. How can we express
this using our logical notation? One possibility would be to simply write
\[\neg \forall x(x \in A \Rightarrow x \in B).\]
This says that it is false that for all $x \in A$, we have $x \in B$. An equivalent statement
would be that there exists some $x \in B$ such that $x \notin A$. We will use the mathematical
symbol $\exists$ to express the statement ``there exists'', so $A \not\subset B$ is equivalent
to the assertion that
\[\exists x(x \in B \wedge x \notin A).\]
Here is another true logical statement involving $\exists$:
\[\exists x(x \in A \cap B) \iff A \cap B \neq \emptyset.\]
You should reflect on the meaning here to see why it is true!
We now turn to the final abstract topic we will discuss before we launch into our discussion
of numbers. Much of your previous education was devoted to functions like $f(x) = \cos(x)$
or $f(x) = \sqrt{x}$. You might have been led to think that a function is the same thing
as a formula. This is not true at all, and to think clearly about the foundations
of calculus it will be important to adopt a more abstract definition of a function.
So what is a function? Informally, it is a rule that associates to every element $x$
of a set $X$ an element $f(x)$ of a set $Y$. We will write such a function
as $f\colon X \rightarrow Y$ and call $X$ the {\em domain} of $f$ and $Y$ the {\em codomain}.
Here are a bunch of examples:
\begin{example}
If $X$ is the set of Honors Calculus students and $Y$ is the set of countries in the world,
then there is a function $f\colon X \rightarrow Y$ with $f(x) \in Y$ the birthplace
of student $x \in X$.
\end{example}
\begin{example}
That might not sound very mathematical. We can definitely define
functions like $f\colon \R \rightarrow \R$ with $f(x) = \cos(x)$. We
could also define $g\colon \R \rightarrow [-1,1]$ with $g(x) = \cos(x)$.
This is a {\em different} function than $f$ since its codomain is
different.
\end{example}
\begin{example}
There are also numerical functions that are not given by formulas. For
instance, we could define $\phi\colon \N \rightarrow \N$ by letting
$\phi(n) \in N$ be the $n^{\text{th}}$ decimal digit of $\pi$. While
we can easily calculate this, there is no known formula for it!
\end{example}
\begin{example}
Here is another interesting numerical function. Define $\psi\colon \R \rightarrow \R$ via the
rule
\[\psi(x) = \begin{cases}
1 & \text{if $x$ is rational},\\
0 & \text{if $x$ is irrational}.
\end{cases}\]
You might try to imagine what the graph of this looks like!
\end{example}
\begin{example}
There are also functions that are clearly important in math, but whose domains/codomains are
not sets of numbers. Let $\R[t]$ be the set of real polynomials in one variable $t$, so for
instance
\[3t^2-7t+\pi \in \R[t].\]
There is then a function $D\colon \R[t] \rightarrow \R[t]$ defined by the formula
$D(f(t)) = f'(t)$, where $f'$ is the derivative of $f$. Thus
\[D(3t^2-7t+\pi) = 6t-7.\qedhere\]
\end{example}
\begin{example}
An important function is the {\em identity function}. For a set $Z$, the identity function of
$Z$ is the function $\mathbbm{1}_Z\colon Z \rightarrow Z$ defined via the formula
$\mathbbm{1}_Z(x) = x$ for all $x \in Z$.
\end{example}
\begin{remark}
See Prof. Nicolaescu's notes for how to interpret functions as special kinds of sets. In
math, it is sets all the way to the bottom!
\end{remark}
Now consider a function $f\colon X \rightarrow Y$. For $A \subset X$, we write
\[f(A) = \Set{$y \in Y$}{$\exists x(x \in X \wedge f(x)=y$}.\]
In other words, $f(A) \subset Y$ is the set of all elements of $Y$ that are ``hit''
by $f$. Here we can take $A =X$, in which case we call $f(X)$ the {\em range} of
$f$. Note that this is different from the codomain! Here is an example:
\begin{example}
Let's return to the example $\psi\colon \R \rightarrow \R$ defined by
\[\psi(x) = \begin{cases}
1 & \text{if $x$ is rational},\\
0 & \text{if $x$ is irrational}.
\end{cases}\]
We then have $\psi(\Q) = \{1\}$, and the range of $\psi$ is $\psi(\R) = \{0,1\}$. Notice
that this range is {\em different} from the codomain.
\end{example}
\section{Day 5}
Today we continue our discussion of functions. Consider a function $f\colon X \rightarrow Y$.
Last time we discussed the image $f(A)$ of a subset $A \subset X$. We now reverse this. For
$y \in Y$, define
\[f^{-1}(y) = \Set{$x$}{$x \in X$ and $f(x) = y$}.\]
In other words, $f^{-1}(y)$ is all elements of $X$ that map to $y$. Here is an example.
\begin{example}
Let $\psi\colon \R \rightarrow \R$ be
\[\psi(x) = \begin{cases}
1 & \text{if $x$ is rational},\\
0 & \text{if $x$ is irrational}.
\end{cases}\]
Then $\psi^{-1}(1) = \Q$ and $\psi^{-1}(0) = \R \setminus \Q$ and $\psi^{-1}(1/2)=\emptyset$.
\end{example}
More generally, consider a subset $B \subset Y$. Define
\begin{align*}
f^{-1}(B) &= \Set{$x$}{$x \in X$ and $f(x) \in B$}\\
&= \bigcup_{b \in B} f^{-1}(b).
\end{align*}
\begin{example}
Let $f\colon \R \rightarrow \R$ be defined via $f(x) = \sin(x)$. Then
\[f^{-1}([0,1]) = \bigcup_{k=-\infty}^{\infty} [2k \pi, (2k+1)\pi].\]
The similar-looking function $g\colon [-\pi,\pi] \rightarrow \R$ defined via $g(x) = \sin(x)$ would have
\[g^{-1}([0,1]) = [0,\pi].\]
So the domain is important!
\end{example}
We now define the composition of two functions.
\begin{definition}
The {\em composition} of functions $f\colon X \rightarrow Y$ and $g \colon Y \rightarrow Z$
is the function $g \circ f\colon X \rightarrow Z$ defined by $g \circ f(x) = g(f(x))$ for
$x \in X$.
\end{definition}
Observe that for this to make sense, it is important for the codomain of $f$ to equal
the domain of $g$. Here is an example:
\begin{example}
Let $f\colon \Q \rightarrow \N$ be the function $f(a/b) = a^2+1$, where $a/b \in \Q$ is in lowest
terms. Let $g\colon \N \rightarrow \R[t]$ be the function $g(n) = (t-1)^n$. Then
$g \circ f\colon \Q \rightarrow \R[t]$ is the function
\[g \circ f(a/b) = (t-1)^{a^2+1},\]
where $a/b \in \Q$ is in lowest terms.
\end{example}
We now discuss three important properties that function might have. The first
is as follows:
\begin{definition}
A function $f\colon X \rightarrow Y$ is {\em injective} if for all $x,x' \in X$,
\[f(x) = f(x') \Rightarrow x=x'.\qedhere\]
\end{definition}
The equivalent contrapositive of this might be more intuitive:
\[x \neq x' \Rightarrow f(x) \neq f(x').\]
In other words, different elements of $X$ must map to different elements of $Y$. Here
is a sample proof involving injectivity:
\begin{lemma}
\label{lemma:injectivecompose}
If $f\colon X \rightarrow Y$ and $g\colon Y \rightarrow Z$ are functions such that $g \circ f\colon X \rightarrow Z$
is injective, then $f$ is injective.
\end{lemma}
\begin{proof}
Consider $x,x' \in X$, and assume that $f(x) = f(x')$. We must prove that $x = x'$. Since $f(x) = f(x')$,
we have $g \circ f(x) = g \circ f(x')$. Since $g \circ f$ is injective, this implies that $x = x'$, as desired.
\end{proof}
The second is as follows:
\begin{definition}
A function $f\colon X \rightarrow Y$ is {\em surjective} if for all $y \in Y$, there exists
some $x \in X$ such that $f(x) = y$.
\end{definition}
A sample proof involving surjectivity is as follows:
\begin{lemma}
\label{lemma:surjectivecompose}
If $f\colon X \rightarrow Y$ and $g\colon Y \rightarrow Z$ are functions such that $g \circ f\colon X \rightarrow Z$
is surjective, then $g$ is surjective.
\end{lemma}
\begin{proof}
Consider some $z \in Z$. We must find some $y \in Y$ such that $g(y) = z$. Since $g \circ f\colon X \rightarrow Z$
is surjective, there exists some $x \in X$ such that $g \circ f(x) = z$. Setting $y = f(x)$, we have
$g(y) = g \circ f(x) = z$, as desired.
\end{proof}
The third condition is as follows:
\begin{definition}
A function $f\colon X \rightarrow Y$ is {\em bijective} if there exists a {\em two-sided inverse}, i.e.\ a
function $F\colon Y \rightarrow X$ such that $F \circ f = \mathbbm{1}_X$ and
$f \circ F = \mathbbm{1}_Y$.
\end{definition}
\begin{remark}
It is traditional to write the two-sided inverse of a bijective function $f\colon X \rightarrow Y$ as
$f^{-1}\colon Y \rightarrow X$. We will eventually start doing this, but we do not do so right
now since we do not want to confuse this with the preimage of $f$.
\end{remark}
What does this have to do with being injective and surjective? In the homework, you will prove the
following:
\begin{lemma}
\label{lemma:onesidedinverse}
Let $f\colon X \rightarrow Y$ be a function. The following then hold:
\begin{compactitem}
\item The function $f$ is injective if and only if there exists some $G\colon Y \rightarrow X$
such that $G \circ f = \mathbbm{1}_X$.
\item The function $f$ is surjective if and only if there exists some $H \colon Y \rightarrow X$
such that $f \circ H = \mathbbm{1}_Y$.
\end{compactitem}
\end{lemma}
These functions $G$ and $H$ are known as {\em one-sided inverses}. We then have the following:
\begin{lemma}
A function $f\colon X \rightarrow Y$ is bijective if and only if $f$ is both injective
and surjective.
\end{lemma}
\begin{proof}
We first prove that if $f$ is bijective, then $f$ is injective and surjective. Assume
that $f$ is bijective, and let $F$ be its two-sided inverse. We thus have $F \circ f = \mathbbm{1}_X$, so
by Lemma \ref{lemma:injectivecompose} the function $f$ is injective. We also have
$f \circ F = \mathbbm{1}_Y$, so by Lemma \ref{lemma:surjectivecompose} the function $f$ is surjective.
We have proven that $f$ is both injective and surjective, as desired.
We now prove that if $f$ is both injective and surjective, then $f$ is bijective. Assume
that $f$ is both injective and surjective. Since $f$ is injective, Lemma \ref{lemma:onesidedinverse}
shows that there exists a one-sided inverse $G\colon Y \rightarrow X$ such that $G \circ f = \mathbbm{1}_X$.
since $f$ is surjective, Lemma \ref{lemma:onesidedinverse} shows that there exists a one-sided inverse
$H \colon Y \rightarrow X$ such that $f \circ H = \mathbbm{1}_Y$. We want to prove that $f$ is bijective,
i.e.\ that $f$ has a two-sided inverse $F$. To do this, it is enough to prove that $G = H$ since then
$F = G = H$ is a two-sided inverse. We check this as follows:
\[G = G \circ \mathbbm{1}_Y = G \circ (f \circ H) = (G \circ f) \circ H = \mathbbm{1}_X \circ H = H.\]
This is what we were trying to show, so the lemma follows.
\end{proof}
\section{Day 6}
Our goal today is to answer the following basic question:
\begin{question}
How can we measure the number of elements in a set?
\end{question}
It is clear what this means for sets containing finitely many elements. For instance, the
set $\{\text{apple, orange, banana}\}$ contains $3$ elements. But how about infinite sets
like $\N$? Is there an interesting way to say that one infinite set is ``larger'' than another?
The first basic thing we need to agree on is what it means for two infinite sets to have
the same size. We will use the following definition:
\begin{definition}
We say that a set $X$ has the {\em same cardinality} as a set $Y$ if there exists a bijection
$f\colon X \rightarrow Y$.
\end{definition}
Here are a few trivial observations about this:
\begin{compactitem}
\item $X$ has the same cardinality as itself: use the bijection $\mathbbm{1}_X\colon X \rightarrow X$.
\item If $X$ has the same cardinality as $Y$, then $Y$ has the same cardinality as $X$.
Indeed, if $f\colon X \rightarrow Y$ is a bijection, then its inverse $f^{-1}\colon Y \rightarrow X$
is a bijection.
\item If $X$ has the same cardinality as $Y$ and $Y$ has the same cardinality as $Z$, then
$X$ has the same cardinality as $Z$. Indeed, if $f\colon X \rightarrow Y$ and $g\colon Y \rightarrow Z$
are bijections, then $g \circ f\colon X \rightarrow Z$ is a bijection.
\end{compactitem}
Later on in your mathematical education you will learn that these three properties mean that
the relationship ``has the same cardinality'' is an {\em equivalence relation} on sets. We
will simply observe that if we use the notation $|X| = |Y|$ to mean
that $X$ has the same cardinality as $Y$, then the above three properties imply that
this use of ``$=$'' has all the properties of the more familiar uses of the equals sign.
Here is a first example.
\begin{example}
Letting $[n] = \{1,\ldots,n\}$, if a set $X$ satisfies $|X| = |[n]|$, then $X$ has $n$ elements
in the usual sense. For instance, here is a bijection $f\colon \{\text{apple, orange, banana}\} \rightarrow [3]$
\begin{align*}
f(\text{apple}) &= 1\\
f(\text{orange}) &= 2\\
f(\text{banana}) &= 3\qedhere
\end{align*}
\end{example}
So how about infinite sets? It turns out that most people's intuition about the cardinalities of
infinite sets are {\bf completely wrong}. The rest of this lecture is really a series
of examples illustrating the subtle issues here.
Let's first consider the set
\[\N = \{1,2,3,\ldots\}.\]
Your intuition probably says that $\N$ is larger than its subset
\[Y = \{3,4,5,\ldots\}.\]
However, this is false, and $|\N| = |Y|$. Here's a bijection $f\colon \N \rightarrow Y$:
\begin{align*}
f(1) &= 3\\
f(2) &= 4\\
f(3) &= 5\\
\vdots
\end{align*}
The point here is that the ``names'' of the elements of a set are irrelevant to its cardinality: the
bijection in some sense allows us to change them in arbitrary ways!
Here's a more drastic example. Let
\[E = \{2,4,6,\ldots\}\]
be the set of even integers. Is $\N$ bigger than $E$? Again, they have the same cardinality!
Indeed, the function $f\colon \N \rightarrow E$ with $f(n) = 2n$ is a bijection.
We can play this kind of game forever, and in the homework you will prove the ultimate result in
this direction:
\begin{lemma}
Let $Y \subset \N$ be any infinite subset. Then $|\N| = |Y|$.
\end{lemma}
Sets with the same cardinality as $\N$ are important enough to have a special name:
\begin{definition}
A set $X$ is {\em countably infinite} if $|\N| = |X|$. A set $X$ is {\em countable} if it is
either finite or countably infinite.
\end{definition}
This terminology arises because a set is countable if we can enumerate its elements in sequential order (i.e.\
``count'' its elements). For instance, if $O$ is the set of odd numbers, then $O$ is countably infinite
since we can enumerate $O$ as
\[1,3,5,7,9,\ldots\]
This establishes a bijection between $\N$ and $O$ that takes $n \in \N$ to the $n^{\text{th}}$ term in the list.
Many sets that appear to be ``larger'' than $\N$ are themselves countable. For instance, we have the following:
\begin{lemma}
The set $\Z$ of integers is countable.
\end{lemma}
\begin{proof}
We can list the elements of $\Z$ as
\[0,1,-1,2,-2,3,-3,\ldots\]
This corresponds to the bijection $f\colon \N \rightarrow \Z$ given by
\[f(n) = \begin{cases}
\frac{n}{2} & \text{if $n$ is even}\\
-\frac{n-1}{2} & \text{if $n$ is odd}.
\end{cases}\qedhere\]
\end{proof}
A more interesting example is the set of rational numbers $\Q$. Surely this is not countable! But it is:
\begin{lemma}
The set $\Q$ is countable.
\end{lemma}
\begin{proof}
We enumerate elements of $\Q$ by first writing down the fractions $\pm a/b$ with $a+b=1$, then those
with $a+b=2$, then those with $a+b=3$, etc. Here that is done explicitly (to simplify our notation,
we will write $\pm \frac{a}{b}$ to mean $\frac{a}{b},-\frac{a}{b}$):
\begin{align*}
&\frac{0}{1} \\
&\pm \frac{1}{1} \\
&\pm \frac{2}{1}, \pm \frac{1}{2} \\
&\pm \frac{3}{1}, \pm \frac{1}{3} \quad\quad\quad\quad \quad (\text{$\pm \frac{2}{2}$ not needed since not in lowest terms!})\\
&\pm \frac{4}{1}, \pm \frac{3}{2}, \pm \frac{2}{3}, \pm \frac{1}{4}\\
\vdots
\end{align*}
Here each rational number appears in some row, the the bijection $\N \rightarrow \Q$ first goes along the first
row, then the second, then the third, etc.
\end{proof}
At this point, you might be tempted to conjecture that {\em every} set is countable. But this is wrong:
\begin{theorem}
The set $\R$ is not countable.
\end{theorem}
This theorem was first proved by Cantor via what is called his {\em diagonal argument}. I
think this is one of the most beautiful proofs in undergraduate mathematics, and its discovery was one
of the events that precipitated the modern approach to set theory (and the foundations of math more generally). I will present it on Monday.
\section{Day 7}
Recall from last time that if there exists a bijection $f\colon X \rightarrow Y$ between two sets, then we
say that $X$ and $Y$ have the {\em same cardinality}, in which case we write $|X| = |Y|$. If
$|X| = |\N|$, then we say that $X$ is {\em countably infinite}. We proved that many sets are countably
infinite; for instance, the set of even natural numbers, the set of integers, and the set of rational numbers.
In the homework you will prove that many other natural sets are countably infinite.
Our first goal today is to prove the following beautiful theorem of Cantor, which provides our first
example of an infinite set that is so large that it is {\em not} countably infinite.
\begin{theorem}
\label{theorem:cantor}
The set $\R$ is not countable.
\end{theorem}
\begin{proof}
In the homework, you will show that $|\R| = |(0,1)|$, so it is enough to prove that the open interval
$(0,1)$ is not countably infinite (this is just for convenience -- the same argument works for $\R$, but
requires slightly more complicated notation). To prove that $(0,1)$ is not countably infinite, it
is enough to prove that all functions $f\colon \N \rightarrow (0,1)$ are non-surjective.
So consider some function $f\colon \N \rightarrow (0,1)$. We want to produce some $x \in (0,1)$ such
that $x$ is not in the image of $f$. Consider the decimal expansions of the $f(n)$:
\begin{align*}
f(1) &= 0.d_{11} d_{12} d_{13} d_{14} \cdots\\
f(2) &= 0.d_{21} d_{22} d_{23} d_{24} \cdots\\
f(3) &= 0.d_{31} d_{32} d_{33} d_{34} \cdots\\
f(4) &= 0.d_{41} d_{42} d_{43} d_{44} \cdots\\
&\vdots
\end{align*}
Thus $d_{ij} \in \{0,1,\ldots,9\}$ is the $j^{\text{th}}$ decimal digit of $f(i)$. Here our convention
is that a decimal expansion can {\em not} end in infinitely many $9$'s (this is needed to make sure that
decimal expansions are unique!). For each $n$, let $e_n$ be a decimal digit that is {\em different}
from $d_{nn}$ and does not equal $9$. Setting
\[x = 0.e_1 e_2 e_3 e_4 \cdots,\]
we cannot have $f(n) = x$ for any $n$ since the digits $d_{nn}$ and $e_n$ are different. It follows
that $x$ is not in the image of $f$ and thus that $f$ is not surjective, as desired.
\end{proof}
In the homework, you will prove that for all infinite sets $X \subset \N$, the set $X$ is countably
infinite. The above theorem says in some sense that $\R$ is ``bigger'' than $\N$. Informally,
the following question asks whether there are infinities that lie strictly between $\N$ and
$\R$:
\begin{question}[Continuum hypothesis, Cantor 1878]
Let $X \subset \R$ be an infinite set. Must it be the case that either $|X| = |\N|$ or $|X| = |\R|$?
\end{question}
This question spurred a huge amount of work in the foundations of mathematics, and appeared in Hilbert's
famous list of the most important open problems in math at the beginning of the 20th century. It
was resolved in amazing work of G\"{o}del and Cohen:
\begin{theorem}[G\"{o}del, Cohen]
The continuum hypothesis cannot be proven or disproven from the ZFC axioms of set theory.
\end{theorem}
It is thus not clear at all whether or not the continuum hypothesis is true. It might be
that we are missing some basic axioms, but no one has managed to find any that are universally accepted.
Figuring out what kind of truth value to assign to the continuum hypothesis remains a fundamental
question in the philosophy of mathematics.
We now return to earth. We have been talking about what it means for two sets to have the same
cardinality, i.e.\ for $|X| = |Y|$. How can we make precise what it would mean for $Y$ to have
a {\em larger} cardinality than $X$? We make the following definition.
\begin{definition}
For sets $X$ and $Y$, we say that the cardinality of $Y$ is {\em at least} the cardinality of $X$
if there exists an injection $\iota\colon X \rightarrow Y$. We write this as $|X| \leq |Y|$.
\end{definition}
Here is some examples:
\begin{example}
We have $|\N| \leq |\Z|$. Indeed, the inclusion $\iota\colon \N \rightarrow \Z$ map is an injection.
In this case, we actually have $|\N| = |\Z|$ since in the last class we wrote down a bijection between
$\N$ and $\Z$.
\end{example}
\begin{example}
We have $|\N| \leq |\R|$. Indeed, the inclusion $\iota\colon \N \rightarrow \R$ is an injection.
Cantor's theorem above says that $|\N| \neq |\R|$.
\end{example}
The following theorem says that this notion of inequality behaves like our ordinary notion.
\begin{theorem}[Cantor--Schr\"{o}der--Bernstein]
For sets $X$ and $Y$, if there exist injections $f\colon X \rightarrow Y$ and $g\colon Y \rightarrow X$, then
there exists a bijection $h\colon X \rightarrow Y$.
\end{theorem}
In other words, if $|X| \leq |Y|$ and $|Y| \leq |X|$, then we have $|X| = |Y|$. We will not use this
theorem, so we will not prove it (though the proof does not use any technology we do not know). You thus
should not use it in the homework.
This raises the natural question of whether for all sets $X$, there exists a set $Y$ whose cardinality
is strictly greater than that of $X$. As we will now see the answer to this is {\em yes}.
We make the following definition.
\begin{definition}
Let $X$ be a set. The {\em power set} of $X$, denoted $\cP(X)$, is the set of all subsets of $X$.
\end{definition}
For the natural numbers $\N$, the power set $\cP(\N)$ thus contains elements like the following:
\begin{compactitem}
\item The empty set $\emptyset$.
\item One element sets like $\{2\}$ and $\{3\}$.
\item Finite sets like $\{3,231,7\}$.
\item The even numbers, and the odd numbers.
\item The whole set $\N$.
\end{compactitem}
We have the following lemma.
\begin{lemma}
For all sets $X$, we have $|X| \leq |\cP(X)|$.
\end{lemma}
\begin{proof}
We must exhibit an injection $\iota\colon X \rightarrow \cP(X)$. We define $\iota$ via the following
formula:
\[\iota(p) = \{p\} \quad \quad (p \in X).\]
Here $\{p\} \in \cP(X)$ is the one-element set containing $p$.
\end{proof}
The following theorem of Cantor shows that the cardinality of the power set is strictly greater
than the cardinality of $X$. Its proof is another example of the diagonal argument, though in
a more abstract form.
\begin{theorem}[Cantor]
For all sets $X$, we have $|X| \neq |\cP(X)|$. In other words, there is no bijection
$f\colon X \rightarrow \cP(X)$.
\end{theorem}
\begin{proof}
In fact, we will show that there is no surjection $f\colon X \rightarrow \cP(X)$. Consider
some function $f\colon X \rightarrow \cP(X)$. To see that $f$ is not a surjection, it is enough
to exhibit some $S \in \cP(X)$ such that $S$ is not in the image of $f$.
This element $S$ should be a subset of $X$. Define
\[S = \Set{$p \in X$}{$p \notin f(p)$}.\]
We claim that $S$ is not in the image of $f$. Indeed, consider some $a \in X$. We want to show
that $f(a) \neq S$. We either have $a \in f(a)$ or $a \notin f(a)$. We consider these two cases separately:
\begin{compactitem}
\item If $a \in f(a)$, then by definition $a \notin S$. Since $a \in f(a)$ but $a \notin S$, we must
have $f(a) \neq S$.
\item If $a \notin f(a)$, then by definition $a \in S$. Since $a \notin f(a)$ but $a \in S$, we must
have $f(a) \neq S$.
\end{compactitem}
In both cases we have shown that $f(a) \neq S$, as desired.
\end{proof}
\end{document}