NLA-lib Explorer

NLAlib.Schur.schurResidualCheck_writes_of_schurOutput

Library · theorem

Standard rounding

The check passes on an accurate Schur output: on a scalar machine with the standard model at \boldsymbol{u}, index literals and exact comparisons, with 64(n + 2)^3\boldsymbol{u} \le 1, 0 \le \kappa \le 64(n + 2)^2\boldsymbol{u}, \theta \le 1, 4096(n + 2)^3\boldsymbol{u} \le \theta, e_U \le 1/2 and \sqrt{n + 1}\,\delta' \le \theta/8, from a memory holding a Schur output of \mathbf{A} with the errors \delta', e_U, a copy of \mathbf{A} at a0, the words \theta, \kappa at p and room for the flag, pairwise apart, the check writes the flag 0 and changes no other cell. A step in the proof of NLAlib.Schur.verifiedSchurWith_measureReal_not_flag_le.

NLAlib.Schur.schurResidualCheck_writes_of_schurOutput {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 ℝ} {u : ℝ}
  (hS : Ops.IsScalar M I) (hM : Ops.StdModel u id M) (hL : Ops.IsIndexLit M I) (hC : Ops.IsCmp id I)
  {n : ℕ} {θ κ δ' eU : ℝ} (hu : 64 * (↑n + 2) ^ 3 * u ≤ 1) (hκ0 : 0 ≤ κ)
  (hκ : κ ≤ 64 * (↑n + 2) ^ 2 * u) (hθ1 : θ ≤ 1) (huθ : 4096 * (↑n + 2) ^ 3 * u ≤ θ)
  (heU : eU ≤ 1 / 2) (hδ' : √(↑n + 1) * δ' ≤ θ / 8) {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ}
  {a0 uo a p f : ℕ × ℕ} {A : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ}
  (hout : Schur.SchurOutput a uo f A δ' eU μ) (hA : HoldsMatrix a0 A μ.store)
  (hp : μ.store.readBlock p.1 p.2 2 = some [θ, κ]) (hl : μ.Live [a0, uo, a, p, f])
  (hf : f.2 < μ.store.len f.1)
  (hap :
    Ops.Fp.Apart [a0, uo, a, p, f]
      [2 * ((n + 1) * (n + 1)), 2 * ((n + 1) * (n + 1)), 2 * ((n + 1) * (n + 1)), 2, 1]) :
  Ops.Writes Ops.Mode.total I τ Schur.schurResidualCheck.body
    (Ops.Env.frame [n + 1] [a0, uo, a, p, f])
    (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔ Ops.Store.inBlock f.1 f.2 1)
    (fun μ' ↦
      μ'.store.get f.1 f.2 = some 0 ∧
        Ops.Store.EqOff (Ops.Store.inBlock f.1 f.2 1) μ.store μ'.store)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.Schur.Verified.