If a proof consists of only a single, less-than-a-line-long equation, there is no reason to put the `\emph{Proof.}` and the equation not on the same line. How can I tell LaTex this?

Here is a minimal non-working example, i.e. the proof equation is on a separate line even though I would like to have it on the same line as the `\emph{Proof.}`. 

```
\documentclass{article}
\usepackage{amsmath, amsthm}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}[Binomial formula]
    \[
        (a+b)^2 = a^2 + 2ab + b^2
    \]
    \begin{proof}
        \[
            (a+b)^2 = a^2 + ab + ba + b^2 = a^2 + 2ab + b^2
            \qedhere
        \]
    \end{proof}
\end{theorem}
\end{document} 

```

Btw, I know that I could use inline math mode, but then the equation is no longer centered and this I would like to keep up.