\documentclass [12pt] {article}

\usepackage{graphicx, xypic,amsmath,amssymb,epstopdf, amsthm}
\usepackage[all]{xy}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\newenvironment{packed_itemize}{
\begin{itemize}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{itemize}}
\newenvironment{packed_enum}{
\begin{enumerate}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{enumerate}}


\topmargin 0pt
\advance \topmargin by -\headheight
\advance \topmargin by -\headsep
\textheight 8.9in
\oddsidemargin 0pt
\evensidemargin \oddsidemargin
\marginparwidth 0.5in
\textwidth 6.5in


\newtheorem{thm}{Theorem}

\begin{document}
\begin{center}

{\Huge{Proofs}}\\
the mostly algebraic kind
\end{center}

\begin{enumerate}
\item If $m$ and $n$ are both perfect squares, then $nm$ is also a perfect square.
\vspace{3in}



\end{enumerate}

\newpage
\small
\begin{enumerate}
\item For each of the following ``Theorems", determine:
\begin{packed_enum}
\item if the ``Theorem" is true, and
\item if the ``Proof" is valid.
\end{packed_enum}

\begin{thm}
If $n$ is an odd integer, then $n^2$ is odd.
\end{thm}

\begin{proof}
Assume that $n$ is an odd integer.  We want to show that $n^2$ is odd.  

Since $n$ is an odd integer, there exists an integer $a$, so that $n=2a+1$. Using algebra we see,

$$n^2=(2a+1)^2=4a^2+4a+1=2(2a^2+2a)+1.$$

By definition of an odd integer we see $n^2$ is an odd integer.
\end{proof}

\begin{thm}
If $n^2$ is positive, then $n$ is positive.
\end{thm}

\begin{proof}
Assume that $n^2$ is positive.  We want to show that $n$ is positive.

Consider if $n$ is positive, then $n>0$.  We can multiply this inequality by the positive number $n$ on both sides and arrive at $n^2>0n$ or $n^2>0$.  Thus, if $n$ is positive we know $n^2$ is positive.  

Since we were assuming that $n^2$ was positive, we can conclude from the above that $n$ is positive.
\end{proof}

%Not valid because only did one implication
%\begin{thm}
%$n$ is an even integer if and only if $n^2$ is an even integer.
%\end{thm}

%\begin{proof}
%Assume that $n$ is an even integer.  We want to show that $n^2$ is an even integer.

%Since $n$ is an even integer, there exists and integer $a$ such that $n=2a$.  Using algebra we see,
%$$n^2=(2a)^2=4a^2=2(2a^2).$$
%By definition of an even integer we see $n^2$ is an even integer.
%\end{proof}

\begin{thm} Let $m$, $n$, and $p$ be integers.  If $m+n$ and $n+p$ are even integers, then $m+p$ is an even integer.	
\end{thm}

\begin{proof}
Assume that $m+n$ and $n+p$ are even integers.  We want to show that $m+p$ is an even integer.

Since $m+n$ is an even integer, there exists integers $a$ and $b$ such that $$m+n=2a+2b.$$
Thus we know that $m=2a$ and $n=2b$.  

Since $n+p$ is an even integer and $n=2b$, we know that there exists and integer $c$ such that $$n+p=2b+2c.$$
Thus we also know that $p=2c$.

Now we can consider $m+p$ which equals $2a+2c=2(a+c)$.  Thus $m+p$ is even.
\end{proof}

\begin{thm}
If $n$ is an integer and $n^2$ is odd, then $n$ is odd.
\end{thm}

\begin{proof}
We will show the contrapositive of the statement, that is, if $n$ is not odd, we will show that either $n$ is not an integer or $n^2$ is not odd.  Said more simply, we will show, if $n$ is even, then either $n$ wasn't an integer or $n^2$ is even.

Since $n$ is even, we know there exists an integer $a$ such that $n=2a$.  Using algebra we see,
$$n^2=(2a)^2=4a^2=2(2a^2),$$
thus, by definition of an even integer, $n^2$ is even.
\end{proof}

\vfill
%\small Consider verifying your answers by looking at \S1.7 Examples 1, 16, and 8.

%\newpage
%\item (\S1.7 \#15) Let $x$ and $y$ be real numbers.  Prove that if $x+y\geq 2$, then $x\geq 1$ or $y\geq 1$.
%\vfill
%\item (\S1.8 Ex5) Prove the final decimal digit of the square of an integer is $0$, $1$, $4$, $5$, $6$, or $9$.
%\vfill

\end{enumerate}
\end{document}
