NLA-lib Explorer

NLAlib.SmallEig.smallEigProg_core_terminates

Library · theorem

The core call of NLAlib.SmallEig.smallEigProg (NLAlib.ShiftedQR.solveRoundedWith_terminates_if with the decoupler and the order-one leaf terminating): the run is total and leaves the block and the accumulator stored; if P (which gives the standard model at \boldsymbol{u} \le 1/100) and the accumulator \mathbf{X}' is within (1 + 24\boldsymbol{u})^{(n+1)^2} - 1 of the unitary \mathbf{V}_1, the stored accumulator is near a unitary (NLAlib.SmallEig.smallEigProg_accumulator_le). The frame is given by its evaluations.

NLAlib.SmallEig.smallEigProg_core_terminates {O Q : Type} [Ops.Has Ops.ScalarOp O]
  [Ops.Has Ops.IndexOp O] [Ops.Has Ops.SampleOp O] [Ops.Has ShiftedQR.DiskSampleOp O]
  [Ops.Has Ops.CmpTst Q] [Ops.Has Ops.IdxTst Q] {M : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ}
  (hS : Ops.IsScalar M I) {P : Prop} (hP : P → Ops.StdModel u id M ∧ u ≤ 1 / 100)
  (hL : Ops.IsIndexLit M I) {n kmax : ℕ} (hdk : n + 1 ≤ kmax)
  (hNat : Ops.IsExactNatLit id M (n + 1)) (hC : Ops.IsCmp id I) (hQ : Ops.IsToNat id I)
  (hSmp : Ops.IsSample I) {sU sG : ℕ} (hDisk : ShiftedQR.IsPolarDiskSampler sU I) {T : ℕ}
  {qs : List ℝ} (hqs : SmallEig.SmallEigCaps T qs) (hlen : 12 ≤ qs.length) {ρ : Ops.Env}
  {ds : List Ops.IExp} {args : List Ops.Operand} {a t p uo f : ℕ × ℕ}
  (hd : Ops.IExp.evalList ρ.idx ds = some [n + 1, 1, qs.length, T, T, T + (n + 1), n + 1])
  (ha : Ops.Operand.evalList ρ args = some [a, t, p, uo, a, uo, f]) {tape : Ops.Tape ℝ}
  {μ : Ops.Mem ℝ} {H X' V₁ : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {thr : ℝ}
  (hl : μ.Live [a, t, p, uo, f])
  (hr : μ.Room [a, t, p, uo, f] [2 * ((n + 1) * (n + 1)), 1, qs.length, 2 * ((n + 1) * (n + 1)), 1])
  (hap : ShiftedQR.ShQRViewsApart (n + 1) qs.length a t p uo f) (hA : HoldsMatrix a H μ.store)
  (hX : HoldsMatrix uo X' μ.store) (ht : μ.store.get t.1 t.2 = some thr)
  (hp : μ.store.readBlock p.1 p.2 qs.length = some qs) (hV₁ : HasOrthonormalCols V₁)
  (hX'b : P → specNorm (X' - V₁) ≤ (1 + 24 * u) ^ ((n + 1) * (n + 1)) - 1) :
  Ops.Writes Ops.Mode.total I tape (Ops.Stmt.frame ds args (SmallEig.smallEigCore sG)) ρ
    (Ops.Store.inBlock a.1 a.2 (2 * ((n + 1) * (n + 1))) ⊔
        Ops.Store.inBlock uo.1 uo.2 (2 * ((n + 1) * (n + 1))) ⊔
      Ops.Store.inBlock f.1 f.2 1)
    (fun μ' ↦
      ∃ Tb Ub,
        HoldsMatrix a Tb μ'.store ∧
          HoldsMatrix uo Ub μ'.store ∧
            (P →
              ∃ V,
                HasOrthonormalCols V ∧
                  specNorm (Ub - V) ≤
                    (1 + 24 * u) ^ (kmax * kmax + 2 * (kmax + 1) * ((T + kmax) * kmax + 6)) - 1))
    μ

Full source on GitHub

Import NLAlib.Eigensolvers.SmallEig.Program.