Exclusive upper bound of the committed prime table. The accepted 100000
policy is the largest measured candidate inside the fresh-replay build budget;
primeTable lists every prime below it.
Equations
- Hex.Nat.primeTableBound = 100000
Instances For
Every prime below primeTableBound, ascending. A committed literal;
mem_primeTable_prime and mem_primeTable_of_prime are the two membership
directions, so the generator that produced the literal is untrusted.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Adjacent strict ascent of a list, structurally: true iff consecutive
entries strictly increase.
Equations
- Hex.Nat.ascAdj [] = true
- Hex.Nat.ascAdj [head] = true
- Hex.Nat.ascAdj (a :: b :: rest) = (decide (a < b) && Hex.Nat.ascAdj (b :: rest))
Instances For
The committed table is strictly ascending.
Membership in the committed prime table, by binary search.
Equations
Instances For
The final verified sieve state underlying the committed prime table.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Membership in the committed prime table. Kernel reduction reads a bit
from the already verified final sieve state; compiled code uses binary search
through isTablePrime_eq_tableSearch.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A lookup succeeds exactly on members of the committed table.
Compiled lookup retains binary search; the equality protects both successful and unsuccessful lookups at every input.
Every table entry is prime: the committed literal read back through the verified sieve run.
Every prime below the bound is a table entry: completeness through the sieve's completeness direction, which is what lets a caller conclude anything from a failed lookup.
The primes in [lo, hi), ascending. Runtime decision through the
isPrimeTrial-backed Decidable instance; the committed table plays no
role, so the range is unrestricted.
Equations
- Hex.Nat.primesIn lo hi = (List.filter (fun (n : Nat) => decide (Hex.Nat.Prime n)) (List.range' lo (hi - lo))).toArray