\documentclass[12pt]{amsart}
\usepackage{amsmath, amssymb, amsthm, amsfonts}

\usepackage{epsf}
\newcommand{\ZZ}{\ensuremath{\mathbb{Z}}}

\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\theoremstyle{definition}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{defin}[thm]{Definition}
\newtheorem{ex}[thm]{Example}
\newtheorem{rmk}[thm]{Remark}
\newtheorem{alg}[thm]{Algorithm}
\newcommand{\m}[1]{\marginpar{\addtolength{\baselineskip}{-3pt}{\footnotesize \it #1}}}
\begin{document}

\title{A LaTex template for the Laboratory in Mathematical Experimentation}
\author{The Mathematics and Statistics Department}
\email{robinson@mtholyoke.edu}
\address{Department of Mathematics and Statistics, Mount Holyoke
College, South Hadley, MA 01075}
\thanks{I thank my friends for proof-reading this document for me}
\begin{abstract}
In this document we provide some examples of how to write mathematical documents using \emph{LaTeX}.
\end{abstract}

\maketitle
\section{Introduction}
This document serves a dual purpose.  It contains some tips on structuring your first paper.  It also provides examples of how to work with the \emph{LaTeX} document preparation system.

A good introduction informs the reader of the purpose of your paper 
and one of your your "coolest" results as
quickly as possible. It
is also very important to try to make the reader understand why you
found the work interesting.  Was it surprising?  Is it a basic fact?
Is it related to something else?

You should end your introduction by letting the reader know what
is in the different sections of your paper.

In \S 2 we illustrate the use of some basic \emph{LaTeX} commands.
We state and prove Theorem \ref{thm: big} on the behavior of linear iteration in \S 3.

\section{The main result}
In this section we give various ways of displaying mathematical expressions.
We also illustrate how to cite a reference and how to make margin comments.


 Mathematical expressions which appear in a line of text
need to be enclosed in dollar signs so that \emph{LaTeX} can recognize
them.  For example, we may wish to write $f(x) = \cos(x)+1.$

Some things look better if they are displayed alone.  For example,
if we are talking about limits, we may write $\lim_{n \rightarrow
\infty} f(x)$ in the text.  Alternatively, we may enclose
mathematical expressions in square brackets as below
\[\lim_{n \rightarrow \infty} f(x).\]

LaTex has commands for citing sources in the bibliography.  We may
wish to cite our course text \cite{labBook}.  Sometimes, it is helpful 
to make comments in the margin to mark places which need revision. 
\m{Hi! I'm a margin comment.}

\section{The big theorem}
We can also use Latex to refer back to Theorems, Definitions, etc
from earlier in the text.  For example, we may have a very big
theorem.

\begin{thm}\label{thm: big}
This is a very big theorem.
\end{thm}
\begin{proof}
A concise proof goes here.
\end{proof}

While you are working on your paper, you may wish to include the word ``showkeys'' in the list of packages that you wish to use at the beginning of the document.  This will print out all of the internal document labels for you so you can easily see what they are.

\section{Random notation}

Here is some random notation you might need: 
\vspace{.5\baselineskip}
% this "vspace" above just adds some vertical space.  note that
% we can't add vertical space with carriage returns, so we have to 
% add it this way instead.  here "baselineskip" is the space of a line,
% so we're skipping by half that. 
 
$x_2$,
$x_{25}$, % note parentheses needed to get both digits in subscript
$x^2$,
$x^{25}$, % note parentheses needed to get both digits in exponent
$\pm 4$,
$x \not = 17$, % you can put "not" in front of lots of different operators
$x > 5$, 
$x < 5$, 
$x \geq 5$, 
$x \leq 5$,
$\{ 1, 2, 3 \}$, % note curly brackets need a backslash or they are invisible
$\{ x \mid \sqrt{x} > 2 \}$,
$\infty$.
\vspace{.5\baselineskip}

$A \subset B$, 
$A \subseteq B$,
$A \not \subset B$,
$A \not \subseteq B$,
$A \setminus B$,
$A^{\rm c}$, % "rm" changes the font to "roman", i.e. non-math, font
$A \cap B$,
$A \cup B$,
$x \in A$, 
$x \not \in A$, 
$|A|$, 
$\mathcal{P}(A)$, 
$\emptyset$.
\vspace{.5\baselineskip}

$\frac{5}{1+x}$, 
$\displaystyle\frac{5}{1+x}$, % anything in $$ is automatically displaystyle
$\bigcap_{i=1}^n S_i$,
$\displaystyle\bigcap_{i=1}^n S_i$,
$\bigcup_{i=1}^n S_i$,
$\displaystyle\bigcup_{i=1}^n S_i$,
$\sum_{k=1}^{10} a_k$,
$\displaystyle\sum_{k=1}^{10} a_k$,
$\prod_{k=1}^{10} a_k$,
$\displaystyle\prod_{k=1}^{10} a_k$.
\vspace{.5\baselineskip}
% "displaystyle" is the default when using double dollar signs.
% so you only need to use "displaystyle" in the rare case where you
% want one of these oversized notations right in the middle of a line
% of text, which is not usually what you want.  for centered equations,
% everything will automatically be in "displaystyle".

$\mathbb{R}$, % use this ONLY to denote the real numbers
$\mathbb{Q}$, % rational numbers
$\mathbb{Z}$, % integers
$\mathbb{N}$, % natural numbers
$\clubsuit$, 
$\diamondsuit$,
$\heartsuit$,
$\spadesuit$,
$\rightarrow$, 
$\leftarrow$,
$\leftrightarrow$, 
$\longrightarrow$,
$\longleftarrow$,
$\longleftrightarrow$,
$\Rightarrow$, % the "implies" arrow
$\Leftarrow$,
$\Leftrightarrow$, % the "if and only if" arrow
$\Longrightarrow$, % longer "implies" arrow
$\Longleftarrow$,
$\Longleftrightarrow$, % longer "if and only if" arrow
$\mapsto$,
$\longmapsto$.
\vspace{.5\baselineskip}

$\mathcal{P}$, % "mathcal" is a fancy font that can be applied to any letter.
$\mathcal{S}$,
$\mathcal{F}$,
$\forall$,
$\exists$,
$\lor$, % think "logical or"
$\land$, % think "logical and"
$\neg$, % \lnot also works.  use this for logical negation (\sim looks funny)
$\sim$, % use this for equivalence relations, it's made to be a binary operation
$\approx$,
$\equiv$,
$\times$, % for cartesian products
$\ast$,
$\star$,
$\mid$, % use this for "such that"
$a | b$, % use this for "divides"
$|x|$, % use this for absolute value
$\|x\|$,
$\lceil x \rceil$,
$\lfloor x \rfloor$,
$\{x \in \mathbb{Z} \mid x \mbox{ is prime} \}$. % note use of "mbox"
% the "mbox" is needed so that we can have non-math type inside of the
% math environment.  without the "mbox" the words would be in math/italics,
% and all smushed together with no spaces between words.  notice also
% the space before the word "is".
\vspace{.5\baselineskip}

$\gcd$, % in math mode, just "gcd" would be in italics, but "\gcd" is not
${\rm lcm}$, % there isn't a command for "lcm" in tex so we just roman it
$n \choose k$,
$n+1 \choose k$, % no brackets needed, the n+1 is all assumed to be on top
$a = {n+1 \choose k}$, % we need brackets or else "a=" would be in the choose
$\prec$, % think "precedes"
$\preceq$,
$\succ$, % think "succeeds"
$\succeq$,
$f \colon [0,\infty) \rightarrow \mathbb{R}$, 
$f \circ g$ % composition
\{, % these next few symbols mean particular things to latex
\}, % so to get them to appear in your document you precede them with backslash
\$, % notice that these are NOT in math mode
\%,
\&,
\_,
\#.


\begin{thebibliography}{99}

\bibitem{labBook}  Department of Mathematics and Statistics at
Mount Holyoke College, \emph{Laboratories in Mathematical
Exploration: A Bridge to Higher Mathematics}, Springer-Verlag, New
York, 1997.
\end{thebibliography}
\end{document}
