Certified decimal quantile bounds — Φ⁻¹ leaves symbolic-land #
The scorecard's radii are σ·Φ⁻¹(q₀) with Φ⁻¹ SYMBOLIC; the driver prints
decimals via float Acklam. This file closes that gap with certified rational
LOWER bounds on Φ⁻¹:
stdNormalCDF_panel— one upper-Riemann panelΦ(b) ≤ Φ(a) + (b−a)·φ(a)on[0,∞)(the density is antitone there), by bounding the Gaussian measure ofIoc a bthroughgaussianReal_apply+setLIntegral— no FTC, no improper integrals;ratExpLB/ratPdfUB/ratCeil9— a KERNEL-COMPUTABLE rational upper bound for the density: 32-term Taylor lower bound forexp(Real.sum_le_exp_of_nonneg),√(2π) ≥ 2.5066282(Real.pi_gt_d20), each panel value ceiling-rounded to10⁻⁹so the grid fold's denominators stay bounded (the exact values' lcm explodes);phiGridUB+stdNormalCDF_le_phiGridUB— the cumulative grid fold:Φ(m·h) ≤ phiGridUB h m, a computable ℚ;le_stdNormalQuantile_of_grid— the workhorse: ONEdecide +kernelrational checkphiGridUB h m ≤ q₀certifiesm·h ≤ Φ⁻¹(q₀).
For the whole corpus, the §prefix-scan section makes per-image checks cheap:
phiScanRev computes ALL grid values in one kernel pass (the head's two uses
stay shared through the kernel's whnf cache), phiScanRev_getD indexes it,
and le_stdNormalQuantile_of_scan/smooth_radius_dec turn one O(index)
lookup against the one-shot literal into a certified decimal radius — see
the generated SmoothingDecScorecard.lean (279 images). The literal is
verified in CHUNKS (phiScanRevFrom + phiScanRevFrom_append): one
whole-grid evaluation peaks at 15 GB of retained kernel-cache bignums (an
OOM on 16 GB CI runners); per-declaration chunks are freed in between.
All results are propext / Classical.choice / Quot.sound-clean.
One upper Riemann panel: on [a,b] ⊆ [0,∞) the density is at most its
left-endpoint value, so Φ(b) ≤ Φ(a) + (b−a)·φ(a).
Truncated Taylor sum — a computable rational lower bound for exp on
[0,∞) (32 terms: relative error < e⁻²⁴ at x = 5.12, our largest use).
Equations
- Proofs.ratExpLB x = ∑ i ∈ Finset.range 32, x ^ i / ↑i.factorial
Instances For
Computable rational upper bound for the standard-normal density at a
rational point: φ(a) = 1/(√(2π)·exp(a²/2)) ≤ 1/(2.5066282·ratExpLB(a²/2)).
Equations
- Proofs.ratPdfUB a = (25066282 / 10000000 * Proofs.ratExpLB (a ^ 2 / 2))⁻¹
Instances For
Round a rational UP to denominator 10⁹ — keeps the grid fold's
denominators from exploding (the exact ratPdfUB values have ~190-digit
numerators whose lcm across 640 grid points is astronomical).
Instances For
Computable upper bound for Φ(m·h): cumulative left-endpoint upper
Riemann panels from 0, each pdf bound ceiling-rounded to 10⁻⁹.
Equations
- Proofs.phiGridUB h 0 = 1 / 2
- Proofs.phiGridUB h m.succ = Proofs.phiGridUB h m + h * Proofs.ratCeil9 (Proofs.ratPdfUB (↑m * h))
Instances For
Descending prefix scan of the grid fold: phiScanRev h n = [phiGridUB h n, …, phiGridUB h 0]. Each step reuses the previous head, so
ONE kernel evaluation prices the whole grid at O(n) pdf bounds (a per-image
phiGridUB decide re-folds its whole prefix instead; the kernel's whnf
cache keeps the head's two uses shared — measured 81 s for the full
h = 1/1000, 3300-panel scan).
Equations
- Proofs.phiScanRev h 0 = [1 / 2]
- Proofs.phiScanRev h m.succ = match Proofs.phiScanRev h m with | [] => [] | x :: xs => (x + h * Proofs.ratCeil9 (Proofs.ratPdfUB (↑m * h))) :: x :: xs
Instances For
The scan workhorse: against a ONE-shot kernel-evaluated literal
phiScanRev h n = L, a single O(index) lookup L.getD (n−m) 1 ≤ q₀
certifies m·h ≤ Φ⁻¹(q₀) — per-image checks stop re-folding the grid.
The scan CONTINUED from a checkpoint: given v = phiGridUB h k,
phiScanRevFrom h k v j = [phiGridUB h (k+j), …, phiGridUB h k]
(established by phiScanRevFrom_append). Lets the whole-grid kernel
evaluation — 15 GB peak at 3300 panels, an OOM on 16 GB CI runners — be
split into per-declaration chunks: the kernel's whnf cache (which retains
every intermediate bignum) is freed between declarations.
Equations
- Proofs.phiScanRevFrom h k v 0 = [v]
- Proofs.phiScanRevFrom h k v m.succ = match Proofs.phiScanRevFrom h k v m with | [] => [] | x :: xs => (x + h * Proofs.ratCeil9 (Proofs.ratPdfUB (↑(k + m) * h))) :: x :: xs
Instances For
The chunk glue: a scan continued from the checkpoint phiGridUB h k
extends the full scan from k to k + j.
The scorecard-protocol decimal-radius form (σ = 1/2, grid h = 1/1000,
4-decimal q₀ = a/10000): one scan lookup certifies
m/2000 ≤ σ·Φ⁻¹(q₀) — the certified decimal counterpart of the driver's
float radius printout.