TorchLean API

NN.MLTheory.CROWN.Proofs.ConvEnclosure

Enclosure by the directed convolution folds #

The executable convolution transfer bounds each signed product and accumulates those bounds in the same channel/kernel order as groupedConvSpec. These theorems establish its enclosure over the exact real BoundOps instance, including padding, grouped channels, dilation, and arbitrary leading batch dimensions. The affine corollary uses the existing convolution matrix equality; the transfer itself continues to use its spatial folds.

Flattening preserves and reflects every component inequality of a real tensor box.

theorem NN.MLTheory.CROWN.ConvProof.contains_getAtOrZero {dims : List ℕ} {box : Box ℝ (Spec.Shape.ofList dims)} {input : TorchLean.Tensor ℝ (Spec.Shape.ofList dims)} (h : box.contains input) (indices : List ℕ) :
Spec.getAtOrZero box.lo indices ≤ Spec.getAtOrZero input indices ∧ Spec.getAtOrZero input indices ≤ Spec.getAtOrZero box.hi indices
theorem NN.MLTheory.CROWN.ConvProof.foldlIndices_rel {A B : Type} (relation : A → B → Prop) (dims : List ℕ) {left : A → List ℕ → A} {right : B → List ℕ → B} (step : ∀ (a : A) (b : B) (i : List ℕ), relation a b → relation (left a i) (right b i)) {a : A} {b : B} (initial : relation a b) :

The spatial iterator preserves a binary relation independently of rank and empty extents.

theorem NN.MLTheory.CROWN.ConvProof.ibpConv_contains_groupedConv_real {d inC outC : ℕ} {kernel stride padding inSpatial : TorchLean.Tensor ℕ [d]} (layer : Spec.ConvSpec d inC outC kernel stride padding ℝ) (dilation paddingAfter : TorchLean.Tensor ℕ [d]) (groups : ℕ) (leading : Spec.Shape) (box : Box ℝ (leading.concat (Spec.Shape.ofList (inC :: (TorchLean.Tensor.Internal.Rep.data inSpatial).toList)))) (input : TorchLean.Tensor ℝ (leading.concat (Spec.Shape.ofList (inC :: (TorchLean.Tensor.Internal.Rep.data inSpatial).toList)))) (h : box.contains input) :
(ibpConv layer dilation paddingAfter groups leading box).contains (TorchLean.Tensor.mapLeading leading (Spec.groupedConvSpec groups layer.kernel layer.bias) input)

The actual directed convolution transfer encloses the grouped convolution specification over the reals, independently in every leading batch.