%% Use A4 page size, bigger fonts
\documentclass[a4paper,12pt]{amsart}

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

%% A package with additional math symbols
\usepackage{mathtools}

%% A command to typeset the := symbol in a nicer way; uses the
%% mathtools package
\newcommand{\df}{\coloneqq}

%% 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}

%% Style for remarks
\theoremstyle{remark}
\newtheorem{remark}{Remark}

%% Style for definitions
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}

%% 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}}

%% Begin the text
\begin{document}

\title{Third file}

%% Print the title
\maketitle

\section{General feedback on the first writing exercise}

%% The enumerate environment gives a numbered lists.
%% The items are separated by \item
\begin{enumerate}
\item Always use dollars around mathematical content: ``let $x$ be a
  real number'' instead of ``let x be a real number''.
\item Vertical spacing before displayed formulas: compare

  $$
  x^n+y^n=z^n
  $$
  with the more standard version
  $$
  x^n+y^n=z^n.
  $$
\item Make sure you include any auxiliary files, for instance
  pictures, style files or bibliography. (Keep track of what you
  really need.)
\item Do not number every equation, but only those you will use again
  later.
\end{enumerate}

%% For unnumbered list, one can use
% \begin{itemize}
% \item First item.
% \item Second item.
% \end{itemize}

\section{More general LaTeX things}

%% A definition; using the square bracket argument is useful to
%% indicate what you are defining. It is also useful to indicate this
%% by emphasizing the key words in the definition.
\begin{definition}[Algebra]
  An \emph{algebra} over a field $K$ is a ring morphism $A\to K$.
\end{definition}

%% Example of the command defined at the beginning for :=
Definition symbol:
$$
x\df y.
$$

Multline line formulas:
%% multline and multline* are AMS commands that handle the
%% horizontal/vertical spacing for good readability of formulas that
%% extend over more than one line. Each line is separated by \\
\begin{multline*}
  a^2+b^2+c^2+\cdots+z^2=1+2+3+\ldots+xwy+\int_0^{\infty}e^{-x^3}\cos(txy)dx+
  \\
  a^2+b^2+c^2+\cdots+z^2=1+2+3+\ldots+xwy+\int_0^{\infty}e^{-x^3}\cos(txy)dx+
  \\
  \sum_{n=0}^{\infty}\frac{1+n!}{(n^2+n+1)!}
  +
  a^2+b^2+c^2+\cdots+z^2=1+2+3+\ldots+xwy
\end{multline*}
or
%% Version with equation number
\begin{multline}
    a^2+b^2+c^2+\cdots+z^2=1+2+3+\ldots+xwy+\int_0^{\infty}e^{-x^3}\cos(txy)dx+
  \\
  a^2+b^2+c^2+\cdots+z^2=1+2+3+\ldots+xwy+\int_0^{\infty}e^{-x^3}\cos(txy)dx+
  \\
  \sum_{n=0}^{\infty}\frac{1+n!}{(n^2+n+1)!}
  +
  a^2+b^2+c^2+\cdots+z^2=1+2+3+\ldots+xwy
  \end{multline}

  Compare to:
  %% Using successive displayed equations is discouraged
  $$
  a^2+b^2+c^2+\cdots+z^2=1+2+3+\ldots+xwy+\int_0^{\infty}e^{-x^3}\cos(txy)dx+
  $$
  $$
  a^2+b^2+c^2+\cdots+z^2=1+2+3+\ldots+xwy+\int_0^{\infty}e^{-x^3}\cos(txy)dx+
  $$
  $$
  \sum_{n=0}^{\infty}\frac{1+n!}{(n^2+n+1)!}
  +
  a^2+b^2+c^2+\cdots+z^2=1+2+3+\ldots+xwy
  $$

  Aligning equations:
  %% To align a sequence of computations, with the & symbol indicating
  %% the horizontal point where all lines will be aligned.
  \begin{align*}
    x&=\sum_{n=1}^{+\infty}\frac{1}{n^2}\\
     &=\frac{\pi^2}{6}\\
    &=\zeta(2).
  \end{align*}

  Or
  %% The version with equation numbers. In principle, each equation
  %% gets a different number, but this can be changed by adding
  %% \nonumber which indicates that the corresponding line is not
  %% numbered.
  \begin{align}
    x&=\sum_{n=1}^{+\infty}\frac{1}{n^2}\nonumber\\
     &=\frac{\pi^2}{6}\nonumber\\
    &=\zeta(2).
  \end{align}

  Similar items, but not a computation:
  %% This centers horizontally various items The version gather* does
  %% not number the equations, and \nonumber can also be used here.
  \begin{gather}
    E=\R^2\nonumber\\
    f\colon E\to E\text{ a linear transformation}
    \\
    F=\ker(E).\nonumber
  \end{gather}

  Cases:
  %% Distinguish different cases with a curly bracket on the left. The
  %% & symbol indicates a position where all lines will be aligned.
  $$
  f(x)=
  \begin{cases}
    x&\text{ if } 0\leq x<1,\\
    \exp(x)&\text{ if } x\geq 1.
  \end{cases}
  $$

  Some minor symbols:
  %% Various examples. The "\ " creates a small horizontal space.
  \begin{gather*}
    f\circ g,\ E^{\perp},\ X\subset Y,\ X\supset Y,\ x\not\in X,\ X\not\subset Y
    \\
    f(x)\sim g(x),\ E\simeq F,\ f(x)\approx g(x),\ f(x)\asymp g(x)
    \\
    \hat{f},\ \widehat{f},\ \tilde{f},\ \widetilde{f},\ f\colon X\to Y
    \\
    \alpha,\ \beta,\ \epsilon,\ \varepsilon,\ \rho,\ \varrho
  \end{gather*}

\end{document}
