Solution (source code)

= Solution

For $x(P)=A/B^2$ in lowest terms, take the logarithmic naive height $h(P)=\log\max\{|A|,B^2\}$. Its required properties are
$$
h(2P)=4h(P)+O(1)
$$
and
$$
h(P+Q)+h(P-Q)=2h(P)+2h(Q)+O(1),
$$
with constants depending only on the curve. Define the <canonical height of an elliptic curve> by
$$
\widehat h(P)=\lim_{r\to\infty}4^{-r}h(2^rP).
$$
The first bounded-error relation makes this a convergent telescoping correction to $h(P)$. Apply the second relation to $2^rP,2^rQ$, divide by $4^r$, and let $r\to\infty$ to obtain
$$
\widehat h(P+Q)+\widehat h(P-Q)=2\widehat h(P)+2\widehat h(Q).
$$
Also $\widehat h(2P)=4\widehat h(P)$, and the parallelogram identity then gives $\widehat h(nP)=n^2\widehat h(P)$ for every integer $n$. Thus $\widehat h$ is a quadratic form.