NLAlib.SpectralBisection.reconstructResult_writes
Library · theorem
Complete root reconstruction from actual stored levels and node outcomes. A fragment of NLAlib.SpectralBisection.bisectionRoutine.
NLAlib.SpectralBisection.reconstructResult_writes {K Op Tst : Type} [Inhabited K]
[Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.MatrixOp Op] [Ops.Has Ops.IdxTst Tst] (M : Ops.Machine K)
(dec : K → ℝ) (mm : MatMulMap (K × K)) (qr : QRMap (K × K)) {n L fuel base : ℕ} {τ : Ops.Tape K}
{μ : Ops.Mem K} (R0 eps beta : K) (A : Matrix (Fin n) (Fin n) (K × K))
{c ma ua qa ea sz kd kp lv su sg u dv : ℕ × ℕ} {I : Ops.Interp Op Tst K} (hS : Ops.IsScalar M I)
(hQ : Ops.IsToNat dec I) (hMM : Ops.IsMatrixMul (Ops.EntryCodec.pair K) (fun {l m n} ↦ mm) I)
(hLit : Ops.IsExactNatLit dec M (max n 4))
(hl : μ.Live (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg ++ [u, dv]))
(hRoom :
μ.Room (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
(SpectralBisection.arenaLengths n L))
(hOutRoom : μ.Room [u, dv] [2 * (n * n), n])
(hAP :
Ops.Fp.Apart (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
(SpectralBisection.arenaLengths n L))
(hOutput : Ops.Fp.Disj (Ops.Store.inBlock u.1 u.2 (2 * (n * n))) (Ops.Store.inBlock dv.1 dv.2 n))
(hProtect :
(Ops.Fp.blocks (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
(SpectralBisection.arenaLengths n L)).Disj
(Ops.Fp.blocks [u, dv] [2 * (n * n), n]))
(hLevels :
∀ d ≤ L + 1,
SpectralBisection.StoresLevel M
(SpectralBisection.tapeMachine M dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) n base τ) n fuel R0
beta { k := n, A := A, R := R0, ε := eps, ℓ := L } d ma sz lv μ)
(hRecords :
∀ d ≤ L,
SpectralBisection.StoresRecords M
(SpectralBisection.tapeMachine M dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) n base τ) n fuel R0
beta { k := n, A := A, R := R0, ε := eps, ℓ := L } d ma ua qa ea sz kd kp μ)
(hTwo : μ.store.get c.1 (c.2 + 1) = some (M.lit 2)) :
Ops.Writes Ops.Mode.total I τ SpectralBisection.reconstructResult
(Ops.Env.frame [n, L] [c, ua, qa, ea, sz, kd, kp, lv, u, dv])
(SpectralBisection.resultArenaFp n L ua ea ⊔ Ops.Fp.blocks [u, dv] [2 * (n * n), n])
(fun ν ↦
ν.pos = μ.pos ∧
SpectralBisection.StoresResult n 0 0 u dv
(eighAux
(SpectralBisection.tapeMachine M dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) n base τ) n
fuel R0 beta (L + 1) A R0 eps L
(eighSlotTree
(SpectralBisection.tapeMachine M dec (fun {l m n} ↦ mm) (fun {m n} ↦ qr) n base τ) n
fuel R0 beta 0 0 { k := n, A := A, R := R0, ε := eps, ℓ := L }))
ν.store)
μImport NLAlib.Eigensolvers.SpectralBisection.Reconstruct.