NLA-lib Explorer

NLAlib.SmallEig.roundedDecoupleExit_writes_decoupleScans

Library · theorem

The exit of NLAlib.SmallEig.decoupleLast after i \le m_2 rounds, from the history NLAlib.SmallEig.DecoupleScans, at the cap m_2 if the last scan failed: the flag 0 with the last scan bound, or the flag 1 at i = m_2 with every scan failed; the matrix is kept. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.SmallEig.roundedDecoupleExit_writes_decoupleScans {O Q : Type} [Ops.Has Ops.IndexOp O]
  [Ops.Has Ops.CmpTst Q] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u t : ℝ}
  (hL : Ops.IsIndexLit M I) (hC : Ops.IsCmp id I) {n : ℕ} (hNat : Ops.IsExactNatLit id M (n + 2))
  {i m₂ : ℕ} (hi : i ≤ m₂) {H : Matrix (Fin (n + 2)) (Fin (n + 2)) ℂ} {ζ : ℂ} {τ : Ops.Tape ℝ}
  {μ : Ops.Mem ℝ} {h r f : ℕ × ℕ} (hs : SmallEig.DecoupleScans u t H ζ h r i μ.store)
  (hcap : μ.store.get r.1 (r.2 + 3) = some 0 → i = m₂)
  (hhf :
    Ops.Fp.Disj (Ops.Store.inBlock h.1 h.2 (2 * ((n + 2) * (n + 2)))) (Ops.Store.inBlock f.1 f.2 1))
  (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 μ' ↦
      ∃ ℓ Hs,
        ℓ ≤ m₂ ∧
          (∀ k ≤ ℓ,
              ∃ Rs, IsStableQRChain (300 * (↑n + 2) ^ 2 * u) H (List.replicate k ζ) (Hs k) Rs) ∧
            (∀ k < ℓ, t < (1 + u) ^ 2 * ‖Hs k (Fin.last (n + 1)) (Fin.last n).castSucc‖ ^ 2) ∧
              IsUpperHessenberg (Hs ℓ) ∧
                HoldsMatrix h (Hs ℓ) μ'.store ∧
                  (μ'.store.get f.1 f.2 = some 0 ∧
                      (1 - u) ^ 2 * ‖Hs ℓ (Fin.last (n + 1)) (Fin.last n).castSucc‖ ^ 2 ≤ t ∨
                    μ'.store.get f.1 f.2 = some 1 ∧
                      ℓ = m₂ ∧
                        t < (1 + u) ^ 2 * ‖Hs ℓ (Fin.last (n + 1)) (Fin.last n).castSucc‖ ^ 2))
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.Decouple.