% 03authored.tex
% 2011/02/28, v3.00 gamma

\chapter{Mathematics}
\label{mathchap}

\section{Why are we using amsthm.sty?}\label{amsthm}

Many authors already use \verb"amsthm", so we've made it part of our distribution.
It provides a way of allowing varying types of theorem-like enunciations to
be laid out differently but consistently, and to be numbered automatically within
a numbering system of your choice; and it's easy to implement. To implement it just
include near top of the root file the following lines:\\[0.5\baselineskip]
\verb"  \documentclass{"\texttt{\cambridge}\verb"}"\\
\verb"  \usepackage{amsmath}"\\
\verb"  \usepackage{amsthm}"\\[0.5\baselineskip]
Note that if you are using \verb"amsmath.sty", it \emph{must} precede \verb"amsthm.sty".

Instructions for amsthm.sty are documented separately in \texttt{amsthdoc.pdf}.
We've included \texttt{amsthm.sty} and \texttt{amsthdoc.pdf} in this distribution
for your convenience, but you may find more recent versions on the web.
The following sections discuss basic features, plus a few extras.

To save time, you can copy and paste the code given in Appendix \ref{theorem}
into your root file. This is an extensive list of
theorem-like environments, both numbered and unnumbered.

Our preferred style is that theorems, definitions, remarks, etc. should be numbered in a single
sequence by chapter (so Chapter~4 might have Definition~4.1, Lemma~4.2,
 Lemma~4.3, Proposition~4.4, Example~4.5). This helps navigation.

To do this we used \verb"\newtheorem{theorem}{Theorem}[chapter]".
To number the elements by section, replace \verb"[chapter]" with \verb"[section]".

\section{amsthm styles}
If no \verb"\theoremstyle" command is given in the preamble
of the root file, the style used will be \texttt{plain}.
To specify a different style (we only recommend plan and definition styles),
divide your \verb"\newtheorem" commands
into groups and preface each group with the appropriate \verb"\theoremstyle".

\subsection{amsthm \texttt{plain} style}
The \texttt{plain} style is normally used for theorems, lemmas,
corollaries, propositions, and conjectures. These can be numbered or unnumbered.

\subsection{amsthm \texttt{definition} style}
\label{amsdefn}
The \texttt{definition} style is used for definitions,
remarks, notation, conditions, problems, and examples;
it can also be used for problems and exercises (see Chapter~\ref{rarities}).
These can be numbered or unnumbered.

The example below illustrates the use of both styles, in numbered and unnumbered form.
The code

\begin{verbatim}
  \theoremstyle{plain}% default
  \newtheorem{theorem}{Theorem}[chapter]
  \newtheorem{lemma}[theorem]{Lemma}
  \newtheorem*{corollary*}{Corollary}

  \theoremstyle{definition}
  \newtheorem{definition}[theorem]{Definition}
  \newtheorem{example}[theorem]{Example}

  \begin{theorem}
    Let the scalar function \ldots
  \end{theorem}
  \begin{lemma}[Tranah]
    The first-order free surface amplitudes \ldots
  \end{lemma}
  \begin{definition}
    The series above is the Green function \ldots
  \end{definition}
  \begin{lemma}[\citep{MenshEst}]
    The exotic behaviours of Lagrangian \ldots
  \end{lemma}
  \begin{corollary*}
    Let $G$ be the free group on \ldots
  \end{corollary*}
\end{verbatim}
will produce the following output:
  \begin{theorem}
    Let the scalar function \ldots
  \end{theorem}
  \begin{lemma}[Tranah]
    The first-order free surface amplitudes \ldots
  \end{lemma}
    \begin{definition}
    The series above is the Green function \ldots
  \end{definition}
\begin{lemma}[\citep{MenshEst}]
    The exotic behaviours of Lagrangian \ldots
  \end{lemma}
  \begin{corollary*}
    Let $G$ be the free group on \ldots
  \end{corollary*}
  \begin{definition}
    The correlation between the real and estimated flow \ldots
  \end{definition}
  \begin{example}
    Consider spatial and temporal problems \ldots
  \end{example}


\section{Proofs}
\label{proofs}
The \verb"proof" environment is also part of the
amsthm package and provides a consistent format for proofs.
 For example,
\begin{verbatim}
  \begin{proof}
    Use $K_\lambda$ and $S_\lambda$ to translate combinators
    into $\lambda$-terms. For the converse, translate
    $\lambda x$ \ldots by [$x$] \ldots and use induction
    and the lemma.
  \end{proof}
\end{verbatim}
produces the following:
  \begin{proof}
    Use $K_\lambda$ and $S_\lambda$ to translate combinators
    into $\lambda$-terms. For the converse, translate
    $\lambda x$ \ldots\ by [$x$] \ldots\ and use induction
    and the lemma.
  \end{proof}

