I'm typing up solutions to a problem set. I've defined a theorem
and solution
environment, as in the following document.
\documentclass{article}
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem{problem}{Problem}
\theoremstyle{remark}
\newtheorem*{solution}{Solution}
\begin{document}
\begin{theorem}
The word ``theorem'' at the beginning of a theorem is bold, unless it appears inside a solution.
\end{theorem}
\begin{problem}
What is $2+2$?
\end{problem}
\begin{solution}
We use the following theorem.
\begin{theorem} Numbers can be added.\end{theorem}
The result is therefore $2+2=4$.
\end{solution}
\end{document}
For the theorem that is outside the solution, the word "Theorem" appears correctly as bold. However, inside the solution environment, the title for the theorem environment is italic, matching the style for the solution environment.
How do I get the theorem inside the solution to be correctly boldface?