TorchLean API

NN.MLTheory.CROWN.Proofs.DirectedIBPMaxPool

Directed enclosure for max pooling #

The window fold skips padded cells and uses zero only when the entire fold is empty. Its comparison selects an endpoint exactly; the proof needs the scalar order law, not rounded addition or an assumption that pooling windows contain positive values.

Three optional window values have matching presence and enclosing scalar values.

Instances For

    The unordered-value branch does not require reflexive scalar equality. Under the order law, two mutually non-greater values denote the same real number.

    The max-pool fold step, with absent padded candidates skipped.

    Instances For
      theorem NN.MLTheory.CROWN.Graph.DirectedBackward.foldl_rel₃ {ι β γ δ : Type} (R : β → γ → δ → Prop) (indices : List ι) {fl : β → ι → β} {fu : γ → ι → γ} {fx : δ → ι → δ} (hstep : ∀ (l : β) (u : γ) (x : δ) (i : ι), R l u x → R (fl l i) (fu u i) (fx x i)) {l : β} {u : γ} {x : δ} (h : R l u x) :
      R (List.foldl fl l indices) (List.foldl fu u indices) (List.foldl fx x indices)

      A ternary relation preserved by each list step is preserved by the complete fold.

      theorem NN.MLTheory.CROWN.Graph.DirectedBackward.foldlIndices_rel₃ {β γ δ : Type} (R : β → γ → δ → Prop) (dims : List ℕ) {fl : β → List ℕ → β} {fu : γ → List ℕ → γ} {fx : δ → List ℕ → δ} (hstep : ∀ (l : β) (u : γ) (x : δ) (i : List ℕ), R l u x → R (fl l i) (fu u i) (fx x i)) {l : β} {u : γ} {x : δ} (h : R l u x) :

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

      theorem NN.MLTheory.CROWN.Graph.DirectedBackward.TensorEncloses.maxPoolSpatial {α : Type} [TorchLean.Storage α] [Context α] [BoundOps α] [LawfulBoundOps α] {d : ℕ} {kernel stride padding spatial : TorchLean.Tensor ℕ [d]} {hk : ∀ (i : Fin d), kernel.getScalar i ≠ 0} {hs : ∀ (i : Fin d), stride.getScalar i ≠ 0} (layer : Spec.MaxPoolSpec d kernel stride padding hk hs) {lo hi : TorchLean.Tensor α (Spec.Shape.ofList (TorchLean.Tensor.Internal.Rep.data spatial).toList)} {x : TorchLean.Tensor ℝ (Spec.Shape.ofList (TorchLean.Tensor.Internal.Rep.data spatial).toList)} (h : TensorEncloses lo hi x) :
      theorem NN.MLTheory.CROWN.Graph.DirectedBackward.TensorEncloses.mapLeading {α : Type} [TorchLean.Storage α] [Context α] [BoundOps α] [LawfulBoundOps α] (leading : Spec.Shape) {s t : Spec.Shape} {fl fu : TorchLean.Tensor α s → TorchLean.Tensor α t} {fx : TorchLean.Tensor ℝ s → TorchLean.Tensor ℝ t} (hstep : ∀ {lo hi : TorchLean.Tensor α s} {x : TorchLean.Tensor ℝ s}, TensorEncloses lo hi x → TensorEncloses (fl lo) (fu hi) (fx x)) {lo hi : TorchLean.Tensor α (leading.concat s)} {x : TorchLean.Tensor ℝ (leading.concat s)} (h : TensorEncloses lo hi x) :

      The arbitrary-rank real max-pool evaluator is enclosed by the two endpoint evaluations.