\documentclass [12pt] {article}

\usepackage{graphicx, xypic,amsmath,amssymb,epstopdf,amsthm,amsfonts}
\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}{Definition}

\begin{document}
\begin{center}

{\Huge{Modular Arithmetic}}\\
\end{center}



\begin{thm} If $a$ and $b$ are integers with $a\not=0$, we say that $a$ \emph{divides} $b$ if there is an integer $c$ such that $b=ac$, or equivalently, if $\frac{b}{a}$ is an integer.  \\

\noindent When $a$ divides $b$ we say that $a$ is a \emph{factor} or \emph{divisor} of $b$, and that $b$ is a \emph{multiple} of $a$.  \\

\noindent The notation $a \vert b$ denotes that $a$ divides $b$.  We write $a \not\vert b$ when $a$ does not divide $b$.
\end{thm}


\begin{enumerate}
\item Does $3 \vert 7$?
\vspace{.3in}
\item Does $4 \vert 3214$?
\vspace{.3in}
\item Use quantifiers to write the definition of $a\vert b$.
\vspace{1in}
\item Let $n$ and $d$ be positive integers.  How many positive integers not exceeding $n$ are divisible by $d$?

\vfill

\item Prove the following: Let $a$, $b$, and $c$ be integers where $a\not=0$.  If $a\vert b$ and $a\vert c$, then $a \vert (b+c)$.
\vfill

\noindent Check your answers by consulting page 238.
\newpage

\begin{thm} If $a$ and $b$ are integers and $m$ is a positive integer, then $a$ is \emph{congruent} to $b$ \emph{modulo m} if $m$ divides $a-b$.\\

\noindent We use the notation $a\equiv b \mod m$ to indicate that $a$ is congruent to $b$ modulo $m$. \\

\noindent We say that $a\equiv b \mod m$ is a \emph{congruence} and that $m$ is its \emph{modulus} (plural \emph{moduli}).  \\

\noindent If $a$ and $b$ are not congruent modulo $m$ we write $a\not\equiv b \mod m$.
\end{thm}

\item Is $17 \equiv 5 \mod 6$?
\vspace{.3in}
\item Is $24\equiv 14 \mod 6$?
\vspace{.3in}

\begin{thm} The set of all integers congruent to an integer $a$ modulo $m$ is called the \emph{congruence class} of $a$ modulo $m$.
\end{thm}

\item Write down four distinct integers in the congruence class of $5$ modulo $6$.
\vspace{1in}

\item Find $13 \mod 3$
\vspace{.3in}
\item Find $-97 \mod 11$

\vfill


\end{enumerate}
\end{document}
