Exact fixed-point interval certificate checker for matched-pair Gaussian majorants #
This module defines the pure-integer fixed-point interval arithmetic (Ival at scale 10 ^ 8),
polynomial arccos majorant tables (starQI, crossQI), and balanced-tree stack-machine
certificate verifier (Prog, runProg, checkBox) used to certify
pairCost u 0 ≤ 27735 / 100000 across the 6-dimensional admissible Gram space. Splitting
interval evaluations into short strict stages returning Option records pops intermediate WHNF
reduction frames so kernel verification runs well within default recursion and heartbeat limits
while avoiding analytic imports in the certificate shards.
Main definitions #
Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.certScale,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.sminI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.cminI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.maxoI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.c2I,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.piLoI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.piHiI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.targetI: fixed-point scale10 ^ 8and rational problem constants.Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.forceNat,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.bindInt,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ible,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.iblt,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.intEq,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.natLt,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.natEq,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.imax,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.imin,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.cdiv: strictInt/Boolarithmetic helpers.Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.Ival,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.bindIval,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivConst,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivPi,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivAdd,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivSub,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivNeg,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivMax,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivAbs,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivMul,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivSq,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivDivPos,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivScaleInt,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivDivInt: outward-rounded fixed-point interval operations.Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.QuadI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.starQI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.crossQI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivQeval,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.ivQslope: quadraticarccosmajorant tables and interval evaluators.Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.BoxI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.boxEq,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.bindBox,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.evalBox,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.rootBoxI,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.SubTree,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.lookupSub,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.SubTreeAll,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.PlanarStep,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.Step,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.Prog:6-dimensional fixed-point boxes, balanced lookup trees, certificate instructions, and balanced binary step trees.Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.calcSchurRhsHi,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.clampBox,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.isEmptyBox,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.splitBox,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.chkSchur,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.chkGram,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.chkShep,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.bound1dPt,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.bound1dIv,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.chkPlanar,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.stepOne,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.runProg,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.checkBox,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.Certified1,Cslib.Circuits.Frontier.Gaussian.PairBound.Cert.Certified2: staged leaf checkers and balanced-tree stack-machine verifier.
Fixed-point scale 10 ^ 8 for interval endpoints and certificate witnesses.
Fixed-point intra-edge switching threshold 0.9428 * 10 ^ 8.
Fixed-point cross-edge correlation floor 0.79998 * 10 ^ 8.
Fixed-point antisymmetric coordinate cap 0.10001 * 10 ^ 8.
Fixed-point Schur offset constant 1.322905 * 10 ^ 8.
Rigorous lower integer enclosure of π * 10 ^ 8.
Rigorous upper integer enclosure of π * 10 ^ 8.
Fixed-point pair-cost target 0.27735 * 10 ^ 8 = 5547 / 20000 * 10 ^ 8.
Pure Bool-dispatched integer maximum without propositional proof terms.
Pure Bool-dispatched integer minimum without propositional proof terms.
Point interval [n / 10 ^ 8, n / 10 ^ 8].
Verified enclosure [piLoI / 10 ^ 8, piHiI / 10 ^ 8] of π.
Exact interval sum a + b at fixed-point scale 10 ^ 8.
Exact interval difference a - b at fixed-point scale 10 ^ 8.
Exact interval negation -a at fixed-point scale 10 ^ 8.
Pointwise interval maximum max a b.
Exact interval absolute value |a|.
Outward-rounded interval product a * b at fixed-point scale 10 ^ 8.
Outward-rounded interval square a ^ 2 exploiting sign of 0 in a.
Exact multiplication of an interval a by an integer scalar k.
Outward-rounded division of an interval a by a positive integer k.
Lookup table of certified concave quadratic upper bounds for intra-star arccos.
Lookup table of certified concave quadratic upper bounds for cross-pair arccos.
Outward-rounded evaluation of concave quadratic model q on interval r.
Fixed-point 6-dimensional box (sab, scd, rb, o1, o2, tau0) at scale 10 ^ 8.
- a0 : ℤ
Lower endpoint of
sab. - a1 : ℤ
Upper endpoint of
sab. - b0 : ℤ
Lower endpoint of
scd. - b1 : ℤ
Upper endpoint of
scd. - r0 : ℤ
Lower endpoint of
rb. - r1 : ℤ
Upper endpoint of
rb. - o10 : ℤ
Lower endpoint of
o1. - o11 : ℤ
Upper endpoint of
o1. - o20 : ℤ
Lower endpoint of
o2. - o21 : ℤ
Upper endpoint of
o2. - t0 : ℤ
Lower endpoint of
tau0. - t1 : ℤ
Upper endpoint of
tau0.
Instances For
Pure Bool equality on BoxI across modules without DecidableEq proof terms.
Root 6-dimensional box covering the entire symmetry-reduced hard Gram domain.
Witness parameters for a planar-volume leaf (volume_planarRectSet_le_out or _in).
- isIn : Bool
Whether to use the interior (
true) or exterior (false) planar volume bound. - ia : ℕ
Index in
starQIforsab. - ib : ℕ
Index in
starQIforscd. - ic0 : ℕ
Index in
crossQIforsac. - ic1 : ℕ
Index in
crossQIforsbd. - ic2 : ℕ
Index in
crossQIforsad. - ic3 : ℕ
Index in
crossQIforsbc. - cexMode : ℕ
Mode (
0,1, or2) for bounding the planar Gaussian expectation factorcex. - lam : ℤ
Nonnegative Lagrange multiplier for positive-sign Schur penalty.
- lamM : ℤ
Nonnegative Lagrange multiplier for negative-sign Schur penalty.
- rxy : ℤ
Positive AM-GM balancing ratio
rxy. - slo : ℤ
Certified lower bound
sloon√D. - shi : ℤ
Certified upper bound
shion√D. - sm : ℤ
Midpoint expansion parameter
smforD ^ (-3 / 2). - cex : ℤ
Certified upper bound
cexon the planar Gaussian factor. - rhoLo : ℤ
Certified lower bound on
|ρ|incexMode = 2. - rhoHi : ℤ
Certified upper bound on
|ρ|incexMode = 2. - invSdetK : ℤ
Certified lower bound on
(det K) ^ (-1 / 2)whenisIn = true.
Instances For
Validated first stage of calcSchurRhsHi.
- a1 : Ival
Interval enclosure of
c2 - sab. - a2 : Ival
Interval enclosure of
c2 + sab. - d2 : Ival
Interval enclosure of
c2 + scd. - m11 : Ival
Interval enclosure of
15 * rb + 16 * sig * tau0. - m22 : Ival
Interval enclosure of
15 * tau0 + 16 * sig * rb. - m12 : Ival
Interval enclosure of
15 * o2 + 16 * sig * o1. - m21 : Ival
Interval enclosure of
15 * o1 + 16 * sig * o2.
Precompute and validate positivity side conditions for calcSchurRhsHi.
Upper bound on the nonlinear Schur remainder (or -1 if side conditions do not hold).
Intermediate state after Schur t-clamping in clampBox.
Intermediate Gram diagonal intervals in clampBox.
Sound domain tightening using cross-correlation bounds, Schur inequalities, and Gram PSD.
Certify that no 4-vector unit Gram matrix realizes any point in box b.
Intermediate cross-correlation evaluations for chkShep.
- vaHi : ℤ
Upper bound on
arccos sab. - vbHi : ℤ
Upper bound on
arccos scd. - s0 : ℤ
Lower bound on
sacclamped to[cminI, 1]. - s1 : ℤ
Lower bound on
sbdclamped to[cminI, 1]. - s2 : ℤ
Lower bound on
sadclamped to[cminI, 1]. - s3 : ℤ
Lower bound on
sbcclamped to[cminI, 1]. - vc0 : ℤ
Upper bound on
arccos sac. - vc1 : ℤ
Upper bound on
arccos sbd. - vc2 : ℤ
Upper bound on
arccos sad. - vc3 : ℤ
Upper bound on
arccos sbc.
Maximize sl * δ - curvLo * δ ^ 2 over |δ| ≤ dmaxHi for fixed integer slope sl.
Maximize s * δ - c * δ ^ 2 over s ∈ sl, c ∈ curv, and |δ| ≤ dmaxHi.
Validated stage-1a output (polynomial table lookups and D enclosure).
- qa : QuadI
Quadratic upper bound model for
arccos sab. - qb : QuadI
Quadratic upper bound model for
arccos scd. - qc0 : QuadI
Quadratic upper bound model for
arccos sac. - qc1 : QuadI
Quadratic upper bound model for
arccos sbd. - qc2 : QuadI
Quadratic upper bound model for
arccos sad. - qc3 : QuadI
Quadratic upper bound model for
arccos sbc. - vx : Ival
Interval enclosure of
(1 + sab) / 2. - vy : Ival
Interval enclosure of
(1 + scd) / 2. - dIv : Ival
Validated stage-1 output (basic domain, D, K_{ij}, and c_ex check).
- qa : QuadI
Quadratic upper bound model for
arccos sab. - qb : QuadI
Quadratic upper bound model for
arccos scd. - qc0 : QuadI
Quadratic upper bound model for
arccos sac. - qc1 : QuadI
Quadratic upper bound model for
arccos sbd. - qc2 : QuadI
Quadratic upper bound model for
arccos sad. - qc3 : QuadI
Quadratic upper bound model for
arccos sbc. - vx : Ival
Interval enclosure of
(1 + sab) / 2. - vy : Ival
Interval enclosure of
(1 + scd) / 2. - dIv : Ival
Validated positive interval enclosure of
D. - k00 : Ival
Nonnegative-clamped enclosure of
K_{00}. - k11 : Ival
Nonnegative-clamped enclosure of
K_{11}. - absK01 : Ival
Interval enclosure of
|K_{01}|. - kk : Ival
Interval enclosure of
K_{00} * K_{11}.
Validated stage-2a output (basic planar geometry before cxU/ceU).
- u1 : Ival
Interval enclosure of
o1 / D. - u2 : Ival
Interval enclosure of
o2 / D. - x1 : Ival
Interval enclosure of
u1 * rb. - x2 : Ival
Interval enclosure of
u2 * rb. - pIv : Ival
- omx1 : Ival
Interval enclosure of
1 - x1. - omx2 : Ival
Interval enclosure of
1 - x2. - opx1 : Ival
Interval enclosure of
1 + x1. - opx2 : Ival
Interval enclosure of
1 + x2. - detM : Ival
Positive interval enclosure of
(1 - x1) * (1 - x2) - pIv.
Validated stage-2 output (planar quadrilateral coefficients cxU, ceU, cAB).
- u1 : Ival
Interval enclosure of
o1 / D. - u2 : Ival
Interval enclosure of
o2 / D. - x1 : Ival
Interval enclosure of
u1 * rb. - x2 : Ival
Interval enclosure of
u2 * rb. - pIv : Ival
- omx1 : Ival
Interval enclosure of
1 - x1. - omx2 : Ival
Interval enclosure of
1 - x2. - detM : Ival
Positive interval enclosure of
(1 - x1) * (1 - x2) - pIv. - cxU : Ival
Interval enclosure of
pairCxMax / o2. - ceU : Ival
Interval enclosure of swapped
pairCxMax / o1. - omx1sq : Ival
Interval enclosure of
1 - x1 ^ 2. - denX12 : Ival
- denO12 : Ival
Interval enclosure of
(1 - x1) * (1 - x2) * detM. - cAB : Ival
Interval enclosure of
pairCAB.
Box midpoint intervals and coordinate half-widths.
- aM : Ival
Midpoint interval of
sab. - bM : Ival
Midpoint interval of
scd. - rM : Ival
Midpoint interval of
rb. - o1M : Ival
Midpoint interval of
o1. - o2M : Ival
Midpoint interval of
o2. - tM : Ival
Midpoint interval of
tau0. - daHi : ℤ
Upper half-width of
sab. - dbHi : ℤ
Upper half-width of
scd. - drHi : ℤ
Upper half-width of
rb. - do1Hi : ℤ
Upper half-width of
o1. - do2Hi : ℤ
Upper half-width of
o2. - dtHi : ℤ
Upper half-width of
tau0.
Validated stage-3b output (D midpoint and D^{-1/2} secant bound).
- vxM : Ival
Midpoint interval of
(1 + sab) / 2. - vyM : Ival
Midpoint interval of
(1 + scd) / 2. - dM : Ival
Midpoint interval of
D. - cInv : Ival
Nonnegative secant slope bound
cInvforD ^ (-1 / 2). - invM : Ival
Secant upper bound value at
dMforD ^ (-1 / 2). - dLMax : ℤ
Maximum variation
cInv * |D - dM|across the box.
Validated stage-3 output (box midpoints, D^{-1/2} secant, and D^{-3/2} tangent).
- aM : Ival
Midpoint interval of
sab. - bM : Ival
Midpoint interval of
scd. - rM : Ival
Midpoint interval of
rb. - o1M : Ival
Midpoint interval of
o1. - o2M : Ival
Midpoint interval of
o2. - tM : Ival
Midpoint interval of
tau0. - daHi : ℤ
Upper half-width of
sab. - dbHi : ℤ
Upper half-width of
scd. - drHi : ℤ
Upper half-width of
rb. - do1Hi : ℤ
Upper half-width of
o1. - do2Hi : ℤ
Upper half-width of
o2. - dtHi : ℤ
Upper half-width of
tau0. - vxM : Ival
Midpoint interval of
(1 + sab) / 2. - vyM : Ival
Midpoint interval of
(1 + scd) / 2. - dM : Ival
Midpoint interval of
D. - cInv : Ival
Secant slope bound for
D ^ (-1 / 2). - invM : Ival
Secant midpoint bound for
D ^ (-1 / 2). - dLMax : ℤ
Maximum secant variation
cInv * |D - dM|. - gM : Ival
Tangent lower bound at
dMforD ^ (-3 / 2). - gSl : Ival
Tangent slope
3 / (2 * sm ^ 5)forD ^ (-3 / 2). - gVarMax : ℤ
Maximum deviation of
D ^ (-3 / 2)fromgM.
Validated planar model (out or in) coefficients.
- bK0M : Ival
Midpoint coefficient of
K_{00}in the planar volume bound. - bK1M : Ival
Midpoint coefficient of
K_{11}in the planar volume bound. - cExM : Ival
Midpoint bilinear cross-term coefficient in the planar volume bound.
- bK0Sl : Ival
Linear slope of
K_{00}term with respect too2. - bK1Sl : Ival
Linear slope of
K_{11}term with respect too1. - bK0Rem : ℤ
Remainder bound for
K_{00}variation witho2. - bK1Rem : ℤ
Remainder bound for
K_{11}variation witho1. - cExSl1 : Ival
Linear slope of
cExwith respect too1. - cExSl2 : Ival
Linear slope of
cExwith respect too2. - cExCurv : Ival
Quadratic curvature upper bound of
cExin(o1, o2).
Certify that st.cex upper-bounds the correlated planar Gaussian expectation factor.
Stage 1a of chkPlanar: validate domain bounds, polynomial lookups, and D enclosure.
Stage 1 of chkPlanar: enclose K_{ij} and validate checkCexOk.
Validated denominators for calcCuOpt.
Validate and enclose the four rational denominators of pairCxp and pairCxm.
Enclose the normalized linear rational envelope pairCxMax / o.
Box midpoint intervals (first half of PlanarMid).
Enclose the six midpoint coordinates of box b.
Stage 3b of chkPlanar: enclose dM and secant parameters for D ^ (-1 / 2).
Stage 3 of chkPlanar: combine box midpoints with D ^ (-1 / 2) and D ^ (-3 / 2) models.
First half of planarModelOut.
First stage of exterior planar model (isIn = false).
Second half of planarModelOut.
- bK0Sl : Ival
Linear slope of exterior
K_{00}term ino2. - bK1Sl : Ival
Linear slope of exterior
K_{11}term ino1. - bK0Rem : ℤ
Bilinear remainder for
K_{00}variation witho2. - bK1Rem : ℤ
Bilinear remainder for
K_{11}variation witho1. - cXsqHi : ℤ
Upper bound on quadratic
(o1 ^ 2 + o2 ^ 2)coefficient ofpairCAB. - cO12Hi : ℤ
Upper bound on bilinear
o1 * o2coefficient ofpairCAB.
Assemble validated exterior planar volume model (volume_planarRectSet_le_out).
First stage of planarModelIn.
First stage of interior planar model (isIn = true).
Second stage of planarModelIn.
- acx : Ival
Interval enclosure of
pairAbsCx2. - ace : Ival
Interval enclosure of
pairAbsCe2. - k2 : Ival
Interval enclosure of interior
ξcutoff ratiok2. - k1 : Ival
Interval enclosure of interior
ηcutoff ratiok1. - cxmB : Ival
Interval enclosure of
cxU * o2. - cemB : Ival
Interval enclosure of
ceU * o1. - cabM4 : Ival
Nonnegative-clamped enclosure of
cAB - 4.
Assemble validated interior planar volume model (volume_planarRectSet_le_in).
Dispatch to planarModelOut (isIn = false) or planarModelIn (isIn = true).
First half of planarStage4.
Validated stage-4 output.
- ck0 : Ival
Combined AM-GM weight
ck0onK_{00}. - ck1 : Ival
Combined AM-GM weight
ck1onK_{11}. - rectM : Ival
Midpoint planar rectangle contribution divided by
4π. - cD : Ival
- remBilin : ℤ
Total higher-order bilinear remainder across box
b. - cSKKIv : Ival
Interval
[0, cSKK]multiplying signedcExslopes. - cSKKHi : Ival
Point interval
[cSKK, cSKK]multiplying quadraticcExcurvature.
Stage 4a of chkPlanar: assemble midpoint rectangle weight rectM and D-slope cD.
Stage 4 of chkPlanar: bound bilinear remainders and AM-GM cross factor cSKK.
Stage-5a output (Schur penalties and star midpoint evaluations).
Stage 5a of chkPlanar: evaluate Schur penalties and intra-star midpoint values/slopes.
Stage-5b1 output (cross-correlation midpoints and value sum).
Stage 5b1 of chkPlanar: evaluate cross-edge quadratic models at box midpoints.
Stage-5b output (cross-correlation slopes and minimum curvature).
- crossMHi : ℤ
Upper bound on midpoint cross-edge
arccossum divided by4π. - c2Min : ℤ
Minimum quadratic curvature
min(qc0.c2, qc1.c2, qc2.c2, qc3.c2). - slc0 : Ival
Negative derivative interval
-qc0'(sacM). - slc1 : Ival
Negative derivative interval
-qc1'(sbdM). - slc2 : Ival
Negative derivative interval
-qc2'(sadM). - slc3 : Ival
Negative derivative interval
-qc3'(sbcM).
Stage-5c output (directional slope intervals along all 6 coordinates).
- slA : Ival
Total directional slope interval with respect to
sab - aM. - slB : Ival
Total directional slope interval with respect to
scd - bM. - slR : Ival
Total directional slope interval with respect to
rb - rM. - slO1 : Ival
Total directional slope interval with respect to
o1 - o1M. - slO2 : Ival
Total directional slope interval with respect to
o2 - o2M. - slT : Ival
Total directional slope interval with respect to
tau0 - tM.
Stage 5c of chkPlanar: assemble directional slope intervals along all 6 coordinates.
Stage 5 of chkPlanar: sum midpoint value, remainders, and 1D coordinate variations.
Full staged verifier for a planar-volume leaf (Step.planar st) on box b.
Direct certificate witness for b using no sub-boxes.
Two-level certificate witness for b discharging into Certified1 sub-boxes.