2

Suppose we have defined a lemma environment with the amstheorem package. And suppose the proof environment is available via the ams packages. Please consider this example.

\begin{lemma}
\label{lem:euler}
Euler is the greatest mathematician of all times.
\end{lemma}
\begin{proof}[Proof of Lemma~\ref{lem:euler} under the additional assumption that there
exists a unique mathematician of all times and that this unique mathematician of all times
has a magnitude]
Indeed, under the above assumption, the magnitude is given by the greatness. But if there
is only one mathematician, he is automatically the greatest. Since Euler was a mathematician,
we are done.
\end{proof}

When coding such long proof headers, I have many problems.

  • It may happen that the proof header is longer than a line. It will not fit in a line but it does not break automatically.

  • I cannot use display math in the proof header.

  • I have no problem with the obligatory period at the end. For several sentences, I can omit the last period manually. No deal!
  • Even if the header fits in a line but is close to the end, and I start writing my paragraph inside the proof, that new paragraph will not spread out nicely, but rather goes over the margin (with an overfull boxes madness). It does not help to insert newline manually. The text simply does not spread out, but is left aligned.
  • Suppose I want to start a new line after the long header, the best I know to do is \mbox{}\newline because a simple newline is not recognized as a line directly after [text] (->warning).

How can I avoid these problems? How do I typeset this correctly? I thank everyone for suggestions!

2

I'd avoid long labels. Anyway, here's how you can do.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[]
  {\itshape #1\@addpunct{.}}\hskip\labelsep\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
\makeatother

\newtheorem{lemma}{Lemma}

\begin{document}

\begin{lemma}\label{lem:euler}
Euler is the greatest mathematician of all times.
\end{lemma}


\begin{proof}[Proof of Lemma~\ref{lem:euler} under the additional assumption that there
exists a unique mathematician of all times and that this unique mathematician of all times
has a magnitude]
Indeed, under the above assumption, the magnitude is given by the greatness. But if there
is only one mathematician, he is automatically the greatest. Since Euler was a mathematician,
we are done.
\end{proof}

\end{document}

enter image description here

  • Thanks! I will try out your solution tomorrow! – user66288 Oct 19 '18 at 17:34

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.