I have an environment >>Satz<< (German for >>theorem<<), which ends with a \diamond. But if the theorem ends with cases, the diamond is not set correctly. It is either in a new line (but at least at the right edge), or it is right behind the last character in the cases (but at least in the correct line).
Here is my MWE:
\documentclass{article}
\usepackage{amsmath,amsthm}
\usepackage{etoolbox}
\usepackage{cases}
\theoremstyle{definition}
\newtheorem{satz}{Satz}
\AtBeginEnvironment{satz}{%
\pushQED{\qed}\renewcommand{\qedsymbol}{$\diamond$}%
}
\AtEndEnvironment{satz}{\popQED\endsatz}
\begin{document}
\begin{satz}
This works.
\end{satz}
\begin{satz}
This works.
\begin{align*}
f(x) &= \bigl( g(x) \bigr) \\
h(x) &= \bigl( r(x) \bigr).\qedhere
\end{align*}
\end{satz}
\begin{satz}
This
\[
\begin{cases}
\text{does} \\
\text{not}.
\end{cases}
\]
\end{satz}
\begin{satz}
And this
\[
\begin{cases}
\text{doesn't} \\
\text{either}. \qedhere
\end{cases}
\]
\end{satz}
\end{document}
\qedhere
is placed instead after\end{cases}, the symbol will be placed flush right on the baseline of the equation. Still not exactly what's wanted here, but shows that placing it *inside*
cases` isn't the correct approach.