The choice of the moduli #
The choice of the moduli and the cut points from the curve (Ratpoints.sievingInfo) either exits,
when the curve has no points modulo a prime that it examines, or gives what the run needs
(Ratpoints.IsSievingInfo): sound sieve entries with the fields that the packing reads and the
tables of inverses of their factors, prime entries wherever the count of factors is zero, the
reciprocals of the moduli in their order, a first decision whose cut points the run can use
(Ratpoints.Sieve.DecisionWF), sound forbidden divisors and a store of the tables of rows that fits
every entry, for any values of the doubles of the cost model.
The loop of the tables (Ratpoints.tablesLoop) keeps the tables of the primes looked at at their
positions, prime candidates, sound forbidden divisors and the store of the rows of the primes
(Ratpoints.TableLoop.WF); the rest of the choice (Ratpoints.choiceTail) offers the composite
moduli, runs the stages and ends with one sieve entry for each candidate of the pool, made for its
position (Ratpoints.IsChoiceEntries), whose tables of rows the store then fits.
Main definitions #
Ratpoints.Sieve.SieveEntry.IsSound: a sieve entry that lets the numerator of every point through.Ratpoints.Sieve.EntriesWF: sieve entries fit for the run, with the reciprocals of their moduli and a store of the tables of rows.Ratpoints.IsSievingInfo: what the run needs of the result of the choice.Ratpoints.Sieve.PrimeStore: the store of the tables of rows that the loop of the tables makes.Ratpoints.TableLoop.WF: the state of the loop of the tables.Ratpoints.IsChoiceEntries: the sieve entries of the choice, each made for its position.
Main statements #
Ratpoints.SieveOptions.numPrimes_normalize_le: the normalized options look at mostRatpoints.numPrimesprimes.Ratpoints.IsModulusEntry.isSound: an entry of a modulus as the choice makes it is sound.Ratpoints.tablesLoop_spec: the loop of the tables.Ratpoints.isSievingInfo_choiceEnd,Ratpoints.choiceTail_spec: the end of the choice.Ratpoints.sievingInfo_spec: the contract of the choice.
A sieve entry that lets the numerator of every point of the curve y ^ 2 = F(x, z) with the
coefficient list c through: its modulus is positive, and its row of the denominator b admits the
numerator a of every triple (a, y, b) with gcd(a, b) = 1 and y ^ 2 = F(a, b). The choice of
the moduli makes only such entries (Ratpoints.sievingInfo_spec).
The modulus is positive.
- admits_of_sq_eq {a y : ℤ} {b : ℕ} (hab : a.gcd ↑b = 1) (hy : y ^ 2 = binaryForm c a ↑b) : e.admits b a = true
The row of the denominator of every point admits its numerator.
Instances For
Sieve entries fit for the run of the search on the curve y ^ 2 = F(x, z) with the coefficient
list c: sound (Ratpoints.Sieve.SieveEntry.IsSound), each with no factors counted a prime entry
of the table (Ratpoints.Sieve.SieveEntry.IsPrimeEntry), as the third stage needs, with the tables
of inverses of their factors (Ratpoints.Sieve.SieveEntry.HasInverses), the reciprocals magics
of their moduli in their order, and a store of the tables of rows that fits them all
(Ratpoints.Sieve.RowStore.Fits).
- isSound (e : SieveEntry) : e ∈ entries → SieveEntry.IsSound c e
The sieve entries are sound.
- isPrimeEntry_of_nf (e : SieveEntry) : e ∈ entries → e.nf = 0 → e.IsPrimeEntry
An entry with no factors counted is a prime entry of the table.
The reciprocals of the moduli, in the order of the entries.
- hasInverses (e : SieveEntry) : e ∈ entries → e.HasInverses
The factors of the sieve entries have their tables of inverses.
- fits : store.Fits entries
The store of the tables of rows fits all the entries.
Instances For
Sieve entries fit for the run stay so when the inverses of the strides that each records change.
A sieve entry of a modulus as the choice makes it is sound.
What the run needs of the result si of the choice of the moduli for the curve
y ^ 2 = F(x, z) with the coefficient list c and the largest denominator bHigh: sieve entries
fit for the run with the reciprocals of their moduli and the store of the tables of rows, the
reserve included (Ratpoints.Sieve.EntriesWF), with the fields that the packing reads
(Ratpoints.Sieve.SieveEntry.Packable); the first decision, from the block 0 on, with the cut
points of the parameters, well-formed for the entries (Ratpoints.Sieve.DecisionWF); the forbidden
divisors among those that the loops of the tables and of the further primes may record
(Ratpoints.Sieve.IsForbiddenEntry, Ratpoints.Sieve.IsForbiddenVal); and the test of the
denominators only for even degree.
- packable (e : Sieve.SieveEntry) : e ∈ si.entries → e.Packable
The sieve entries have the fields that the packing reads.
- decisionWF : Sieve.DecisionWF si.entries si.params.sp1 { block := 0, sp2 := si.params.sp2, sp3 := si.params.sp3 }
The first decision is well-formed.
- isForbiddenEntry (e : Sieve.ForbiddenEntry) : e ∈ si.forb → Sieve.IsForbiddenEntry c (degree c) bHigh e
The forbidden divisors tested with words are sound.
- isForbiddenVal (e : Sieve.ForbiddenVal) : e ∈ si.forbVal → Sieve.IsForbiddenVal c (degree c) bHigh e
The forbidden divisors tested by their valuations are sound.
The denominators are tested only for even degree.
Instances For
The normalized options look at most Ratpoints.numPrimes primes.
The loop of the tables #
The store of the tables of rows that the loop of the tables makes holds every function R of
the references and the residues (Ratpoints.Sieve.RowStore.Holds) whose rows of 0 of the primes
are the patterns sieves0 (Ratpoints.Sieve.sieves0), since it holds only these rows, and every
table of rows of a prime in it has its row of 0 (Ratpoints.Sieve.RowStore.PrimeZeroRows).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The state of the loop of the tables (Ratpoints.TableLoop) for the curve with the coefficient
list c and the largest denominator bHigh: at most Ratpoints.numPrimes primes to look at, the
tables of the primes those of Ratpoints.Sieve.examinePrime at their positions
(Ratpoints.IsExaminedPrimeSe), prime candidates (Ratpoints.ModulusCandidate.IsPrime), sound
forbidden divisors and the store of the tables of rows of the primes
(Ratpoints.Sieve.PrimeStore).
At most
Ratpoints.numPrimesprimes to look at.- primeSe : IsExaminedPrimeSe c st.primeSe
The tables of the primes at their positions.
- isPrime (e : ModulusCandidate) : e ∈ st.pool → ModulusCandidate.IsPrime c e
Prime candidates.
- ba (e : Sieve.ForbiddenEntry) : e ∈ st.ba → Sieve.IsForbiddenEntry c (degree c) bHigh e
Sound forbidden divisors tested with words.
- val (e : Sieve.ForbiddenVal) : e ∈ st.val → Sieve.IsForbiddenVal c (degree c) bHigh e
Sound forbidden divisors tested by their valuations.
- store : Sieve.PrimeStore st.store
The store of the tables of rows of the primes.
Instances For
A forbidden divisor tested with words that the prime at the position pn < numPrimes gives from
what its table hands back, recorded.
A forbidden divisor tested by its valuation that the prime at the position pn < numPrimes
gives from what its table hands back, recorded.
The state of the loop of the tables after the prime at the position pn = st.primeSe.size,
which says something, with its candidate, its table and its table of rows.
The contract of Ratpoints.examineInLoop at the position pn = st.primeSe.size below
Ratpoints.numPrimes: at none the curve has no points; otherwise the state of the loop of the
tables stays one (Ratpoints.TableLoop.WF), with the table of the prime at its
position.
The contract of Ratpoints.raiseLimit while fewer than Ratpoints.numPrimes primes are to be
looked at: the state of the loop of the tables stays one, with its tables.
The state of the loop of the tables at its start, for the number of primes to look at of
options that look at most Ratpoints.numPrimes primes.
The invariant of the loop of Ratpoints.tablesLoop over the positions of the table, whose
state is the value of a return and the state of the loop: the state of the loop
(Ratpoints.TableLoop.WF), with the tables of the positions looked at while the loop goes on; the
value of a return an exit, at which the curve has no points.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The contract of Ratpoints.tablesLoop, for options that look at most Ratpoints.numPrimes
primes and any values of the doubles: at an exit the curve has no points; otherwise the state of the
loop is one (Ratpoints.TableLoop.WF).
The end of the choice #
Every candidate of the pool after the stages has its sieve entry, made for its position.
The sieve entries es of the choice, each made for its position (Ratpoints.IsChoiceEntry),
those from the end sp2 of the second stage on with no factors counted.
Equations
Instances For
The store of the loop of the tables with the tables of rows of the sieve entries of the choice fits them.
The sieve entries at the end of the choice, after the third stage that ends at t.sp3: one for
each candidate of the pool, each made for its position (Ratpoints.IsChoiceEntries).
The result of the choice after its third stage (Ratpoints.choiceEnd), with the cut points of
the stages, sound forbidden divisors, the store of the loop of the tables and the test of the
denominators only for even degree: what the run needs (Ratpoints.IsSievingInfo).
The contract of Ratpoints.thirdOf: Ratpoints.thirdStage_spec from the end sp2 of the
second stage.
Ratpoints.firstStages_run for the candidates of the pool after the composite moduli, sorted by
their keys.
The candidates of the primes, keyed for the first stage, are candidates of the pool before the stages.
The contract of Ratpoints.choiceTail, after the loop of the tables, with sound forbidden
divisors and the test of the denominators only for even degree: at an exit of the third stage the
curve has no points; otherwise the result is what the run needs (Ratpoints.IsSievingInfo).
The contract of the choice of the moduli and the cut points from the curve, for options that
look at most Ratpoints.numPrimes primes (normalized options,
Ratpoints.SieveOptions.numPrimes_normalize_le), the test of the denominators only for even degree
and any values of the doubles: at an exit, at a prime of the loop of the tables or of the
third stage without points modulo it, the curve has no points; otherwise the result is what the run
needs (Ratpoints.IsSievingInfo).