# A flexible enumeration for my maths dissertation

So I'm currently writing my maths dissertation.

Say I am in "section 5" of the dissertation and am ordering lemmas, propositions, theorems and corollaries by 5.1, 5.2, 5.3,... etc. Is there a way to code this enumeration so that if I wanted to add a new 5.2, the old 5.2 would change to 5.3, 5.3 would change to 5.4,... etc?

Thanks for any help

-
This is the default behavior of LaTeX system. Please add a minimal working example (MWE) that illustrates your problem. I think there is a misunderstanding here. – percusse Aug 21 '12 at 12:27
What you describe is how all latex numbering works. So if it isn't working you need to show us what you did. – David Carlisle Aug 21 '12 at 12:27
As the previous comments say this is LaTeX default provided one uses LaTeX's \newtheorem etc. to set up these environments, e.g. \newtheorem{theorem}{Theorem}[section] etc. You should then place \label and reference them with \ref to refer to these environments. See LaTeX documentation, and possibly consider either amsthm or ntheorem packages for more sophisticated formatting. – Andrew Swann Aug 21 '12 at 12:45
Thanks guys. I'm completely new to this all. I'll check out \newtheorem{thm} et al. – user32259 Aug 21 '12 at 13:02

Hopefully you've discovered that the problem is easy in LaTeX (indeed, it is substantially what it was designed for), but here is an explicit construction for you to look at.

Try compiling this document, both with and without the Lemma in it. (Depending on how you are writing your document, you may have to run LaTeX twice in a row to make the cross-reference resolve each time you remove the Lemma. Many modern editors do this automatically.)

\documentclass{article}
\usepackage{amsthm,amssymb}
\newtheorem{theorem}{Theorem}[section]
% Theorem numbering is Sec#.Thm#
\newtheorem{lemma}[theorem]{Lemma}
% Lemmata are numbered as theorems

\begin{document}
\section{A section with some politically motivated math in it}

\begin{lemma}[Synergy Lemma]
\label{lemma:synergy}
Under the right circumstances, $1 + 1 = 3$.
\end{lemma}
\begin{proof} By adoption of a positive workplace culture. \end{proof}
\noindent
The Synergy Lemma proves quite useful to show the following celbrated result:

\begin{theorem}
\label{thm:2+2=5}
When it suits us, $2 + 2 = 5$.
\end{theorem}
\begin{proof} Exercise for the reader; use good stomping boots. \end{proof}
\noindent
Theorem~\ref{thm:2+2=5} is commonly known as \emph{Orwell's Theorem},
though it is often (and more accurately) called \emph{Vissarionovich's Theorem}
in many eastern European countries.

\end{document}

-
Hi, thanks for your answer. As I am just starting with latex I really find illustrated examples helpful. – user32259 Aug 23 '12 at 10:03