NLA-lib Explorer

NLAlib.hessenbergReduceLast_terminates

Library · theorem

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

NLAlib.hessenbergReduceLast terminates on every tape and every stored matrix: its loops are counted and every operation succeeds on stored operands; the log gains its N - 2 slots.

NLAlib.hessenbergReduceLast_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)
  (hC : Ops.IsCmp id I) (hL : Ops.IsIndexLit M I) {nmax : ℕ} (hNat : Ops.IsExactNatLit id M nmax)
  (h1 : 1 ≤ nmax) {τ : Ops.Tape ℝ} {m : Ops.Mem ℝ} {N : ℕ} {a lg : ℕ × ℕ}
  {A : Matrix (Fin N) (Fin N) ℂ} (hN : N ≤ nmax + 1) {ns w : ℕ}
  {L : List (Option (List GivensEntry))} (hlog : HoldsSlottedLog lg ns w L [] m.store)
  (hj : L.length + (N - 2) ≤ ns) (hw : N - 2 ≤ w) (hl : m.Live [a, lg])
  (hA : HoldsMatrix a A m.store)
  (hd :
    Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 (2 * (N * N)))
      (Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))) :
  Ops.Writes Ops.Mode.total I τ hessenbergReduceLast (Ops.Env.frame [N, w, L.length] [a, a, lg])
    (Ops.Store.inBlock a.1 a.2 (2 * (N * N)) ⊔ Ops.Store.inBlock lg.1 lg.2 (ns * (1 + 5 * w)))
    (fun m' ↦
      ∃ A',
        HoldsMatrix a A' m'.store ∧
          HoldsSlottedLog lg ns w (L ++ List.map some (hessenbergReduceLastSlots M A)) [] m'.store)
    m

Full source on GitHub

Import NLAlib.Eigensolvers.HessenbergReduction.