Different proofs in amsmath with different QED symbol?
Here is a direct solution just using the AMS packages. We set up a new environment myproof
, which is proof
but containing a redefinition of the \qedsymbol
.
\documentclass{article}
\usepackage{amsthm,amsmath,amssymb}
\newcommand*{\myproofname}{My proof}
\newenvironment{myproof}[1][\myproofname]{\begin{proof}[#1]\renewcommand*{\qedsymbol}{\(\blacksquare\)}}{\end{proof}}
\begin{document}
\begin{proof}
Usual proof.
\end{proof}
\begin{myproof}
New proof style.
\end{myproof}
\begin{proof}[Short]
Standard proof
\begin{equation*}
a = b. \qedhere
\end{equation*}
\end{proof}
\begin{myproof}[Short new style]
New proof style
\begin{equation*}
a = b. \qedhere
\end{equation*}
\end{myproof}
\end{document}
I also tend to use ntheorem
as Bernard show. Just wanted to add how I'd do this with amsthm
:
\documentclass[a4paper]{memoir}
\usepackage{amsthm}
\newenvironment{proof*}[1][\proofname]{
\renewcommand\qedsymbol{\rule{3mm}{3mm}}
\begin{proof}[#1]}{\end{proof}}
\begin{document}
\begin{proof}
sfadf
\end{proof}
\begin{proof}[Proof of ...]
sfadf
\end{proof}
\begin{proof*}
asdfsf
\end{proof*}
\begin{proof*}[Proof of ...]
sfadf
\end{proof*}
\end{document}
This is quite easy with the ntheorem
package. Moreover, it manages correctly the placement of end-of-proof symbols when the proof ends in a displayed equation. I added the cleveref
package to show how it manages reference types (if the cited theorem were to become a proposition, for instance, its reference would be changed accordingly):
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[thmmarks, amsmath, thref]{ntheorem}
\usepackage{cleveref}
\theoremstyle{plain}
\theoremheaderfont{\bfseries}
\theoremseparator{.}
\theorembodyfont{\itshape}
\newtheorem{theorem}{Theorem}
\theoremstyle{nonumberplain}
\theoremheaderfont{\scshape}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\square}}
\newtheorem{proof}{Proof}
\theoremsymbol{\ensuremath{\blacksquare}}
\newtheorem{blackproof}{Proof}
\begin{document}
\begin{theorem}[Some theorem]\label{thm:some-theorem}
This is an important theorem.
\end{theorem}
\begin{proof}
This is a very important proof.
\end{proof}
\begin{proof}[of \cref{thm:some-theorem}]
This is a very important proof.
\end{proof}
\begin{blackproof}[of \cref{thm:some-theorem}]
This is a very important proof.
\begin{align*}
a & = b\\ c & = d.
\end{align*}
\end{blackproof}
\end{document}