The brute-force reference finds exactly the points #
Ratpoints.bruteForce c H lists every normalized point of height at most H on
y ^ 2 = F(x, z), and nothing else, each once; comparator certifies this
(comparator/Challenge.lean).
Main statements #
Ratpoints.mem_bruteForce_iff: a triple lies inRatpoints.bruteForce c Hexactly when it is a normalized point of height at mostH.Ratpoints.nodup_bruteForce: the list has no duplicates.Ratpoints.toFinset_bruteForce: its set of elements isRatpoints.points c H.Ratpoints.bruteForce_eq_append,Ratpoints.filter_bruteForce_eq_append: the list is the points at infinity followed by those of the denominators1, …, H, and its points at infinity and those of the denominatorsbLow, …, bHighare those of these candidates;Ratpoints.filter_bruteForce_eq_self: its points at infinity and those of the denominators1, …, BforB ≥ Hare all its points.Ratpoints.ite_pointsAbove_eq_filter: the points of one candidate are those that the specification of the order lists,(x, y, z)before(x, -y, z).
Proof #
The evaluation of the model, Horner's rule on the products cₖ z^(d - k) with one more factor z
for odd d, is Ratpoints.binaryForm (Ratpoints.BruteForce.horner_scaledCoeffs_mul); v is
the square of y exactly when the model's test of ⌊√v⌋ succeeds and y = ±⌊√v⌋
(Ratpoints.BruteForce.mem_pointsAbove_iff); and the candidates are the pairs that the
normalization allows. The triples of different candidates differ in x or in z, so the list has
no duplicates.
The brute-force reference lists exactly the normalized points of height at most H, for every
coefficient list and every height; comparator certifies this (comparator/Challenge.lean).
The brute-force reference lists each point once; comparator certifies this
(comparator/Challenge.lean).
The reference with its points at infinity apart, for H ≥ 1.
The points of the reference with the denominators from bLow ≥ 1 to bHigh ≤ H, and its points
at infinity, are those of these denominators, in increasing order.
The points of one candidate, as the specification of the order lists them #
The points of the brute-force reference over the candidate (x, z), normalized and of height
at most H, are those of the specification of the order (Ratpoints.pointsWithDen): (x, y, z)
and then (x, -y, z) for y = ⌊√F(x, z)⌋, as far as they are points, one when y = 0.