In my TeX file I have a something like this:
\newcommand{\head}[2]{
\textbf{#1 \imp:} \textit{#2}\\
}
\newcommand{\definition}[1]{
\head{Definition}{#1}
}
\newcommand{\lemma}[1]{
\head{Lemma}{#1}
}
As I write my lemmata and definitions it is hard to keep track of them. So I'd like to use labels. And then I'd love to write something like this
According to Lemma 3 we know that ....
Where Lemma 3 is filled in on the fly by nameref, so that I'd only have to write this
According to \nameref{lemma_cook} we know that .....
I tried to use labels and references but they only work within sections, figures and stuff that can be enumerated. Is there a way to adjust my new commands to make this possible (put them in an enumerable environment, use a virtual counter, use hyperref package, ...)?

\newtheorem. – egreg Dec 15 '13 at 10:54