Documentation

LeanCert.Core.Support

Expression Support Predicates #

This file defines predicates indicating which expressions are supported by different interval evaluation strategies.

Main definitions #

Design notes #

ADSupported is the differentiable fragment used by automatic differentiation. It is contained in ExprSupportedCore via ADSupported.toCore. Checked evaluators accept arbitrary expressions and encode domain failure in their result type, so they need no syntactic support predicate.

The core subset is kept computable so that tactics can use native_decide for interval bound checking. The extended subset uses Real.exp with floor/ceil bounds, which requires noncomputability.

Core supported expression subset (computable) #

Predicate indicating an expression is in the computable core subset. Supports: const, var, add, mul, neg, sin, cos, exp, log, sqrt, sinh, cosh, tanh, erf, pi

Note: log requires positive domain for correctness. The correctness theorem evalIntervalCore_correct has an additional hypothesis evalDomainValid that ensures log arguments evaluate to positive intervals.

Instances For

    Extended supported expression subset (with exp) #

    Predicate indicating an expression is in the fully-verified subset for AD. Supports: const, var, add, mul, neg, sin, cos, exp Does NOT support:

    • sqrt (not differentiable at 0 - use ExprSupportedCore for interval evaluation only)
    • inv (requires nonzero interval checks)
    • log (requires positive interval checks)
    • atan/arsinh/atanh (derivative proofs incomplete in the total AD evaluator)
    Instances For

      ADSupported expressions are also in ExprSupportedCore

      The executable support check recognizes exactly the differentiable ADSupported fragment used by the checked AD/monotonicity backend.

      A successful computable core-support check produces the corresponding proof object required by the tight Rational evaluator theorem.