I would like to have different versions of the same theorem or definition. So version 0 of definition 1 would be called "Definition 1.0" and version 1 would be called "Definition 1.1". The file below returns the error TeX capacity exceeded, sorry [input stack size=5000]. on compilation. What am I doing wrong?
I copied the relevant code from here and changed some of the details:
\documentclass[12pt]{article}
\usepackage{amsthm}
\usepackage{amsmath}
\newcounter{dfn}[section]
\newcounter{dfnv}
\makeatletter
\@namedef{thedfnv}{\@nameuse{thedfn}.\arabic{dfnv}}
\makeatother
\newtheorem{dfn}[dfnv]{Definition}
\begin{document}
\section{First section}
\begin{dfn}% Should display as Definition 1.0
Version 0 of the definition of foo.
\end{dfn}
\begin{dfn}% Should display as Definition 1.1
Version 1 of the definition of foo.
\end{dfn}
\stepcounter{dfn}
\begin{dfn}% Should display as Definition 2.0
Version 0 of the definition of bar.
\end{dfn}
\begin{dfn}% Should display as Definition 2.1
Version 1 of the definition of bar.
\end{dfn}
\stepcounter{dfn}
\end{document}

dfn, for the theorem type and the counter. I'm not putting this as an answer because I don't know why it's a problem. – Joshua Meyers May 26 '17 at 05:11