[Tex/LaTex] How to place the QED symbol at the end of equation using IEEEproof environment

amsmathequationsieeetran

I was wondering how one can place the QED symbol at the end of an equation when using the IEEEproof environment?

With the standard proof environment of amsthm this is done by simply placing \qedhere at the end of the equation, for example:

\begin{equation}
     x = y+z \qedhere
\end{equation}

But the same code does not work when we change the environment to IEEEproof. In this case the QED symbol will be placed at the end of next line.

Best Answer

The IEEEtran documentclass does have its own versions of \qedhere namely \IEEEQEDhereeqn for use in equations and \IEEEQEDhere for eqnarray and other enviroments, e.g. lists (thank you to Aditya for noting the latter). Here is a demonstration:

Sample output

\documentclass{IEEEtran}

\newtheorem{theorem}{Theorem}

\begin{document}
\begin{theorem}
  Ordinary case.
\end{theorem}

\begin{IEEEproof}
  That's it!
\end{IEEEproof}

\begin{theorem}
  A statement.
\end{theorem}

\begin{IEEEproof}
  We see
  \begin{equation}
    x=y \IEEEQEDhereeqn\quad
  \end{equation}
\end{IEEEproof}

\begin{theorem}
  Another statement.
\end{theorem}

\begin{IEEEproof}
  We consider the following points:
  \begin{enumerate}
  \item assumptions,
  \item implications. \hspace{1em plus 1fill}\IEEEQEDhere
  \end{enumerate}
\end{IEEEproof}

\begin{theorem}
  Final statement.
\end{theorem}

\begin{IEEEproof}
  We compute
  \begin{IEEEeqnarray}{rCl}
    1 + 2 & = & 2 + 1 \IEEEnonumber\\
    & = & 3.
    \qquad\IEEEQEDhere
  \end{IEEEeqnarray}
\end{IEEEproof}

\begin{IEEEproof}[Alternative proof.]
  We compute
  \begin{equation}
    \begin{IEEEeqnarraybox}{rCl}
    1 + 2 & = & 2 + 1 \\
    & = & 3.
  \end{IEEEeqnarraybox}
  \IEEEQEDhereeqn\quad
\end{equation}
\end{IEEEproof}

\end{document}

Note the spacing. For the equation version you need add some space afterwards otherwise it will be right up against the equation number. I have chose \quad but another possibility is \. In the other cases you see that \IEEEQEDhere does not place the symbol at the right-hand margin without help. I have shown how to this in an enumerate. For the IEEEeqnarray it is does not seem to be possible, but I give a work around, placing it inside an equation, in the case when you only want one equation number.