Interval Soundness Lemmas #
Scalar interval arithmetic, box-cast lemmas, and point-box facts used by the graph IBP soundness induction.
Op-level soundness lemmas (enclosure for each supported step) #
These lemmas are the building blocks for the final “certificate ⇒ semantics enclosure” theorem.
This proof reuses the following existing components:
- Linear IBP soundness over
ℝis already proved inNN.MLTheory.CROWN.mlpasNN.MLTheory.CROWN.Theorems.ibp_linear_sound_real. - For add/sub/relu on
FlatBox, the graph file already contains enclosure lemmas inNN.MLTheory.CROWN.Graph.Theorems.Semantics.
Monotonicity of real ReLU, used by interval enclosure proofs.
Helpers: our bound propagation uses BoundOps.min2/max2, which are defined via decide (a > b).
For ℝ these coincide with min/max.
Casting lemmas (avoid cases on B.dim = v.n) #
FlatBox and FlatVec carry their dimensions in dependent types, so it is tempting to
cases equalities like h : B.dim = v.n to “align” types. In Lean this can easily trigger
dependent elimination failures when the equality mentions fields of dependent records.
Instead, we keep such equalities as data and move tensors/boxes across them using
castDimScalar / castBoxDim. The following small lemmas are proved once (by cases on
fresh Nat equalities) and then used throughout the main proof without ever cases-ing on
B.dim = v.n directly.
Point Boxes Always Enclose Their Point #
This is used in the .const case, where a constant node certifies a point box
[v,v] and the semantics returns exactly the same v.