NLA-lib Explorer

NLAlib.Ops.Hermitian.mirror_writes

Library · theorem

Mirroring completes the full matrix from a readable upper triangle. The stored diagonal is preserved; a zero-imaginary diagonal or numerical Hermitian interpretation is a separate property of the supplied upper entries and scalar machine. A fragment of the tree NLAlib.Ops.Hermitian.complete.

NLAlib.Ops.Hermitian.mirror_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}
  {n : ℕ} {y : ℕ × ℕ} (A : ℕ → ℕ → K × K) (hl : y.1 < List.length m.store)
  (hz : y.2 + 2 * (n * n) ≤ m.store.len y.1)
  (hu :
    m.store.HoldsRowEntries (Ops.EntryCodec.pair K)
      { buf := y.1, off := y.2, rows := n, cols := n, ld := n } (fun j ↦ j + 1) A) :
  Ops.Writes md I τ Ops.Hermitian.mirror (Ops.Env.frame [n] [y, y])
    ((Ops.EntryCodec.pair K).regionFp y.1 y.2 n (fun i j ↦ i * n + j) fun j ↦ j)
    (fun m' ↦
      m'.store.HoldsEntries (Ops.EntryCodec.pair K)
          { buf := y.1, off := y.2, rows := n, cols := n, ld := n }
          (Ops.Hermitian.completeUpper M A) ∧
        m'.pos = m.pos)
    m

Full source on GitHub

Import NLAlib.Ops.Blas.HermitianMirror.