Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a document with a lemma (using amsthm), like so:

\begin{lem} \label{mylemma}
  % ...
\end{lem}

The proof of this lemma can be found in the appendix (see section \ref{sec:proof_of_mylemma}).

I now place a copy of the lemma in the appendix, with proof included:

\section{Appendix}

\section{Proof of lemma \ref{mylemma}} \label{sec:proof_of_my_lemma}

\begin{lem}
  % ...
\end{lem}

\begin{proof}
  % ...
\end{proof}

The problem is that the second copy of my lemma has a new number. How can I renumber this lemma to mimick the number of mylemma?

Thanks!

share|improve this question
    

1 Answer 1

up vote 9 down vote accepted

You can use the restatable environment provided by the thmtools package:

\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools,thm-restate}

\newtheorem{lem}{Lemma}

\begin{document}

\begin{restatable}{lem}{primelemma}
\label{mylemma}
Let $p$ be a prime number, and assume $p$ divides the product of two integers $a$ and $b$. Then $p$ divides $a$ or $p$ divides $b$.
\end{restatable}

\section{Proof of lemma~\ref{mylemma}} 
\primelemma*

\end{document}

enter image description here

share|improve this answer
    
What about the opposite: cite the lemma before? For example, cite on Introduction the Lema 1.2 with the same numbering. –  Sigur Feb 4 at 14:03
1  
@Sigur in that case, use the starred version restatable* in the Introduction and the un-starred \primelemma further on in the document. –  Gonzalo Medina Feb 4 at 16:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.