Documentation

LeanCert.Engine.AD.DomainChecked

Computable domain-aware automatic differentiation #

This module extends LeanCert's computable forward-mode AD path with checked reciprocal and logarithm nodes. The existing ADSupported fragment remains the domain-free fast path. Here, successful evaluation itself certifies both syntactic support and every partial-domain side condition.

Computable checked dual evaluation. No finite derivative enclosure is returned unless every reciprocal denominator excludes zero and every logarithm argument is strictly positive on the input box.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Checked value-and-derivative evaluation along coordinate idx.

    Equations
    Instances For

      Checked derivative enclosure along coordinate idx.

      Equations
      Instances For

        Checked derivative enclosure for a single-variable expression.

        Equations
        Instances For
          theorem LeanCert.Engine.evalDualChecked_val_correct (e : Core.Expr) (ρReal : ℕ → ℝ) (ρDual : DualEnv) (cfg : EvalConfig) (D : DualInterval) (hρ : ∀ (i : ℕ), ρReal i ∈ (ρDual i).val) (hok : evalDualChecked e ρDual cfg = Except.ok D) :

          Successful checked dual evaluation encloses the expression value for every real environment represented by the dual environment.

          theorem LeanCert.Engine.evalWithDerivChecked_differentiableAt (e : Core.Expr) (ρReal : ℕ → ℝ) (ρInt : IntervalEnv) (idx : ℕ) (cfg : EvalConfig) (D : DualInterval) (x : ℝ) (hx : x ∈ ρInt idx) (hρ : ∀ (i : ℕ), ρReal i ∈ ρInt i) (hok : evalWithDerivChecked e ρInt idx cfg = Except.ok D) :
          DifferentiableAt ℝ (e.evalAlong ρReal idx) x

          A successful checked evaluation proves differentiability at every point in the input box along the selected coordinate.

          theorem LeanCert.Engine.evalWithDerivChecked_der_correct (e : Core.Expr) (ρReal : ℕ → ℝ) (ρInt : IntervalEnv) (idx : ℕ) (cfg : EvalConfig) (D : DualInterval) (x : ℝ) (hx : x ∈ ρInt idx) (hρ : ∀ (i : ℕ), ρReal i ∈ ρInt i) (hok : evalWithDerivChecked e ρInt idx cfg = Except.ok D) :
          deriv (e.evalAlong ρReal idx) x ∈ D.der

          Successful checked indexed AD encloses the true partial derivative.

          theorem LeanCert.Engine.derivIntervalChecked_correct (e : Core.Expr) (ρReal : ℕ → ℝ) (ρInt : IntervalEnv) (idx : ℕ) (cfg : EvalConfig) (dI : Core.IntervalRat) (x : ℝ) (hx : x ∈ ρInt idx) (hρ : ∀ (i : ℕ), ρReal i ∈ ρInt i) (hok : derivIntervalChecked e ρInt idx cfg = Except.ok dI) :
          deriv (e.evalAlong ρReal idx) x ∈ dI

          Golden soundness theorem for the checked derivative-only API.