NLA-lib Explorer

NLAlib.SmallEig.roundedDecoupleExit_writes_lastScan

Library · theorem

The exit of NLAlib.SmallEig.decoupleLast (NLAlib.ShiftedQR.roundedDecoupleExit) from the scan state NLAlib.SmallEig.LastScan: the flag 0 with the scan bound, or the flag 1 with the scan flag 0 and the failed scan. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.SmallEig.roundedDecoupleExit_writes_lastScan {O Q : Type} [Ops.Has Ops.IndexOp O]
  [Ops.Has Ops.CmpTst Q] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u t : ℝ} {n : ℕ}
  (hL : Ops.IsIndexLit M I) (hC : Ops.IsCmp id I) (hNat : Ops.IsExactNatLit id M 1) {τ : Ops.Tape ℝ}
  {μ : Ops.Mem ℝ} {r f : ℕ × ℕ} {H : Matrix (Fin (n + 2)) (Fin (n + 2)) ℂ}
  (hs : SmallEig.LastScan u t r H μ.store) (hf : f.2 < μ.store.len f.1) :
  Ops.Writes Ops.Mode.total I τ ShiftedQR.roundedDecoupleExit (Ops.Env.frame [] [r, f])
    (Ops.Store.inBlock f.1 f.2 1)
    (fun μ' ↦
      μ'.store.get f.1 f.2 = some 0 ∧
          (1 - u) ^ 2 * ‖H (Fin.last (n + 1)) (Fin.last n).castSucc‖ ^ 2 ≤ t ∨
        μ'.store.get f.1 f.2 = some 1 ∧
          μ.store.get r.1 (r.2 + 3) = some 0 ∧
            t < (1 + u) ^ 2 * ‖H (Fin.last (n + 1)) (Fin.last n).castSucc‖ ^ 2)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.Decouple.