NLAlib.SmallEig.smallEigProg_reduce_writes_if
Library · theorem
The order-(n + 1) \ge 2 branch of NLAlib.SmallEig.smallEigProg after the perturbation, up to the core: open the scoped log at (L + 2, 0), reduce the block recording the rotations and replay them on the identity accumulator. On every tape the run writes only the block, the accumulator and the scratch above L, stores the rounded Hessenberg form NLAlib.hessenbergReduceLastWord of \mathbf{A} and an accumulator within (1 + 24\boldsymbol{u})^{(n+1)^2} - 1 of the exact unitary of the recorded rotations, and leaves the memory of the core call (NLAlib.SmallEig.SmallEigCoreReady). The frames are given by their evaluations. The accumulator bound is claimed only if P, which gives the standard model at \boldsymbol{u} \le 1/100; the run itself needs no rounding model. A step in the proof of NLAlib.SmallEig.smallEigProg_reduce_writes, NLAlib.SmallEig.smallEigProg_reduce_terminates.
NLAlib.SmallEig.smallEigProg_reduce_writes_if {O Q : Type} [Ops.Has Ops.ScalarOp O]
[Ops.Has Ops.IndexOp 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 : ℕ} (hn1 : 1 ≤ n)
(hNat : Ops.IsExactNatLit id M (n + 1)) (hC : Ops.IsCmp id I) (hQ : Ops.IsToNat id I)
{qs : List ℝ} (hlen : 12 ≤ qs.length) {ρ : Ops.Env} {ds₁ ds₂ ds₃ : List Ops.IExp}
{as₁ as₂ as₃ : List Ops.Operand} {w p ub : ℕ × ℕ} {L : ℕ}
(hd₁ : Ops.IExp.evalList ρ.idx ds₁ = some [n + 1, n + 1])
(ha₁ : Ops.Operand.evalList ρ as₁ = some [(L + 2, 0)])
(hd₂ : Ops.IExp.evalList ρ.idx ds₂ = some [n + 1, n + 1, 0])
(ha₂ : Ops.Operand.evalList ρ as₂ = some [w, w, (L + 2, 0)])
(hd₃ : Ops.IExp.evalList ρ.idx ds₃ = some [n + 1, 0, 0, n + 1, n + 1, n + 1])
(ha₃ : Ops.Operand.evalList ρ as₃ = some [(L + 2, 0), ub, ub]) {tape : Ops.Tape ℝ} {μ : Ops.Mem ℝ}
{A : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} (hwL : w.1 < L) (hpL : p.1 < L) (huL : ub.1 < L)
(hlen₂ : List.length μ.store = L + 3) (hFl : μ.store.len L = 1) (hTh : μ.store.len (L + 1) = 1)
(hLg : μ.store.len (L + 2) = (n + 1) * (1 + 5 * (n + 1))) (hB : HoldsMatrix w A μ.store)
(hU : HoldsMatrix ub 1 μ.store) (hp : μ.store.readBlock p.1 p.2 qs.length = some qs)
(hThv : μ.store.get (L + 1) 0 = some (qs.getD 6 0))
(hwu :
Ops.Fp.Disj (Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))))
(Ops.Store.inBlock ub.1 ub.2 (2 * ((n + 1) * (n + 1)))))
(hpwu :
Ops.Fp.Disj (Ops.Store.inBlock p.1 p.2 qs.length)
(Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock ub.1 ub.2 (2 * ((n + 1) * (n + 1))))) :
Ops.Writes Ops.Mode.total I tape
((Ops.Stmt.frame ds₁ as₁ slottedLogOpen).seq
((Ops.Stmt.frame ds₂ as₂ hessenbergReduceLast).seq
(Ops.Stmt.frame ds₃ as₃ givensReplayColumns)))
ρ
(Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock ub.1 ub.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Fp.above L)
(fun μ' ↦
∃ X',
SmallEig.SmallEigCoreReady qs w p ub L (hessenbergReduceLastWord M A) X' μ' ∧
(P →
specNorm (X' - givensLog (n + 1) (hessenbergReduceLastSlots M A).flatten) ≤
(1 + 24 * u) ^ ((n + 1) * (n + 1)) - 1))
μImport NLAlib.Eigensolvers.SmallEig.Program.