NLA-lib Explorer

NLAlib.SmallEig.decoupleLast_terminates

Library · theorem

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

NLAlib.SmallEig.decoupleLast terminates on every tape: from NLAlib.SmallEig.DecoupleInput with any matrix of order n + 2 and at least eight words, on a scalar machine with index literals, exact natural literals up to n + 2 and exact comparisons, it writes only the matrix and the flag and stores both.

NLAlib.SmallEig.decoupleLast_terminates {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 ℝ}
  (hS : Ops.IsScalar M I) (hL : Ops.IsIndexLit M I) (hC : Ops.IsCmp id I) {n m₂ : ℕ}
  (hNat : Ops.IsExactNatLit id M (n + 2)) {H : Matrix (Fin (n + 2)) (Fin (n + 2)) ℂ} {ζ : ℂ}
  {qs : List ℝ} (hqs : 8 ≤ qs.length) {τ : 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', HoldsMatrix h H' μ'.store) ∧
        ∃ x,
          μ'.store.get f.1 f.2 = some x ∧
            ∃ 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.DecoupleTermination.