7

I am looking to number my corollaries similarly to how Serre does it. His corollary numbers mirror the Lemma or Proposition which they follow. For example:

Section 1
Proposition 1
Corollary 1
Lemma 1.1
Corollary 1.1

Section 2
Lemma 2.1
Proposition 2
Lemma 2.2
Corollary 2.2A
Corollary 2.2B

How to do something similar in LaTeX? I am thinking something along the lines of:

\begin{lem}\label{l1}
...
\end{lem}
\begin{cor}\label{c1}\tag{\ref{l1}}
...
\end{cor}

However, this gives me a syntax error. [see full code below]

I also tried using reptheorem for this; however, it does not seem to be quite suited to this task; and I am not good enough at LaTeX coding to modify it to make it work here.

\documentclass[11pt]{amsart}
\usepackage{amsmath}
\newtheorem{lem}{Lemma}
\newtheorem{Lem}[lem]{Lemma}%*
\numberwithin{lem}{section}
\newtheorem{prop}{Proposition}
\newtheorem{Prop}[prop]{Proposition}
\newtheorem{Cor}{Corollary}%}[lem]{
\newtheorem{cor}[Cor]{Corollary}%*
\begin{document}
\section{asdf}
\begin{lem}\label{l1}
\end{lem}
\begin{prop}\label{p1}
\end{prop}
\begin{cor}\label{c1}\tag{\ref{l1}}
\end{cor}
\section{fdsa}
\begin{lem}\label{l2}
\end{lem}
\begin{prop}\label{p2}
\end{prop}
\begin{lem}\label{l2}
\end{lem}
\begin{cor}\label{c2}\tag{\ref{l2}A}
%\tag{asdf}
\end{cor}
\begin{cor}\label{c3}\tag{\ref{l2}B}
%\tag{asdf}
\end{cor}
\end{document}
Alex
  • 418
  • 3
  • 12
  • Please show us what you have tried so far, not only fragments –  Dec 31 '16 at 18:45
  • 1
    My computer with LaTeX does not have internet access, so I have to transfer to a different computer to give the code sample; also, I'm not sure how much use my attempt is, since it did generate a syntax error. However, due to your request, I spent 13 minutes to upload a code sample. Is this what you were looking for? – Alex Dec 31 '16 at 18:59
  • There doesn't seem to be any consistency in the numbering scheme for corollaries. It seems conditional on the number of corollaries per lemma? – Werner Dec 31 '16 at 19:01
  • @Werner Yes. Per Lemma, or per Proposition. That's the way Serre does it. – Alex Dec 31 '16 at 19:09
  • 1
    @Alex: Who is Serre? –  Dec 31 '16 at 19:09
  • @ChristianHupfer Jean-Pierre Serre, the famous 80-year-old mathematician... – Alex Dec 31 '16 at 19:12
  • 1
    @Alex... seems to be famous for strange numbering schemes ... perhaps useful in topology ;-) –  Dec 31 '16 at 19:14
  • @ChristianHupfer :) No, he's just a very perfectionist algebraist. My adviser recalled how when he met Serre, Serre upbraided him for saying "The following 10 lemmas" in a paper, instead of spelling the "ten" out; he said that when numerals are used, they have to denote mathematical objects... But in either case, that's irrelevant to how to make LaTeX repeat his numbering. Any ideas? – Alex Dec 31 '16 at 19:18
  • @Alex: So Lemmas (per section) and Propositions (stand-alone) are numbered differently, yet both have (possibly) sub-numbered Corollaries? – Werner Dec 31 '16 at 19:51
  • @Werner Yes, that is correct. I figured out how to number this before you posted; however, I'm now having trouble referring back to the numbers. See http://tex.stackexchange.com/questions/346499/how-to-refer-to-corollaries-numbered-by-lemmas – Alex Dec 31 '16 at 19:59
  • 2
    French mathematicians are known for their peculiar numbering systems, which seem to be devised very carefully in order that the reader is not able to find the statement from the reference. With due respect to one of the greatest mathematicians of the 20th century, I find this particular numbering system one of the silliest. On the other hand, I fully agree that ”the following 10 lemmas“ is wrong. – egreg Jan 01 '17 at 01:05

2 Answers2

1

Got it! With a modification to reptheorem.

\documentclass[11pt]{amsart}
\usepackage{amsmath}

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

