[Tex/LaTex] Space before proof

amsthmspacingtheorems

I am trying to make LaTeX put no additional space between theorem and proof.
Here is my code:

\newtheorem*{pr3}{Theorem}
\begin{pr3}
   foo                                             
\end{pr3}
\begin{proof}[Proof:]
   bar
\end{proof}

Is there a way to do that only with amsthm/amsmath and how? I wanted to renewenvironment proof, however I couldn't find what is the best way to do that. So it would be great if someone can tell me where I can find such information (that could also be considered answer to the first question).

Best Answer

You probably don't want to remove the space after the proof, so the way should be

\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
  \vspace{-\topsep}% remove the space after the theorem
  \pushQED{\qed}%
  \normalfont
  \topsep0pt \partopsep0pt % no space before
  \trivlist
  \item[\hskip\labelsep
        \itshape
    #1\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
  \addvspace{6pt plus 6pt} % some space after
}
\makeatother

However a proof environment not preceded by a theorem will be typeset wrongly.

Related Question