Core Bound Verification #
This module provides the fundamental infrastructure for certificate-driven verification of numerical bounds using interval arithmetic.
Main definitions #
Boolean Checkers #
checkUpperBound- Check if∀ x ∈ I, f(x) ≤ cvia interval arithmeticcheckLowerBound- Check if∀ x ∈ I, c ≤ f(x)via interval arithmeticcheckStrictUpperBound- Check if∀ x ∈ I, f(x) < ccheckStrictLowerBound- Check if∀ x ∈ I, c < f(x)
Golden Theorems #
verify_upper_bound- ConvertscheckUpperBound = trueto semantic proofverify_lower_bound- ConvertscheckLowerBound = trueto semantic proofverify_strict_upper_bound- ConvertscheckStrictUpperBound = trueto semantic proofverify_strict_lower_bound- ConvertscheckStrictLowerBound = trueto semantic proof
Check if an expression is bounded above by c on interval I.
Returns true iff domain validity holds AND the computed upper bound is ≤ c.
Equations
- LeanCert.Validity.checkUpperBound e I c cfg = (LeanCert.Engine.checkDomainValid1 e I cfg && decide ((LeanCert.Internal.Rational.evalTotalCore1 e I cfg).hi ≤ c))
Instances For
Check if an expression is bounded below by c on interval I.
Returns true iff domain validity holds AND the computed lower bound is ≥ c.
Equations
- LeanCert.Validity.checkLowerBound e I c cfg = (LeanCert.Engine.checkDomainValid1 e I cfg && decide (c ≤ (LeanCert.Internal.Rational.evalTotalCore1 e I cfg).lo))
Instances For
Check if an expression is strictly bounded above by c on interval I.
Returns true iff domain validity holds AND the computed upper bound is < c.
Equations
- LeanCert.Validity.checkStrictUpperBound e I c cfg = (LeanCert.Engine.checkDomainValid1 e I cfg && decide ((LeanCert.Internal.Rational.evalTotalCore1 e I cfg).hi < c))
Instances For
Check if an expression is strictly bounded below by c on interval I.
Returns true iff domain validity holds AND the computed lower bound is > c.
Equations
- LeanCert.Validity.checkStrictLowerBound e I c cfg = (LeanCert.Engine.checkDomainValid1 e I cfg && decide (c < (LeanCert.Internal.Rational.evalTotalCore1 e I cfg).lo))
Instances For
Golden Theorems #
These theorems convert the boolean true from the checkers into semantic proofs
about Real numbers. They are the theorems a tactic will apply.
Golden Theorem for Upper Bounds
If checkUpperBound e I c cfg = true, then ∀ x ∈ I, Expr.eval (fun _ => x) e ≤ c.
Golden Theorem for Lower Bounds
If checkLowerBound e I c cfg = true, then ∀ x ∈ I, c ≤ Expr.eval (fun _ => x) e.
Golden Theorem for Strict Upper Bounds
If checkStrictUpperBound e I c cfg = true, then ∀ x ∈ I, Expr.eval (fun _ => x) e < c.
Golden Theorem for Strict Lower Bounds
If checkStrictLowerBound e I c cfg = true, then ∀ x ∈ I, c < Expr.eval (fun _ => x) e.
Convenience lemmas for pointwise bounds #
Pointwise upper bound: if check passes and x ∈ I, then f(x) ≤ c
Pointwise lower bound: if check passes and x ∈ I, then c ≤ f(x)
Two-sided bounds #
Check both lower and upper bounds simultaneously
Equations
- LeanCert.Validity.checkBounds e I lo hi cfg = (LeanCert.Validity.checkLowerBound e I lo cfg && LeanCert.Validity.checkUpperBound e I hi cfg)
Instances For
Two-sided bound verification: if both checks pass, then lo ≤ f(x) ≤ hi for all x ∈ I
Argmax/Argmin Verification #
Check that evaluating f at a point x gives a value ≥ c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Check that evaluating f at a point x gives a value ≤ c.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Verify that c ≤ f(x) at a specific point x.
Verify that f(x) ≤ c at a specific point x.
Argmax Verification Theorem
Proves ∀ y ∈ I, f(y) ≤ f(x) (x is a maximizer) by:
- Checking that
∀ y ∈ I, f(y) ≤ c(the max over I is at most c) - Checking that
c ≤ f(x)(the value at x is at least c)
Argmin Verification Theorem
Proves ∀ y ∈ I, f(x) ≤ f(y) (x is a minimizer).