I am using amsthm
\usepackage{amsthm}
\newtheorem{thm}{Theorem}[chapter]
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
and algorithm
\usepackage{algorithm, algpseudocode}
\makeatletter
\renewcommand\thealgorithm{\thechapter.\arabic{algorithm}}
%\@addtoreset{algorithm}{chapter}
\makeatother
In my text I have everything numbered consecutively in each chapter (Definition 3.1, Lemma 3.2, Theorem 3.3) except for the algorithms which have separate counter (Definition 3.1, Lemma 3.2, Algorithm 3.1, Theorem 3.3). How can I make it so that algorithms are numbered together with everything else? (Definition 3.1, Lemma 3.2, Algorithm 3.3, Theorem 3.4)
[algorithm]in all your\newthoremso they use that instead ofthm– David Carlisle May 11 '15 at 18:57