Welcome to the UK List of
TeX Frequently Asked Questions
on the Web

Searching

The index of Frequently Asked Questions about TeX is searchable.

Please enter your keyword here:   then press here: ,    or:
Google

Proof environment

It has long been thought impossible to make a proof environment which automatically includes an ‘end-of-proof’ symbol. Some proofs end in displayed maths; others do not. If the input file contains ...\] \end{proof} then LaTeX finishes off the displayed maths and gets ready for a new line before it reads any instructions connected with ending the proof, so the code is very tricky. You can insert the symbol by hand, but the ntheorem package now solves the problem for LaTeX users: it does indeed provide an automatic way of signalling the end of a proof.

The AMSLaTeX package amsthm also provides a proof environment that does the job; though you need to insert a \qedhere command if the proof ends with a displayed equation:

\begin{proof}
  text...
  \begin{equation*}
    maths... \tag*{\qedhere}
  \end{equation*}
\end{proof}

The \tag*{\qedhere} construction may be used in any of AMSLaTeX’s numbering environments.

amsthm.sty
Distributed as part of the AMSLaTeX bundle macros/latex/required/amslatex (or browse the directory); catalogue entry
ntheorem.sty
macros/latex/contrib/ntheorem (or browse the directory); catalogue entry


Go to previous question, or next question.

Go to FAQ home.

URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=proof

Comments, suggestions, or error reports? - see “how to improve the FAQ”.

This is FAQ version 3.19d, last modified on 2010-04-07.