\documentclass[11pt,a4paper,reqno]{amsart}
\usepackage{amsmath,amsthm,amssymb}
\setlength{\parindent}{0cm}
\setlength{\parskip}{1ex}
\newtheorem{thm}{Theorem}[section]
\theoremstyle{plain}
\newtheorem{lem}[thm]{Lemma}
\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\title{MAS115: Homework 3}
\author{Sam Marsh}
\date{}
\begin{document}
\maketitle
\section{The square-root of 2}
Here, we're going to investigate a solution of the equation
\begin{equation}
x^2 = 2.\label{eq:root 2}
\end{equation}
\begin{defn}The positive solution to equation (\ref{eq:root 2}) is
denoted $\sqrt{2}$.\end{defn}
\begin{lem}\label{lem:coprime}
Any non-zero rational number can be written in the form $\frac{a}{b}$, where $a$ and $b$ are coprime integers.
\end{lem}
\begin{proof} Let $q$ be any non-zero rational number. Then, by definition, $q=\frac{c}{d}$ for some integers $c$ and $d$, possibly sharing factors. Let $h$ denote the highest common factor of $c$ and $d$, and write $a=c/h$ and $b=d/h$. Then $a$ and $b$ are coprime integers and $q=\frac{c}{d}=\frac{c}{d}.\frac{1/h}{1/h}=\frac{a}{b}$, as required.\end{proof}
\begin{thm}
The real number $\sqrt{2}$ is irrational.
\end{thm}
\begin{proof}
Suppose not, and $\sqrt{2}$ is rational. Then, by Lemma \ref{lem:coprime}, $\sqrt{2}=\frac{a}{b}$, where $a$ and $b$ share no common factors. Thus, squaring, $2b^2=a^2$. It follows that $a^2$ is even, and hence so is $a$. Write $a=2m$ for some $m\in\mathbb{Z}$. Then $2b^2=(2m)^2=4m^2$, so $b^2=2m^2$. As before, this means that $b$ is even. But then $a$ and $b$ share a factor of 2, which is a contradiction. Hence $\sqrt{2}$ is irrational.
\end{proof}
\end{document}