\documentclass[12pt]{amsart}
\usepackage{amsmath,amsthm,amsfonts,latexsym,amssymb,amscd,xcolor}
\pagestyle{headings}
\setlength{\textwidth}{468true pt}
\setlength{\headheight}{0true pt} % needed for 12pt documents
\setlength{\oddsidemargin}{0 truept}
\setlength{\evensidemargin}{0 truept}
\setlength{\textheight}{580true pt}

\begin{document}


\noindent
{\bf Solutions to HW 6.}

\medskip

\begin{enumerate}
\item[1.]
Show that
$f\colon \mathbb N\times \mathbb N\to \mathbb N\colon
(m,n)\mapsto 2^m(2n+1)-1$ is a bijection.
(This shows that $|\mathbb N\times \mathbb N|=|\mathbb N|$
using a different argument than the one given in class.)
\end{enumerate}
  
\medskip

\color{blue}
($f$ is injective)
If $f(m,n)=f(p,q)$, then $2^m(2n+1)-1=2^p(2q+1)-1$, or
$2^m(2n+1)=2^p(2q+1)$ (a nonzero natural number).
By uniqueness of prime factorizations, every nonzero
natural number is expressible in a unique way as a product of
a power of $2$ and an odd number, hence $2^m=2^p$
and $2n+1=2q+1$. From $2^m=2^p$ we derive $m=p$ by unique
factorization, and from $2n+1=2q+1$ we derive $2n=2q$, and then
$n=q$ with some arithmetic. This shows that 
$f(m,n)=f(p,q)$ implies $(m,n)=(p,q)$.

($f$ is surjective)
If $k\in\mathbb N$, then we can solve $2^x(2y+1)-1=k$
for $x, y\in\mathbb N$.
Simply write this as as $2^x(2y+1)=k+1$, then choose $x$ so that
$2^x$ is the exact power of $2$ that divides $k+1$
and choose $y$ so that $2y+1$ is the odd number
that remains after dividing $k+1$ by $2^x$.
The statement that $2^x(2y+1)-1=k$ is solvable
for $x, y\in\mathbb N$ is exactly what it means for $f$ to be surjective.
\color{black}
  
\medskip
\medskip

\begin{enumerate}
\item[2.]
Show that if $|X|=|Y|$, then $|{\mathcal P}(X)|=|{\mathcal P}(Y)|$.
\end{enumerate}
  
\medskip
  
\color{purple}
I will write the solution in a general form below, but first
let me explain the idea of the solution in small example.
Let $X = \{0,1\}$ and $Y = \{a, b\}$.
Let $f\colon X\to Y$ be the bijection $0\mapsto a, 1\mapsto b$.
Think of $f$ as ``renaming the elements $0, 1$ using $a, b$''.
To prove that $|{\mathcal P}(X)|=|{\mathcal P}(Y)|$
we need to establish that there is a bijection
$
\hat{f}\colon {\mathcal P}(X)\to {\mathcal P}(Y).
$
Written out more fully, we need to establish that there is a bijection
\[
\hat{f}\colon \{\emptyset,\{0\}, \{1\}, \{0,1\} \}\to
\{\emptyset,\{a\}, \{b\}, \{a,b\} \}.
\]
The idea is to take $\hat{f}$ to be the function that
``renames inside the braces''.
That is
$\hat{f}(\emptyset) = \emptyset$,
$\hat{f}(\{0\}) = \{a\}$, 
$\hat{f}(\{1\}) = \{b\}$,
$\hat{f}(\{0,1\}) = \{a,b\}$.
So, the idea
$\hat{f}(\{0,1\}) = \{f(0),f(1)\}$ may be expressed as
``renaming a set with $\hat{f}$
means renaming the elements inside the set with $f$''.

\medskip

