Computable Bernstein certificates for rational polynomials #
Engine/TaylorModel/Core.lean proves that a polynomial on a closed interval lies
between the minimum and maximum of its Bernstein coefficients, but states the
result over Mathlib's noncomputable Polynomial ℚ. This file evaluates the same
enclosure on the executable QPoly representation so it can serve as a Boolean
certificate:
bernsteinCoeffs p I— exact Bernstein coefficients ofpon[I.lo, I.hi], obtained by composingpwith the affine reparametrisation of[0,1]ontoIand converting monomial to Bernstein coefficients;bernsteinEnclosure p I— the interval[min bₖ, max bₖ];bernsteinCheck cmp p c I depth— a recursive certificate that either proves the comparison from the enclosure on the current box or bisects, up todepth.
Bisection recomputes the coefficients on each child from p (exact, O(n²)
per box) so the soundness proof reduces to the one-box enclosure every time.
Unlike Horner interval evaluation, the Bernstein enclosure is exact at the
endpoints and converges quadratically under bisection, so polynomial bounds
that are tight near an endpoint need no subdivision at all.
Affine reparametrisation #
The affine map t ↦ I.lo + (I.hi - I.lo) · t sending [0,1] onto I.
Equations
Instances For
Coefficients of t ↦ p(I.lo + (I.hi - I.lo) t), padded to be nonempty.
Equations
Instances For
Bernstein coefficients and enclosure #
Exact Bernstein coefficients of p on I (degree p.coeffs.size - 1).
Equations
Instances For
[min bₖ, max bₖ] over the Bernstein coefficients of p on I.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Bernstein enclosure. Every value of p on I lies in
bernsteinEnclosure p I.
Recursive certificates #
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Semantic comparison c ?? y for each Cmp.
Equations
- LeanCert.Engine.QPoly.Cmp.lower.holds x✝¹ x✝ = (x✝¹ ≤ x✝)
- LeanCert.Engine.QPoly.Cmp.upper.holds x✝¹ x✝ = (x✝ ≤ x✝¹)
- LeanCert.Engine.QPoly.Cmp.strictLower.holds x✝¹ x✝ = (x✝¹ < x✝)
- LeanCert.Engine.QPoly.Cmp.strictUpper.holds x✝¹ x✝ = (x✝ < x✝¹)
Instances For
Does the enclosure J prove c ?? y for every y ∈ J?
Equations
Instances For
Recursive Bernstein certificate: prove cmp from the enclosure on I, or
bisect and certify both halves, up to depth levels.
Equations
- One or more equations did not get rendered due to their size.
- LeanCert.Engine.QPoly.bernsteinCheck cmp p c I 0 = cmp.check (p.bernsteinEnclosure I) c
Instances For
Least depth at which bernsteinCheck succeeds, if any up to maxDepth.
Untrusted search helper used for reporting; certificates re-run the checker.
Equations
- LeanCert.Engine.QPoly.bernsteinDepth? cmp p c I maxDepth = List.find? (fun (depth : ℕ) => LeanCert.Engine.QPoly.bernsteinCheck cmp p c I depth) (List.range (maxDepth + 1))
Instances For
Number of boxes examined by bernsteinCheck (reporting only).
Equations
- One or more equations did not get rendered due to their size.
- LeanCert.Engine.QPoly.bernsteinBoxes cmp p c I 0 = 1
Instances For
Soundness of the recursive Bernstein certificate.
Lower bounds from a Bernstein certificate.