\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amsthm,amsfonts,latexsym,amssymb,xcolor}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\headheight}{50pt}

\begin{document}
\lhead{Set Theory \\ Assignment 4} 
\rhead{Solution Key \\ October 4}


In the solutions below I will assume the truth of all the
Laws of Addition from the handout arithmetic.pdf.
Following a common convention,
I may denote the product of $m,n\in \mathbb N$
by either $mn$ or by $m\cdot n$.
Also, I will use the following abbreviations:
\begin{itemize}
\item IC = Initial Condition
\item RR = Recurrence Relation
\item IH = Inductive Hypothesis 
\end{itemize} 
 

\bigskip

\noindent
\begin{enumerate}
\item[(1)]
Prove that $(m+n)\cdot k=(m\cdot k)+(n\cdot k)$ for all $m, n, k\in\mathbb N$.
\end{enumerate}

\smallskip
\color{blue}
We are proving the Right Distributive Law.

This is a proof by induction on $k$.

(Base Case: $k=0$)
$$
\begin{array}{rlcl}
(m+n)0  &= 0  &\hphantom{AAAAA} &(\textrm{IC}, \cdot)\\
  &= 0+0  &\hphantom{AAAAA} &(\textrm{IC},+)\\
  &= m0+n0  &\hphantom{AAAAA} &(\textrm{IC}, \cdot)\\
\end{array}
$$

(Inductive Step: Assume true for $k$, prove true for $S(k)$)
$$
\begin{array}{rlcl}
(m+n)\cdot S(k)  &= (m+n)k+(m+n)  &\hphantom{AAAAA} &(\textrm{RR}, \cdot)\\
  &= (mk+nk)+(m+n) &\hphantom{AAAAA} &(\textrm{IH})\\
  &= mk+(nk+(m+n)) &\hphantom{AAAAA} &(\textrm{Associative Law},+)\\
  &= mk+((nk+m)+n)) &\hphantom{AAAAA} &(\textrm{Associative Law},+)\\
  &= mk+((m+nk)+n)) &\hphantom{AAAAA} &(\textrm{Commutative Law},+)\\
  &= mk+(m+(nk+n)) &\hphantom{AAAAA} &(\textrm{Associative Law},+)\\
  &= (mk+m)+(nk+n) &\hphantom{AAAAA} &(\textrm{Associative Law},+)\\
  &= (m\cdot S(k))+(n\cdot S(k))  &\hphantom{AAAAA} &(\textrm{RR}, \cdot)\\
\end{array}
$$
\color{black}

\smallskip

\begin{enumerate}
\item[(2)]
Prove that $m\cdot n=n\cdot m$ for all $m,n\in\mathbb N$.
\end{enumerate}

\smallskip
\color{blue}
{\bf Lemma 1.} $0k=0$.
\medskip     

{\it Proof.}
This is a proof by induction on $k$.

(Base Case: $k=0$)
$$
\begin{array}{rlcl}
00  &= 0  &\hphantom{AAAAA} &(\textrm{IC}, \cdot)\\
\end{array}
$$

(Inductive Step: Assume true for $k$, prove true for $S(k)$)
$$
\begin{array}{rlcl}
0\cdot S(k)  &= 0k+0  &\hphantom{AAAAA} &(\textrm{RR}, \cdot)\\
  &= 0+0 &\hphantom{AAAAA} &(\textrm{IH})\\
  &= 0  &\hphantom{AAAAA} &(\textrm{IC},+)\\
\end{array}
$$
%\color{black}
\medskip

{\bf Lemma 2.} 
$1m=m$.
\medskip     

{\it Proof.}
This is a proof by induction on $m$.

(Base Case: $m=0$)
$$
\begin{array}{rlcl}
10  &= 0  &\hphantom{AAAAA} &(\textrm{IC}, \cdot)\\
\end{array}
$$

(Inductive Step: Assume true for $m$, prove true for $S(m)$)
$$
\begin{array}{rlcl}
1\cdot S(m)  &= (1m)+1  &\hphantom{AAAAA} &(\textrm{RR}, \cdot)\\
  &= m+1 &\hphantom{AAAAA} &(\textrm{IH})\\
  &= S(m) &\hphantom{AAAAA} &(\textrm{Law (a) of Addition})\\
\end{array}
$$
\bigskip

\noindent
{\bf Solution to the Problem.}
  
\noindent
{\it Proof.}
We prove that $mn=nm$ by induction on $n$.

(Base Case: $n=0$)
$$
\begin{array}{rlcl}
m0  &= 0  &\hphantom{AAAAA} &(\textrm{IC}, \cdot)\\
  &= 0m  &\hphantom{AAAAA} &(\textrm{Lemma 1})\\
\end{array}
$$

(Inductive Step: Assume true for $n$, prove true for $S(n)$)
$$
\begin{array}{rlcl}
m\cdot S(n)  &= (mn)+m  &\hphantom{AAAAA} &(\textrm{RR}, \cdot)\\
  &= (nm)+m &\hphantom{AAAAA} &(\textrm{IH})\\
  &= (nm)+(1m) &\hphantom{AAAAA} &(\textrm{Lemma 2})\\
  &= (n+1)\cdot m  &\hphantom{AAAAA} &(\textrm{Exercise 1})\\
  &= S(n)\cdot m  &\hphantom{AAAAA} &(\textrm{Law (a) of Addition})\\
