NLA-lib Explorer

NLAlib.SpectralBisection.bottomLevel_writes_stored

Library · theorem

Arena capacities and mathematical slot disjointness give total bottom initialization. A fragment of NLAlib.SpectralBisection.bisectionRoutine.

NLAlib.SpectralBisection.bottomLevel_writes_stored {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.IdxTst Tst] (M : Ops.Machine K) (dec : K → ℝ) (mm : MatMulMap (K × K))
  (qr : QRMap (K × K)) {n L D 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 : ℕ × ℕ}
  {I : Ops.Interp Op Tst K} (hS : Ops.IsScalar M I) (hQ : Ops.IsToNat dec I)
  (hexact : Ops.IsExactNatLit dec M (max n 4)) (hD : D ≤ L + 1) (hl : μ.Live [sz, ua, ea])
  (hLevel :
    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 μ)
  (hAP :
    Ops.Fp.Apart (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
      (SpectralBisection.arenaLengths n L))
  (hRoom :
    μ.Room (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
      (SpectralBisection.arenaLengths n L)) :
  Ops.Writes Ops.Mode.total I τ SpectralBisection.bottomLevel (Ops.Env.frame [n, D] [sz, ua, ea])
    (SpectralBisection.resultLevelSpan n D ua ea)
    (fun ν ↦
      ν.pos = μ.pos ∧
        SpectralBisection.StoresLevelResults
          (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 } 0 D ua ea ν.store)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SpectralBisection.BottomArena.