NLA-lib Explorer

NLAlib.SmallEig.decoupleLast_writes_word

Library · theorem

This statement changed in the recorded rename: 2026-11-schur.

Standard rounding

NLAlib.SmallEig.decoupleLast on a scalar machine with the standard model at 0 \le \boldsymbol{u}, (n + 2)\boldsymbol{u} \le 1/2500, index literals, exact natural literals up to n + 2 and exact comparisons: from NLAlib.SmallEig.DecoupleInput with an upper Hessenberg \mathbf{H} of order n + 2, the shift \lambda and at least eight words, on every tape, it writes only the matrix and the flag and stores the end \widehat{\mathbf{H}}' of a backward-stable chain (relative error 300(n + 2)^2\boldsymbol{u}) of at most m_2 steps with the shift \lambda, upper Hessenberg, and a flag 0 or 1; with the flag 0 the last subdiagonal entry h of \widehat{\mathbf{H}}' passed the scan, (1 - \boldsymbol{u})^2\lvert h\rvert^2 \le t_L for the word t_L = qs[7]. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.SmallEig.decoupleLast_writes_word {O Q : Type} [Ops.Has Ops.ScalarOp O]
  [Ops.Has Ops.IndexOp O] [Ops.Has Ops.CmpTst Q] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ}
  (hS : Ops.IsScalar M I) (hM : Ops.StdModel u id M) (hu : 0 ≤ u) (hL : Ops.IsIndexLit M I)
  (hC : Ops.IsCmp id I) {n m₂ : ℕ} (hNat : Ops.IsExactNatLit id M (n + 2))
  (hnu : (↑n + 2) * u ≤ 1 / 2500) {H : Matrix (Fin (n + 2)) (Fin (n + 2)) ℂ} {ζ : ℂ} {qs : List ℝ}
  (hqs : 8 ≤ qs.length) (hH : IsUpperHessenberg H) {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ}
  {h lam qw f : ℕ × ℕ} (hin : SmallEig.DecoupleInput H ζ qs h lam qw f μ) {ns w : ℕ} {lg : ℕ × ℕ}
  {LL : List (Option (List GivensEntry))} (hlog : HoldsSlottedLog lg ns w LL [] μ.store)
  (hj : LL.length + m₂ ≤ ns) (hw : n + 1 ≤ w) (hlgl : μ.Live [lg])
  (hlgb : ∀ b ∈ [h, lam, qw, f], b.1 ≠ lg.1) :
  Ops.Writes Ops.Mode.total I τ SmallEig.decoupleLast
    (Ops.Env.frame [n + 2, m₂, w, LL.length] [h, lam, qw, h, f, lg])
    (Ops.Store.inBlock h.1 h.2 (2 * ((n + 2) * (n + 2))) ⊔ Ops.Store.inBlock f.1 f.2 1 ⊔
      Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
    (fun μ' ↦
      ∃ ℓ H' Rs,
        ℓ ≤ m₂ ∧
          IsStableQRChain (300 * (↑n + 2) ^ 2 * u) H (List.replicate ℓ ζ) H' Rs ∧
            IsUpperHessenberg H' ∧
              HoldsMatrix h H' μ'.store ∧
                (μ'.store.get f.1 f.2 = some 0 ∧
                      (1 - u) ^ 2 * ‖H' (Fin.last (n + 1)) (Fin.last n).castSucc‖ ^ 2 ≤
                        qs.getD 7 0 ∨
                    μ'.store.get f.1 f.2 = some 1) ∧
                  ∃ Ls,
                    Ls.length ≤ m₂ ∧
                      (∀ x ∈ slotEntries w Ls, x.1 + 1 < n + 2) ∧
                        HoldsSlottedLog lg ns w (LL ++ Ls) [] μ'.store)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.Decouple.