# Label and sublabel for theorem

In my text file, I am using a theorem environment (from the amsthm package), that contains two parts (for two different cases). The theorem is often referenced as a whole, so I need a global label, but each case is proven on its own, and often referenced specifically, and therefore I also need specific "sublabel". The structure would look as follow :

\begin{theorem}\label{main_thm}
This is the main theorem, with two cases,
\begin{enumerate}
\item First Case \label{first_case}
\item Second Case \label{first_case}
\end{enumerate}
\end{theorem}

The first label follows the environment numbering (enforced by section - I cannot change it), while the second would only reference the item number. So that for instance with later references :

• see theorem \ref{main_thm} would appear as "see theorem 4.3"
• see theorem \ref{first_case} would appear as "see theorem (a)" making it impossible to reference in later sections.

Is there anyway to make thinks clearer? setting some kind of subtheorem, or sublabeling. Idealy a futur reference would look as

• see theorem \ref{main_thm} would appear as "see theorem 4.3"
• see theorem \ref{first_case} would appear as "see theorem 4.3a"

In this site, I found some question on subtheorem, but they always reference a hierarchical numbering of lemmas, rather than two part of one theorem. And the sublabel package split the label as 4a,4b,4c, but does not allow for 4,4a,4b...

• One idea could be to stack your \ref{} calls i.e. \ref{main_thm}\ref{first_case} which would result in 4.3a. – Jon Jun 4 at 16:16
• True, this is not really "clean", but it sure works, and it's very simple! so simple I had not even thought about it! :) I'll use it if there are no good other solutions – Thomas Lesgourgues Jun 4 at 16:30
• You can load enumitem and code \begin{enumerate[label=(alph*), ref=\ref{main_thm}alph*] – Bernard Jun 4 at 19:02
• Worked perfectly, with the small typo \alph* instead of alph*. You want to make that an answer? Otherwise I will. – Thomas Lesgourgues Jun 6 at 9:23

\begin{theorem}\label{main_thm}
This is the main theorem, with two cases,
\begin{enumerate}[label=(\alph*), ref=\ref{main_thm}\alph*]
\item First Case \label{first_case}
\item Second Case \label{first_case}
\end{enumerate}
\end{theorem}

work as intended.