NLAlib.Schur.schurPipeline_reg_pwrites
Library · theorem
Standard rounding
The regularizer, the identity, the reducer, the core and the scaling back: from a run memory holding a scaled \mathbf{A}_1 with \|\mathbf{A}_1\|_2 \le 2/c_1 and the norm estimate \mathbf{x}, except with probability \varphi_R + \varphi_C the run ends with the flag 0, the accumulator \mathbf{U}_2 and the scaled \mathbf{T}' of an upper triangular \mathbf{T} tracked from (\mathbf{I}, \mathbf{A}_2), \|\mathbf{A}_2 - \mathbf{A}_1\|_2 \le \delta_R. The conclusion is passed as hpost, its outcomes measurable. A step in the proof of NLAlib.Schur.schurPipeline_pos_pwrites.
NLAlib.Schur.schurPipeline_reg_pwrites {O Q : Type} [Ops.Has Ops.ScalarOp O] {Mch : Ops.Machine ℝ}
{I : Ops.Interp O Q ℝ} {u : ℝ} (hS : Ops.IsScalar Mch I) (hM : Ops.StdModel u id Mch)
(h1 : Mch.lit 1 = 1) (hI : I.IsMeasurable) {win : O → List ℕ → ℕ}
(hloc : ∀ (o : O), I.TapeLocal o (win o)) {law : ℕ → Measure ℝ} {Reg Red Core : Ops.Stmt O Q}
{n k F T L : ℕ} {c₁ δR φR εHU εHT εCU εCT φC : ℝ} {qR qC : List ℝ}
{C C' : {m : ℕ} → Matrix (Fin (m + 1)) (Fin (m + 1)) ℂ → Prop}
(hReg : Schur.RandomRegularizerContract law δR φR (fun {n} ↦ C) (n + 1) (2 / c₁) qR Reg I)
(hRed : Schur.HessenbergReducerContract εHU εHT (n + 1) Red I)
(hCore :
Schur.RandomSchurCoreContract law εCU εCT φC (fun {n} ↦ C') k F T (n + 1) (4 / c₁) qC Core I)
(hCC' :
∀ (A H V : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ),
C A → IsPerturbedUnitarySimilarBy V A H (εHT * (2 / c₁ + δR)) → C' H)
(hc₁ : 0 < c₁) (hδR : δR ≤ 1 / c₁) (hεHT0 : 0 ≤ εHT) (hεHT : εHT ≤ 1 / 8) (hεCU : 0 ≤ εCU)
(hφC : 0 ≤ φC) {a p uo f : ℕ × ℕ} {m : Ops.Mem ℝ}
(hm : Schur.SchurPipelineMem n (qR ++ qC) a p uo f L m) {x : ℝ} (hx : m.store.get L 0 = some x)
{A₁ : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} (hA₁ : HoldsMatrix a A₁ m.store)
(hA₁n : specNorm A₁ ≤ 2 / c₁) {Goal : Ops.Mem ℝ → Prop}
(hGoal :
MeasurableSet {y | Ops.Store.EqOff (Schur.schurFp n a uo f) y.1.store y.2.store ∧ Goal y.2})
(hpost :
∀ (A₂ U₂ Tm T' : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ),
0 ≤ εCT →
specNorm (A₂ - A₁) ≤ δR →
Tm.IsUpperTriangular →
IsTrackedUnitarySimilar ((1 + εHU) * (1 + εCU) - 1) (εHT * specNorm A₂ + εCT) 1 A₂ U₂
Tm →
frobNorm (T' - ↑x • Tm) ≤ u * |x| * frobNorm Tm →
(∀ (i j : Fin (n + 1)), Tm i j = 0 → T' i j = 0) →
∀ (m' : Ops.Mem ℝ),
m'.store.get f.1 f.2 = some 0 →
HoldsMatrix a T' m'.store → HoldsMatrix uo U₂ m'.store → Goal m') :
Ops.PWrites law I
((Ops.Stmt.frame [Ops.IExp.var 0, Ops.IExp.var 1]
[{ buf := 0, off := Ops.IExp.var 6 }, { buf := 1, off := Ops.IExp.var 7 },
{ buf := 0, off := Ops.IExp.var 6 }]
Reg).seq
((Ops.Stmt.frame [Ops.IExp.var 0] [{ buf := 3, off := Ops.IExp.var 9 }]
Ops.PairMatrix.identity).seq
((Ops.Stmt.frame [Ops.IExp.var 0]
[{ buf := 0, off := Ops.IExp.var 6 }, { buf := 3, off := Ops.IExp.var 9 },
{ buf := 0, off := Ops.IExp.var 6 }, { buf := 3, off := Ops.IExp.var 9 }]
Red).seq
((Ops.Stmt.frame
[Ops.IExp.var 0, Ops.IExp.var 2, Ops.IExp.var 3, Ops.IExp.var 4, Ops.IExp.var 5]
[{ buf := 0, off := Ops.IExp.var 6 },
{ buf := 1, off := Ops.IExp.var 7 + Ops.IExp.var 1 },
{ buf := 3, off := Ops.IExp.var 9 }, { buf := 0, off := Ops.IExp.var 6 },
{ buf := 3, off := Ops.IExp.var 9 }, { buf := 4, off := Ops.IExp.var 10 }]
Core).seq
(Ops.Stmt.loop (Ops.IExp.const 2 * (Ops.IExp.var 0 * Ops.IExp.var 0))
(Ops.Stmt.call (Ops.Has.inj Ops.ScalarOp.mul) []
[{ buf := 0, off := Ops.IExp.var 6 + Ops.IExp.var 11 },
{ buf := 5, off := Ops.IExp.const 0 }]
[{ buf := 0, off := Ops.IExp.var 6 + Ops.IExp.var 11 }]))))))
(Schur.schurPipelineEnv n qR.length qC.length k F T a p uo f L) (Schur.schurFp n a uo f)
(fun x ↦ x = m) Goal (φR + φC)Import NLAlib.Eigensolvers.Schur.Pipeline.