# A question on the proof environment of amsthm

I would like to alternate between two proof environments under the amsthm package, e.g. distinguished between \begin{proof1} ... \end{proof1} and \begin{proof2} ... \end{proof2}. In these I want to use different end signs like QED or $\blacksquare$.

How may I do this?

• You've been here some time already: Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. In particular: The term and concept of MWE should be known ;-) – user31729 Jul 25 '15 at 13:36
• @Christian Hupfer My question is perfectly intelligible without a MWE, and so much so that it already got a perfectly acceptable answer. Some times a MWE may just obfuscate matters. – Sapiens Jul 25 '15 at 13:41
• I think it's better for non-high-rep users to understand your question, to provide a MWE, but it's your choice, of course. – user31729 Jul 25 '15 at 13:48
• OK I will attempt to remember that. – Sapiens Jul 25 '15 at 13:52

You can define a proofi environment based on proof but making the desired redefinition for the \qedsymbol:

\documentclass{article}
\usepackage{amsthm}
\usepackage{amssymb}

\newenvironment{proof1}[1][\proofname]
{\begin{proof}[#1]\renewcommand\qedsymbol{$\blacksquare$}}
{\end{proof}}
\newenvironment{proof2}[1][\proofname]
{\begin{proof}[#1]\renewcommand\qedsymbol{\textsc{qed}}}
{\end{proof}}

\begin{document}

\begin{proof}
Test text.
\end{proof}

\begin{proof1}
Test text.
\end{proof1}

\begin{proof2}
Test text.
\end{proof2}

\end{document}


With xparse, you can easily set another optional argument allowing to specify the symbol, if desired; something along these lines:

\documentclass{article}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{xparse}

\NewDocumentEnvironment{proofi}{d()O{\proofname}}
{\begin{proof}[#2]\IfNoValueTF{#1}{}{\renewcommand\qedsymbol{#1}}}
{\end{proof}}

\begin{document}

\begin{proofi}
Test text.
\end{proofi}

\begin{proofi}($\blacksquare$)
Test text.
\end{proofi}

\begin{proofi}(\textsc{qed})
Test text.
\end{proofi}

\end{document}


Or, redefining proof:

\usepackage{letltxmacro}
\usepackage{xparse}

\LetLtxMacro\oldproof\proof
\let\oldendproof\endproof

\RenewDocumentEnvironment{proof}{d()O{\proofname}}
{\oldproof[#2]\IfNoValueTF{#1}{}{\renewcommand\qedsymbol{#1}}}
{\oldendproof}