NLAlib.SpectralBisection.child_writes
Library · theorem
The single-child branch writes the shifted next-level matrix and both metadata words, without a successful-run or numerical-accuracy assumption. The literal values are the actual machine words; exact natural decoding is a separate numerical-model obligation. A fragment of NLAlib.SpectralBisection.bisectionRoutine.
NLAlib.SpectralBisection.child_writes {K Su Sg Op Tst : 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) {τ : Ops.Tape K}
{μ : Ops.Mem K} {n d lo k branch : ℕ} {ma sz kd sigma : ℕ × ℕ} :
have x := (ma.1, ma.2 + 2 * (n * n) * d + 2 * n * lo);
have y := (ma.1, ma.2 + 2 * (n * n) * (d + 1) + 2 * n * lo);
have z := (sz.1, sz.2 + n * (d + 1) + lo);
have w := (kd.1, kd.2 + n * d + lo);
∀ (A : Matrix (Fin k) (Fin k) (K × K)) (s : K),
μ.Live [ma, sz, kd, sigma] →
μ.store.readBlock x.1 x.2 (2 * (k * k)) = some ((Ops.EntryCodec.pair K).packFinMatrix A) →
μ.store.get sigma.1 sigma.2 = some s →
y.2 + 2 * (k * k) ≤ μ.store.len y.1 →
z.2 < μ.store.len z.1 →
w.2 < μ.store.len w.1 →
Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 (2 * (k * k)))
(Ops.Store.inBlock y.1 y.2 (2 * (k * k))) →
Ops.Fp.Disj (Ops.Store.inBlock sigma.1 sigma.2 1)
(Ops.Store.inBlock y.1 y.2 (2 * (k * k))) →
Ops.Fp.Apart [y, z, w] [2 * (k * k), 1, 1] →
Ops.Writes Ops.Mode.total I τ SpectralBisection.child
(Ops.Env.frame [n, d, lo, k, branch] [ma, sz, kd, sigma])
(Ops.Fp.blocks [y, z, w] [2 * (k * k), 1, 1])
(fun μ' ↦
μ'.pos = μ.pos ∧
μ'.readBlocks [y, z, w] [2 * (k * k), 1, 1] =
some
[(Ops.EntryCodec.pair K).packFinMatrix
((M.toFloatMachine dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) unif
normal).hermShift
A s),
[M.lit ↑k], [M.lit ↑branch]])
μImport NLAlib.Eigensolvers.SpectralBisection.Child.