Certificate-Driven Verification with Dyadic Arithmetic #
This file provides Golden Theorems for the Dyadic arithmetic backend, mirroring the
structure of Validity/Bounds.lean but using the high-performance IntervalDyadic type.
Overview #
The Dyadic backend offers significant performance advantages over rational arithmetic for many verification tasks, while maintaining full soundness. This module exposes the Dyadic evaluator as a first-class citizen for certificate-driven verification.
Main definitions #
Boolean Checkers #
checkUpperBoundDyadic- Check if the computed upper bound is ≤ ccheckLowerBoundDyadic- Check if the computed lower bound is ≥ c
Golden Theorems #
verify_upper_bound_dyadic- Converts boolean check to semantic proof for upper boundsverify_lower_bound_dyadic- Converts boolean check to semantic proof for lower bounds
For ExprSupported expressions (no log), convenience versions are provided that
don't require explicit domain validity proofs.
Design #
The Dyadic backend uses IntervalDyadic which represents intervals with dyadic endpoints
(numbers of the form m · 2^e). This allows for faster arithmetic than arbitrary rationals
while still providing rigorous bounds.
Key parameters:
prec : Int- Precision (negative = more precision). Must satisfyprec ≤ 0.depth : Nat- Taylor series depth for transcendental functions.
Trust Hierarchy #
This provides an alternative verification path to the rational-based Validity/Bounds.lean:
- Same
ExprAST andExprSupportedCorepredicate - Different computational backend (
IntervalDyadicvsIntervalRat) - Same semantic guarantees (bounds on real-valued evaluation)
The Dyadic path is faster but the rational path may be preferred for reproducibility across different platforms.
Boolean Checkers #
These check the computed interval bounds. Domain validity is handled separately.
Check if an expression's computed upper bound is ≤ c using Dyadic arithmetic.
This is the computable check that native_decide will execute.
Note: Domain validity must be established separately.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Golden Theorems #
These theorems convert the boolean true from the checkers into semantic proofs
about Real numbers.
Golden Theorem for Dyadic Upper Bounds
If the bound check passes and domain validity holds, then
∀ x ∈ [lo, hi], Expr.eval (fun _ => x) e ≤ c.
This is the key theorem for certificate-driven verification using the Dyadic backend.
Parameters:
e: The expression to evaluatehsupp: Proof that the expression is supported (ExprSupportedCore)lo,hi,hle: The interval [lo, hi] with proof lo ≤ hic: The upper bound to verifyprec: Precision (must be ≤ 0)depth: Taylor series depthh_prec: Proof that prec ≤ 0hdom: Proof of domain validity (automatic for ExprSupported)h_check: The boolean check result
Golden Theorem for Dyadic Lower Bounds
If the bound check passes and domain validity holds, then
∀ x ∈ [lo, hi], c ≤ Expr.eval (fun _ => x) e.
Convenience Theorems for ExprSupported #
For expressions that don't use log, domain validity is automatic.
These versions don't require the hdom hypothesis.
Convenience theorem for ExprSupported expressions (no log). Domain validity is automatic, so only the bound check is needed.
Convenience theorem for ExprSupported expressions (no log). Domain validity is automatic, so only the bound check is needed.