Calculus Examples #
This file demonstrates automatic differentiation and derivative bounds using LeanCert.
Verified AD Examples #
The evalDual_val_correct theorem is FULLY PROVED for the supported
expression subset {const, var, add, mul, neg, sin, cos}. This demonstrates
verified forward-mode automatic differentiation with interval bounds.
Supported expressions for AD #
The expression x²
Equations
Instances For
Proof that x² is in the supported subset
Instances For
The expression x³ = x * x * x
Equations
Instances For
Proof that x³ is supported
Equations
Instances For
The expression sin(x) * cos(x)
Equations
Instances For
Proof that sin(x)*cos(x) is supported
Equations
Instances For
Interval environments for AD #
Unit interval [0, 1]
Equations
- LeanCert.Examples.Calculus.I01 = { lo := 0, hi := 1, le := LeanCert.Examples.Calculus.I01._proof_1 }
Instances For
Create a dual environment for differentiating with respect to x
Equations
Instances For
Verified value computation #
Verified: the value component of dual evaluation is correct. For any x ∈ [0,1], the value of x² lies in the computed interval. This theorem has NO SORRY.
Verified: the value component for x³ is correct
Verified: the value component for sin(x)*cos(x) is correct
Point evaluation examples #
Evaluate x² at a point with its derivative
Equations
Instances For
Verified exp support via IntervalReal #
With the new IntervalReal (real-endpoint intervals) and ExprSupportedExt,
we can now prove facts about expressions containing exp!
The expression exp(x)
Equations
Instances For
The expression exp(x²)
Equations
Instances For
Proof that exp(x) is in the extended supported subset
Equations
Instances For
Proof that exp(x²) is in the extended supported subset
Instances For
Real-endpoint unit interval [0, 1]
Equations
- LeanCert.Examples.Calculus.I01Real = { lo := 0, hi := 1, le := LeanCert.Examples.Calculus.I01Real._proof_1 }
Instances For
Verified: exp(x) on [0, 1] gives a value in the computed interval. This theorem has NO SORRY - exp is now fully supported!
Verified: exp(x²) on [0, 1] gives a value in the computed interval. This demonstrates chained exp support!