Theorem (The output is a Schur pair). Let the machine and the streams be as above, with tail records that bound the two Ginibre tails, u\le u_{\mathrm{SmallEig}} at those records, n+1\le n_{\max}, \|\mathbf{M}\|_2\le\Sigma, 0<\delta\le\Sigma and 0<\varphi\le1. From a memory holding \mathbf{M} and the parameter words, except with probability at most \varphi, the run writes only the matrix and the accumulator and stores an upper triangular \widehat{\mathbf{T}}_\mathbf{b} and an accumulator \widehat{\mathbf{U}}_\mathbf{b} with
\widehat{\mathbf{T}}_\mathbf{b}=\mathbf{V}^{\mathsf{H}}(\mathbf{M}+\mathbf{E})\mathbf{V},\qquad\|\mathbf{E}\|_2\le\delta,\qquad\|\widehat{\mathbf{U}}_\mathbf{b}-\mathbf{V}\|_2\le(1+24u)^{R}-1
for an exact unitary \mathbf{V}, with R=n_{\max}^2+2(n_{\max}+1)\bigl((T+n_{\max})n_{\max}+6\bigr) (smallEigLeafRotations). The proved tail records satisfy the hypothesis. The eigenvalue theorems below are corollaries: the diagonal of \widehat{\mathbf{T}}_\mathbf{b} lists them.
Lean statement and details
Standard rounding
NLAlib.SmallEig.smallEigProg_pwrites_schur {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] {Mch : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ}
{n : ℕ} (hS : Ops.IsScalar Mch I) (hM : Ops.StdModel u id Mch) (hL : Ops.IsIndexLit Mch I)
(hNat : Ops.IsExactNatLit id Mch (n + 1)) (hQ : Ops.IsToNat id I) (hC : Ops.IsCmp id I)
(hI : I.IsMeasurable) {win : O → List ℕ → ℕ} (hloc : ∀ (o : O), I.TapeLocal o (win o))
(hSmp : Ops.IsSample I) {law : ℕ → Measure ℝ} {sU sG : ℕ}
(hDisk : ShiftedQR.IsPolarDiskSampler sU I) (hU : law sU = ℙ.restrict (Set.Icc 0 1))
(hG : law sG = gaussianReal 0 1) {c₁ c₂ : PolyLogTail} (hA : c₁.BoundsGinibreGap)
(hB : c₂.BoundsGinibreCondition) (hb₁ : 0 < c₁.b) (hb₂ : 0 < c₂.b) {nmax : ℕ} (hn : n + 1 ≤ nmax)
{M : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {S δ φ : ℝ} (hMS : specNorm M ≤ S) (hδ : 0 < δ)
(hδS : δ ≤ S) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hu : u ≤ SmallEig.uSmallEig nmax S δ φ c₁ c₂)
(w q o : ℕ × ℕ) :
Ops.PWrites law I (SmallEig.smallEigProg sG)
(Ops.Env.frame (SmallEig.smallEigDims n nmax S δ φ c₁ c₂) [w, q, w, o])
(Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock o.1 o.2 (2 * ((n + 1) * (n + 1))))
(SmallEig.SmallEigInput nmax S δ φ c₁ c₂ w q o M)
(fun μ' ↦
∃ Ub Tb,
Schur.HoldsSchurPair w o Ub Tb μ'.store ∧
Tb.IsUpperTriangular ∧
IsTrackedUnitarySimilar
((1 + 24 * u) ^
SmallEig.smallEigLeafRotations nmax (SmallEig.smallEigCap nmax S δ φ c₁ c₂) -
1)
δ 1 M Ub Tb)
φ
Full source on GitHub
Copy link
Theorem (Theorem 1.1: eigenvalues, backward error). Let the machine and the streams be as above, with u\le u_{\mathrm{SmallEig}} at the proved tail records. Let n+1\le n_{\max}, let \mathbf{M} be a complex matrix of order n+1 with \|\mathbf{M}\|_2\le\Sigma, and let 0<\delta\le\Sigma and 0<\varphi\le1. Start smallEigProg from a memory holding \mathbf{M} and the parameter words. Then, for a random tape with the stream laws,
\mathbb{P}\bigl[\text{the run fails, writes outside the matrix and the accumulator, or does not store an upper triangular }\widehat{\mathbf{T}}_\mathbf{b}\text{ whose diagonal lists }\operatorname{spec}(\mathbf{M}+\mathbf{E})\text{ with }\|\mathbf{E}\|_2\le\delta\bigr]\le\varphi.
Lean statement and details
Standard rounding Random tape
NLAlib.SmallEig.smallEig_measureReal_not_spectrum_le_unconditional {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]
{Mch : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ} {n : ℕ} (hS : Ops.IsScalar Mch I)
(hM : Ops.StdModel u id Mch) (hL : Ops.IsIndexLit Mch I) (hNat : Ops.IsExactNatLit id Mch (n + 1))
(hQ : Ops.IsToNat id I) (hC : Ops.IsCmp id I) (hI : I.IsMeasurable) {win : O → List ℕ → ℕ}
(hloc : ∀ (o : O), I.TapeLocal o (win o)) (hSmp : Ops.IsSample I) {law : ℕ → Measure ℝ}
{sU sG : ℕ} (hDisk : ShiftedQR.IsPolarDiskSampler sU I) (hU : law sU = ℙ.restrict (Set.Icc 0 1))
(hG : law sG = gaussianReal 0 1) {nmax : ℕ} (hn : n + 1 ≤ nmax)
{M : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} {S δ φ : ℝ} (hMS : specNorm M ≤ S) (hδ : 0 < δ)
(hδS : δ ≤ S) (hφ : 0 < φ) (hφ1 : φ ≤ 1)
(hu : u ≤ SmallEig.uSmallEig nmax S δ φ ginibreGapTail ginibreConditionTail) {w q o : ℕ × ℕ}
{μ : Ops.Mem ℝ}
(hin : SmallEig.SmallEigInput nmax S δ φ ginibreGapTail ginibreConditionTail w q o M μ) {Ω : Type}
[MeasurableSpace Ω] {P : Measure Ω} {ξ : Ω → Ops.Tape ℝ} (hξ : Ops.IsTapeLaw law P ξ) :
P.real
{ω |
¬Ops.Writes Ops.Mode.total I (ξ ω) (SmallEig.smallEigProg sG)
(Ops.Env.frame (SmallEig.smallEigDims n nmax S δ φ ginibreGapTail ginibreConditionTail)
[w, q, w, o])
(Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock o.1 o.2 (2 * ((n + 1) * (n + 1))))
(SmallEig.SmallEigSpectrum w o M δ) μ} ≤
φ
Full source on GitHub
Copy link
The error is absolute and \Sigma is an input. The paper's form is relative; it is smallEig_relative and its unconditional form, with \|\mathbf{M}\|_2\le\Sigma\le c\|\mathbf{M}\|_2 and error \varepsilon\|\mathbf{M}\|_2. The failure probability is split in four parts: the eigenvalue gap, the condition number, the norm of the perturbation and the worklist.
Theorem (Corollary 1.3: forward error). Let the machine and the streams be as above, with exact natural literals up to k_{\max}, and let 0<\beta\le\Sigma and 0<\varphi\le1. Let u\le u^{\mathrm{fwd}}_{\mathrm{SmallEig}} at the proved tail records. Take the parameter words and the cap of the forward form at k_{\max}. For \mathbf{M} of order n+1\le k_{\max} with \|\mathbf{M}\|_2\le\Sigma, except with probability at most \varphi, the run writes only the matrix and the accumulator and stores \widehat{\mathbf{T}}_\mathbf{b} with |(\widehat{\mathbf{T}}_\mathbf{b})_{ii}-\lambda_i|\le\beta for a listing \lambda_1,\dots,\lambda_{n+1} of the eigenvalues of \mathbf{M} with multiplicity.
Lean statement and details
Standard rounding Random tape
NLAlib.SmallEig.smallEig_measureReal_not_forward_le_unconditional {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]
{Mch : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ} (hS : Ops.IsScalar Mch I)
(hM : Ops.StdModel u id Mch) (hL : Ops.IsIndexLit Mch I) {kmax : ℕ}
(hNat : Ops.IsExactNatLit id Mch kmax) (hQ : Ops.IsToNat id I) (hC : Ops.IsCmp id I)
(hI : I.IsMeasurable) {win : O → List ℕ → ℕ} (hloc : ∀ (o : O), I.TapeLocal o (win o))
(hSmp : Ops.IsSample I) {law : ℕ → Measure ℝ} {sU sG : ℕ}
(hDisk : ShiftedQR.IsPolarDiskSampler sU I) (hU : law sU = ℙ.restrict (Set.Icc 0 1))
(hG : law sG = gaussianReal 0 1) {S β φ : ℝ} (hβ : 0 < β) (hβS : β ≤ S) (hφ : 0 < φ) (hφ1 : φ ≤ 1)
(hu : u ≤ SmallEig.uSmallEigForward kmax S β φ ginibreGapTail ginibreConditionTail) {n : ℕ}
(hn : n + 1 ≤ kmax) {M : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} (hMS : specNorm M ≤ S)
{w q o : ℕ × ℕ} {μ : Ops.Mem ℝ}
(hin :
SmallEig.SmallEigInput kmax S (SmallEig.forwardBackwardError kmax S β) φ ginibreGapTail
ginibreConditionTail w q o M μ)
{Ω : Type} [MeasurableSpace Ω] {P : Measure Ω} {ξ : Ω → Ops.Tape ℝ} (hξ : Ops.IsTapeLaw law P ξ) :
P.real
{ω |
¬Ops.Writes Ops.Mode.total I (ξ ω) (SmallEig.smallEigProg sG)
(Ops.Env.frame
(SmallEig.smallEigDims n kmax S (SmallEig.forwardBackwardError kmax S β) φ
ginibreGapTail ginibreConditionTail)
[w, q, w, o])
(Ops.Store.inBlock w.1 w.2 (2 * ((n + 1) * (n + 1))) ⊔
Ops.Store.inBlock o.1 o.2 (2 * ((n + 1) * (n + 1))))
(fun μ' ↦
∃ Tb ev,
HoldsMatrix w Tb μ'.store ∧
IsEigenvalueListing M ev ∧ ∀ (i : Fin (n + 1)), ‖Tb i i - ev i‖ ≤ β)
μ} ≤
φ
Full source on GitHub
Copy link
One list of words, chosen at k_{\max}, serves every order up to k_{\max}; in the paper the order is fixed. The proof runs the backward form at \delta_\mathbf{b}=\Sigma\bigl(\beta/(4(2k_{\max}+1)\Sigma)\bigr)^{k_{\max}} and converts the backward error to a forward one by the Ostrowski–Elsner matching, which costs the exponent k_{\max}.
Theorem (The program is a small-block Schur solver). On the machine and streams above, with exact natural literals up to d_{\max}\le k_{\max}, tail records bounding the two Ginibre tails, 0<\beta\le\Sigma, 0<\varphi\le1 and u\le u^{\mathrm{fwd}}_{\mathrm{SmallEig}}, the program with the forward words meets the small-block Schur contract on orders at most d_{\max} and norms at most \Sigma: except with probability \varphi it stores an upper triangular \mathbf{T}_\mathbf{b} and an accumulator \mathbf{U}_\mathbf{b} with \mathbf{T}_\mathbf{b}=\mathbf{V}_\mathbf{b}^{\mathsf{H}}(\mathbf{B}+\mathbf{F})\mathbf{V}_\mathbf{b}, \|\mathbf{F}\|_2\le\delta_\mathbf{b} and \|\mathbf{U}_\mathbf{b}-\mathbf{V}_\mathbf{b}\|_2\le(1+24u)^{R_L}-1, for an exact unitary \mathbf{V}_\mathbf{b} and R_L=k_{\max}^2+2(k_{\max}+1)\bigl((T+k_{\max})k_{\max}+6\bigr).
Lean statement and details
Standard rounding
NLAlib.SmallEig.smallEigProg_randomSchurLeafContract {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] {Mch : Ops.Machine ℝ} {I : Ops.Interp O Q ℝ} {u : ℝ}
(hS : Ops.IsScalar Mch I) (hM : Ops.StdModel u id Mch) (hL : Ops.IsIndexLit Mch I) {dmax kmax : ℕ}
(hdk : dmax ≤ kmax) (hNat : Ops.IsExactNatLit id Mch dmax) (hQ : Ops.IsToNat id I)
(hC : Ops.IsCmp id I) (hI : I.IsMeasurable) {win : O → List ℕ → ℕ}
(hloc : ∀ (o : O), I.TapeLocal o (win o)) (hSmp : Ops.IsSample I) {law : ℕ → Measure ℝ}
{sU sG : ℕ} (hDisk : ShiftedQR.IsPolarDiskSampler sU I) (hU : law sU = ℙ.restrict (Set.Icc 0 1))
(hG : law sG = gaussianReal 0 1) {c₁ c₂ : PolyLogTail} (hA : c₁.BoundsGinibreGap)
(hB : c₂.BoundsGinibreCondition) (hb₁ : 0 < c₁.b) (hb₂ : 0 < c₂.b) {S β φ : ℝ} (hβ : 0 < β)
(hβS : β ≤ S) (hφ : 0 < φ) (hφ1 : φ ≤ 1) (hu : u ≤ SmallEig.uSmallEigForward kmax S β φ c₁ c₂) :
Schur.RandomSchurLeafContract law
((1 + 24 * u) ^
SmallEig.smallEigLeafRotations kmax (SmallEig.smallEigForwardCap kmax S β φ c₁ c₂) -
1)
(SmallEig.forwardBackwardError kmax S β) φ dmax S
(SmallEig.smallEigForwardParams kmax S β φ c₁ c₂) (SmallEig.smallEigForwardCap kmax S β φ c₁ c₂)
(SmallEig.smallEigProg sG) I
Full source on GitHub
Copy link
This contract is the hypothesis that the shifted QR program and BGS + Dense Schur (end-to-end) discharge with this program.
Theorem (On one counted run). Under the hypotheses of Theorem 1.1, the probability is at most \varphi that the counted run of smallEigAlgorithm fails, exceeds its budget, scratch, memory, work or span, writes outside the matrix and the accumulator, or does not store an upper triangular \widehat{\mathbf{T}}_\mathbf{b} whose diagonal lists the spectrum of a matrix \mathbf{M}+\mathbf{E} with \|\mathbf{E}\|_2\le\delta. The work and span bound is the certificate's 517058\,(n+1)^4(T+1)^2.
Lean statement and details
Standard rounding Random tape
NLAlib.SmallEig.smallEig_algorithm_measureReal_not_accepts_le_unconditional {Mch : Ops.Machine ℝ}
{nmax : ℕ} {admitted : ∃ d, SmallEig.SmallEigSizes Mch nmax ginibreGapTail ginibreConditionTail d}
{u : ℝ} (hM : Ops.StdModel u id Mch) {law : ℕ → Measure ℝ} {sU sG : ℕ}
(hU : law sU = ℙ.restrict (Set.Icc 0 1)) (hG : law sG = gaussianReal 0 1) {d : Fin 3 → ℕ}
(hd : SmallEig.SmallEigSizes Mch nmax ginibreGapTail ginibreConditionTail d)
(x : (SmallEig.smallEigProblem Mch nmax ginibreGapTail ginibreConditionTail admitted).Input d)
{I : Ops.Interp SmallEig.SmallEigOp ShiftedQR.Tst ℝ}
(hI :
(SmallEig.smallEigModel
(SmallEig.smallEigProblem Mch nmax ginibreGapTail ginibreConditionTail admitted) Mch
sU).contracts
d x I)
(hIm : I.IsMeasurable) {win : SmallEig.SmallEigOp → List ℕ → ℕ}
(hloc : ∀ (o : SmallEig.SmallEigOp), I.TapeLocal o (win o))
(hMS : specNorm (↑x).1.matrix ≤ (↑x).1.S) (hδ : 0 < (↑x).1.δ) (hδS : (↑x).1.δ ≤ (↑x).1.S)
(hφ : 0 < (↑x).1.φ) (hφ1 : (↑x).1.φ ≤ 1)
(hu : u ≤ SmallEig.uSmallEig nmax (↑x).1.S (↑x).1.δ (↑x).1.φ ginibreGapTail ginibreConditionTail)
{Ω : Type} [MeasurableSpace Ω] {P : Measure Ω} {ξ : Ω → Ops.Tape ℝ} (hξ : Ops.IsTapeLaw law P ξ) :
P.real
{ω |
¬(SmallEig.smallEigSpecification Mch nmax ginibreGapTail ginibreConditionTail admitted
sG).Accepts
(SmallEig.smallEigAlgorithm Mch nmax ginibreGapTail ginibreConditionTail admitted sU
sG).program
I SmallEig.smallEigResources (ξ ω) d x fun x_1 m ↦
Ops.Store.EqOff
(Ops.Store.inBlock 0 0 (2 * ((d 0 + 1) * (d 0 + 1))) ⊔
Ops.Store.inBlock 2 0 (2 * ((d 0 + 1) * (d 0 + 1))))
((SmallEig.smallEigProblem Mch nmax ginibreGapTail ginibreConditionTail
admitted).initial
d x).store
m.store ∧
SmallEig.SmallEigSpectrum (0, 0) (2, 0) (↑x).1.matrix (↑x).1.δ m} ≤
(↑x).1.φ
Full source on GitHub
Copy link