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 #

The predicates are ordered by generality:

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 - use ExprSupportedWithInv + evalInterval?)
    Instances For

      ExprSupported expressions are also in ExprSupportedCore

      Syntactic support predicate with inv and log #

      Syntactic support predicate for expressions with inv and log (no semantic conditions). This is the most general support predicate, allowing all expression constructors. Semantic correctness is handled by evalInterval? returning None when conditions fail.

      Instances For

        ExprSupported implies ExprSupportedWithInv