Please consider the code bellow:
\begin{align*}
function =
\begin{cases}
case1 &\mbox{if } n = 0 \\
\begin{cases}
case2 &\mbox{if } n = 1 \\
\begin{cases}
case3 &\mbox{if } n = 2 \\
case4 &\mbox{if } n = 3
\end{cases}
\end{cases}
\end{cases}
\end{align*}
The result of this code is something like this:
My question is, how to align the conditions of these nested cases (or arrays if you prefer them) without cheating (i.e. without using /quad
or /hspace
) to achieve something like this: