# How to enable line breaking in the standard proof environment with amsmath?

I want to redefine the proof so it accepts linebreaks in the name

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


However, I can't find a solution.

I want the exact same behavior with that environment, but, so I can write long lines in the name (the optional argument). Is it possible? How?

MWE

\documentclass{scrartcl}
\usepackage{amsthm}
\begin{document}
\begin{proof}[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.]
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{proof}
\end{document}


As you see from the original definition, proof from amsthm typesets its title as the argument for \item and this prevents line breaking; you can change this by redefining proof:

\documentclass{scrartcl}
\usepackage{amsthm}

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
\item\relax
{\itshape

• I'd prefer \item\relax or even \item alone, as a brace follows. – egreg Mar 2 '14 at 17:27