I would like to have letters as sub-numbering for some theorems, similarly to this question, but I would like to have the two sub-theorems ''separately'', to be able to include anything between them.
I found an approach using newcounter as an answer to a slightly different question and tried to modify it to do what I want, but I cannot get it work. Here is what I tried:
\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{theorem2}{Theorem}
\newcounter{pretheorem}
\counterwithin{theorem2}{pretheorem}
\renewcommand\thetheorem{\arabic{pretheorem}\alph{theorem2}}
\newcommand{\theoremgroup}{\refstepcounter{pretheorem}}
\begin{document}
\begin{theorem}
This should be Theorem 1.
\end{theorem}
\theoremgroup
\begin{theorem2}
This should be Theorem 2a.
\end{theorem2}
\begin{theorem2}
This should be Theorem 2b.
\end{theorem2}
\begin{theorem}
This should be Theorem 3.
\end{theorem}
\end{document}