Here is a visual representation of what I am talking about:
How do I make it so that at each proof, the counter resets to (1)?
Thank you for your answer.
The simplest thing to do would be to create your own proof environment that resets the equation number:
\newenvironment{myproof}{\setcounter{equation}{0}\begin{proof}}{\end{proof}}
Or, if preferred, save the current equation number going into the proof so it can be restored afterwards:
\newcounter{savenumber}
\newenvironment{myproof}{%
\setcounter{savenumber}{\value{equation}}\setcounter{equation}{0}%
\begin{proof}}%
{\end{proof}%
\setcounter{equation}{\value{savenumber}}%
}
Example use and output
%\usepackage{amsmath} % preamble
%\usepackage{amsthm} % preamble
\begin{document}
\begin{equation}
x=1
\end{equation}
\begin{equation}
x=2
\end{equation}
\begin{myproof}
\begin{equation}
x=3
\end{equation}
\end{myproof}
\begin{equation}
x=4
\end{equation}
\end{document}
Both are likely confusing to a reader and the hyperref
package will complain (and not be able to correct link each equation), if you are using that. A better approach would be to add a visual identifier (and one for hyperref
, if applicable) for equations in your new proof environment, such as:
\newcounter{savenumber}
\newenvironment{myproof}{%
\renewcommand{\theequation}{p.\arabic{equation}}% Visual identifier
% \renewcommand{\theHequation}{p.\arabic{equation}}% Uncomment if using hyperref
\setcounter{savenumber}{\value{equation}}\setcounter{equation}{0}%
\begin{proof}}%
{\end{proof}%
\setcounter{equation}{\value{savenumber}}
}
Then
\newtheorem{theorem}{Theorem}
in preamble.