NLAlib.SpectralBisection.leaf_writes_packed
Library · theorem
Actual leaf outputs as the finite mathematical identity and diagonal or zero vector. A fragment of NLAlib.SpectralBisection.bisectionRoutine.
NLAlib.SpectralBisection.leaf_writes_packed {K Op Tst Su Sg : Type} [Inhabited K]
[Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.IndexOp Op] {M : Ops.Machine K} {dec : K → ℝ}
{mm : MatMulMap (K × K)} {qr : QRMap (K × K)} {unif : K → Su → K} {normal : Sg → K × K}
{I : Ops.Interp Op Tst K} (hS : Ops.IsScalar M I) (hL : Ops.IsIndexLit M I) (diagonal : Bool)
{τ : Ops.Tape K} {m : Ops.Mem K} {k : ℕ} (A : Matrix (Fin k) (Fin k) (K × K)) {a u e kind : ℕ × ℕ}
(hl : m.Live [a, u, e, kind])
(hA : m.store.readBlock a.1 a.2 (2 * (k * k)) = some ((Ops.EntryCodec.pair K).packFinMatrix A))
(hu : u.2 + 2 * (k * k) ≤ m.store.len u.1) (he : e.2 + k ≤ m.store.len e.1)
(hk : kind.2 < m.store.len kind.1)
(hAP : Ops.Fp.Apart [u, e, kind, a] [2 * (k * k), k, 1, 2 * (k * k)]) :
Ops.Writes Ops.Mode.total I τ (SpectralBisection.leaf diagonal)
(Ops.Env.frame [k] [a, u, e, kind]) (Ops.Fp.blocks [u, e, kind] [2 * (k * k), k, 1])
(fun μ ↦
μ.pos = m.pos ∧
μ.readBlocks [u, e, kind] [2 * (k * k), k, 1] =
some
[(Ops.EntryCodec.pair K).packFinMatrix
((M.toFloatMachine dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) unif normal).identityMat
k),
List.ofFn fun i ↦ if diagonal = true then (A i i).1 else M.lit 0, [M.lit 1]])
mImport NLAlib.Eigensolvers.SpectralBisection.LeafPacked.