[Tex/LaTex] Preventing the “end square” of proof environment to be alone on a newpage after an enumeration

amsthmpage-breakingtheorems

I have something like (with the packages amsthm and document class book):

\begin{proof}  
blabla  
\begin{itemize}  
\item blabla  
\item blabla  
\end{itemize}  
\end{proof}

The problem is, that ends on the bottom on a page and the square marking the end of the proof is alone on the next page. How can I avoid such behavior?

Best Answer

this is what the command \qedhere is meant for with amsthm:

\begin{proof}
blabla
\begin{itemize}
\item blabla
\item blabla \qedhere
\end{itemize}
\end{proof}

it should be placed on the last line of the last \item.

it also works when the proof ends with display math, placed just before the \end{...} command of the "main" environment. (there may be some disagreement over the vertical positioning in this case; for example, if the last line includes cases, the box will be placed on the main baseline of that line, which is not the last line of the cases environment.)