NLA-lib Explorer

NLAlib.SmallEig.oneEigStart_good

Library · theorem

The start of NLAlib.SmallEig.oneEig (NLAlib.SmallEig.oneEigStart) with the scratch from L when its sample is good: on a scalar machine with index literals, the literal 0 exact, exact comparisons and an exact polar sampler on the stream sU, with DistSpec accurate on a set \mathbf{P} holding the polar sample w_0 of the window at the current position (radius word r at qw[4]), it writes only Lam, the flag and the scratch, and stores the computed directions, the factor \mathrm{fl}(0.66), the point w_0 at Lam, an estimate within 10\% of its distance at Tau and the flag 0.

NLAlib.SmallEig.oneEigStart_good {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) (hL : Ops.IsIndexLit M I) (h0 : M.lit 0 = 0)
  {sU : ℕ} (hDisk : ShiftedQR.IsPolarDiskSampler sU I) {n m q L : ℕ}
  {H : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {d : Fin (n + 1) → ℂ} {P : Set ℂ}
  (hDS : SmallEig.DistSpecAccurateOn I H d m q P) {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ}
  {h qw lam f : ℕ × ℕ} {r : ℝ} (hh : h.1 < L) (hqw : qw.1 < L) (hlam : lam.1 < L) (hf : f.1 < L)
  (hlen : List.length μ.store = L + 7) (hl0 : μ.store.len L = 1) (hl5 : μ.store.len (L + 5) = 12)
  (hl6 : μ.store.len (L + 6) = 2) (hroom : lam.2 + 2 ≤ μ.store.len lam.1)
  (hroomf : f.2 < μ.store.len f.1)
  (hlh :
    Ops.Fp.Disj (Ops.Store.inBlock lam.1 lam.2 2)
      (Ops.Store.inBlock h.1 h.2 (2 * ((n + 1) * (n + 1)))))
  (hlf : Ops.Fp.Disj (Ops.Store.inBlock lam.1 lam.2 2) (Ops.Store.inBlock f.1 f.2 1))
  (hH : HoldsMatrix h H μ.store) (hq4 : μ.store.get qw.1 (qw.2 + 4) = some r)
  (hP : polarDisk 0 r (τ.windowFn sU μ.pos 2) ∈ P) :
  Ops.Writes Ops.Mode.total I τ SmallEig.oneEigStart
    (Ops.Env.frame [n + 1, m, q] [h, qw, lam, (L, 0), f, (L + 5, 0), (L + 6, 0)])
    (Ops.Store.inBlock lam.1 lam.2 2 ⊔ Ops.Store.inBlock f.1 f.2 1 ⊔ Ops.Fp.above L)
    (fun μ' ↦
      (∀ i < 12, μ'.store.get (L + 5) i = some (SmallEig.oneEigDirWords M i)) ∧
        μ'.store.get (L + 6) 0 = some (M.lit (66 / 100)) ∧
          μ'.store.readBlock lam.1 lam.2 2 =
              some
                [(polarDisk 0 r (τ.windowFn sU μ.pos 2)).re,
                  (polarDisk 0 r (τ.windowFn sU μ.pos 2)).im] ∧
            (∃ t,
                μ'.store.get L 0 = some t ∧
                  0.9 * ⨅ i, ‖polarDisk 0 r (τ.windowFn sU μ.pos 2) - d i‖ ≤ t ∧
                    t ≤ 1.1 * ⨅ i, ‖polarDisk 0 r (τ.windowFn sU μ.pos 2) - d i‖) ∧
              μ'.store.get f.1 f.2 = some 0)
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.OneEigParts.