I've create an unnumbered amsthm environment problem, and a numbered amsthm environment example. Then I want to make the numbered example environment be unnumbered, so I typed \let\theexample=\relax (Why? Because I'm using a template that was already assigned the numbered example environment, and I just don't want to change the .cls file). Then I found that there's a space between the caption of the environment and the dot. So, how can I remove it?
The MWE is
\documentclass{article}
\usepackage{amsthm,lipsum}
\theoremstyle{definition}
\newtheorem*{problem}{Problem}
\newtheorem{example}{Example}
\begin{document}
\begin{problem}
\lipsum[6]
\end{problem}
\begin{example}
\lipsum[6]
\end{example}
\let\theexample=\relax
\begin{example}
\lipsum[6]
\end{example}
\end{document}