\subsection{Adapting the `Proof' heading}
An optional argument allows you to have a different
name from the simple `Proof'. For example, to change the heading
to read `Proof of the Pythagorean Theorem', key the following:
\begin{verbatim}
  \begin{proof}[Proof of the Pythagorean Theorem]
    Start with a generic right-angled triangle \ldots
  \end{proof}
\end{verbatim}
It produces:
  \begin{proof}[Proof of the Pythagorean Theorem]
    Start with a generic right-angled triangle \ldots
  \end{proof}

\subsection{Displayed expressions}
Only number displayed expressions, such as equations, to which you will refer.
Please punctuate all displayed expressions as if they were in-line text.
In multiline displays,
only number the last line (unless you refer to intermediate lines). If you wish
lines on multiline displays to be numbered in a subsequence, either use the \verb"subeqn" environment,
or else use the \verb"\renewcommand", as explained in the \LaTeX\ book, to set up a new sequence,
reverting to the original sequence
when required.  If you wish all the items in a multiline display
to  have the same, single number, centred on the display, use the \verb"array" environment with the
display. Items in appendices are numbered separately. See Appendix \ref{appnum} for an illustration.

The default style is to number equations in one sequence by chapter. If you wish to number by section,
then include the command\\[0.5\baselineskip]
 \verb"\renewcommand\theequation{\arabic{chapter}.\arabic{section}.\arabic{equation}}"\\[0.5\baselineskip]
at the end of the preamble. To illustrate the above, here is a single-line display:
\begin{equation}\label{einstein}
E = Mc^2 .
\end{equation}
Here are examples of a multiline displays:
\begin{equation}
\left.\begin{array}{rcl}
x &=& a+b\\
y &=& c+d\\
z &=& e+f.
\end{array}\right\}
\end{equation}
\begin{eqnarray}
x&=&a+a+b+b\nonumber\\
&=&2a+b+b\nonumber\\
&=&2a+2b.
\end{eqnarray}

\subsection{Typesetting a proof without a \qedsymbol}
Use \verb"proof*"; this is not part of the amsthm package. For example,
\begin{verbatim}
  \begin{proof*}
    The apparent virtual mass coefficient \ldots
  \end{proof*}
\end{verbatim}
produces the following:
  \begin{proof*}
    The apparent virtual mass coefficient \ldots
  \end{proof*}

\subsection{When proofs end with an unnumbered display}
Providing the proof does not end with a numbered display,
you can avoid the \qedsymbol\ dropping onto a following line at the end of a proof
by using \verb"\qedhere":
\begin{verbatim}
  \begin{proof}
    \ldots\ and, as we are all aware,
    \[
       E=mc^2. \qedhere
    \]
  \end{proof}
\end{verbatim}
produces the following:
  \begin{proof}
    \ldots\ and, as we are all aware,
    \[
       E=mc^2. \qedhere
    \]
  \end{proof}
This solution is not part of the amsmath package. When used with amsmath version~2 or later, \verb"\qedhere"
will position \qedsymbol\ flush right; with earlier versions, \qedsymbol\ will be spaced a quad away
from the end of the text or display.

If \verb"\qedhere" produces an error message in an equation, try using \verb"\mbox{\qedhere}" instead.

\subsection{Placing the \qedsymbol\ after an unnumbered displayed eqnarray}
This solution is also not part of the amsmath package. %%BUG? You wrote amsthm here but amsmath above
To enable it, you
need to used the starred version of \verb"proof", and
add both \verb"\arrayqed" and \verb"\arrayqedhere", as shown in the following example:
\begin{verbatim}
  \begin{proof*}
    The following equations prove the theorem:
      \arrayqed
        \begin{eqnarray}
          \epsilon &=& -\frac{1}{2}U_0\frac{\mathrm{d}q'^2}
                       {\mathrm{d}x}\nonumber\\
                   &=& 10\nu\frac{q'^2}{\lambda^2} .
        \arrayqedhere
        \end{eqnarray}
  \end{proof*}
\end{verbatim}
This produces the following:
  \begin{proof*}
    The following equations prove the theorem:
      \arrayqed
        \begin{eqnarray}
          \epsilon &=& -\frac{1}{2}U_0\frac{\mathrm{d}q'^2}
                       {\mathrm{d}x}\nonumber\\
                   &=& 10\nu\frac{q'^2}{\lambda^2} .
        \arrayqedhere
        \end{eqnarray}
  \end{proof*}
Again, the above solution \emph{only} works
if the display is unnumbered.

\endinput
