TorchLean API

NN.Verification.ProofBackedCertificates

Certificate theorem examples #

Most files in this directory are runnable checkers: they parse an artifact, recompute the relevant bounds, and reject the artifact if it disagrees with Lean. This file shows the complementary theorem-backed layer. The public theorems below are the bridge from “the checker accepted this certificate” to “the represented graph semantics is enclosed.”

The split is deliberate:

In other words, a JSON checker answers "does this artifact match Lean recomputation?" The theorem handles below answer the stronger question: "assuming the local checker hypotheses, what semantic fact follows?"

Theorem handles #

These aliases keep the important public theorem names visible in generated docs and catch namespace/API mismatches during builds.

@[reducible, inline]
noncomputable abbrev NN.Verification.ProofBackedCertificates.crownCertificateSoundnessIEEE32 (g : MLTheory.CROWN.Graph) (_ps : MLTheory.CROWN.Graph.ParamStore TorchLean.Floats.IEEE754.IEEE32Exec) (step : Array (Option (MLTheory.CROWN.Graph.FlatAffineBounds TorchLean.Floats.IEEE754.IEEE32Exec))Option (MLTheory.CROWN.Graph.FlatAffineBounds TorchLean.Floats.IEEE754.IEEE32Exec)) (cert : Array (Option (MLTheory.CROWN.Graph.FlatAffineBounds TorchLean.Floats.IEEE754.IEEE32Exec))) (_inputs : Std.HashMap (MLTheory.CROWN.Graph.FlatVec TorchLean.Floats.IEEE754.IEEE32Exec)) (vals : Array (Option (MLTheory.CROWN.Graph.FlatVec TorchLean.Floats.IEEE754.IEEE32Exec))) (ctx : MLTheory.CROWN.Graph.AffineCtx) (x : Spec.Tensor TorchLean.Floats.IEEE754.IEEE32Exec (Spec.Shape.dim ctx.inputDim Spec.Shape.scalar)) [Preorder TorchLean.Floats.IEEE754.IEEE32Exec] (htopo : MLTheory.CROWN.Graph.CrownCertSoundness.TopoSorted g) (_hsem : vals.size = g.nodes.size id < g.nodes.size, vals[id]! = vals[id]!) (hcert : MLTheory.CROWN.Graph.CrownCertSoundness.CrownCertLocalOK g step cert) (hsound : id < g.nodes.size, (∀ pg.nodes[id]!.parents, match cert[p]!, vals[p]! with | some bp, some vp => MLTheory.CROWN.Graph.CrownCertSoundness.EnclosesAtInput ctx x bp vp | x, x_1 => True)match step cert id, vals[id]! with | some b, some v => MLTheory.CROWN.Graph.CrownCertSoundness.EnclosesAtInput ctx x b v | x, x_1 => True) (id : ) :
id < g.nodes.sizematch cert[id]!, vals[id]! with | some b, some v => MLTheory.CROWN.Graph.CrownCertSoundness.EnclosesAtInput ctx x b v | x, x_1 => True

Schematic IEEE32Exec version used when the local transfer rule is supplied for floats.

Instances For