NLA-lib Explorer

NLAlib.SmallEig.rhess_writes_word

Library · theorem

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

NLAlib.SmallEig.rhess on a scalar machine with exact comparisons, index literals, exact natural literals up to n_{\max} \ge N - 1 and draws that store the tape entry: from \mathbf{A} of order 2 \le N at a and a log with closed slots LL and room for N - 1 more, it writes only the matrix and the log, advances the position by 2N, stores NLAlib.SmallEig.rhessWord of \mathbf{A} and the 2N entries of the stream sG at the start position, and closes the N - 1 accepted slots NLAlib.SmallEig.rhessSlots of \mathbf{A} and those entries.

Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.SmallEig.rhess_writes_word {O Q : Type} [Ops.Has Ops.ScalarOp O] [Ops.Has Ops.IndexOp O]
  [Ops.Has Ops.SampleOp O] [Ops.Has Ops.CmpTst Q] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ}
  (hS : Ops.IsScalar M I) (hC : Ops.IsCmp id I) (hSmp : Ops.IsSample I) {sG N : ℕ} {τ : Ops.Tape ℝ}
  {μ : Ops.Mem ℝ} {a : ℕ × ℕ} {A : Matrix (Fin N) (Fin N) ℂ} (hl : μ.Live [a])
  (hA : HoldsMatrix a A μ.store) (hL : Ops.IsIndexLit M I) {nmax : ℕ}
  (hNat : Ops.IsExactNatLit id M nmax) (h1 : 1 ≤ nmax) (h2 : 2 ≤ N) (hN : N ≤ nmax + 1) {ns w : ℕ}
  {lg : ℕ × ℕ} {LL : List (Option (List GivensEntry))}
  (hlog : HoldsSlottedLog lg ns w LL [] μ.store) (hj : LL.length + (N - 1) ≤ ns) (hw : N - 1 ≤ w)
  (hlgl : μ.Live [lg]) (hlga : lg.1 ≠ a.1) :
  Ops.Writes Ops.Mode.total I τ (SmallEig.rhess sG) (Ops.Env.frame [N, w, LL.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 μ' ↦
      μ'.pos = μ.pos + 2 * N ∧
        HoldsMatrix a (SmallEig.rhessWord M A fun j ↦ τ (μ.pos + j) sG) μ'.store ∧
          HoldsSlottedLog lg ns w
            (LL ++ List.map some (SmallEig.rhessSlots M A fun j ↦ τ (μ.pos + j) sG)) [] μ'.store)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.RandomHessenberg.