% Lines that start with a percentage sign are comments; the 
% computer ignores them and you can use them to write notes 
% to yourself.

% The following line starts the document.
% You won't need to change this.
\documentclass[11pt]{article}

% Packages are extra functionality you can load.
% These ones here let you use standard math symbols etc.
% You generally won't need to change this.
\usepackage{amsmath,amssymb,amsthm} 

% This is some more standard set-up stuff.
% You probably won't need to change it.
\newtheorem{theorem}{Theorem}
\newtheorem{exercise}{Exercise}
\newtheorem{definition}{Definition}

% You can make short-forms for commands you want to use often.
% Here is an example that makes the integer Z symbol.
% In the text you just write '\ZZ' and it will make the symbol.
\newcommand{\ZZ}{\mathbb{Z}}

% Here we set up the title and your name, before we start
% the content.
\title{My Homework}
\author{My Name}
\date{\today} % the command '\today' always gives today's date.

% This is where the content of the document starts.
\begin{document}
\maketitle %this is what makes the title from the data above

% Use this command to make a new section.
\section*{Question 1.2.3.4.5.6.7}

Your text goes here. Here's an example displayed equation:
\[
        \mathcal{S} = \left\{ \begin{pmatrix} a & b \\ c & d \end{pmatrix} : a,b,c,d \in \ZZ \right\}
\]
and here's another:
\[
        3 \equiv 7 \pmod 4.
\]
Displayed equations display nicely centered on their own lines.  Look up symbols you don't know at {\tt detexify.kirelabs.org}.

You can also write inline equation like this: $a=bc$.  They fit right into the text.  I can make fractions like $\frac{1}{3}$ and I can say something is an integer like this: $z \in \ZZ$.

Here's an example theorem.

\begin{theorem}
There are infinitely many primes.
\end{theorem}

\begin{proof}
The number $2$ is certainly prime (it is divisible only by $1$ and itself), so there is at least one prime.

Suppose, for a contradiction, that there are only finitely many, say $n$ of them, and list them as follows:
\[
        p_1, \ldots, p_n.
\]
Then consider the integer
\[
        N = p_1 p_2 \cdots p_n + 1.
\]
$N$ has a remainder of $1$ when divided by any of the $p_i$.  Therefore it is not divisible by any of the $p_i$.  But it is certainly greater than $1$ and hence divisible by some prime, which must not be in our finite list.  By this contradiction, the theorem is proved.
\end{proof}

Remark:  This proof depends on the fact that every number is divisible by some prime.  We haven't proven that yet.


\section*{An exercise in the notion of divisibility}


Here's a definition from your textbook.

\begin{definition}
        Let $a, b \in \ZZ$.  We say that \emph{$a$ is divisible by $b$} (and write $b \mid a$), if there exists an integer $c$ such that $bc = a$.
\end{definition}

Do the following exercise:

\begin{exercise}
        Here's a statement of a potential theorem: ``Let $a,b \in \ZZ$.  If $a \mid b$ and $b \mid a$, then $a = b$.''  This theorem is actually (slightly?) false.  Try to prove it and in doing so, discover the problem and correct it.  \LaTeX a corrected theorem and proof, written very carefully.  You'll be judged (informally) by now nicely \LaTeX'd it is, and on your exposition.  Be neither too brief, nor too wordy.  Don't include extraneous information, but don't just include equations, either.  Please \emph{do} use scrap notes before you start \LaTeX'ing.
\end{exercise}
\end{document}
