[Tex/LaTex] Lemmas and sub sections

theoremsthesis

I want to write a LaTeX code to show,

Lemma 1 : x+y=z
Lemma 1.1:  z-r+t=3
Lemma 1.2:   q=r

How do I do that?

Best Answer

Using amsthm package

Update: per Gonzalo Medina's suggestion, using the following definition which make the sublemma counter subsidiary to the lemma counter:

\newtheorem{lemma}{Lemma}
\newtheorem{sublemma}{Lemma}[lemma]

such that the following code:

\begin{lemma}
x+y=z
\end{lemma}
\begin{sublemma}
z-r+t=3
\end{sublemma}
\begin{sublemma}
q=r
\end{sublemma}

\begin{lemma}
x+y=z
\end{lemma}
\begin{sublemma}
z-r+t=3
\end{sublemma}
\begin{sublemma}
q=r
\end{sublemma}

will give you:

enter image description here

EDIT: If you want to number your theorem with correspondence to the section it belongs to, use these definition instead:

\newtheorem{lemma}{Lemma}
\newtheorem{sublemma}{Lemma}[section]

Then check out the example:

\section{Math}
\begin{document}
\begin{lemma}
x+y=z
\end{lemma}
\begin{sublemma}
z-r+t=3
\end{sublemma}
\begin{sublemma}
q=r
\end{sublemma}

\section{More Math}
\begin{lemma}
x+y=z
\end{lemma}
\begin{sublemma}
z-r+t=3
\end{sublemma}
\begin{sublemma}
q=r
\end{sublemma}

which gives you:

enter image description here

Related Question