The fast search finds exactly the points #
Ratpoints.Fast.fastPoints c H bLow bHigh tu lists only normalized points of height at most H on
y ^ 2 = F(x, z) whose denominator is 0 or lies in the range of bLow and bHigh
(Ratpoints.Fast.isPoint_and_inRegion_of_mem_fastPoints), each once
(Ratpoints.Fast.nodup_fastPoints), and, assuming Sturm's theorem, all of them
(Ratpoints.Fast.mem_fastPoints_of_isPoint, Ratpoints.Fast.mem_fastPoints_iff), for every
setting tu of its parameters.
The sieve is a sound filter: a point (a, y, b) makes (a, b) a candidate
(Ratpoints.Fast.IsCandidate), and the residues of a candidate modulo every m pass the table
Ratpoints.Fast.admitTable (Ratpoints.Fast.admitTable_spec; a row prime to m is row 1
permuted, Ratpoints.Fast.getElem!_admitTable, Ratpoints.Fast.getElem!_permRow), so the bit of
a survives in the row of every family (Ratpoints.Fast.Family.IsSound,
Ratpoints.Fast.mkFamily_isSound), in that row shifted to the start of each chunk and moved to the
part of the chunk that is searched (Ratpoints.Fast.Family.IsSound.testBit_shiftRight) and in the
sieve (Ratpoints.Fast.testBit_sieve); Ratpoints.Fast.setBits lists the bits that survive
(Ratpoints.Fast.mem_setBits), and the exact check of Ratpoints.BruteForce.pointsOfDen keeps the
points among them. The slots, the chunks of the classes modulo G, cover each numerator once
(Ratpoints.Fast.exists_mem_slots, Ratpoints.Fast.pairwise_slots), and the part of a chunk holds
the numerators of the chunk within the bounds of the region (Ratpoints.Fast.exists_part_eq_some,
Ratpoints.Fast.add_le_and_dvd_of_part_eq_some), so the search of a part
(Ratpoints.Fast.of_mem_partPoints, Ratpoints.Fast.mem_partPoints), of a denominator
(Ratpoints.Fast.of_mem_denPoints, Ratpoints.Fast.mem_denPoints_of,
Ratpoints.Fast.nodup_denPoints) and the whole search list the points of its denominators with
their numerators within the bounds, each once (Ratpoints.Fast.of_mem_search,
Ratpoints.Fast.mem_search_of, Ratpoints.Fast.nodup_search); a denominator for which a family has
the row 0 carries no candidate (Ratpoints.Fast.any_rows_eq_false).
Assuming Sturm's theorem, the bounds of the region hold the numerator a of every point
(Ratpoints.Fast.exists_bounds_region): one of the intervals that the Sturm step keeps holds
a / b (Ratpoints.Fast.exists_mem_sturmIntervals, from Ratpoints.Sturm.covers_computeSturm),
and the bounds that Ratpoints.Fast.endFrac makes of the ends of the interval
(Ratpoints.Fast.div_le_of_endFrac_eq_some, Ratpoints.Fast.le_div_of_endFrac_eq_some) bound a
(Ratpoints.Fast.fst_numRange_le, Ratpoints.Fast.le_snd_numRange,
Ratpoints.Fast.exists_bounds_of_mem). The denominators that the search leaves out carry no point
(Ratpoints.Fast.mem_denominators_of_isCandidate): for odd degree it takes those of the form
s k ^ 2 with s dividing the leading coefficient, which Ratpoints.Fast.squareDens marks
(Ratpoints.Fast.getElem!_squareDens_of_isCandidate, from
Ratpoints.exists_eq_mul_mul_of_sq_eq_binaryForm_of_odd), and for even degree it leaves out those
that Ratpoints.Fast.forbiddenDens marks, multiples of an odd q with J(c_d | q) = -1
(Ratpoints.Fast.exists_dvd_of_getElem!_forbiddenDens_ne_zero), while the symbol is 1 on every
divisor of the denominator of a point prime to c_d
(Ratpoints.Sieve.jacobiSym_eq_one_of_sq_eq_binaryForm,
Ratpoints.Fast.getElem!_forbiddenDens_eq_zero).
When no range of the denominators is given, Ratpoints.Fast.fastPoints runs
Ratpoints.Fast.sievePoints on the coefficients that Ratpoints.Fast.reversed hands on: when it
reverses them, the region is the whole box and the binary form is that of c with x and z
exchanged (Ratpoints.Fast.isFullBox_and_binaryForm_eq_of_reversed_eq), so that
Ratpoints.Sieve.swapPoint maps the points of the reversed list one to one onto those of c
(Ratpoints.Sieve.isPoint_swapPoint, Ratpoints.Sieve.swapPoint_inj), which all lie in the whole
box (Ratpoints.IsNormalizedPair.inRegion_of_isFullBox).
Main statements #
Ratpoints.Fast.isPoint_and_inRegion_of_mem_fastPoints: the list holds only points of the region.Ratpoints.Fast.mem_fastPoints_iff: assuming Sturm's theorem, it holds exactly the points of the region.Ratpoints.Fast.nodup_fastPoints: each of them once.
The positions of the bits #
The residues that allow a point #
The binary form is homogeneous of degree D = d + d % 2.
For b u ≡ 1 modulo m, F(x u, 1) is a square modulo m for every x ≡ a with
F(a, b) a square, F being homogeneous of even degree (Ratpoints.Fast.binaryForm_mul_self).
Bit masks #
Families #
The family F is sound for the step G and chunks of at most L numerators: it has a row for
every residue modulo F.M > 0, F.ginv inverts G modulo F.M, and the row of b has the bit
j < L + 8 F.M set for every candidate (a, b) with a ≡ G j modulo F.M.
A row for every residue.
The modulus is positive.
F.ginvinvertsG.- testBit (a : ℤ) (b j : ℕ) : j < L + 8 * F.M → IsCandidate c a b → ↑F.M ∣ a - ↑G * ↑j → F.rows[b % F.M]!.testBit j = true
The row of
bkeeps the bitjof every candidate(a, b)witha ≡ G j.
Instances For
The rows of one modulus m ∣ M keep the bit j of every candidate (a, b) with
a ≡ G j modulo M.
The shift #
The row of b, shifted to the chunk that starts at a₀ and moved by o, keeps the bit t of
every candidate (a₀ + G (o + t), b) with o + t < L.
The sieve #
The points of a chunk #
The parts of the chunks #
Chunks and classes #
The slots #
The region #
The bound n / q that Ratpoints.Fast.endFrac makes of a lower end x lies below every v
with |v| ≤ H above the value of x: it is that value when it lies in [-H, H], -(H + 1) when
it lies below, and H + 1 only when it lies above H, where no such v is.
The bound n / q that Ratpoints.Fast.endFrac makes of an upper end x lies above every v
with |v| ≤ H below the value of x: it is that value when it lies in [-H, H], H + 1 when it
lies above, and -(H + 1) only when it lies below -H, where no such v is.
The first numerator of the range of an interval lies below every a with |a| ≤ H and a / b
above the lower end of the interval.
The hull of the ranges of the intervals holds every numerator of the range of one of them.
Assuming Sturm's theorem, the intervals of the Sturm step on the whole line hold every a / b
with |a| ≤ H, b > 0 and F(a, b) ≥ 0 (Ratpoints.Sturm.covers_computeSturm).
Assuming Sturm's theorem, the numerators of the denominator b > 0 that the search takes
(Ratpoints.Fast.bounds) include every a with |a| ≤ H and F(a, b) ≥ 0.
The search #
The rows of sound families for the denominator b, shifted to the chunk that starts at a₀ and
moved by o, keep the bit t of every candidate (a₀ + G (o + t), b) with o + t < L.
A point of the chunk with its numerator from lo to hi lies in the part of the chunk.
No row of sound families is 0 for the denominator of a candidate
(Ratpoints.Fast.Family.IsSound.rows_ne_zero).
A point of a chunk of sl with its numerator within the bounds of the region lies in the
search of its denominator.
The points of chunks without a numerator in common, chunk by chunk, each once, when the points of each chunk are without duplicates and lie in the chunk.
The denominators #
For odd degree, the denominator b of a candidate is s k ^ 2 with s dividing the leading
coefficient (Ratpoints.exists_eq_mul_mul_of_sq_eq_binaryForm_of_odd), which
Ratpoints.Fast.squareDens marks.
The denominators of the search lie in the range of bLow, bHigh and H, in ascending
order.
The parameters #
The points #
The search without the reversal lists every point of the region, assuming Sturm's theorem, on
which the region of the numerators rests (Ratpoints.Fast.exists_bounds_region).
Ratpoints.Fast.reversed reverses only for the whole box, and then the binary form of the
reversed list is that of c with x and z exchanged
(Ratpoints.Setup.binaryForm_eq_of_reversal_eq_ok).
The fast search lists only points of height at most H with their denominator in the range
of bLow and bHigh, for every coefficient list, every height bound, every range and every setting
of the parameters: when the coefficients are reversed, the search of the reversed list lists only
points, which Ratpoints.Sieve.swapPoint maps to points (Ratpoints.Sieve.isPoint_swapPoint), of
the whole box.
The fast search lists every point of height at most H with its denominator in the range
of bLow and bHigh, assuming Sturm's theorem, on which the region of the search rests
(Ratpoints.Fast.exists_bounds_region): when the coefficients are reversed, the point mapped by
Ratpoints.Sieve.swapPoint is a point of the reversed list, of the whole box.
The fast search lists exactly the points of height at most H with their denominator in
the range of bLow and bHigh, for every coefficient list, every height bound, every range and
every setting of the parameters, assuming Sturm's theorem.
The fast search lists each point once: when the coefficients are reversed,
Ratpoints.Sieve.swapPoint is injective on the points of the reversed list
(Ratpoints.Sieve.swapPoint_inj).