# How do I repeat a theorem number?

Often in my papers I want to mention theorems in the introduction that are introduced in more detail and proved in a later section.

I'd like to include the statement of these theorems twice over, each time numbered as the theorem would naturally appear in its later section.

My current solution (using amsthm) is, e.g.

%(in the introduction)
\newtheorem*{thm:associativity}{Theorem \ref{thm:associativity}}
\begin{thm:associativity}
Lorem ipsum ...
\end{thm:associativity}

%(in a later section)
\begin{thm}
\label{thm:associativity}
Lorem ipsum ...
\end{thm}


Can anyone think of a cleaner solution?

• @EyalRozenberg, since there are already quite a few answers directed at the question as stated, I think that starting a new question will get better answers. (Link to it from here!) Of course, you're also welcome to edit as you please here. Dec 22, 2011 at 19:31
• Although I've suggested an answer, I've noticed sometimes you need more from a restatement environment then the question author is asking for... have a look at this extension question of mine. Dec 22, 2011 at 20:14
• When package conflicts prevented me from using the other suggested approaches, your 'current solution' saved the day! Nov 12, 2014 at 15:02
• I agree with mektah: I think your solution has the least overhead and "just works" the best of all. Aug 7, 2015 at 16:58

If you want to allow yourself to vary the text between the two occurrences, here's an alternative:

\documentclass{article}

\usepackage{amsthm}

\makeatletter
\newtheorem*{rep@theorem}{\rep@title}
\newcommand{\newreptheorem}[2]{%
\newenvironment{rep#1}[1]{%
\def\rep@title{#2 \ref{##1}}%
\begin{rep@theorem}}%
{\end{rep@theorem}}}
\makeatother

\newtheorem{theorem}{Theorem}
\newreptheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newreptheorem{lemma}{Lemma}

\begin{document}

\begin{reptheorem}{myAmazingTheorem}
That theorem again
\end{reptheorem}

\begin{theorem}
\label{myAmazingTheorem}
A theorem
\end{theorem}
\begin{lemma}
\label{anInsignificantLemma}
A lemma
\end{lemma}

\begin{replemma}{anInsignificantLemma}
That theorem again
\end{replemma}

\end{document}


Probably needs a little tweaking to suit different theorem styles and the like.

• @Andrew: I'm a bit confused by your code. Can you change some of the environment/labels to not be thm so the flow is a bit more obvious? (Or maybe a word on what your code is actually doing? I don't think I am parsing it quite right.) Jul 28, 2010 at 11:11
• @Willie Wong: Is that better? The idea is that a dummy theorem (with no numbering) is created ('rep@theorem' in the current version) and when we call it then we modify the title to the right thing (the 'name' and the supplied reference). Jul 28, 2010 at 11:27
• Ah, I understand now. Thanks for the clarification. This is a very nice solution. Jul 28, 2010 at 13:16
• I would use a starred version of \ref in your answer; it feels a bit weird to have a link in the theorem, if you're using hyperref. Sep 2, 2010 at 5:36
• @Andrew: A small problem with your solution is that \newreptheorem doesn't respect the current theorem style selected with \theoremstyle. I suggest to replace the block between \makeatletter and \makeatother by the following code to fix that: \newcommand{\newreptheorem}[2]{\newtheorem*{rep@#1}{\rep@title}\newenvironment{rep#1}[1]{\def\rep@title{#2 \ref*{##1}}\begin{rep@#1}}{\end{rep@#1}}} Apr 28, 2011 at 12:15

What about the thmtools bundle? Check out page 6 of the guide: there's a 'restatable' environment.

• This seems to be the best of the suggested options by far. In particular, it is the only suggested solution that doesn't involve duplicating the text of the theorem. Unfortunately, I can't get the starred command (\firsteuclid* in the example) to work with hyperref. May 28, 2014 at 12:10
• There is an example on how to use restatable in this answer: tex.stackexchange.com/a/51288/34551 Nov 2, 2016 at 12:58

Here's a solution I like even though it's not very clever. You simply temporarily redefine \thetheorem (or in your case, \thethm):

% in the introduction
{
\renewcommand{\thetheorem}{\ref{thm:associativity}}
\begin{theorem}
Lorem ipsum ...
\end{theorem}
} % note: these braces are here to take advantage of LaTeX scoping ...
% \thetheorem is returned to its rightful definition outside of this group

% elsewhere
\begin{theorem} \label{thm:associativity}
Lorem ipsum ...
\end{theorem}


You can also define an environment on the same principle

