NLA-lib Explorer

NLAlib.SpectralBisection.initializeArenas_writes_stored

Library · theorem

Actual initialization stores the mathematical root, future zeros and shared constants. Its input parameter block is retained and its write frame stays inside the eleven arenas. A fragment of NLAlib.SpectralBisection.bisectionRoutine.

NLAlib.SpectralBisection.initializeArenas_writes_stored {K Op Tst : Type} [Inhabited K]
  [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.IndexOp Op] (M : Ops.Machine K) (F : FloatMachine K ℕ ℕ)
  (fuel : ℕ) (R0 eps beta : K) {n L : ℕ} (A : Matrix (Fin n) (Fin n) (K × K))
  {I : Ops.Interp Op Tst K} (hS : Ops.IsScalar M I) (hIndex : Ops.IsIndexLit M I) {τ : Ops.Tape K}
  {μ : Ops.Mem K} {a par c ma ua qa ea sz kd kp lv su sg : ℕ × ℕ}
  (hl : μ.Live [a, par, c, ma, sz, lv])
  (hRoom :
    μ.Room (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
      (SpectralBisection.arenaLengths n L))
  (hAP :
    Ops.Fp.Apart (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
      (SpectralBisection.arenaLengths n L))
  (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 [a, par] [2 * (n * n), 3]))
  (hA : μ.store.readBlock a.1 a.2 (2 * (n * n)) = some ((Ops.EntryCodec.pair K).packFinMatrix A))
  (hPar : μ.store.readBlock par.1 par.2 3 = some [R0, eps, beta]) :
  Ops.Writes Ops.Mode.total I τ SpectralBisection.initializeArenas
    (Ops.Env.frame [n, L] [a, par, c, ma, sz, lv])
    (Ops.Fp.blocks (SpectralBisection.arenaOperands c ma ua qa ea sz kd kp lv su sg)
      (SpectralBisection.arenaLengths n L))
    (fun ν ↦
      ν.pos = μ.pos ∧
        ν.store.readBlock par.1 par.2 3 = some [R0, eps, beta] ∧
          ν.store.readBlock c.1 c.2 5 =
              some [M.lit 1, M.lit 2, M.div (M.lit 1) (M.lit 2), M.neg (M.lit 1), M.sqrtHalf] ∧
            SpectralBisection.StoresLevel M F n fuel R0 beta
                { k := n, A := A, R := R0, ε := eps, ℓ := L } 0 ma sz lv ν ∧
              ∀ (e : ℕ),
                1 ≤ e → e ≤ L + 1 → ∀ lo < n, ν.store.get sz.1 (sz.2 + n * e + lo) = some (M.lit 0))
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SpectralBisection.InitialArena.