NLA-lib Explorer

NLAlib.SpectralBisection.levelParameters_writes

Library · theorem

The level program writes the rounded next radius and tolerance from the actual stored constants, current parameters and dimension literal. Separation is spatial; the two adjacent parameter pairs occupy disjoint regions of the same level arena. No nonzero-denominator or successful-execution hypothesis is needed for the functional word computation. A fragment of NLAlib.SpectralBisection.bisectionRoutine.

NLAlib.SpectralBisection.levelParameters_writes {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.IndexOp Op] {M : Ops.Machine K} {I : Ops.Interp Op Tst K} (hS : Ops.IsScalar M I)
  (hIndex : Ops.IsIndexLit M I) {τ : Ops.Tape K} {L d : ℕ} {c lv t : ℕ × ℕ} {m : Ops.Mem K}
  (one two half R eps : K)
  (hAP : Ops.Fp.Apart [c, (lv.1, lv.2 + 2 * d), (lv.1, lv.2 + 2 * (d + 1)), t] [3, 2, 2, 4])
  (hc : m.store.readBlock c.1 c.2 3 = some [one, two, half])
  (hLv : m.store.readBlock lv.1 (lv.2 + 2 * d) 2 = some [R, eps])
  (hroom : lv.2 + 2 * (d + 1) + 2 ≤ m.store.len lv.1) (ht : t.2 + 4 ≤ m.store.len t.1) :
  Ops.Writes Ops.Mode.total I τ SpectralBisection.levelParameters
    (Ops.Env.frame [L, d] [c, lv, t, lv, t])
    (Ops.Store.inBlock lv.1 (lv.2 + 2 * (d + 1)) 2 ⊔ Ops.Store.inBlock t.1 t.2 4)
    (fun μ ↦
      μ.pos = m.pos ∧
        μ.store.readBlock lv.1 (lv.2 + 2 * (d + 1)) 2 =
          some
            [M.mul (M.add half (M.div two (M.lit ↑(L + d)))) R,
              M.mul (M.sub one (M.div one (M.lit ↑(L + d)))) eps])
    m

Full source on GitHub

Import NLAlib.Eigensolvers.SpectralBisection.LevelParameters.