\end{array}
$$
\color{black}

\smallskip

\begin{enumerate}
\item[(3)]
 Prove that $m^{n+k}=m^n\cdot m^k$. (You may need to prove some lemmas first.) 
\end{enumerate}
\smallskip

\color{blue}
{\bf Lemma 1.} (Law (d) of Multiplication) $m1=m$.
\medskip     

{\it Proof.}
$$
\begin{array}{rlcl}
m\cdot 1 &= m\cdot S(0)  &\hphantom{AAAAA} &(\textrm{Definition of $1$})\\
  &= (m\cdot 0) + m &\hphantom{AAAAA} &(\textrm{RR}, \cdot)\\
  &= 0  + m&\hphantom{AAAAA} &(\textrm{IC},\cdot)\\
  &= m&\hphantom{AAAAA} &(\textrm{Law (c) of Addition})\\
\end{array}
$$
%\color{black}

\medskip

{\bf Lemma 2.} (Left Distributive Law) $m(n+k)=(mn)+(mk)$.

{\it Proof.}
We prove this  by induction on $k$.

(Base Case: $k=0$)
$$
\begin{array}{rlcl}
m(n+0)  &= mn  &\hphantom{AAAAA} &(\textrm{IC}, +)\\
 &= mn+0  &\hphantom{AAAAA} &(\textrm{IC}, +)\\
 &= mn+m0  &\hphantom{AAAAA} &(\textrm{IC}, \cdot)\\
\end{array}
$$

(Inductive Step: Assume true for $k$, prove true for $S(k)$)
$$
\begin{array}{rlcl}
m\cdot (n+S(k))  &= m\cdot S(n+k)  &\hphantom{AAAAA} &(\textrm{RR}, +)\\
  &= m(n+k)+m  &\hphantom{AAAAA} &(\textrm{RR}, \cdot)\\
  &= (mn+mk)+m  &\hphantom{AAAAA} &(\textrm{IH})\\
  &= mn+(mk+m)  &\hphantom{AAAAA} &(\textrm{Associative Law}, +)\\
  &= mn+mS(k)  &\hphantom{AAAAA} &(\textrm{RR}, \cdot)\\
\end{array}
$$

\medskip

{\bf Lemma 3.} (Associative Law of Multiplication) $m(nk)=(mn)k$.
\medskip     

{\it Proof.}
We prove this  by induction on $k$.

(Base Case: $k=0$)
$$
\begin{array}{rlcl}
m\cdot (n\cdot 0) &= m\cdot 0  &\hphantom{AAAAA} &(\textrm{IC}, \cdot)\\
 &= 0  &\hphantom{AAAAA} &(\textrm{IC}, \cdot)\\
 &= (m\cdot n)\cdot 0  &\hphantom{AAAAA} &(\textrm{IC}, \cdot)\\
\end{array}
$$

(Inductive Step: Assume true for $k$, prove true for $S(k)$)
$$
\begin{array}{rlcl}
m\cdot (n\cdot S(k))  &= m(nk+n)  &\hphantom{AAAAA} &(\textrm{RR}, \cdot)\\
  &= m(nk) + mn &\hphantom{AAAAA} &(\textrm{Left Distributive Law, Lemma 2})\\
  &= (mn)k + mn &\hphantom{AAAAA} &(\textrm{IH})\\
  &= (mn)k + (mn)\cdot 1 &\hphantom{AAAAA} &(\textrm{Law (d) of Multiplication, Lemma 1)}\\
  &= (mn)(k+1) &\hphantom{AAAAA} &(\textrm{Left Distributive Law, Lemma 2})\\
  &= (mn)S(k) &\hphantom{AAAAA} &(\textrm{Law (a) of Addition})\\
\end{array}
$$
%\color{black}

\medskip
  
\noindent
{\bf Solution to the Problem.}
  
\noindent
{\it Proof.}
We prove that $m^{n+k}=m^n\cdot m^k$ by induction on $k$.

(Base Case: $k=0$)
$$
\begin{array}{rlcl}
m^{n+0}  &= m^n  &\hphantom{AAAAA} &(\textrm{IC}, +)\\
  &= m^n\cdot 1  &\hphantom{AAAAA} &(\textrm{Law (d) of Multiplication, Lemma 1)}\\
  &= m^n\cdot m^0  &\hphantom{AAAAA} &(\textrm{IC}, \textrm{Exp})\\
\end{array}
$$

(Inductive Step: Assume true for $k$, prove true for $S(k)$)
$$
\begin{array}{rlcl}
m^{n+S(k)}  &= m^{S(n+k)}  &\hphantom{AAAAA} &(\textrm{RR}, +)\\
&= m^{n+k}\cdot m &\hphantom{AAAAA} &(\textrm{RR},\; \textrm{Exp})\\
&= (m^n\cdot m^k)\cdot m &\hphantom{AAAAA} &(\textrm{IH})\\
&= m^n\cdot (m^k\cdot m) &\hphantom{AAAAA} &(\textrm{Associative Law}, \cdot; \textrm{Lemma 3})\\
&= m^n\cdot m^{S(k)} &\hphantom{AAAAA} &(\textrm{RR},\; \textrm{Exp})\\
\end{array}
$$

\color{black}
\vfill
\vfill
\vfill

\end{document}