\newtheorem{lem}{Lemma}
\newreptheorem{lem}{Corollary}
\newtheorem{Lem}[lem]{Lemma}%*
\numberwithin{lem}{section}
\newtheorem{prop}{Proposition}
\newreptheorem{prop}{Corollary}
\newtheorem{Prop}[prop]{Proposition}
\newtheorem{Cor}{Corollary}%}[lem]{
\newtheorem{cor}[Cor]{Corollary}%*
\begin{document}
\section{asdf}
\begin{lem}\label{l1}
\end{lem}
\begin{prop}\label{p1}
\end{prop}
\begin{repprop}{p1}
\end{repprop}
\section{fdsa}
\begin{lem}\label{l2}
\end{lem}
\begin{prop}\label{p2}
\end{prop}
\begin{lem}\label{l2}
\end{lem}
\begin{replem}[A]{l2}
\end{replem}
\begin{replem}[B]{l2}
\end{replem}
\end{document}
Alex
  • 418
  • 3
  • 12
1

Here's an implementation, which might be improved for cross-references.

\documentclass{amsart}

\newtheorem{propT}{Proposition}
\newtheorem{lemmaT}{Lemma}[section]
\newtheorem*{genericT}{\genericTname}

\newenvironment{prop}{\propT}{\endpropT\xdef\laststatement{\thepropT}}
\newenvironment{lem}{\lemmaT}{\endlemmaT\xdef\laststatement{\thelemmaT}}

\newenvironment{corollary}[1][]
 {\def\genericTname{Corollary \laststatement#1}\genericT}
 {\endgenericT}

\begin{document}

\section{asdf}
\begin{prop}
\end{prop}
\begin{corollary}
\end{corollary}
\begin{lem}
\end{lem}
\begin{corollary}
\end{corollary}

\section{fdsa}
\begin{lem}
\end{lem}
\begin{prop}
\end{prop}
\begin{lem}
\end{lem}
\begin{corollary}[A]
\end{corollary}
\begin{corollary}[B]
\end{corollary}
\end{document}

enter image description here

Personal comment. With due respect to one of the greatest mathematicians of the 20th century, this numbering scheme is silly. Especially devised for making it difficult to find a statement from a reference in the text: for instance, where the h*** will Proposition 24 be? Now add theorems: can you tell whether Proposition 18 is before or after Theorem 3? No, of course: you have no clue even about what section they are in. However, I've seen worse systems.

Addition

If you want to refer to corollaries with \label, I think this can work. Change the definition of corollary into

\makeatletter
\newenvironment{corollary}[1][]
 {%
  \def\genericTname{Corollary \laststatement#1}%
  \edef\@currentlabel{\laststatement#1}%
  \genericT
 }
 {\endgenericT}
\makeatletter

Now

\begin{corollary}[B]\label{whatever}

should make it possible to use \ref{whatever} and get “2.2B” (assuming the numbering of the example above).

egreg
  • 1,121,712
  • Might not work so well for a book-- but in a thesis, where I have 2-3 theorems each within their own section, and the rest are propositions, lemmas, and corollaries, this particular method is particularly useful. Cor 2.3B means the second Corollary to the third Lemma related to the second Theorem. The reason Propositions are numbered individually is, to make referencing them in future works easier, because they are major statements which are likely to be cited. +1 for the \laststatement – Alex Jan 02 '17 at 15:51
  • @Alex I fully disagree about the usefulness of this method. ;-) – egreg Jan 02 '17 at 15:54
  • So I tried to improve this for cross-references, and one problem is, \thecor is undefined for this implementation. How do I change the \refed-to underlying number? Alternatively, how do I access the optional parameter when I am doing \renewcommand{\thecor} using a traditional implementation? – Alex Jan 02 '17 at 22:10
  • @Alex It makes no sense to cross reference a corollary: reference its parent object. – egreg Jan 02 '17 at 22:36
  • But the "A" or "B" or "" might change as I move corollaries around. Then I would have to update all references when I move corollaries. – Alex Jan 02 '17 at 22:37
  • @Alex I added the proper code. I believe it works, but I'm surely not going to spend much more time on something I find hideous. – egreg Jan 02 '17 at 22:43
  • Yes, this worked. Should I update the original code? – Alex Jan 02 '17 at 22:51