[Tex/LaTex] Creating “Proof of Theorem X” Using the LLNCS Document Class

cross-referencinglncstheorems

I have the following working example.

\RequirePackage{amsmath}
\documentclass{llncs}

\begin{document}

\begin{theorem}
\label{thm:ex}
A very important result.
\end{theorem}

Some comments here \ldots

\begin{proof}[Proof of Theorem \ref{thm:ex}]
It follows by inspection.
\end{proof}

\end{document}

This produces "Proof (Proof of Theorem 1)." as opposed to just "Proof of Theorem 1." – I was trying to mimic the solution here How can I create a "Proof of Theorem x.xx" header for a proof environment?, which does not appear to work with the LLNCS class. What's the simplest way to do this? I am trying to avoid using many additional packages, as instructed by the conference.

Edit: In my paper, I also have things like "Theorem 1 (Bob [2]).", which I would like to keep as is… so I need to make sure that the solution proposed does not effect such things.

Best Answer

When there is an optional argument, the header (label) of unnumbered theorem-style environments is defined by the \@Opargbegintheorem macro.

Add:

\makeatletter
\renewcommand{\@Opargbegintheorem}[4]{%
  #4\trivlist\item[\hskip\labelsep{#3#2\@thmcounterend}]}
\makeatother

in the preamble of the document.

enter image description here

\documentclass{llncs}

\makeatletter
\renewcommand{\@Opargbegintheorem}[4]{%
  #4\trivlist\item[\hskip\labelsep{#3#2\@thmcounterend}]}
\makeatother

\begin{document}

\begin{theorem}\label{thm:ex}
  A very important result.
\end{theorem}

\begin{theorem}[Bob]
  Another very important result.
\end{theorem}

\begin{proof}
  Clear.\qed
\end{proof}

Some comments here \ldots

\begin{proof}[Proof of Theorem \ref{thm:ex}]
  It follows by inspection.\qed
\end{proof}

\end{document}