NLA-lib Explorer

NLAlib.Ops.Hermitian.shift_writes

Library · theorem

A shifted Hermitian matrix is computed from copied upper entries and actual rounded real diagonal differences. Disjoint input/output regions may belong to the same arena. The run stated on the entries of the stored matrix: a step in the proof of NLAlib.Ops.Hermitian.shiftRoutine_meets, and the form from which NLAlib.Ops.Hermitian.shift_writes_packed reads the result on a floating point machine.

NLAlib.Ops.Hermitian.shift_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) {τ : Ops.Tape K} {n : ℕ} {x c y : ℕ × ℕ}
  {m : Ops.Mem K} {A : ℕ → ℕ → K × K} {d : K}
  (hxy :
    Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 (2 * (n * n))) (Ops.Store.inBlock y.1 y.2 (2 * (n * n))))
  (hcy : Ops.Fp.Disj (Ops.Store.inBlock c.1 c.2 1) (Ops.Store.inBlock y.1 y.2 (2 * (n * n))))
  (hX :
    m.store.HoldsEntries (Ops.EntryCodec.pair K)
      { buf := x.1, off := x.2, rows := n, cols := n, ld := n } A)
  (hc : m.store.get c.1 c.2 = some d) (hY : y.2 + 2 * (n * n) ≤ m.store.len y.1)
  (hl : m.Live [x, c, y]) :
  Ops.Writes Ops.Mode.total I τ Ops.Hermitian.shift (Ops.Env.frame [n] [x, c, y])
    (Ops.Store.inBlock y.1 y.2 (2 * (n * n)))
    (fun μ ↦
      μ.store.HoldsEntries (Ops.EntryCodec.pair K)
          { buf := y.1, off := y.2, rows := n, cols := n, ld := n }
          (Ops.Hermitian.completeUpper M fun i j ↦
            if i = j then (M.sub (A i i).1 d, M.lit 0) else A i j) ∧
        μ.pos = m.pos)
    m

Full source on GitHub

Import NLAlib.Ops.Blas.HermitianCorrect.