\usepackage{amsthm} \newtheorem{lemma}{Lemma} \begin{lemma}% \label{thm:foo} Foo \end{lemma} \ref{thm:foo}