Height: Difference between revisions

From Elliptic Curve Crypto
→‎Example program: Not an issue in any of these examples, but, forgot ... Y2.canonicalize();
logarithmic and canonical heights
Line 1: Line 1:
The '''height''' <ref>Stephen Hoel Schanuel. “Heights in number fields.” ''Bulletin de la S. M. F.'', vol. 107 (1979), p. 433-449. http://www.numdam.org/item/?id=BSMF_1979__107__433_0</ref> of a rational number is defined to be the greater of the absolute values of its numerator and denominator in lowest terms.
The '''height''' <ref>Stephen Hoel Schanuel. “Heights in number fields.” ''Bulletin de la S. M. F.'', vol. 107 (1979), p. 433-449. http://www.numdam.org/item/?id=BSMF_1979__107__433_0</ref> (or '''rational height''') of a rational number is defined to be the greater of the absolute values of its numerator and denominator in lowest terms.


If <math>\gcd(m,n)=1</math>, then <math>H\left(\frac m n\right) = \max(|m|,|n|)</math>.
If <math>\gcd(m,n)=1</math>, then <math>H\left(\frac m n\right) = \max(|m|,|n|)</math>.


Height is used in the method of infinite descent to prove that some property is true of all rational numbers, when it can be shown that the property is true of any rational number whenever it is true of all rational numbers of lesser height.
Height is used in the method of infinite descent to prove that some property is true of all rational numbers, when it can be shown that the property is true of any rational number whenever it is true of all rational numbers of lesser height.
The '''logarithmic height''' of the same rational number is then defined
:<math>h\left(\frac m n\right) = \log H\left(\frac m n\right)</math>.
The height of any rational point ''P'' on an elliptic curve ''E''/ℚ, when ''E'' is in [[Weierstraß normal form]], is typically understood to be the height of its ''x''-coördinate. The Néron–Tate '''canonical height''' of an elliptic curve ''E''/ℚ, starting at a rational point ''P'' is then defined
:<math>\hat h_{E/\mathbb Q}(P)=\lim_{N\rightarrow\infty}
\frac{h\left(\underbrace{P\oplus P\oplus \cdots\oplus P}_{N\times}\right)}{N^2}</math>,
by iterating its [[point group operation]] ⊕ and taking a limit. Namely, Néron and Tate had observed that “doubling” a rational point on an elliptic curve typically raises its rational height to the fourth power in an asymptotic or limiting sense.


== Example program ==
== Example program ==

Revision as of 21:01, 6 February 2025

The height [1] (or rational height) of a rational number is defined to be the greater of the absolute values of its numerator and denominator in lowest terms.

If , then .

Height is used in the method of infinite descent to prove that some property is true of all rational numbers, when it can be shown that the property is true of any rational number whenever it is true of all rational numbers of lesser height.

The logarithmic height of the same rational number is then defined

.

The height of any rational point P on an elliptic curve E/ℚ, when E is in Weierstraß normal form, is typically understood to be the height of its x-coördinate. The Néron–Tate canonical height of an elliptic curve E/ℚ, starting at a rational point P is then defined

,

by iterating its point group operation ⊕ and taking a limit. Namely, Néron and Tate had observed that “doubling” a rational point on an elliptic curve typically raises its rational height to the fourth power in an asymptotic or limiting sense.

Example program

This program will iterate an outer loop over H, the height, and then an inner loop over all rational numbers X = N/D of height H.

This example outputs all rational points on the curve

with an x-coördinate whose height does not exceed 1000.

C++. Requires flags “-lgmpxx -lgmp” passed to compiler to link.

#include <iostream>
#include <gmpxx.h> // CMAKE_CXX_FLAGS = -lgmpxx -lgmp

int main(int argc, char **argv) {
    mpq_class X, Y, Y2;
    mpz_class H, N, D, n, d;
    for(H = 1; H <= 1000; ++H) {
        for(N = -H, D = 1; D > 0;
            N == -H && D < H ? ++D : N < H ? ++N : --D)
        {
            X.get_num() = N; X.get_den() = D; X.canonicalize();
            if (X.get_den() < D) continue; // not in lowest terms
            Y2 = mpq_class(-7,17)*X*(X - 5)*(X + 5)*(X + 1); Y2.canonicalize();
            if (Y2 < 0) continue;
            n = sqrt(Y2.get_num()); Y.get_num() = n;
            d = sqrt(Y2.get_den()); Y.get_den() = d;
            if (Y*Y != Y2) continue;

            std::cout << X << ", " << Y << std::endl;
        }
    }
    return 0;
}
Output data plotted in R.
-1, 0
0, 0
-5, 0
5, 0
9/5, 168/25
5/16, 525/256
-17/5, 168/25
1/24, 385/576
25/9, 700/81
20/31, 3150/961
-35/27, 1400/729
-85/53, 8400/2809
121/48, 19019/2304
-175/67, 25200/4489
595/131, 115500/17161
-605/129, 77000/16641
-625/601, 231000/361201

Possible conclusions and further questions

  • Fairly high rank with many rational points.
  • All roots are rational integers.
  • Is it too simple?
  • What is the algebraic genus of the curve, and how does that affect the cryptographic group operations to be performed on it?

Another curve with a slightly different equation has many, many more rational points.

A third curve, , does not seem to have any rational points of accessible height at all except for , , , , , and .

  1. Stephen Hoel Schanuel. “Heights in number fields.” Bulletin de la S. M. F., vol. 107 (1979), p. 433-449. http://www.numdam.org/item/?id=BSMF_1979__107__433_0