2

I'm using the following code to generate the "lemma" functionality in my document:

\newtheorem{lemma}[theorem]{Lemma}

However, the first lemma I define appears as Lemma 0.1. I tried using the \setcounter{lemma} command to change the count, but it didn't work. I want to be able to set the counter so that the first lemma I define appears as Lemma 5.1. Note that I'm not working with sections or any other partitioning like that, so the 5 is somewhat arbitrary.

2
  • And how is theorem defined? Which document class are you using? This information is relevant, since the counter for your lemmas shares the counter for the theorems. Commented Apr 25, 2014 at 1:58
  • You say "Note that I'm not working with sections or any other partitioning like that, so the 5 is somewhat arbitrary." Wouldn't that be confusing for a reader? Usually when the reader sees "Lemma 5.1", the "5" refers to a sectional unit or to another structure in your document. Commented Apr 25, 2014 at 2:02

1 Answer 1

7

Since you have defined the lemma structure using

\newtheorem{lemma}[theorem]{Lemma}

this implies that lemmas will share the counter for theorems and, unfortunately, the question doen't give information about how exactly the theorem structure was defined. Seeing the form of the counter, however, one can guess that the definition for theorems must be something along the lines of

\newtheorem{theorem}{Theorem}[section]

where, instead of [section] it could be [chapter] or similar. In this case, the representation for the counter for lemmas will have a prefix: the counter declared in the second optional argument for theorems and this is the counter you have to change:

\documentclass{article}
\usepackage{amsthm}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}

\begin{document}

\begin{lemma}
test
\end{lemma}

\setcounter{section}{5}
\begin{lemma}
test
\end{lemma}

\end{document}

enter image description here

1
  • @RyanPeden You're welcome! Don't forget that you can accept answers that you consider solved your problems by clicking the checkmark to their left; in case of doubt, please see How do you accept an answer?. Commented Apr 25, 2014 at 14:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .