I am trying to make a system of equations that contains a sub-system of equations. The equations should be numbered with arabic numbers (e.g. 1, 2, ...) and the sub-equations with a combination of arabic + alphabetic character (e.g. 1a, 1b, 2a, ...). All equations should be referenceable.
Ideally, I would open the subnumcases environment inside the numcases environment (from package "cases") but it does not seem to work. There is a thread (cf. Mixed (sub)equation numbering within an array) that tackles more or less the issue but it does not implement left braces as I need.
Up to now, this is what I have been able to achieve (cf. below). I would just like to flush the numbering to the right (for both the main and sub- equations) and automatize it, if possible, to be able to create other structure of this type (relatively) quickly.
\documentclass{article}
\usepackage{amsmath}
\newcounter{subeqn}[equation]
\renewcommand{\thesubeqn}{\theequation\alph{subeqn}}
\begin{document}
$$
\begin{array}{l}
\left{
\begin{array}{l@{\hspace{0.8\textwidth}}r}
\refstepcounter{equation}\label{eq:main1}
A = B & (\theequation) \
\refstepcounter{equation}\label{eq:main2}
B = C & (\theequation) \
\multicolumn{2}{l}{
\left{
\begin{array}{l@{\hfill}r}
\refstepcounter{equation}\label{eq:main3}
\refstepcounter{subeqn}\label{eq:subset1}
a = b & (\thesubeqn) \
\refstepcounter{subeqn}\label{eq:subset2}
b = c & (\thesubeqn) \
\end{array}
\right.
}
\end{array}
\right.
\end{array}
$$
Equation references: \eqref{eq:main1}, \eqref{eq:main2}, \eqref{eq:main3}, \eqref{eq:subset1}, \eqref{eq:subset2}.
\end{document}
