When a proof ends with a math equation, it adds an extra space. It means that the proof square goes to the next line and doesn't appear exactly in the last line.
Here is an example:
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\begin{theorem}
...
\end{theorem}
\begin{proof}
...
$$\begin{array}{ccc}
A & \Longrightarrow & B\\
& \Longrightarrow & C
\end{array}$$
\end{proof}
\begin{theorem}
...
\end{theorem}
\end{document}
And the compiled result is the following.
What should I do to have the square exactly aligned, it means in the same line "\Longrightarrow C" exists?
Best Answer
You should never (in the sense of never ever) use
$$...$$
in LaTeX. For no reason whatsoever. See Why is \[ ... \] preferable to $$ ... $$?For proofs that end with a display there is
\qedhere
.Depending on the nature of the alignment, you can also use