NLA-lib Explorer

NLAlib.SmallEig.oneEigCheck_exit

Library · theorem

The exit of OneEig after a good run: with exact comparisons, from the loop invariant NLAlib.SmallEig.OneEigLoopInv before round i with the estimate at most 0.9\beta = qw[5], the final check writes only the flag, keeps it 0, and the point at Lam is at distance between \eta_1 and \beta from the d_i.

NLAlib.SmallEig.oneEigCheck_exit {O Q : Type} [Ops.Has Ops.IndexOp O] [Ops.Has Ops.CmpTst Q]
  {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} (hCmp : Ops.IsCmp id I) {n L : ℕ}
  {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {d : Fin (n + 1) → ℂ} {β η₁ η₂ η : ℝ} {qs : List ℝ}
  (hqs : 6 ≤ qs.length) (hq5 : qs.getD 5 0 = 0.9 * β) {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ}
  {h qw lam f : ℕ × ℕ} {i : ℕ} (hI : SmallEig.OneEigLoopInv M H d qs h qw lam f L β η₁ η₂ η i μ)
  (hτ : ∀ (v : ℝ), μ.store.get L 0 = some v → v ≤ 0.9 * β) :
  Ops.Writes Ops.Mode.total I τ SmallEig.oneEigCheck
    (Ops.Env.frame [] [(qw.1, qw.2 + 5), (L, 0), f]) (Ops.Store.inBlock f.1 f.2 1)
    (fun μ' ↦
      μ'.store.get f.1 f.2 = some 0 ∧
        ∃ z,
          μ'.store.readBlock lam.1 lam.2 2 = some [z.re, z.im] ∧
            η₁ ≤ ⨅ i, ‖z - d i‖ ∧ ⨅ i, ‖z - d i‖ ≤ β)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.OneEig.