NLA-lib Explorer

NLAlib.Ops.Store.HoldsEntries.update_column_of_frame

Library · theorem

Replace one stored column and preserve every other column through its exact frame. No initialization of padding cells or separate-buffer assumption is required.

NLAlib.Ops.Store.HoldsEntries.update_column_of_frame {K E : Type} [Inhabited K] {s s' : Ops.Store K}
  {C : Ops.EntryCodec K E} {L : Ops.MatLayout} {A : ℕ → ℕ → E} (h : s.HoldsEntries C L A)
  (hL : L.Valid) {j : ℕ} {F : Ops.Fp}
  (hF : F.Disj (Ops.Store.inBlock L.buf L.off (C.width * (L.cols * L.ld))))
  (hfr :
    Ops.Store.EqOff (Ops.Store.inBlock L.buf (L.off + C.width * (j * L.ld)) (L.rows * C.width) ⊔ F)
      s s')
  (v : ℕ → E)
  (hv :
    s'.readBlock L.buf (L.off + C.width * (j * L.ld)) (L.rows * C.width) = some (C.pack L.rows v)) :
  s'.HoldsEntries C L fun i c ↦ if c = j then v i else A i c

Full source on GitHub

Import NLAlib.Ops.Logic.EntryColumn.