Proof-like environment

Package amsthm has three styles: plain (title is in \bfseries and body is in \itshape), definition (title is in \bfseries and body is in \rmfamily) and remark (title is in \itshape and body is in \rmfamily). All of them come with starred versions, which do not use a counter.

\documentclass[a4paper,11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{amsthm}

\newtheorem{theorem}{Theorem}
\newtheorem{question}{Question}
\theoremstyle{remark}
\newtheorem*{solution}{Solution}


\begin{document}

\begin{question}
Some question here
\end{question}

\begin{solution}
Here goes the solution to the question
\end{solution}

\begin{theorem}
Some theorem or formula to derive here
\end{theorem}

\begin{proof}
Here goes the proof to the question
\end{proof}

\end{document}

Here is another way if you like to see the QED symbol at the end of the solution.

\documentclass[a4paper,11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{amsthm}

\newtheorem{theorem}{Theorem}
\newtheorem{question}{Question}

\newenvironment{solution}{\renewcommand{\proofname}{Solution}\begin{proof}}{\end{proof}}


\begin{document}

\begin{question}
Some question here
\end{question}

\begin{solution}
Here goes the solution to the question
\end{solution}

\begin{theorem}
Some theorem or formula to derive here
\end{theorem}

\begin{proof}
Here goes the proof to the question
\end{proof}

\end{document}

enter image description here


Original proof copied and modified:

\documentclass[a4paper,11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsthm}

\newtheorem{theorem}{Theorem} % PS
\newtheorem{question}{Question}

\makeatletter
\newenvironment{solution}[1][\solutionname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
%<amsbook|amsproc>  \itemindent\normalparindent
  \item[\hskip\labelsep
%<amsbook|amsproc>        \scshape
%<amsart|amsthm>        \itshape
\itshape 
    #1\@addpunct{.}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
%    \end{macrocode}
%    Default for \cn{proofname}:
%    \begin{macrocode}
\providecommand{\solutionname}{Solution}

\makeatother


\begin{document}

\begin{question}
Some question here
\end{question}

%\begin{proof}
\begin{solution} % PS
Here goes the solution to the question
%\end{proof}
\end{solution} % PS

\begin{theorem}
Some theorem or formula to derive here
\end{theorem}

\begin{proof}
Here goes the proof to the question
\end{proof}

\end{document}

enter image description here

Tags:

Theorems