When using either the ntheorem or the amsthm package to declare theorem-like environments, it's important to make use of the following rules of syntax when using \newtheorem:
If you want the counter of a theorem-like environment to be subordinate to, say, the section number, use a directive such as
\newtheorem{theorem}{Theorem}[section]
i.e., the option [section] (the name of the "parent counter") should come at the end.
If, on the other hand, you want the theorem-like environment (say, corollary) to share a counter with an already-existing environment (say, theorem), use the following syntax:
\newtheorem{corollary}[theorem]{Corollary}
i.e., i..e, the option [theorem] (the name of the "shared counter") should be placed between the environment name and the way the environment's name should be typeset.
The output of a full MWE:
\documentclass{article}
\usepackage{ntheorem}
\theoremstyle{theorem}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\begin{document}
\setcounter{section}{1}
\begin{theorem} a \end{theorem}
\begin{proposition} b \end{proposition}
\begin{definition} c \end{definition}
\begin{example} d \end{example}
\begin{remark} e \end{remark}
\begin{lemma} f \end{lemma}
\end{document}
Best Answer
Using
amsthm
packageUpdate: per Gonzalo Medina's suggestion, using the following definition which make the sublemma counter subsidiary to the lemma counter:
such that the following code:
will give you:
EDIT: If you want to number your theorem with correspondence to the section it belongs to, use these definition instead:
Then check out the example:
which gives you: