Discovery Mode: Finder Functions #
This module provides high-level "finder" functions that:
- Run the appropriate algorithm (optimization, root finding, etc.)
- Generate certificate parameters automatically
- Assemble the proof term using the "Golden Theorems" from Certificate.lean
These functions produce proof-carrying results (Verified* types) that bundle
computed data with semantic proofs.
Main Definitions #
findGlobalMin- Find and verify a global minimumfindGlobalMax- Find and verify a global maximumsearchRoots- Find root candidates (not formally verified)quickBounds- Quick interval evaluation
Design #
The finders work in two stages:
- Computation: Run the raw algorithm (e.g.,
globalMinimizeCore) - Certification: Apply the corresponding Golden Theorem to get the proof
The proof is assembled by native_decide evaluating the boolean certificate checker.
Global Minimum Finding #
Find a verified global minimum of an expression over a box.
This function:
- Runs
globalMinimizeCoreto compute the bound - Uses
globalMinimizeCore_lo_correctto produce a proof
The returned VerifiedGlobalMin bundles:
- The computed lower bound
- The best box containing a near-minimizer
- A proof that the bound is valid for all points in the domain
Usage:
def result := findGlobalMin expr support domain cfg
-- result.bound is the minimum bound
-- result.is_lower_bound is the proof
Equations
- One or more equations did not get rendered due to their size.
Instances For
Find a verified global maximum of an expression over a box.
Symmetric to findGlobalMin, using maximization instead.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Bound Verification #
Verify an upper bound using interval arithmetic.
Returns some proof if the bound is verified, none otherwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Verify a lower bound using interval arithmetic.
Returns some proof if the bound is verified, none otherwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Root Finding #
Result of root search before certification
- intervals : List Core.IntervalRat
Intervals that may contain roots
- statuses : List Engine.RootStatus
Status for each interval
- iterations : ℕ
Iteration count
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Find roots of an expression on an interval using bisection.
This searches for roots but doesn't provide formal proofs of existence. The results indicate where roots may exist based on sign changes.
Note: For formal verification, use the sign change theorems from Certificate.lean
with the returned intervals that have hasRoot status.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Convenience Functions #
Quick bounds check: returns (lo, hi) interval containing all values of expr on domain
Equations
- LeanCert.Discovery.quickBounds expr domain cfg = ((LeanCert.Engine.evalIntervalCore1 expr domain cfg.toEvalConfig).lo, (LeanCert.Engine.evalIntervalCore1 expr domain cfg.toEvalConfig).hi)
Instances For
Quick global bounds: returns (min, max) bounds using optimization
Equations
- LeanCert.Discovery.quickGlobalBounds expr hsupp domain cfg = ((LeanCert.Discovery.findGlobalMin expr hsupp domain cfg).bound, (LeanCert.Discovery.findGlobalMax expr hsupp domain cfg).bound)
Instances For
Adaptive Verification #
These functions automatically increase precision until verification succeeds.
Try to verify an upper bound with increasing Taylor depths.
Returns some with the verified bound if successful, none otherwise.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Try to verify a lower bound with increasing Taylor depths.
Returns some with the verified bound if successful, none otherwise.
Equations
- One or more equations did not get rendered due to their size.