combining cases, subequations and tags

I'm trying to write a set of equations in \begin{cases}. The i-th equation should have the tag P.i. I can use \tag{P} to number the entire set as P, or, I can use \begin{subequations} to number the i-th equation as 1.i. But I can't number my equations as P.1. I tried the following:

\begin{subequations}\begin{align}\label{eq:a}\tag{P}
\begin{cases}
a &a \tag{\ref{a}}\\
a &a.
\end{cases}
\end{align}
\end{subequations}


but it doesn't work. Does anyone have a suggestion?

• Welcome to tex.sx. Perhaps off-topic: if there is only one cases element, what's the reason to use align? equation would be better for that. – barbara beeton Nov 7 '19 at 19:00

Something like this?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations}\begin{align}\label{eq:a}
\begin{cases}
a &a \tag{P.\theequation}\\
a &a.
\end{cases}
\end{align}
\end{subequations}
In \ref{eq:a}, we find blah-blah
\end{document}


Ued subnumcases environment from cases for getting subnumbering for case.
Used @egreg's answer to the question: "subequations customize arabic numbering in aligned environment" for changing the equation numbering to arabic.

\documentclass[10pt]{article}
\usepackage{amsmath,etoolbox}
\usepackage{cases}

\patchcmd\subequations
{\theparentequation\alph{equation}}
{\subequationsformat}
{}{}

\newcommand{\subequationsformat}{\theparentequation.\arabic{equation}}
\begin{document}
\renewcommand{\theequation}{P}
\begin{subnumcases}{}
a &a \label{a}\\
b &b \label{b}
\end{subnumcases}

\renewcommand{\theequation}{Q}
\begin{subnumcases}{}
c &c \label{c}\\
d &d \label{d}
\end{subnumcases}

Refer to \ref{a}, \ref{b}, \ref{c} or \ref{d}.
\end{document}