This might seem like a really obvious question to some of you but I am having a bit of trouble.
I use Theorem (and Lemma etc.) environments in my documents and reference them in the proof of others - pretty standard.
The trouble I am having is what to call my theorems - the ones without names anyway.
An obvious way is to number them the same way they appear in the document, but if I then go back and add or remove theorem environments this all goes kablooey.
Does anyone have a nice logical system for doing this?
Minimal Working Example
\documentclass{article}
\newtheorem{thm}{Theorem}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{lem}[thm]{Lemma}
\begin{document}
\begin{lem}\label{lem2}
This is the 1st lemma (2nd 'theorem') I write, but it clarifies the proof of the theorem below, so I place it above.
\end{lem}
\begin{proof}
The proof of lemma.
\end{proof}
\begin{thm}\label{thm1}
This is the 1st theorem I write.
\end{thm}
\begin{proof}
The proof of theorem using Lemma \ref{lem2}.
\end{proof}
\end{document}
\documentclass
and end with\end{document}
.\label
. But even if you do so, you don't need to change the\label
if you reorder, add or delete something. If your editor does not assist in finding labels you can use a package likeshowkeys
.