# Define a new environment based on “proof”

I want to change the word "Proof" as in \begin{proof}...\end{proof} to "Solution". I found out that \begin{proof}[Solution]...\end{proof} could do the trick. But is there a way to define a new environment \begin{solution}...\end{solution} to make it automatic. I only need to change the word "Proof -> Solution". Everything else should stay the same.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}

\begin{document}
\begin{theorem}
$A^2=B^2+C^2$
\end{theorem}
\begin{proof}
$A=1, B=1, C=0$
\end{proof}

\begin{theorem}
$D^2=E^2+F^2$
\end{theorem}
\begin{proof}[Solution]
$D=1, E=1, F=0$
\end{proof}
\end{document}


• Please show a short compilable code you have tried so far ... – Mensch Jan 5 '19 at 4:33

Just wondering if you are only looking for

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newenvironment{solution}{\begin{proof}[Solution]}{\end{proof}}
\begin{document}
\begin{theorem}
$A^2=B^2+C^2$
\end{theorem}
\begin{proof}
$A=1, B=1, C=0$
\end{proof}

\begin{theorem}
$D^2=E^2+F^2$
\end{theorem}
\begin{solution}
$D=1, E=1, F=0$
\end{solution}