NLA-lib Explorer

NLAlib.SmallEig.oneEig_writes_word

Library · theorem

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

NLAlib.SmallEig.oneEig on a scalar machine with the literal 0 exact, index literals, exact comparisons and an exact polar sampler: from NLAlib.SmallEig.OneEigInput with at least six words, on every tape, it writes only the pair lam and the flag f, and stores a pair and a flag 0 or 1. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine and NLAlib.SmallEig.smallEigRoutine, on their scratch.

NLAlib.SmallEig.oneEig_writes_word {O Q : Type} [Ops.Has Ops.ScalarOp O] [Ops.Has Ops.IndexOp O]
  [Ops.Has ShiftedQR.DiskSampleOp O] [Ops.Has Ops.CmpTst Q] {M : Ops.Machine ℝ}
  {I : Ops.Interp O Q ℝ} (hS : Ops.IsScalar M I) (hzero : M.lit 0 = 0) (hL : Ops.IsIndexLit M I)
  (hCmp : Ops.IsCmp id I) {sU : ℕ} (hDisk : ShiftedQR.IsPolarDiskSampler sU I) {n m q t : ℕ}
  (hNat : Ops.IsExactNatLit id M n) {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {qs : List ℝ}
  (hqs : 6 ≤ qs.length) {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ} {h qw lam f : ℕ × ℕ}
  (hin : SmallEig.OneEigInput H qs h qw lam f μ) :
  Ops.Writes Ops.Mode.total I τ SmallEig.oneEig (Ops.Env.frame [n + 1, m, q, t] [h, qw, lam, f])
    (Ops.Store.inBlock lam.1 lam.2 2 ⊔ Ops.Store.inBlock f.1 f.2 1)
    (fun μ' ↦
      (∃ z, μ'.store.readBlock lam.1 lam.2 2 = some [z.re, z.im]) ∧
        (μ'.store.get f.1 f.2 = some (M.lit 0) ∨ μ'.store.get f.1 f.2 = some (M.lit 1)))
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.OneEig.