When writing a proof, I often need to include a claim, for which I've defined a separate environment. In my current set up, claims are numbered successively, with the numbering resetting within every proof. This is achieved by the following code in my preamble:
\newcounter{proofcount}
\newtheorem{claim}{Claim}
\makeatletter
\@addtoreset{claim}{proofcount}
\makeatother
\AtBeginEnvironment{proof}{\stepcounter{proofcount}}
\theoremstyle{remark}
\makeatletter
\newtheorem*{cproof/}{Proof of claim \rev@cproofmark}
\newenvironment{cproof}[1][\@nil]
{\def\@tmp{#1}%
\ifx\@tmp\@nnil
\def\rev@cproofmark{\theclaim}%
\else
\let\rev@cproofmark\@tmp
\fi
\renewcommand{\qedsymbol}{$\dashv$}%
\pushQED{\qed}\begin{cproof/}}
{\popQED\end{cproof/}}
\makeatother
Now, if there is only one proof in my claim, the above renders said claim as "Claim 1", which looks (to me) strange; I'd rather it just say "Claim". Of course, I could achieve this by having a separate environment for unnumbered claims, and use that when my proof only requires a single claim, but I was wondering if there's a way of automating the process? That is, have a single claim environment such that, within each proof, if there's only one claim, the claim is not numbered, and if there's more than one, they're numbered Claim 1, Claim 2, etc.
To clarify, if I write something like:
\begin{proof}
Proof starts.
\begin{claim}
This is a claim.
\end{claim}
\begin{cproof}
This is the proof the claim.
\end{cproof}
Main proof continues.
\end{proof}
\begin{proof}
Proof starts.
\begin{claim}
This is a claim.
\end{claim}
Proof continues.
\begin{cproof}
This is the proof the claim.
\end{cproof}
Main proof continues.
\begin{claim}
This is a claim.
\end{claim}
\begin{cproof}
This is the proof the claim.
\end{cproof}
Main proof continues.
\end{proof}
I get:
I would like "Claim 1" in the first proof to appear as "Claim". I can achieve this by having a different environment for unnumbered claims in my preamble, but I was wondering if there's a way of automating this and only using one environment.