# How to align a set of multiple equations on a set of multiple aligned?

With a set of multiple aligned equations are becoming misaligned as follows:

\begin{equation*}
DGE
\left \{
\begin{aligned}
& FEGE & & &
\left \{
\begin{aligned}
& & CGE & &
\left \{
\begin{aligned}
& & & EP &
\left \{
\begin{aligned}
&&&& x_{ij, \> t} = \frac{Y_{i, \> t} \, E_{j, \> t}}{Y_t} \, \left ( \frac{t_{ij, \> t}}{\prod_{i, \> t} \, P_{j, \> t}} \right )^{1 - \sigma}
\end{aligned}
\right. \\
&&&& \Pi^{1 - \sigma}_{i, \> t} = \sum_j \left ( \frac{t_{ij, \> t}}{P_{j, \> t}} \right )^{1 - \sigma} \, \frac{E_{j, \> t}}{Y_t} \\
&&&& P^{1 - \sigma}_{j, \> t} = \sum_i \left ( \frac{t_{ij, \> t}}{\Pi_{i, \> t}} \right )^{1 - \sigma} \, \frac{Y_{i, \> t}}{Y_t}
\end{aligned}
\right. \\
&&&&  p_{i, \> t} = \left ( \frac{Y_{i, \> t}}{Y_t} \right )^{\frac{1}{1 - \sigma}} \, \frac{1}{\alpha_i \, \Pi_{i, \> t}} \\
&&&& Y_{i, \> t} = p_{i, \> t} \, A_{i, \> t} \, L^{1 - \eta}_{i, \> t} \, K^{\eta}_{i, \> t} \\
&&&& E_{i, \> t} = \varphi_{i} \, Y_{i, \> t}
\end{aligned}
\right. \\
&&&& K_{i, \> t \; + \; 1} = \left [ \gamma \, \delta \, \varphi_{i, \> t} \, \frac{\eta \, p_{i, \> t} \, A_{i, \> t} \, L^{1 - \eta}_{i, \> t} \, K^{\eta - 1}_{i, \> t}}{(1 - \gamma \; + \; \delta \gamma) \, P_{i, \> t}} \right]^{\delta} \, K_{i, \> t}
\end{aligned}
\right.
\end{equation*}


However I would like to get an equal alignment when using eqnarray, as follows:

\begin{eqnarray*}
x_{ij, \> t} & = & \frac{Y_{i, \> t} \, E_{j, \> t}}{Y_t} \, \left ( \frac{t_{ij, \> t}}{\prod_{i, \> t} \, P_{j, \> t}} \right )^{1 - \sigma} \\
\Pi^{1 - \sigma}_{i, \> t} & = & \sum_j \left ( \frac{t_{ij, \> t}}{P_{j, \> t}} \right )^{1 - \sigma} \, \frac{E_{j, \> t}}{Y_t} \\
P^{1 - \sigma}_{j, \> t} & = & \sum_i \left ( \frac{t_{ij, \> t}}{\Pi_{i, \> t}} \right )^{1 - \sigma} \, \frac{Y_{i, \> t}}{Y_t} \\
p_{i, \> t} & = & \left ( \frac{Y_{i, \> t}}{Y_t} \right )^{\frac{1}{1 - \sigma}} \, \frac{1}{\alpha_i \, \Pi_{i, \> t}} \\
Y_{i, \> t} & = & p_{i, \> t} \, A_{i, \> t} \, L^{1 - \eta}_{i, \> t} \, K^{\eta}_{i, \> t} \\
E_{i, \> t} & = & \varphi_{i} \, Y_{i, \> t} \\
K_{i, \> t \; + \; 1} & = & \left [ \gamma \, \delta \, \varphi_{i, \> t} \, \frac{\eta \, p_{i, \> t} \, A_{i, \> t} \, L^{1 - \eta}_{i, \> t} \, K^{\eta - 1}_{i, \> t}}{(1 - \gamma \; + \; \delta \gamma) \, P_{i, \> t}} \right]^{\delta} \, K_{i, \> t}
\end{eqnarray*}


With use of the nicematrix package:

\documentclass{article}
\usepackage{nicematrix}
\usetikzlibrary{decorations.pathreplacing,
calligraphy}
\tikzset{
B/.style = {decorate,
decoration={calligraphic brace, amplitude=3pt,
raise=1pt, mirror},% for mirroring of brace
thick},
}

\begin{document}
$\setlength\arraycolsep{1pt} \renewcommand\arraystretch{2} \def\X{\hphantom{XX}} \def\XX{\hphantom{XXXX}} \begin{NiceArray}{C @{\hspace{4em}}C @{\hspace{3em}}C @{\hspace{2em}}C RCL}% [code-after={ \tikz\draw[B] (1-4.west |- 1-7.north) -- node[left=1mm] {EP} (1-4.west |- 1-7.south); \tikz\draw[B] (1-3.west |- 1-7.north) -- node[left=1mm] {CGE} (3-3.west |- 2-7.south); \tikz\draw[B] (1-2.west |- 1-7.north) -- node[left=1mm] {FEGE} (6-2.west |- 6-7.south); \tikz\draw[B] (1-1.west |- 1-7.north) -- node[left=1mm] {DGE} (7-1.west |- 7-7.south); } ] &&&& x_{ij,t} & = & \frac{Y_{i,t} E_{j,t}}{Y_t} \Bigl(\frac{t_{ij,t}} {\prod_{i,t} P_{j,t}} \Bigr)^{1 - \sigma} \\ &&&& \Pi^{1-\sigma}_{i,t} & = & \sum_j \Bigl(\frac{t_{ij,t}} {P_{j,t}} \Bigr)^{1-\sigma} \frac{E_{j,t}}{Y_t} \\ &&&& P^{1-\sigma}_{j,t} & = & \sum_i \Bigl(\frac{t_{ij,t}} {\Pi_{i,t}} \bigr)^{1-\sigma} \frac{Y_{i,t}}{Y_t} \\ &&&& p_{i,t} & = & \Bigl(\frac{Y_{i,t}}{Y_t} \Bigr)^{\frac{1} {1 - \sigma}} \frac{1} {\alpha_i \Pi_{i,t}} \\ &&&& Y_{i,t} & = & p_{i,t} A_{i,t} L^{1 - \eta}_{i,t} K^{\eta}_{i,t} \\ &&&& E_{i,t} & = & \varphi_{i} Y_{i,t} \\ &&&& K_{i,t+1} & = & \Bigl[\gamma\delta\varphi_{i,t} \frac{\eta p_{i,t} A_{i, t} L^{1-\eta}_{i,t} K^{\eta-1}_{i,t}} {(1 - \gamma + \delta\gamma) P_{i,t}} \Bigr]^{\delta} K_{i,t} \end{NiceArray}$
\end{document}


After two compilation the result is:

Here is a way, more or less a hack with bigdelim, an array and mathtools:

\documentclass[a4paper,12pt]{article}
\usepackage{array}
\usepackage{bigdelim}
\usepackage{mathtools}

\begin{document}

$\begin{array}{r@{}r @{} >{\displaystyle{}}l@{}} \ldelim\{{13.7}{*}[ DGE  ]\ldelim\{{10.8}{*}[\enspace FEGE  ]\ldelim\{{6.5}{*}[\enspace CGE  ] \ldelim\{{1.6}{*}[\enspace EP  ] & x_{ij, \> t} & = \frac{Y_{i, \> t} \, E_{j, \> t}}{Y_t} \, \left ( \frac{t_{ij, \> t}}{\prod_{i, \> t} \, P_{j, \> t}} \right )^{1 - \sigma} \\ & \Pi^{1 - \sigma}_{i, \> t} & = \sum_j \left ( \frac{t_{ij, \> t}}{P_{j, \> t}} \right )^{1 - \sigma} \, \frac{E_{j, \> t}}{Y_t} \\ & P^{1 - \sigma}_{j, \> t} & = \sum_i \left ( \frac{t_{ij, \> t}}{\Pi_{i, \> t}} \right )^{1 - \sigma} \, \frac{Y_{i, \> t}}{Y_t} \\ & p_{i, \> t} & = \left ( \frac{Y_{i, \> t}}{Y_t} \right )^{\frac{1}{1 - \sigma}} \, \frac{1}{\alpha_i \, \Pi_{i, \> t}} \\ & Y_{i, \> t} & = p_{i, \> t} \, A_{i, \> t} \, L^{1 - \eta}_{i, \> t} \, K^{\eta}_{i, \> t} \\ & E_{i, \> t} & = \varphi_{i} \, Y_{i, \> t} \\ &\mathllap{ K_{i, \> t \; + \; 1}} & = \left [ \gamma \, \delta \, \varphi_{i, \> t} \, \frac{\eta \, p_{i, \> t} \, A_{i, \> t} \, L^{1 - \eta}_{i, \> t} \, K^{\eta - 1}_{i, \> t}}{(1 - \gamma \; + \; \delta \gamma) \, P_{i, \> t}} \right]^{\delta} \, K_{i, \> t} \end{array}$

\end{document}