NLA-lib Explorer

NLAlib.ShiftedQR.excShifts_pwrites

Library · theorem

Standard rounding

The rounded exceptional shifts (Exc in floating point, corrected [BanksGarzaVargasSrivastava2022, Lemma 5.3]): on a scalar machine with the standard model at \boldsymbol{u} \le 1/100 and an exact polar sampler on a stream s uniform on [0, 1], let the centre r be stored at C, the radius \tilde R > 0 at Rt, the factor \varepsilon/2 at Cw, 0 < \varepsilon \le 1/2, and the net NLAlib.ShiftedQR.excNet ε at G; let \lambda_1, \dots, \lambda_n be complex numbers, 0 \le \varphi \le 1/5, q = \varphi/(11n), and the rounding budget 6\boldsymbol{u}(\lvert r\rvert + 3\tilde R) at most 0.005\,\varepsilon\tilde R and at most \varepsilon\tilde R\sqrt q/8. Then NLAlib.ShiftedQR.excShifts writes only its output and, except with probability at most \varphi over its two draws, stores a list \mathcal{S} of shifts with \lvert\mathcal{S}\rvert \le 9/\varepsilon^2 that covers \mathbb{D}(r, \tilde R) at radius \varepsilon\tilde R, keeps the distance \varepsilon\tilde R\sqrt q/4 from every \lambda_i, and lies in \mathbb{D}(r, 2.1\tilde R): the hypotheses hcover, hcard and hne of NLAlib.exists_mem_le_norm_inv_pow_of_covers at the radius \tilde R, and a forward-stability distance for the shifted steps. The translate has radius \mathrm{fl}(\varepsilon\tilde R/2), and its points are not intersected with a disk (the paper's intersection with \mathbb{D}(r, \tilde R) can drop the points covering the boundary); the rounding budget 0.005\,\varepsilon\tilde R replaces the paper's 0.1\,\varepsilon\tilde R, which exceeds the covering slack, and the packing count is 11, not 3. Shared by the trees of NLAlib.ShiftedQR.shqrSmallEigRoutine, on their scratch.

NLAlib.ShiftedQR.excShifts_pwrites {O Q : Type} [Ops.Has Ops.ScalarOp O]
  [Ops.Has ShiftedQR.DiskSampleOp O] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ}
  (hS : Ops.IsScalar M I) (hM : Ops.StdModel u id M) {law : ℕ → Measure ℝ} {s : ℕ}
  (hD : ShiftedQR.IsPolarDiskSampler s I) (hU : law s = ℙ.restrict (Set.Icc 0 1)) {N : ℕ}
  (e : Fin N → ℂ) {r : ℂ} {R ε φ : ℝ} (hR : 0 < R) (hε : 0 < ε) (hε2 : ε ≤ 1 / 2) (hφ : 0 ≤ φ)
  (hφ1 : φ ≤ 1 / 5) (hu : u ≤ 1 / 100) (hδ : 6 * u * (‖r‖ + 3 * R) ≤ 5e-3 * ε * R)
  (hδη : 6 * u * (‖r‖ + 3 * R) ≤ ε * R * √(φ / (11 * ↑N)) / 8) {c rt cw g ss : ℕ × ℕ} :
  Ops.PWrites law I ShiftedQR.excShifts
    (Ops.Env.frame [(ShiftedQR.excNet ε).length] [c, rt, cw, g, ss])
    (Ops.Store.inBlock ss.1 ss.2 (2 * (ShiftedQR.excNet ε).length))
    (fun μ ↦
      μ.Live [c, rt, cw, g, ss] ∧
        μ.store.get c.1 c.2 = some r.re ∧
          μ.store.get c.1 (c.2 + 1) = some r.im ∧
            μ.store.get rt.1 rt.2 = some R ∧
              μ.store.get cw.1 cw.2 = some (ε / 2) ∧
                μ.store.readBlock g.1 g.2 (2 * (ShiftedQR.excNet ε).length) =
                    some (List.flatMap (fun z ↦ [z.re, z.im]) (ShiftedQR.excNet ε)) ∧
                  ss.2 + 2 * (ShiftedQR.excNet ε).length ≤ μ.store.len ss.1 ∧
                    Ops.Fp.Disj (Ops.Store.inBlock ss.1 ss.2 (2 * (ShiftedQR.excNet ε).length))
                        (Ops.Store.inBlock rt.1 rt.2 1) ∧
                      Ops.Fp.Disj (Ops.Store.inBlock ss.1 ss.2 (2 * (ShiftedQR.excNet ε).length))
                        (Ops.Store.inBlock g.1 g.2 (2 * (ShiftedQR.excNet ε).length)))
    (fun μ' ↦
      ∃ zs,
        zs.length = (ShiftedQR.excNet ε).length ∧
          μ'.store.readBlock ss.1 ss.2 (2 * (ShiftedQR.excNet ε).length) =
              some (List.flatMap (fun z ↦ [z.re, z.im]) zs) ∧
            ↑zs.length ≤ 9 / ε ^ 2 ∧
              (∀ (z : ℂ), ‖z - r‖ ≤ R → ∃ s ∈ zs, ‖z - s‖ ≤ ε * R) ∧
                (∀ s ∈ zs, ∀ (i : Fin N), ε * R * √(φ / (11 * ↑N)) / 4 ≤ ‖e i - s‖) ∧
                  ∀ s ∈ zs, ‖s - r‖ ≤ 2.1 * R)
    φ

Full source on GitHub

Import NLAlib.Eigensolvers.ShiftedQR.RoundedExc.