NLA-lib Explorer

NLAlib.Ops.inInterval_packFinMatrix_iff

Library · theorem

Scanning a packed finite matrix is equivalent to testing every component of its entries against the same decoded bounds, including empty matrices.

NLAlib.Ops.inInterval_packFinMatrix_iff {K E : Type} [Inhabited K] (C : Ops.EntryCodec K E)
  (dec : K → ℝ) (a b : K) {rows cols : ℕ} (A : Matrix (Fin rows) (Fin cols) E) :
  Ops.InInterval dec a b (Ops.vec (C.packFinMatrix A)) (cols * rows * C.width) ↔
    ∀ (i : Fin rows) (j : Fin cols) (z : Fin C.width),
      dec a ≤ dec (C.words (A i j) z) ∧ dec (C.words (A i j) z) ≤ dec b

Full source on GitHub

Import NLAlib.Ops.Blas.IntervalMatrix.