How to obtain claim numbered within proof without changing the default look

I have a problem that I could not solve, even after looking around for a while on the site.

Quite simply, I do like how the following MWE looks like in terms of spacing, but I would like to have the claims numbered within each proof starting from 1.

\documentclass{article}
\usepackage{amsmath}%
\usepackage{amsthm}%
\usepackage{amsfonts}%
\usepackage{amssymb}%

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}

\theoremstyle{remark}
\newtheorem{claim}{Claim}

\begin{document}

\begin{theorem}
Bla
\end{theorem}

\begin{proof} There are some claims.
\begin{claim}
Bla
\end{claim}
\begin{claim}
Bla bla
\end{claim}
\end{proof}

\begin{theorem}
Bla
\end{theorem}

\begin{proof} There are some claims.
\begin{claim}
Bla
\end{claim}
\begin{claim}
Bla bla
\end{claim}
\end{proof}

\end{document}


The problem is that all the solutions I found modified in some way the present spacing between the objects, which is the default look.

Is it possible to avoid such a situation?

This may be what you want.

\usepackage{etoolbox}
\AtEndEnvironment{proof}{\setcounter{claim}{0}}


Here we reset the claim counter after each proof environment.

\documentclass{article}
\usepackage{amsmath}%
\usepackage{amsthm}%
\usepackage{amsfonts}%
\usepackage{amssymb}%

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}

\theoremstyle{remark}
\newtheorem{claim}{Claim}
%\numberwithin{claim}{theorem} %% <-- This is another alternative if you like little difference.
\usepackage{etoolbox}
\AtEndEnvironment{proof}{\setcounter{claim}{0}}
\begin{document}

\begin{theorem}
Bla
\end{theorem}

\begin{proof} There are some claims.
\begin{claim}
Bla
\end{claim}
\begin{claim}
Bla bla
\end{claim}
\end{proof}

\begin{theorem}
Bla
\end{theorem}

\begin{proof} There are some claims.
\begin{claim}
Bla
\end{claim}
\begin{claim}
Bla bla
\end{claim}
\end{proof}

\end{document}


• Clean and smooth. Great answer, thanks a lot! May 18 '16 at 4:27
• Just wondering, a sudden curiosity. In case I would like to have only one unnumbered claim, how could I obtain it? (e.g. assume that in theorem 2 there is only one claim, which I would leave unnumbered) Thanks a lot, and sorry for the late curiosity. May 18 '16 at 4:38
• @Kolmin \newtheorem* is for such purposes. Declare \newtheorem*{myclaim}{Claim} and then \begin{myclaim}...\end{myclaim} will not be numbered.
– user11232
May 18 '16 at 8:58
• since you're using amsthm, you should be able to use \qedhere before the last \end{claim} to move the tombstone up to the last line, not have it on a line by itself. May 18 '16 at 14:19
• @HarishKumar: Thanks a lot! I knew I could do it in such a way, but I thought that maybe there was another option. May 18 '16 at 16:06