The contact-sensitive exclusion checker (computable part) #
All data are integer polynomials in one real parameter x (the offset s - lo of the covering
parameter from the left end of a certificate interval), lowest degree first. A point P : IPoint
denotes the real point (1/den) • (P.1(x), P.2(x)). A Cap records a contact constraint: the
real point p/den is a full ray endpoint with exit direction dv (strict = false) or a
forbidden point on a positive ray from a mandatory point (strict = true).
excluded Ps den caps ord a b d fuel depth decides, for the parameter piece [a/d, b/d],
whether no equilateral triangle of side < 1 can contain all points of Ps while satisfying
the caps and (for ord = some i) the non-overfull condition of side owner i. Its structure
mirrors tools/proto_checker.py (the untrusted Python reference model):
ordinaryExclusion: segments between mandatory points cross the two boundary rays ofvertex iand give lower bounds whose sum reaches1;- a pair of mandatory points at distance
≥ 1; fanCheck: the closed 120-degree cone fromeast = (1, 0)torot east = (-1, 1)(which contains one of the three outward edge directions of every triangle) is cut by a list of candidate directions into consecutive cones; every node and every cone is certified either by a support triple (side≥ 1) or by the impossibility of every cap on all three faces;- on failure the parameter piece is split at a rational knot and both halves are checked.
Only the leaf tests (nonnegOn, posOn) and the chain structure are used by the soundness
proofs in CheckerSound.lean; everything else (choice of nodes, triples, knots) is untrusted
search executed inside the checker.
A point whose two coordinates are integer polynomials in the interval parameter.
Equations
Instances For
Indices of the three mandatory points used by a support bound.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Polynomial geometry #
The determinant polynomial of two polynomial points.
Equations
- ConwaySoifer.Certificates.detP u v = (u.1.mul v.2).sub (u.2.mul v.1)
Instances For
Rotation through 120 degrees in polynomial triangular coordinates.
Equations
- ConwaySoifer.Certificates.rotP u = ((ConwaySoifer.Certificates.IPoly.smul (-1) u.1).sub u.2, u.1)
Instances For
Negation of both polynomial coordinates.
Equations
Instances For
The sum of support determinants for three successive orientation normals.
Equations
- One or more equations did not get rendered due to their size.
Instances For
N² - den² |u|²: nonnegative together with N ≥ 0 iff the side bound is at least one.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A structural, optional lookup used by the verified support checker.
Equations
- ConwaySoifer.Certificates.nth [] x✝ = none
- ConwaySoifer.Certificates.nth (a :: tail) 0 = some a
- ConwaySoifer.Certificates.nth (head :: l) n.succ = ConwaySoifer.Certificates.nth l n
Instances For
Trusted leaf tests #
Untrusted search helpers #
The maximum coefficient-list length among all polynomial point coordinates.
Equations
- ConwaySoifer.Certificates.maxLen [] = 0
- ConwaySoifer.Certificates.maxLen (P :: Ps) = max (max (List.length P.1) (List.length P.2)) (ConwaySoifer.Certificates.maxLen Ps)
Instances For
Track the first largest value while scanning values with their indices.
Equations
- ConwaySoifer.Certificates.argmaxAux [] x✝² x✝¹ x✝ = x✝¹
- ConwaySoifer.Certificates.argmaxAux (v :: vs) x✝² x✝¹ x✝ = if x✝ < v then ConwaySoifer.Certificates.argmaxAux vs (x✝² + 1) x✝² v else ConwaySoifer.Certificates.argmaxAux vs (x✝² + 1) x✝¹ x✝
Instances For
The first index attaining the largest value, or zero for an empty list.
Equations
Instances For
Reject a direction using either a support bound or a cap.
Equations
- ConwaySoifer.Certificates.nodeCheck Ps den caps N u a b d fuel = (ConwaySoifer.Certificates.supportNode Ps den N u a b d fuel || ConwaySoifer.Certificates.capNode Ps caps u a b d fuel)
Instances For
Reject a positive orientation cone using a common support triple or a cap.
Equations
- ConwaySoifer.Certificates.coneCheck Ps den caps N u v a b d fuel = (ConwaySoifer.Certificates.supportCone Ps den N u v a b d fuel || ConwaySoifer.Certificates.capCone Ps caps u v a b d fuel)
Instances For
nodesOK … u ns: the consecutive cones (u, v₁), (v₁, v₂), … up to rot east all pass,
consecutive determinants are nonnegative on the piece, and every intermediate node satisfies
nodeCond.
Equations
- One or more equations did not get rendered due to their size.
- ConwaySoifer.Certificates.nodesOK Ps den caps N a b d fuel x✝ [] = false
Instances For
Candidate nodes (untrusted) #
The six rotations and opposite rays generated by a polynomial direction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Differences of every unordered pair of mandatory polynomial points.
Equations
Instances For
A polynomial direction paired with its exact integer evaluation.
Equations
Instances For
Pair a polynomial ray with its scaled rational-coordinate evaluation.
Equations
- ConwaySoifer.Certificates.evalRay num den N r = (r, ConwaySoifer.Certificates.evalScaledN r.1 num den N, ConwaySoifer.Certificates.evalScaledN r.2 num den N)
Instances For
Fuel-bounded merge of two lists using a Boolean ordering test.
Equations
- One or more equations did not get rendered due to their size.
- ConwaySoifer.Certificates.merge lt 0 x✝¹ x✝ = x✝¹ ++ x✝
- ConwaySoifer.Certificates.merge lt n.succ [] x✝ = x✝
- ConwaySoifer.Certificates.merge lt n.succ x✝ [] = x✝
Instances For
Fuel-bounded merge sort used only to propose certificate data.
Equations
Instances For
Keep a node only when the trusted conditions with the previously kept node hold.
Equations
Instances For
Non-overfull owners #
The segment [A, B] crosses the ray from v in direction dvec (all conditions on the
piece): dd > 0, 0 ≤ mu ≤ dd (crossing parameter inside the segment) and nm ≥ 0 (nonnegative
ray parameter nm/dd).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Candidate crossing pairs (untrusted pruning; everything is re-verified in
rayBoundsSum).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Trusted: two crossing pairs (points of Ps) whose lower bounds nm₁/dd₁ + nm₂/dd₂ reach
1 on the whole piece.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Apply the non-overfull exclusion when an owner flag is present.
Equations
- ConwaySoifer.Certificates.ordinaryCheck Ps den none a b d fuel = false
- ConwaySoifer.Certificates.ordinaryCheck Ps den (some i) a b d fuel = ConwaySoifer.Certificates.ordinaryExclusion Ps den i a b d fuel
Instances For
Diameter #
Rational split points (untrusted) #
Remove trailing zero coefficients from an integer polynomial.
Equations
Instances For
Differentiate successive coefficients starting at a specified degree.
Equations
- ConwaySoifer.Certificates.derivAux x✝ [] = []
- ConwaySoifer.Certificates.derivAux x✝ (c :: p) = ↑x✝ * c :: ConwaySoifer.Certificates.derivAux (x✝ + 1) p
Instances For
Differentiate an integer coefficient list.
Equations
Instances For
Remove trailing zeros from a rational coefficient list.
Equations
Instances For
Fuel-bounded polynomial remainder calculation over rational coefficients.
Equations
- ConwaySoifer.Certificates.qremAux 0 x✝¹ x✝ = x✝¹
- ConwaySoifer.Certificates.qremAux k.succ x✝¹ x✝ = if x✝¹.length < x✝.length then x✝¹ else ConwaySoifer.Certificates.qremAux k (ConwaySoifer.Certificates.qstep x✝¹ x✝) x✝
Instances For
All rational roots of a polynomial of degree at most two (integer square root test), and
the rational roots of gcd(p, p') for higher degrees (double roots). Fuel-bounded.
Equations
- One or more equations did not get rendered due to their size.
- ConwaySoifer.Certificates.ratRootsAux 0 x✝ = []
Instances For
Propose rational roots using a degree-based recursion budget.
Equations
Instances For
Rational comparison n₁/m₁ < n₂/m₂ for positive denominators.
Instances For
Compare rational pairs by cross multiplication; denominators are assumed positive.
Instances For
Candidate knots: switch parameters of support values, sign changes of contact polynomials and crossings of candidate directions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exclusion decision #
Split [a/d, b/d] at n/m (with a/d < n/m < b/d) into two pieces.
Equations
Instances For
Point sets: the ordered-field thinning of the reference verifier #
The sign of the first nonzero coefficient, or zero for a zero coefficient list.
Equations
Instances For
Compare polynomial points lexicographically by the first nonzero coefficient difference.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Sort polynomial points using their coefficient comparison.
Equations
- ConwaySoifer.Certificates.sortPts Ps = ConwaySoifer.Certificates.msort (fun (x y : ConwaySoifer.Certificates.IPoint) => decide (ConwaySoifer.Certificates.cmpPt x y < 0)) (Ps.length + 1) Ps
Instances For
Stack scan with a structural recursion budget. Each transition decreases
out.length + 2 * rest.length, so that measure suffices for the complete scan.
Equations
- One or more equations did not get rendered due to their size.
- ConwaySoifer.Certificates.halfHullAux 0 x✝¹ x✝ = x✝¹
- ConwaySoifer.Certificates.halfHullAux n.succ x✝ [] = x✝
- ConwaySoifer.Certificates.halfHullAux fuel.succ x✝ (q :: rest) = ConwaySoifer.Certificates.halfHullAux fuel (q :: x✝) rest
Instances For
Complete half-hull scan; the budget bounds stack transitions, not input size.
Equations
- ConwaySoifer.Certificates.halfHull out rest = ConwaySoifer.Certificates.halfHullAux (out.length + 2 * rest.length) out rest
Instances For
Certificate replay #
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
The replay state: mandatory point lists, caps and ordinary flags per owner.
The mandatory polynomial points for each owner.
The contact constraints for each owner.
Optional non-overfull side-owner indices.
Instances For
The thinned list, filtered to elements of the original list (so that membership is a syntactic fact and no property of the hull heuristic is needed).
Equations
- ConwaySoifer.Certificates.thinHullChecked L = List.filter (fun (P : ConwaySoifer.Certificates.IPoint) => decide (P ∈ L)) (ConwaySoifer.Certificates.thinHull L)
Instances For
Insert a forced point into its owner set and retain only a checked hull subset.
Equations
Instances For
Check the forced assignments in order and a final owner contradiction.
Equations
- One or more equations did not get rendered due to their size.
- ConwaySoifer.Certificates.replay M den a b d fuel depth [] x✝ = ConwaySoifer.Certificates.excluded (M.B x✝) den (M.caps x✝) (M.ord x✝) fuel depth a b d