# Different proofs in amsmath with different QED symbol?

I'm trying to expand the amsmath package to get two different proof environments:

• \begin{proof} ... \end{proof} and
• \begin{proof*} ... \end{proof*}

so proof* should act exactly like proof except of the QED Symbol. proof should provide be a blacksquare while proof* provides the normal square.

I found

\let\proof*\proof


and

\renewcommand{\qedsymbol}{$\blacksquare$}


in some questions but this changes every QED symbol. Any advice?

-
Not an answer/advice: \let\proof*\proof is wrong, it will let \proof be * and then use \proof which is equal to *. In case you want to copy something like that (for some reason), with etoolbox you can \cslet{proof*}\proof. – Manuel Jul 18 '14 at 10:41
I think there's a seperate command for this. Consider thmtools, there's a good example that I found in the tex.stackexchange.com/a/35093/44160 (Show off your LaTeX skills), which uses gridenv for QED-symbols but other theorems without it. – 1010011010 Jul 18 '14 at 10:43
ok i used  \usepackage{etoolbox} \cslet{proof*}\proof \renewenvironment{proof*}{{\qedsymbol}}{$\blacksquare$}  but now proof* doesn't provide a linebreak behind the \blacksquare. so it doesn't act like proof :( – Frank Jul 18 '14 at 10:53
Add in a \par after the last dollar sign? :D – 1010011010 Jul 18 '14 at 11:00
@ Frank I did not meant you to do so, just explained that it didn't do what you expected (although I don't see a reason to do so, as seen in the answers, it's not needed). @1010011010 What is that? \let\bs{… wil let \bs to be exactly {. \let command only picks the first two tokens, no a group {…} – Manuel Jul 18 '14 at 11:15

Here is a direct solution just using the AMS packages. We just set up a new environment, 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}

-

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}
\theoremseparator{.}
\theorembodyfont{\itshape}
\newtheorem{theorem}{Theorem}

\theoremstyle{nonumberplain}
\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}


-
You add a lot of packages to most of your answers, although it's not wrong, I think it's not desired. Since you remove some clarity on the answer, and new users may not know which package does what and just copy all of them to their “never ending template”. – Manuel Jul 18 '14 at 11:18
@Manuel: Sorry, I simply slighly modified an old file, and forgot to remove fonts loading. I'll delete it at once ( but leave the image as is, I think it's unimportant). – Bernard Jul 18 '14 at 11:23
No need to “sorry”, I was just pointing that out because it was my opinion. I like your fourierised answers, by the way :) – Manuel Jul 18 '14 at 11:26

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}
\end{proof}

\begin{proof}[Proof of ...]
\end{proof}

\begin{proof*}
asdfsf
\end{proof*}

\begin{proof*}[Proof of ...]
\end{proof*}

\end{document}

-
You don't need etoolbox or \ifblank if you use \newenvironment{proof*}[1][\proofname]{…} you just pass #1 to \begin{proof}[#1] and it automatically works. – Manuel Jul 18 '14 at 11:22
@Manuel, your're right, updated – daleif Jul 18 '14 at 11:33

Here's a solution with thmtools

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

\declaretheoremstyle[
spaceabove=6pt plus 6pt,
spacebelow=6pt plus 6pt,
bodyfont=\normalfont,
qed=\protect\thisproofqed,
]{proof}

\declaretheorem[
name=\protect\thisproofname,
style=proof,
numbered=no,
]{gproof}

\newcommand\thisproofname{}
\newcommand\thisproofqed{}

\renewenvironment{proof}[1][\proofname]
{\renewcommand\thisproofname{#1}%
\renewcommand\thisproofqed{$\blacksquare$}%
\gproof}
{\endgproof}

\newenvironment{proof*}[1][\proofname]
{\renewcommand\thisproofname{#1}%
\renewcommand\thisproofqed{\openbox}%
\gproof}
{\endgproof}

\begin{document}

A starred proof follows.

\begin{proof*}
Something.
\end{proof*}

An unstarred proof follows.

\begin{proof}
Something.
\end{proof}

A starred proof follows.

\begin{proof*}
Something.
\end{proof*}

Let's see if we can nest them.

\begin{proof*}
Something depending on a lemma.
\begin{proof}[Proof of the lemma]
Wow!
\end{proof}
The end.
\end{proof*}

\end{document}


The advantage is of not using ntheorem and so being able to use \qedhere as provided by amsthm.

-