NLAlib.Ops.Hermitian.triangle_writes
Library · theorem
A triangular entry procedure needs only a word-level transition specification. The shared matrix rule supplies its actual entry, transposed entry, scalar, output room, and all framing. The procedure is fixed before matrix sizes and values are chosen. Shared by the trees of NLAlib.Ops.Hermitian.copyTriangle, NLAlib.Ops.Hermitian.diagonal, NLAlib.Ops.Hermitian.upper and 4 more.
NLAlib.Ops.Hermitian.triangle_writes {K Op Tst : Type} {I : Ops.Interp Op Tst K} {τ : Ops.Tape K}
(entry : Ops.Stmt Op Tst) (F : K × K → K × K → K → K × K)
(hentry :
∀ (μ : Ops.Mem K) (x xt c z : ℕ × ℕ) (a aT : K × K) (d : K),
Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 2) (Ops.Store.inBlock z.1 z.2 2) →
Ops.Fp.Disj (Ops.Store.inBlock xt.1 xt.2 2) (Ops.Store.inBlock z.1 z.2 2) →
Ops.Fp.Disj (Ops.Store.inBlock c.1 c.2 1) (Ops.Store.inBlock z.1 z.2 2) →
μ.Live [x, xt, c, z] →
μ.store.get x.1 x.2 = some a.1 →
μ.store.get x.1 (x.2 + 1) = some a.2 →
μ.store.get xt.1 xt.2 = some aT.1 →
μ.store.get xt.1 (xt.2 + 1) = some aT.2 →
μ.store.get c.1 c.2 = some d →
z.2 + 2 ≤ μ.store.len z.1 →
Ops.Wp Ops.Mode.total I τ entry (Ops.Env.frame [] [x, xt, c, z])
(fun μ' ↦ μ' = μ.updBlock z [(F a aT d).1, (F a aT d).2]) μ)
{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.triangle entry) (Ops.Env.frame [n] [x, c, y])
((Ops.EntryCodec.pair K).rowsFp { buf := y.1, off := y.2, rows := n, cols := n, ld := n } id)
(fun m' ↦
(m'.store.HoldsRowEntries (Ops.EntryCodec.pair K)
{ buf := y.1, off := y.2, rows := n, cols := n, ld := n } id fun i j ↦
F (A i j) (A j i) d) ∧
m'.pos = m.pos)
mImport NLAlib.Ops.Blas.HermitianUpper.