NLA-lib Explorer

NLAlib.SmallEig.oneEigRound_step

Library · theorem

Standard rounding

A good round of OneEig extends the run: on a scalar machine in the standard model at 0 \le \boldsymbol{u} \le 1/5000 with index literals, the literals 0 and 1 exact, exact comparisons and an exact polar sampler on the stream sU, with DistSpec accurate on the points of modulus at most 10\Sigma at distance at least \eta_1 from the d_i, \lvert d_i\rvert \le \Sigma, 0 \le \eta_2 \le 0.02\,\Sigma, \beta > 0, \eta = \eta_2 + 60\boldsymbol{u}\Sigma \le 0.027\,\beta and the word \eta_2 at qw[4]: from the loop invariant NLAlib.SmallEig.OneEigLoopInv before round i with an estimate above 0.9\beta, if the window at the current position is good (in the unit square, and no centre NLAlib.SmallEig.oneEigCentre plus the polar sample within \eta_1 + 40\boldsymbol{u}\Sigma of a d_i), the round writes only the point, the flag and the scratch and ends in the invariant before round i + 1.

NLAlib.SmallEig.oneEigRound_step {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 ℝ} {u : ℝ} (hS : Ops.IsScalar M I) (hM : Ops.StdModel u id M) (hu0 : 0 ≤ u)
  (hu : u ≤ 1 / 5000) (hL : Ops.IsIndexLit M I) (h0 : M.lit 0 = 0) (h1 : M.lit 1 = 1)
  (hCmp : Ops.IsCmp id I) {sU : ℕ} (hDisk : ShiftedQR.IsPolarDiskSampler sU I) {n m q L : ℕ}
  {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {d : Fin (n + 1) → ℂ} {S β η₁ η₂ : ℝ}
  (hDS :
    SmallEig.DistSpecAccurateOn I H d m q {p | ‖p‖ ≤ 10 * S ∧ ∀ (i : Fin (n + 1)), η₁ ≤ ‖d i - p‖})
  (hdS : ∀ (i : Fin (n + 1)), ‖d i‖ ≤ S) (hη₂0 : 0 ≤ η₂) (hη₂S : η₂ ≤ 2e-2 * S) (hβ : 0 < β)
  (hηr : η₂ + 60 * u * S ≤ 27e-3 * β) {qs : List ℝ} (hqs : 6 ≤ qs.length) (hq4 : qs.getD 4 0 = η₂)
  {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ} {h qw lam f : ℕ × ℕ} {i : ℕ}
  (hI : SmallEig.OneEigLoopInv M H d qs h qw lam f L β η₁ η₂ (η₂ + 60 * u * S) i μ)
  (htest : ∃ v, μ.store.get L 0 = some v ∧ 0.9 * β < v)
  (hgood :
    τ.windowFn sU μ.pos 2 ∉
      {x |
        (∃ k, x k ∉ Set.Icc 0 1) ∨
          ∃ j i,
            ‖SmallEig.oneEigCentre M lam L (↑j) μ + polarDisk 0 η₂ x - d i‖ < η₁ + 40 * u * S}) :
  Ops.Writes Ops.Mode.total I τ SmallEig.oneEigRound
    (Ops.Env.frame [n + 1, m, q]
      [h, qw, (L + 5, 0), lam, (L, 0), f, (L + 1, 0), (L + 2, 0), (L + 3, 0), (L + 4, 0),
        (L + 6, 0)])
    (Ops.Store.inBlock lam.1 lam.2 2 ⊔ Ops.Store.inBlock f.1 f.2 1 ⊔ Ops.Fp.above L)
    (SmallEig.OneEigLoopInv M H d qs h qw lam f L β η₁ η₂ (η₂ + 60 * u * S) (i + 1)) μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.OneEig.