# Duplicating the amsthm proof environment

I am currently writing up some lecture notes and would like to have therefore a "\solution" environment which should work basically as the amsthm \proof environment, just writing "Solution." instead of "Proof." at the begin of a solution of an exercise. Of course I can achieve this by switching with

\renewcommand{\proofname}{Solution.}


resp.

\renewcommand{\proofname}{Proof.}


at the appropriate places. While this is working, I would find it nice to have a proper \solution environment which just replicates the \proof environment. Is there an easy way to do this?

Yes, there's an easy way. You can define your solution environment with "Solution" as the optional argument for proof:

\documentclass{article}
\usepackage{amsthm}

\newenvironment{solution}
{\begin{proof}[Solution]}
{\end{proof}}

\begin{document}

\begin{proof}
test.
\end{proof}

\begin{solution}
test.
\end{solution}

\end{document}


• My problem with this answer is that if I want to leave the environment empty (so that students can write their solution in the space), the word solution slips to the bottom. You can see this when you write (with your definition of solution ) \begin{solution} \vspace{1in} \end{solution} – Máté Wierdl Mar 27 '19 at 1:15