Checked Bounds for Partial Operations #
This module provides checkers and theorems for expressions that may contain
inverse-like operations (inv, log, atan, arsinh, atanh) using evalInterval?
which handles domain validation.
Main definitions #
Boolean Checkers #
checkUpperBoundChecked- Check upper bounds for expressions with inverse supportcheckLowerBoundChecked- Check lower bounds for expressions with inverse supportcheckStrictUpperBoundChecked- Check strict upper boundscheckStrictLowerBoundChecked- Check strict lower bounds
Golden Theorems #
verify_upper_bound_checked- Converts boolean check to semantic proofverify_lower_bound_checked- Converts boolean check to semantic proofverify_strict_upper_bound_checked- Strict upper bound verificationverify_strict_lower_bound_checked- Strict lower bound verification
Bridge Theorems #
verify_upper_bound_Icc_checked- Bridge to Set.Icc upper boundsverify_lower_bound_Icc_checked- Bridge to Set.Icc lower boundsverify_strict_upper_bound_Icc_checked- Bridge to Set.Icc strict upper boundsverify_strict_lower_bound_Icc_checked- Bridge to Set.Icc strict lower bounds
Boolean Checkers for arbitrary expressions #
NOTE: These are noncomputable because evalInterval? uses Real Taylor approximations.
They cannot be used with native_decide. Use the verification theorems directly
in term proofs or with explicit computation.
Check upper bound for arbitrary expressions.
Returns true iff evalInterval?1 succeeds and the upper bound is ≤ c.
NOTE: Noncomputable - cannot be used with native_decide.
Equations
- LeanCert.Validity.checkUpperBoundChecked e I c = match LeanCert.Engine.evalInterval?1 e I with | some J => decide (J.hi ≤ c) | none => false
Instances For
Check lower bound for arbitrary expressions.
Returns true iff evalInterval?1 succeeds and the lower bound is ≥ c.
NOTE: Noncomputable - cannot be used with native_decide.
Equations
- LeanCert.Validity.checkLowerBoundChecked e I c = match LeanCert.Engine.evalInterval?1 e I with | some J => decide (c ≤ J.lo) | none => false
Instances For
Check strict upper bound for arbitrary expressions. NOTE: Noncomputable - cannot be used with native_decide.
Equations
- LeanCert.Validity.checkStrictUpperBoundChecked e I c = match LeanCert.Engine.evalInterval?1 e I with | some J => decide (J.hi < c) | none => false
Instances For
Check strict lower bound for arbitrary expressions. NOTE: Noncomputable - cannot be used with native_decide.
Equations
- LeanCert.Validity.checkStrictLowerBoundChecked e I c = match LeanCert.Engine.evalInterval?1 e I with | some J => decide (c < J.lo) | none => false
Instances For
Golden Theorems for arbitrary expressions #
Verification theorem for upper bounds with arbitrary expressions.
Verification theorem for lower bounds with arbitrary expressions.
Verification theorem for strict upper bounds with arbitrary expressions.
Verification theorem for strict lower bounds with arbitrary expressions.
Set.Icc Bridge Theorems for arbitrary expressions #
Bridge theorem for Set.Icc upper bounds with arbitrary expressions.
Bridge theorem for Set.Icc lower bounds with arbitrary expressions.
Bridge theorem for Set.Icc strict upper bounds with arbitrary expressions.
Bridge theorem for Set.Icc strict lower bounds with arbitrary expressions.