[Tex/LaTex] change label of a single theorem using ntheorem

ntheoremnumberingtheorems

My question refers to the minimal example pasted below. I would like to change the title of the second theorem (the one with yyy) to Theorem 7' without affecting the theorem counter. That is, the theorems should be labelled as follows:

Theorem 1 xxx
Theorem 7' yyy
Theorem 2 zzz
Theorem 3 uuu

Possibly this can be done using \setcounter, but this does not solve the problem with the prime after the 7. So my question is whether it is possible to manipulate particular theorem labels?

\documentclass{scrartcl}
\usepackage{ntheorem}
\newtheorem{thm}{Theorem}   
\begin{document}
\begin{thm} %Theorem 1
xxx
\end{thm}
\begin{thm} % Theorem 7'
yyy
\end{thm}
\begin{thm} %Theorem 2
zzz
\end{thm}
\begin{thm} %Theorem 3
uuu
\end{thm}
\end{document}

I am getting back to Marco Daniels answer. Consider the following three minimal examples. I do not understand why the first doesn't work while the second and third is fine. Can anyone tell me?

First example (produces strange error):

\documentclass{article}

\usepackage[thmmarks,hyperref]{ntheorem} 
\usepackage[colorlinks=false, citecolor=blue, pdfstartview=FitH,plainpages=false] {hyperref}

\newtheorem{thm}{Theorem}                            
\newtheorem{prop}[thm]{Proposition}

\begin{document}
\begingroup
\def\thethm{\ref{a}'}
\addtocounter{thm}{-1}
\begin{prop} 
yyy
\label{test}
\end{prop}
\endgroup
\end{document}

Second example, hyperref removed, otherwise identical code (works fine):

\documentclass{article}

\usepackage[thmmarks]{ntheorem} 

\newtheorem{thm}{Theorem}                            
\newtheorem{prop}[thm]{Proposition}

\begin{document}
\begingroup
\def\thethm{\ref{a}'}
\addtocounter{thm}{-1}
\begin{prop} 
yyy
\label{test}
\end{prop}
\endgroup
\end{document}

Third example, code as in the first example but \thethm is changed (also works well):

\documentclass{article}

\usepackage[thmmarks,hyperref]{ntheorem} 
\usepackage[colorlinks=false, citecolor=blue, pdfstartview=FitH,plainpages=false] {hyperref}

\newtheorem{thm}{Theorem}                            
\newtheorem{prop}[thm]{Proposition}

\begin{document}
\begingroup
\def\thethm{1'}
\addtocounter{thm}{-1}
\begin{prop} 
yyy
\label{test}
\end{prop}
\endgroup
\end{document}

I am really confused about this. Cannot interpret the error message.

Best Answer

The output of a counter is stored in the macro \the<counter>. So you have to change \thethm. Based on your request you have to do this local. In the example below I do this with \begingroup...\endgroup. Of course you must decrease the counter thm too.

\documentclass{scrartcl}
\usepackage{ntheorem}
\newtheorem{thm}{Theorem}   
\begin{document}
\begin{thm} %Theorem 1
xxx
\end{thm}
\begingroup
\def\thethm{7'}
\addtocounter{thm}{-1}
\begin{thm} % Theorem 7'
yyy
\label{test}
\end{thm}
\endgroup
\begin{thm} %Theorem 2
zzz
\end{thm}
\begin{thm} %Theorem 3
uuu
\end{thm}
\ref{test}
\end{document}