I know there is a myriad of questions about the alignment of the tombstone symbol, but I couldn't see any one that addresses this little issue.
Say you end your proof with a diagram such as the following:
\[\xymatrix{A & B \\ C & D} \]
Then the little tombstone symbol will be way one line further down from where it should be. If I add \qedhere
just after the diagram, then the tombstone is aligned with the B in the diagram, which is just wrong.
How do I get it right?
MWE:
\documentclass{article}
\usepackage{amsmath,amsthm}
\usepackage[all,cmtip,2cell]{xy}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem} A theorem.
\begin{proof}
\[\xymatrix{A & B \\ C & D} \]
\end{proof}
\end{theorem}
\begin{theorem} A theorem.
\begin{proof}
\[\xymatrix{A & B \\ C & D} \qedhere \]
\end{proof}
\end{theorem}
\end{document}