NLA-lib Explorer

NLAlib.Ops.PairMatrix.conjTranspose_writes

Library · theorem

Conjugate transpose writes the machine-negated imaginary words and copied real words of the actual input matrix. Input and output word blocks are disjoint, including when they share a buffer. No initialized output words, numerical model or successful-run premise is assumed. A fragment of the tree NLAlib.SpectralBisection.compress.

NLAlib.Ops.PairMatrix.conjTranspose_writes {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  {M : Ops.Machine K} {I : Ops.Interp Op Tst K} (hI : Ops.IsScalar M I) {md : Ops.Mode}
  {τ : Ops.Tape K} {m : Ops.Mem K} {r c : ℕ} {x y : ℕ × ℕ} (A : ℕ → ℕ → K × K) (hl : m.Live [x, y])
  (hx :
    m.store.HoldsEntries (Ops.EntryCodec.pair K)
      { buf := x.1, off := x.2, rows := r, cols := c, ld := r } A)
  (hy : y.2 + 2 * (r * c) ≤ m.store.len y.1)
  (hxy :
    Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 (2 * (c * r)))
      (Ops.Store.inBlock y.1 y.2 (2 * (r * c)))) :
  Ops.Writes md I τ Ops.PairMatrix.conjTranspose (Ops.Env.frame [r, c] [x, y])
    (Ops.Store.inBlock y.1 y.2 (2 * (r * c)))
    (fun m' ↦
      (m'.store.HoldsEntries (Ops.EntryCodec.pair K)
          { buf := y.1, off := y.2, rows := c, cols := r, ld := c } fun i j ↦
          ((A j i).1, M.neg (A j i).2)) ∧
        m'.pos = m.pos)
    m

Full source on GitHub

Import NLAlib.Ops.Blas.MatrixCorrect.