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?



ntheorempackage does what you want automatically, at least for an equation on a single line. – pluton Oct 19 '16 at 13:53