NLA-lib Explorer

NLAlib.SpectralBisection.eval_upNode_shift

Library · theorem

The bounded kind query selects the one-child reconstruction for kinds two and three. The shift's sign is represented by the supplied word at offset zero or one, respectively.

NLAlib.SpectralBisection.eval_upNode_shift {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.MatrixOp Op] [Ops.Has Ops.IdxTst Tst] {dec : K → ℝ} {I : Ops.Interp Op Tst K}
  (hQ : Ops.IsToNat dec I) {τ : Ops.Tape K} {m : Ops.Mem K} {n d lo k : ℕ}
  {ua qa ea kd kp t : ℕ × ℕ} (side : Bool) {w : K}
  (hkind : m.store.get kd.1 (kd.2 + n * d + lo) = some w)
  (hdec : dec w = ↑(if side = true then 2 else 3)) (hl : m.Live [ua, qa, ea, kd, kp, t]) :
  Ops.eval I τ SpectralBisection.upNode (Ops.Env.frame [n, d, lo, k] [ua, qa, ea, kd, kp, t]) m =
    Ops.eval I τ SpectralBisection.upShiftResult
      (Ops.Env.frame [k]
        [(ua.1, ua.2 + 2 * (n * n) * (d + 1) + 2 * n * lo), (ea.1, ea.2 + n * (d + 1) + lo),
          (t.1, t.2 + if side = true then 0 else 1), (ua.1, ua.2 + 2 * (n * n) * d + 2 * n * lo),
          (ea.1, ea.2 + n * d + lo)])
      m

Full source on GitHub

Import NLAlib.Eigensolvers.SpectralBisection.UpDispatch.