NLAlib.Schur.schurPipeline_pos_pwrites
Library · theorem
Standard rounding
The positive branch of the pipeline: from a run memory holding \mathbf{A} and a norm estimate c_1\|\mathbf{A}\|_{\mathsf{F}} \le \mathbf{x} \le c_2\|\mathbf{A}\|_{\mathsf{F}}, \mathbf{x} > 0, the run of the scaling, the four stages and the scaling back ends in a Schur output except with probability \varphi_R + \varphi_C. A step in the proof of NLAlib.Schur.schurPipelineWith_measureReal_not_schur_le.
NLAlib.Schur.schurPipeline_pos_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₁ 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₁) (hu0 : 0 ≤ u) (hu : 8 * (↑n + 1) * u ≤ 1 / 4) (hδR : δR ≤ 1 / c₁) (hεHT0 : 0 ≤ εHT)
(hεHT : εHT ≤ 1 / 8) (hεHU : 0 ≤ εHU) (hεCU : 0 ≤ εCU) (hεU : (1 + εHU) * (1 + εCU) - 1 ≤ 1 / 16)
(hφR : 0 ≤ φR) (hφC : 0 ≤ φC) {a p uo f : ℕ × ℕ} {A : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ}
{m : Ops.Mem ℝ} (hm : Schur.SchurPipelineMem n (qR ++ qC) a p uo f L m)
(hA : HoldsMatrix a A m.store) {x : ℝ} (hx : m.store.get L 0 = some x) (hx0 : 0 < x)
(hxl : c₁ * frobNorm A ≤ x) (hxu : x ≤ c₂ * frobNorm A) :
Ops.PWrites law I
((Ops.Stmt.call (Ops.Has.inj (Ops.ScalarOp.lit 1)) [] []
[{ buf := 6, off := Ops.IExp.const 0 }]).seq
((Ops.Stmt.call (Ops.Has.inj Ops.ScalarOp.div) []
[{ buf := 6, off := Ops.IExp.const 0 }, { buf := 5, off := Ops.IExp.const 0 }]
[{ buf := 6, off := Ops.IExp.const 0 }]).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 := 6, off := Ops.IExp.const 0 }]
[{ buf := 0, off := Ops.IExp.var 6 + Ops.IExp.var 11 }])).seq
((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 ⊔ Ops.Store.inBlock (L + 1) 0 1) (fun x ↦ x = m)
(Schur.SchurOutput a uo f A
(2 * c₂ * √(↑n + 1) * (δR + 3 * εHT / c₁ + εCT + 8 * ((1 + εHU) * (1 + εCU) - 1) / c₁) +
8 * (↑n + 1) * u)
(2 * ((1 + εHU) * (1 + εCU) - 1) + ((1 + εHU) * (1 + εCU) - 1) ^ 2))
(φR + φC)Import NLAlib.Eigensolvers.Schur.Pipeline.