% repeat theorems, with amsthm
% args = type,counter,reference
\newenvironment{repthm}[3]
{
\bgroup
\expandafter\def\csname the#2\endcsname{\ref{#3}}
\def\foo{\end{#1}}
\begin{#1}
}
{
\foo
\egroup
}


Here is how I do it:

\documentclass{article}

\usepackage{amsthm}

\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]

\newtheoremstyle{TheoremNum}
{\topsep}{\topsep}              %%% space between body and thm
{\itshape}                      %%% Thm body font
{}                              %%% Indent amount (empty = no indent)
{.}                             %%% Punctuation after thm head
{ }                             %%% Space after thm head
{\thmname{#1}\thmnote{ \bfseries #3}}%%% Thm head spec
\theoremstyle{TheoremNum}
\newtheorem{thmn}{Theorem}

\begin{document}

\begin{thmn}[\ref{T:1}] $1+1 = 2$
\end{thmn}

\begin{thm}\label{T:1} $1+1 = 2$
\end{thm}

\end{document}

• This is just nice and simple, thanks for this. I ended up just making the name field empty and use only the note field -- so I could use it for any environment (just means I have to supply my own "Theorem~" or "Definition~" etc.). Jan 25, 2016 at 3:11

A somewhat "sketchy" solution: there's a package by Ulrich Diez called theomac.sty that's floating online but isn't on CTAN, and which I've used once before. The latest version I'm aware of contains the string "2007/06/18 v1.00beta4 Define macros from theorems" in it, and can be found, say, in the discussions here or here (or an older version on Google Groups where you can download it). You use it somewhat as follows:

\usepackage{theomac} %To repeat theorems
\newtheoremWithMacro{rtheorem}[theorem]{Theorem}

...

\begin{rtheorem}[\foo]
$1 + 1 = 2$
\end{rtheorem}


(Or any name instead of rtheorem.) Then you can write \foo anywhere you want the theorem to appear, without having to repeat the body.

Following is how I implement Andrew Stacey's suggestion. The difference is that I use ntheorem to simulate amsthm style; and I'm using \autoref to have a single restatement environment which works for theorems, corollaries, anything - based on just the label. It's not elegant or terse, but it should be useful if you use ntheorem. Of course, if you don't care about AMS styles, just tweak the \newtheoremstyle commands to your liking (while keeping the styles for the statement and the restatement in synch).

Also, the code allows for restatement both with and without additional text after the theorem number.

\documentclass{article}

\usepackage{hyperref}
\usepackage[hyperref]{ntheorem}

\makeatletter
\def\ifempty#1{%
\def\@tmp@a{#1}%
\ifx\@tmp@a\@empty%
}

\newtheoremstyle{ams-theorem}%
\theorem@separator}]}
% The following is a dummy style, we only need it so ntheorem uses its
% unnumbered version properly
\newtheoremstyle{ams-restatedtheorem}
\theorem@separator}]}
% ... this is the one that's actually used, and in fact, we only use the
% 3-argument variant
\newtheoremstyle{nonumberams-restatedtheorem}%

\theoremstyle{ams-theorem}
\theorembodyfont{\itshape}
\theoremseparator{.}
\theoremindent0cm
\theoremnumbering{arabic}
\theoremsymbol{}

\newtheorem{theorem}{Theorem}
% and here you would have environments such as lemma, corollary, etc.
% (possibly with \newaliascnt commands to get them to use the same
% counter)

\theoremstyle{ams-restatedtheorem}
% the argument of restatedtheorem* shouldn't ever actually be used
\newtheorem*{restatedtheorem*}{}
\newenvironment{restatement}[2][]{%
\ifempty{#1}
\begin{restatedtheorem*}[\autoref*{#2}]%
\else%
\begin{restatedtheorem*}[\autoref*{#2} (#1)]%
\fi%
}%
{\end{restatedtheorem*}}
\makeatother

\begin{document}
\begin{theorem}
\label{myfirst}
This is my first theorem.
\end{theorem}
\begin{theorem}
\label{mysecond}
This is my second theorem.
\end{theorem}
\begin{restatement}{myfirst}
This is a restatement of my first theorem.
\end{restatement}
\begin{restatement}[fancy version]{mysecond}
Hear ye, hear ye, the most excellent seconde theoreme!
\end{restatement}
\end{document}


Finally wanted to do this myself and decided that I didn't like my solution. Here's an alternative. It works for amsthm. Don't know how it would work with other theorem-builders.

\ExplSyntaxOn
\DeclareDocumentEnvironment{repetition}{m o}
{
\tl_set_eq:Nc \l_tmpa_tl {#1}
\IfNoValueTF{#2}{
\tl_set:Nx \l_tmpb_tl {
\tl_item:Nn \l_tmpa_tl {1}
{\tl_item:Nn \l_tmpa_tl {2} }
{}
{\tl_item:Nn \l_tmpa_tl {4}}
}
}
{
\tl_set:Nx \l_tmpb_tl {
\tl_item:Nn \l_tmpa_tl {1}
{\tl_item:Nn \l_tmpa_tl {2} }
{}
{\tl_item:Nn \l_tmpa_tl {4} ~ \exp_not:N \ref{#2} }
}
}
\tl_use:N \l_tmpb_tl
}
{
\use:c {end #1}
}
\ExplSyntaxOff


This defines a single new environment repetition. The environment takes two arguments, a first mandatory one which is the name of the environment to be repeated, and a second optional one which is the label of the environment to be repeated.

The way it works is as follows. When, say, \begin{proposition} is invoked then eventually the command \proposition is executed. This is a token list consisting of the basic theorem-builder and three arguments which set up how that basic theorem-builder will behave. The first sets the style, so we want to keep that. The second says which counter to use, so we want to throw that away. The third says what the title text should be, so we want to modify that slightly if we're given a label. The L3 stuff does that modification before invoking the token list and thus starting the theorem-builder on its merry way.

Another simple solution that works in simple circumstances:

After the other theorem environments are defined,

\theoremstyle{empty}
\newtheorem{duplicate}{NameIgnored}


Then in the body of the document

\begin{theorem}[My theorem tile]
\label{thm:worth.repeating}
An insightful truth.
\end{theorem}


and elsewhere

\begin{duplicate}[Theorem~\ref{thm:worth.repeating} (My theorem title)]
An insightful truth (again).
\end{duplicate}

• I couldn't format the duplicate of the tcolorbox theorem. See How to restate a theorem keeping the same number? Jan 12, 2017 at 1:28

Here's an answer, maybe not that fancy like others but it just works.

Use your favorite theorem enviroment and then replicate that enviroment attaching the reference.

For example:

...
\begin{document}

{\bf Theorem \ref{theo1}.} {\it This is my theorem}

\begin{theorem}\label{theo1}
This is my theorem
\end{theorem}

\end{document}

• Ok. I get it, thaks. Feb 3, 2021 at 23:33