NLAlib.Ops.Hermitian.average_writes
Library · theorem
Rounded addition/subtraction of transposed entries, rounded division, and completion return the actual Hermitian-averaged word matrix with imaginary diagonal zero. The run stated on the entries of the stored matrix: a step in the proof of NLAlib.Ops.Hermitian.averageRoutine_meets, and the form from which NLAlib.Ops.Hermitian.average_writes_packed reads the result on a floating point machine.
NLAlib.Ops.Hermitian.average_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.average (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.div (M.add (A i i).1 (A i i).1) d, M.lit 0)
else (M.div (M.add (A i j).1 (A j i).1) d, M.div (M.sub (A i j).2 (A j i).2) d)) ∧
μ.pos = m.pos)
mImport NLAlib.Ops.Blas.HermitianCorrect.