Until now we’ve done everything inside math environments—which isn’t weird for a LaTeX Math course—but now it’s time to step out of it. Let’s look at mathematical concepts that don’t necessarily need to be formulas or equations. Common math concepts that don’t need to be in math mode.

I’m talking about all of these: theorems, lemmas, corollaries, remarks, definitions, and proofs.

General Syntax

To create these different types of mathematical paragraphs, a single command is available in standard LaTeX. This command simply creates an environment for this type, and you can use some extra arguments to customize it. The syntax is:

1\newtheorem{environment name}{environment text}[reset counter]

environment name takes any standardized name, such as theorem or lemma.

environment text specifies what text is automatically displayed at the start of the environment. This is not the content, it’s some simple phrase that signals to the reader what’s about to happen. Again, the standard text (in your document’s language) will do.

reset counter is optional. It requires the name of an existing counter. Every theorem environment receives its own independent counter, but every time the reset counter is incremented, this theorem counter is reset.

This way, for example, you can number your theorems starting from one per section, by using section as the reset counter.

Applying the Syntax

Now you can create all those mathematical constructs I mentioned. Define your theorem and start a new environment of the same name. Additionally, every theorem environment can receive an optional argument that specifies the title of your theorem.

 1\newtheorem{theorem}{THEOREM}[section]
 2\newtheorem{lemma}{LEMMA}[theorem]
 3
 4\begin{document}
 5
 6    \section{Chapter 1}
 7    \begin{theorem}[Pythagorean Theorem]
 8        It's simply $a^2 + b^2 = c^2$
 9    \end{theorem}
10
11    \begin{lemma}
12        Some trivial lemma here.
13    \end{lemma}
14
15\end{document}
Code above > output below
Code above > output below
Remark

Because each theorem environment receives its own counter, you can even use those as reset counters in subsequent new theorems you define!

Customizing the Layout

All these environments are typeset the same:

  • The environment text, and optionally the title, are bold
  • All the text inside is in italics.

To modify this, use the last of the AMS packages: amsthm (AMS theorems).

This provides two important functionalities:

  • Non-numbered theorem environments
  • Predefined styles for each type of environment

Non-numbered Environments

To create non-numbered environments, use the star variation.

1\newtheorem*{name}{text}[reset]
1\usepackage{amsthm}
2
3\newtheorem*{theorem}{THEOREM}
4
5\begin{document}
6    \begin{theorem}[Pythagorean Theorem]
7        It's simply $a^2 + b^2 = c^2$
8    \end{theorem}
9\end{document}
Code above > output below
Code above > output below

Theorem Styles

To give a theorem environment a certain style, use this command before you define the theorem:

1\theoremstyle{type of theorem}

The AMS theorems package has predefined styles for every type. These are often exactly what you need and are in many ways the universal notation.

 1\usepackage{amsthm}
 2
 3\theoremstyle{theorem}
 4\newtheorem*{theorem}{Theorem}
 5\theoremstyle{remark}
 6\newtheorem*{remark}{Remark}
 7
 8\begin{document}
 9    \begin{theorem}[Pythagorean Theorem]
10        It's simply $a^2 + b^2 = c^2$
11    \end{theorem}
12
13    \begin{remark}
14        Some trivial remark.
15    \end{remark}
16\end{document}
Code above > output below
Code above > output below

Proofs

Proofs are no different from everything discussed thus far. Create them by using the proof environment with the same options.

They are, however, automatically supported by the AMS package!

This means you don’t have to define them yourself and they already have the correct style. On top of that, a square is added at the end of every proof. This is the QED symbol that demonstrates a proof is complete. To change this, renew the \qedsymbol command.

 1\renewcommand{\qedsymbol}{$\heartsuit$}
 2\begin{proof}
 3
 4    Assume that in fact $\cup_{A \in F} A$ is negligible for any such~$F$.  
 5    Then the family of {\em all}\/ negligible subsets of~$[0,1]$ would satisfy the hypotheses of Zorn's Lemma! 
 6    There would then be a maximal negligible subset. But this is absurd. 
 7    
 8    Indeed, suppose $S$\/ is a maximal negligible subset of~$[0,1]$.  
 9    
10    If there were $x\in [0,1]$ not contained in~$S$, then $S \cup \{x\}$ would be a negligible subset of~$[0,1]$ strictly containing~$S$. 
11    Hence there is no such~$x$, and $S=[0,1]$. But it is known that $[0,1]$ is not negligible.
12 
13\end{proof}
Code above > output below
Code above > output below
Continue with this course
Support me and this website!

Want to support me?

Buy one of my projects. You get something nice, I get something nice.

Donate through a popular platform using the link below.

Simply giving feedback or spreading the word is also worth a lot.