NLA-lib Explorer

NLAlib.Ops.Hermitian.negate_wp

Library · theorem

Negation writes the machine-negated words of the complete interleaved matrix. The operands are live and either in distinct buffers or exactly coincident; output has room. Shared by the trees of NLAlib.Ops.Hermitian.shift, NLAlib.Ops.Hermitian.shiftNegate.

NLAlib.Ops.Hermitian.negate_wp {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {K : Type} [Inhabited K]
  {M : Ops.Machine K} {I : Ops.Interp Op Tst K} (hI : Ops.IsScalar M I) {md : Ops.Mode}
  {τ : Ops.Tape K} {rows cols : ℕ} {x y : ℕ × ℕ} {m : Ops.Mem K} {xs : List K}
  (hxy : x.1 ≠ y.1 ∨ x = y) (hx : m.store.readBlock x.1 x.2 (2 * (rows * cols)) = some xs)
  (hy : y.2 + 2 * (rows * cols) ≤ m.store.len y.1) (hl : m.Live [x, y]) {Q : Ops.Mem K → Prop}
  (hQ : Q (m.updBlock y (List.map M.neg xs))) :
  Ops.Wp md I τ Ops.Hermitian.negate (Ops.Env.frame [rows, cols] [x, y]) Q m

Full source on GitHub

Import NLAlib.Ops.Blas.Hermitian.