# Is there a \renewtheorem equivalent of \renewcommand, using amsthm and not ntheorem?

Suppose I have a theorem that is defined a certain way, as follows.

\newtheorem*{mytheorem}{Foo}


And I want to redefine it another way further down in my document, as below.

\newtheorem*{mytheorem}{Bar}


I would like something like this, but I get undefined control sequence on \renewtheorem.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}

\begin{document}
\theoremstyle{definition}
\newtheorem*{thmTemp}{Foo}
\begin{thmTemp} First one.  \end{thmTemp}

\renewtheorem*{thmTemp}{Bar}
\begin{thmTemp} Second one.  \end{thmTemp}
\end{document}


When I run pdflatex on this, I get the following:

! Undefined control sequence.
l.10     \renewtheorem
*{thmTemp}{Bar}


I am avoiding ntheorem because it does not preserve the theorem styles defined by amstheorem, even when the amsthm option is passed to it, and I would prefer not to redefine those styles.

-
Have you tried \renewtheorem? It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. That way we would know which packages you are using as some solutions may be package specific. –  Peter Grill Mar 18 '13 at 6:13
Try replacing amsthm with ntheorem. –  Peter Grill Mar 18 '13 at 6:22
@PeterGrill, There's actually a specific reason I want to use amsthm and not ntheorem. I prefer not to redefine \theoremstyle{definition} among others. –  merlin2011 Mar 18 '13 at 6:23
And yes, I have tried the [amsthm] option to ntheorem, but it does not achieve the desired effect. –  merlin2011 Mar 18 '13 at 6:23
Perhaps it would help if you specified more closely what you mean by 'redefine it another way'... How do you expect the redefined theorem environment to behave? Do you simply want to change the heading and continue numbering with the previous counter? Or do you also want to change the style of the theorem? –  benwilfut Mar 18 '13 at 8:12

Rather than redefining the environment each time, I would define a wrapper:

\documentclass{article}
\usepackage{amsthm}
\theoremstyle{definition}
\newenvironment{defi}[1]
{\end{inner}}

\begin{document}
\begin{defi}{Foo}
First one.
\end{defi}

\begin{defi}{Bar}
Second one.
\end{defi}
\end{document}


-