The last part of my proof is formatted in an alignat* environment. How do I make \qedhere appear correctly?
The naive approach (as you would do with align*):
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{lipsum}
\begin{document}
\begin{proof}
\begin{alignat*}{2}
&\quad& f &\le g \\
\implies && f-a &\le g-a \\
\implies && b(f-a) &\le b(g-a)
\qedhere
\end{alignat*}
\end{proof}
\lipsum[1]
\end{document}
produces an undesired result and the following warning:
The \qedhere command may not work correctly here




ntheoremthis is automatic. Actually, you don't have to type\qedhere:\end{proof}is enough. – Bernard Jul 22 '15 at 17:09