[Tex/LaTex] Split-like environment inside cases environment

amsmathcasesenvironmentshorizontal alignmentmultline

I'd like to have a cases environment with some cases that are too long to fit on one line. I tried this:

\begin{cases}
  \begin{split}
    long expression \\ second line of long expression
  \end{split} & condition \\
  ...

but I get the warning

Package amsmath Warning: Cannot use 'split' here;
trying to recover with 'aligned' on input line 201.

It automatically replaces the split with an aligned environment, which looks like this:

alt text

Is there any way to get these long expressions to behave like they were in split or multline environments, with the top line flush left and the next line indented a little?

Best Answer

Well, I'd follow amsmath's suggestion to use aligned instead of split:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\[
  \text{left hand side} =
  \begin{cases}
    \!\begin{aligned}%[b]
       & \text{a very long expression} \\
       & + \text{that continues on the next line}
    \end{aligned}           & \text{1st condition} \\%[1ex]
    \text{short expression} & \text{2nd condition}
  \end{cases}
\]
\end{document}

Does this yield the output you want? (Note that the \! in front of aligned is needed since that environment adds a \, we have to cancel out.)

EDIT: If you want to achieve alignment and spacing as Niel suggests (@Niel: I would want that; good catch), then just remove the two % in the code.