%% Use A4 page size, bigger fonts, and put the equation numbers on the
%% right
\documentclass[a4paper,12pt,reqno]{amsart}

%% Use also various symbols from the AMS
\usepackage{amsmath,amssymb}

%% Decrease the size of the margins to use more of the page
\usepackage{fullpage}

%% The colorlinks option gives colored links instead of boxes around
%% links for equation numbers and other references
%% This can be a problem for color-blind readers
\usepackage[colorlinks]{hyperref}

%% The usual theorems, etc
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem*{theorem*}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}

\theoremstyle{remark}
\newtheorem{remark}{Remark}

%% Define a new command to typeset GL as a function
\DeclareMathOperator{\gl}{GL}

%% Use the AMS versions of the "less than or equal to" and "larger
%% than or equal to" signs
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}

%% A command "boldmath" to type bold mathematical formulas in such a
%% way that small letters remain slanted instead of being straight
\newcommand{\bm}[1]{\text{\boldmath${#1}$}}

%% The basic number sets in the bold style
% \newcommand{\C}{\mathbf{C}}
% \newcommand{\R}{\mathbf{R}}
% \newcommand{\Q}{\mathbf{Q}}
% \newcommand{\Z}{\mathbf{Z}}

%% The basic number sets in the "blackboard" style. Using this or the
%% previous is a question of taste, but they shouldn't be mixed.
\newcommand{\C}{\mathbb{C}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}

%5 Begin the text
\begin{document}

\title{Second test}

%% Print the title
\maketitle

This is the second test file.

%% A displayed formula using some standard function names known to TeX
%% by default
$$
\cos(x)^2+\sin(x)^2=1.
$$

%% To check the difference between the typesetting of the inequality
%% signs
We have $3\leq 5$ and $3\geq 2$.

%% Test of the GL command
Let $g\in \gl(E)$ be a linear map.

%% How to insert bold or italic text.
This is \textbf{important}, and this is \textit{slanted}
argument.

%% The \emph command will typeset text in italic in a straight context
%% and conversely.
Also this is \emph{noticeable}. \textit{Also \emph{here}}.

%% Example where \emph will be straight with the 'plain' theorem style.
\begin{theorem}\label{th-1}
  It is \emph{not} true that all prime numbers are odd.
\end{theorem}

%% Example where \emph will be straight with the 'remark' theorem
%% style.
\begin{remark}
  It is \emph{not} true that all prime numbers are odd.
\end{remark}

%% Use of the \proof environment to set up a proof. The optional
%% argument in [] is typeset instead of "Proof" (if it is used).
\begin{proof}[Sketch of proof]
  The number $2$ is prime and not odd.
\end{proof}

%% Using the optional argument to refer to the theorem being proved,
%% which can be useful if the proof doesn't start immediately after
%% the statement of the theorem.
\begin{proof}[Proof of Theorem~\ref{th-1}]
  The number $2$ is prime and not odd.
\end{proof}

%% How to typeset mathematics in bold; comparison with the result of
%% the \bm command defined in the preamble.
%% The \quad command inserts a pretty big horizontal space.
\begin{equation}
  \mathbf{v}=\mathbf{w}+\mathbf{z}\quad\quad v=w+x,\quad
  \bm{v}=\bm{w}+\bm{z}.
\end{equation}

%% How to insert some text within a displayed formula. Note that the
%% spacing must be inserted either with \quad or similar command, or
%% inside the \text{}
$$
\sqrt{x}^2=x\quad \text{if }  x\geq 0.
$$

%% A different way to type displayed formula, delimited by \[ and \]
Compare with:
\[
\sqrt{x}^2=x\quad \text{if }  x\geq 0.
\]

Useful things:

Matrices:
%% begin{pmatrix}end{pmatrix} gives better spacing than some other
%% methods. The & sign separates the entries of the matrix in a
%% given row, and the \\ separate the rows.
$$
\begin{pmatrix}
  a & c & c\\
  1& 0 & y\\
  &&\pi
\end{pmatrix}
$$

Big parenthesis:
%% Using left( and right) gives parenthesis with height adapted to the
%% content in between
$$
\left(\sum_{n=1}^{+\infty}\frac{1}{n^2}\right)^2=\frac{\pi^4}{36}.
$$

%% This can sometimes give relatively ugly results if the parenthesis
%% extends a lot vertically in one direction, but not the other.  The
%% command \substack{...\\...\\...} can be used in subscripts to stack
%% various items one over the other, with \\ separating the lines
$$
\left(\sum_{\substack{n=1\\n\text{ is an integer}}}^{+\infty}\frac{1}{n^2}\right)^2=\frac{\pi^4}{36}.
$$

%% A solution which often works is to just use a fixed size that is
%% sufficient to separate the content of the parenthesis from the
%% surrounding. Bigl( and Bigr) are usually good for that.
$$
\alpha\Bigl(\sum_{\substack{n=1\\n\text{ is an
      integer}}}^{+\infty}\frac{1}{n^2}\Bigr)^2=
\frac{\alpha\pi^4}{36}.
$$

%% Writing summation conditions on a single line instead of using
%% \substack is also often quite ugly.
$$
\left(\sum_{n=1\text{ is an integer}}^{+\infty}\frac{1}{n^2}\right)^2=\frac{\pi^4}{36}.
$$

Numbers sets
%% The basic number sets.
$$
0\in\Z,\quad \frac{1}{2}\in\Q,\quad \pi\in \R,\quad\quad 1+i\in\C.
$$

Arrows:
%% The most usual arrows; \hookrightarrow gives an arrow corresponding
%% to an injection.
$$
E\to F,\quad\quad x\mapsto f(x)\quad\quad A\longrightarrow B,\quad\quad
X\hookrightarrow Y.
$$

\end{document}