\color{blue}
Let's write this down for general $X$ and $Y$.
Since $|X|=|Y|$, there is a bijection $f\colon X\to Y$.
Let $g\colon Y\to X$ be the inverse of $f$.
Define functions $\hat{f}\colon {\mathcal P}(X)\to {\mathcal P}(Y)$
by the rule $\hat{f}(S) = \{f(x)\in Y\;|\;x\in S\}$ and
$\hat{g}\colon {\mathcal P}(Y)\to {\mathcal P}(X)$
by the rule $\hat{g}(T) = \{g(y)\in X\;|\;y\in T\}$.
It is not hard to see that $\widehat{g}$ is the inverse
of $\widehat{f}$, as follows:
\[
\widehat{g}\circ \widehat{f}(S) = 
\widehat{g}(\{f(x)\in Y\;|\;x\in S\})
=\{{g\circ f}(x)\in X\;|\;x\in S\}
=\{x\in X\;|\;x\in S\}=S
\]
for any $S\in{\mathcal P}(X)$, 
and a similar argument shows that
$\widehat{f}\circ \widehat{g}(T)=T$
for any $T\in{\mathcal P}(Y)$.

Since $\hat{f}\colon {\mathcal P}(X)\to {\mathcal P}(Y)$
is invertible, it is a bijection, hence
$|{\mathcal P}(X)|=|{\mathcal P}(Y)|$.
\color{black}

\medskip
\medskip
\vfill
\pagebreak

\begin{enumerate}
\item[3.]
Let $\textrm{Eq}(\mathbb N)$ be the set of equivalence relations
on $\mathbb N$. Show that
$|{\mathcal P}(\mathbb N)|\leq |\textrm{Eq}(\mathbb N)|\leq
|{\mathcal P}(\mathbb N\times \mathbb N)|$. Use Problem 2 to
conclude that
$|\textrm{Eq}(\mathbb N)| = 
|{\mathcal P}(\mathbb N)|$. 
\end{enumerate}

\medskip

\color{blue}
Let $\mathbb N^+$ be the set of nonzero natural numbers.
According to the ``Laws of Successor''
(Sep 20 handout ``arithmetic.pdf''),
the successor function $S\colon \mathbb N\to \mathbb N^+$
is a bijection, so $|\mathbb N|=|\mathbb N^+|$.
By Problem 2, $|{\mathcal P}(\mathbb N)|=|{\mathcal P}(\mathbb N^+)|$.

Now we define a function
$f\colon {\mathcal P}(\mathbb N^+)\to \textrm{Eq}(\mathbb N)$
by defining $f(S)$ to equal the equivalence relation
on $\mathbb N$
with one equivalence class equal to $S\cup \{0\}$
and all other equivalence classes equal to singletons.
That is, for $S\in {\mathcal P}(\mathbb N^+)$,
define $f(S) = (S\cup \{0\})^2\cup \{\{(n,n)\}\;|\;n\in\mathbb N\}$
The function $f$ is injective, since if
$S, T\in {\mathcal P}(\mathbb N^+)$ and
$f(S)=f(T) = E$,
then the $E$-equivalence class containing $0$ is
$S\cup \{0\} = T \cup \{0\}$; 
since both $S$ and $T$ consist of nonzero elements,
$S=T$.
Altogether this shows that
\begin{equation} \label{A}
|{\mathcal P}(\mathbb N)|=
|{\mathcal P}(\mathbb N^+)|\leq 
|\textrm{Eq}(\mathbb N)|.
\end{equation}

Next, every equivalence relation on $\mathbb N$ is a
binary relation on $\mathbb N$, hence is
a subset of $\mathbb N\times \mathbb N$.
This means that $\textrm{Eq}(\mathbb N)\subseteq 
{\mathcal P}(\mathbb N\times \mathbb N)$,
hence
$|\textrm{Eq}(\mathbb N)|\leq |{\mathcal P}(\mathbb N\times \mathbb N)|$.
Since $|\mathbb N\times \mathbb N|=|\mathbb N|$, we derive
from Problem 2 that
\begin{equation} \label{B}
|\textrm{Eq}(\mathbb N)|\leq |{\mathcal P}(\mathbb N\times \mathbb N)|
= |{\mathcal P}(\mathbb N)|.
\end{equation}
Combining (\ref{A}) and (\ref{B}) yields
$
|{\mathcal P}(\mathbb N)|\leq |\textrm{Eq}(\mathbb N)| \leq
|{\mathcal P}(\mathbb N)|,
$
so $|\textrm{Eq}(\mathbb N)| = |{\mathcal P}(\mathbb N)|$
by the Cantor-Bernstein-Shr\"{o}der Theorem.
\color{black}

\vfill  


\end{document}
