3

Consider the following definition of the proof environment:

\renewenvironment{proof} % so we can use wrap fig in proofs
    {\noindent\emph{Proof.}} % close enough?
    {\qed\vskip\topsep} % close enough?

Is this, in fact, close enough? Why does amsthm use some scary magic that mere mortals like me will never understand? Why does LNCS use different but equally scary magic? Is this question even answerable?

7

Trivlist handles many things not handled by the simpler version for example

xxx
\begin{proof}
zzz
\end{proof}

xxx
\begin{proof}

zzz
\end{proof}

you need to correctly handle ending the previous paragraph, you need to handle the case that the proof starts with a blank line or a nested list, you need to avoid a page break after the Proof heading and before the actual proof.

You need to handle the positioning of the QED mark including tricky cases like the proof ending with a list or display math.

  • So, basically, 999 corner cases. But in that case, I take it that the above definition is a perfectly acceptable "poor man's proof environment", so long as you make sure to never do things like that. For instance, the following two rules should hopefully be enough: (1) proof starts right after theorem ends, and (2) Proof begins with plain text. Right? – Mark Jul 6 '16 at 21:48
  • 1
    @Mark Not really: it allows a page break after the heading which really is a fail for any command producing a heading. – David Carlisle Jul 6 '16 at 21:50
  • Shouldn't basic widow/orphan control take care of that? – Mark Jul 6 '16 at 23:06
  • @Mark setting those controls just for the first paragraph and setting them back automatically after that paragraph isn't that basic, and since the definition of proof in amsthm is only 10 lines long likely to be more complicated than the "complicated" definition that you are replacing if you don't reference the trivlist mechanism for that. – David Carlisle Jul 6 '16 at 23:52
  • 1
    @Mark it may be good enough for some class of documents but in the default settings latex uses higher penalties than normal in this situation, and and then resets them after the first paragraph, also prevents a break if the proof environment content starts with a blank line, or a list etc. I'm not sure what you are asking, clearly you can do something else but you asked why latex uses trivlist and basically that's why. – David Carlisle Jul 7 '16 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.