API - The Reverse Ritz Inclusion

The routines of src/*.jl, the companion code of I. Nisoli, The reverse Ritz inclusion: computable bounds on the pseudospectra of an operator by those of a finite-rank compression, arXiv:2610.30530, one section per source file in the order of the paper. The docstrings cite the paper's labels; implementation.md in the repository maps the labels to the code.

CertifiedPseudospectra.CertifiedPseudospectra — Module
CertifiedPseudospectra

Companion code of The reverse Ritz inclusion: computable bounds on the pseudospectra of an operator by those of a finite-rank compression (I. Nisoli, arXiv:2610.30530). The source files follow the sections of the paper; the docstrings cite its labels. Everything that is not specific to the paper, the directed rounding, the norm bounds, the singular value enclosures, the ball products and the eigenvalue inclusions (verifyeigall), is BallArithmetic's.

twoblock.jl      §2 thm:assembly, prop:blockdom, eq:farshort, prop:complete, prop:count
                 (circle and union covers), prop:projector, cor:selfadj, cor:weyl
operator.jl      eq:roundA, the operator and its rounding model
couplings.jl     §3.3 eq:gram; α, the pencil and the factors of prop:almostortho
farblock.jl      §4 eq:mincert, prop:ladder, eq:sweep, sec:fpsweep (eq:epsP, lem:onestep,
                 eq:FI, eq:Ft, eq:FIt, prop:fpchecks, rem:impl, alg:fpsweep)
frame.jl         §5.1 def:Q (two-sided frame), rem:lanczos (floating point)
splitting.jl     §5 the certified splitting, the counts through verifyeigall and the
                 homotopy of prop:almostortho, cor:agree, cor:gap, the self-adjoint case
helper.jl        uncertified helpers: floating-point estimates of a run's parameters (the
                 radius, the frame size, the order of the sweep) before it is made
dense/           the dense pseudospectra code that was BallArithmetic's `src/pseudospectra`:
                 contour enclosures, block and SVD-frame resolvent floors, pseudospectrum
                 cells, the Sylvester-based resolvent bound, and `CertifScripts`
source

The two-block bound, contours and the self-adjoint corollaries (§2)

CertifiedPseudospectra.assembly_floor — Function
assembly_floor(σ11, σ22, γ1, γ2) -> (floor, ok)

Theorem thm:assembly, eq:assembly: if σ11 σ22 > γ1 γ2 (certified with the rounding directed against it) then 1/‖(A − zI)⁻¹‖ ≥ (σ11σ22 − γ1γ2)/(σ11 + σ22 + γ1 + γ2) = floor > 0. Arguments: lower bounds σ11 ≤ σ_min(G11 − zI), σ22 ≤ 1/‖(G22 − zI)⁻¹‖, upper bounds γ1 ≥ ‖G12‖, γ2 ≥ ‖G21‖, kept separate. Otherwise returns (0.0, false): "no bound". The right-hand side increases in σ11, σ22 and decreases in γ1, γ2, so evaluating it at the bounds gives a lower bound on its value at the true quantities.

source
CertifiedPseudospectra.blockdom_floor — Function
blockdom_floor(σ11, σ22, γ1, γ2) -> (floor, ok)

Proposition prop:blockdom, eq:blockdom: if γ1 < σ11 and γ2 < σ22, then 1/‖(A − zI)⁻¹‖ ≥ min(σ11, σ22)(1 − τ), τ = max(γ1/σ11, γ2/σ22). Same argument conventions as assembly_floor; the right-hand side increases in σ11, σ22.

source
CertifiedPseudospectra.farshort_lo — Function
farshort_lo(z, ḡ) -> Float64

eq:farshort: σ22(z) ≥ |z| − ḡ when ḡ ≥ ‖G22‖ and |z| > ḡ; returns a certified lower bound, or 0.0 when |z| ≤ ḡ cannot be excluded.

source
CertifiedPseudospectra.inclusion_delta — Function
inclusion_delta(ε, R, ḡ, γ1, γ2) -> (δ, ok)

Proposition prop:complete, eq:incl: if R > ḡ ≥ ‖G22‖ and ε(R − ḡ) > γ1γ2, then Λ_δ(A) ∩ {|z| > R} ⊆ Λ_ε(G11) ∩ {|z| > R} with δ = (ε(R − ḡ) − γ1γ2)/(ε + (R − ḡ) + γ1 + γ2). δ increases in s = R − ḡ, so a lower bound of s is used throughout.

source
CertifiedPseudospectra.CircleCheck — Type
CircleCheck

Result of check_circle. ok means that σ11(z)σ22(z) > γ1γ2 was certified at every point of the circle (not only at the samples); floor is then a certified lower bound on σ_min(A − zI) over the whole circle (Theorem thm:assembly); region_ok records the hypothesis D ∪ Γ ⊆ {|z| > ḡ} of prop:count for the component D named by region.

source
CertifiedPseudospectra.check_circle — Function
check_circle(σ11lo, ḡ, γ1, γ2, c, r; region, nθ = 64, maxdepth = 6, σ22lo = nothing,
             arcs = nothing)

Certify the hypothesis of prop:count on the circle Γ = {|z − c| = r} (or on the sub-arcs arcs, a list of angle intervals (θa, θb)). σ11lo(z) must return a certified lower bound on σ11(z) = σ_min(G11 − zI); σ22 is bounded below by eq:farshort, |z| − ḡ, or by σ22lo(z) if given. The true σ11 and σ22 are 1-Lipschitz in z (a smallest singular value, and the reciprocal of a resolvent norm, move by at most |Δz|), which is what makes a finite sample a cover: the circle is cut into nθ arcs; every point of an arc between two samples is within h = r·Δθ/2 (arc length) of the nearer sample, plus δ = 8u(|c| + r), a bound on the distance between a computed sample point and the exact point of the circle at that angle. Hence on the arc σ11 ≥ min(σ11lo(z_a), σ11lo(z_b)) − h and likewise for σ22, and thm:assembly's hypothesis is tested with these arc-wise lower bounds; an arc that fails is bisected, up to maxdepth times.

region = :interior also checks D ∪ Γ ⊆ {|z| > ḡ} for the open disc D, i.e. |c| − r > ḡ; region = :exterior (only for c = 0) checks it for D = {|z| > r}, i.e. r > ḡ.

source
check_circle(sc, c, r; region = :interior, kwargs...) -> CircleCheck

check_circle with the certificate's σ11 and σ22.

source
CertifiedPseudospectra.union_boundary_arcs — Function
union_boundary_arcs(centres, radii; μ = 1e-6) -> Vector{Vector{Tuple{Float64,Float64}}}

For the union U of the closed discs D(c_i, r_i), the arcs of each circle that must be checked: the whole circle minus the arcs lying strictly inside another disc. The skipped arcs are shrunk by the angle μ at both ends and kept only when that margin moves the points inside the other disc by far more than the rounding of κ = cos ψ (μ sin ψ > max(1e-9, 10·err(κ)), ψ the half-angle of the covered arc), so every point of ∂U lies on a checked arc.

source
CertifiedPseudospectra.projector_bound — Function
projector_bound(floorΓ, floor0, r, e) -> (bound, M, M0, ok)

Proposition prop:projector on a circle of radius r: with floorΓ a certified lower bound over the contour on the right-hand side of eq:assembly, so that M = 1/floorΓ ≥ sup_Γ ‖(A − zI)⁻¹‖, floor0 a certified lower bound over the contour on min(σ11(z), σ22(z)), so that M0 = 1/floor0 ≥ sup_Γ max(1/σ11, 1/σ22), the resolvent bound of the block-diagonal part, and e ≥ ‖E‖ the norm of the off-diagonal part,

‖P − P₀‖ ≤ (|Γ|/2π) M M₀ e = r M M₀ e,

the length of the circle being 2πr. The proof is the resolvent identity (zI−A)⁻¹ − (zI−A₀)⁻¹ = (zI−A)⁻¹E(zI−A₀)⁻¹ integrated over Γ. For the two-block splitting e = max(γ1, γ2), since E*E is block diagonal; inside sec:vbd, A₀ = Λ, E = M_c − Λ and e = β_Λ.

source
CertifiedPseudospectra.EigInterval — Type
EigInterval(lo, hi, count)

A real interval [lo, hi] certified to contain exactly count eigenvalues of the compression G11, counted with multiplicity; the intervals of one certificate are disjoint and together hold all k eigenvalues.

source
CertifiedPseudospectra.selfadj_enclosure — Function
selfadj_enclosure(θ, ḡ, γ̄) -> Vector{NamedTuple}

Corollary cor:selfadj (i) for A = A*: every point λ of spec(A) with |λ| > ḡ satisfies min_i |λ − θ_i| (|λ| − ḡ) ≤ γ̄², θ_i the eigenvalues of G11 (enclosed by the intervals θ). Returns intervals whose union contains spec(A) ∩ {|λ| > ḡ}, one per side and per interval J of θ (side = +1 for λ > ḡ, -1 for λ < −ḡ), with the quadratic radii ρ⁻, ρ⁺ about J:

  • around J = [lo, hi] the interval [r₂, r⁺], r⁺ = ((hi + ḡ) + √((hi − ḡ)² + 4γ̄²))/2 (so r⁺ − hi ≤ γ̄²/(hi − ḡ)), r₂ = ((lo + ḡ) + √((lo − ḡ)² − 4γ̄²))/2 when the discriminant is nonnegative, else r₂ = ḡ;
  • next to the disc, (ḡ, r₁] with r₁ = ((lo + ḡ) − √((lo − ḡ)² − 4γ̄²))/2 for the interval nearest to ḡ, reported with J = 0: that region is not excluded.

Endpoints are rounded outward (r⁺ increases in hi, ḡ, γ̄; r₂ increases in lo and decreases in ḡ, γ̄; r₁ decreases in lo and increases in ḡ, γ̄).

source
CertifiedPseudospectra.selfadj_count — Function
selfadj_count(θ, ḡ, γ̄, x1, x2) -> (count, ok)

Corollary cor:selfadj (ii): if ḡ < x1 < x2 and x1, x2 are at distance more than γ̄²/(x1 − ḡ) from every eigenvalue of G11, then A and G11 have the same number of eigenvalues in [x1, x2]. For x2 < x1 < −ḡ… use negative arguments: the interval [x1, x2] with x1 < x2 < −ḡ is handled by applying the statement to −A. The distance from x to θ_i is bounded below by the distance to the enclosing interval.

source
CertifiedPseudospectra.weyl_pairing — Function
weyl_pairing(θ, ḡ, γ̄, n) -> NamedTuple

Corollary cor:weyl for Hermitian A ∈ ℂ^{n×n}, with the radius γ̄: with j₊ = #{θ_i > ḡ}, |λ_i − θ_i| ≤ γ̄ for i ≤ j₊ and λ_{j₊+1} ≤ ḡ + γ̄ (eigenvalues in decreasing order), and symmetrically at the bottom. Corollary cor:weyl gives the smaller radius 2γ̄²/(δ_i + (δ_i² + 4γ̄²)^{1/2}) ≤ min(γ̄, γ̄²/δ_i), δ_i = θ_i − ḡ, for i ≤ j₊; that radius is not computed here. Needs every interval of θ to lie on one side of ḡ (and of −ḡ); the i-th largest θ lies in the interval reached by the cumulative counts from the top, which gives λ_i ∈ [lo − γ̄, hi + γ̄] for that interval. Returns top and bottom lists of (i, lo, hi) and the bounds λ_{j₊+1} ≤ top_rest, λ_{n−j₋} ≥ bottom_rest, or ok = false.

source

The operator and its rounding model (eq:roundA)

CertifiedPseudospectra.LinOp — Type
LinOp

A linear operator on ℂⁿ (or ℝⁿ) with its rounding model: mul!(Y, X) and adj!(Y, X) write fl(A X) and fl(A* X) column by column; epsA, etaA are the constants of eq:roundA (with the absolute term); stored is the matrix when one is stored (used for ball products), else nothing; T is the element type of the vectors (Float64 or ComplexF64).

source

The frame and the couplings (§3.3)

CertifiedPseudospectra.FrameData — Type
FrameData

Certified frame quantities. α ≥ ‖I − Q*Q‖; Gt a ball matrix and rhoG = (c0, c1) such that every entry of Q*AQ lies within rad(Gt) + c0 + c1·a of mid(Gt) whenever ‖A‖ ≤ a (for a stored matrix rhoG = (0, 0)); Mq ⊇ Q*Q; s, γ1Q, γ2Q the affine bounds on ‖Q*AQ‖, ‖Q*AP⊥‖, ‖P⊥AQ‖ for the frame Q itself (not yet divided by the factors in α).

source
CertifiedPseudospectra.frame_data — Function
frame_data(op::LinOp, Q; coupling = :gram) -> FrameData

The quantities above for the frame Q (n×k). Ball products with the stored matrix when op.stored !== nothing, otherwise from fl(AQ) and fl(A*Q) with the affine rounding terms. Throws if α < 1 is not certified.

source
CertifiedPseudospectra.frame_alpha — Function
frame_alpha(Q) -> (α, Mq)

α ≥ ‖I_k − Q*Q‖₂, the quantity of eq:alpha, and the ball matrix Mq ∋ Q*Q: Q*Q is formed by a ball product of the exact Q* and Q, and α is the upper bound of the spectral norm of Mq − I by upper_bound_L2_opnorm(…; svd = true), which holds for every matrix of the ball. α = 0 for an empty frame. Whether α < 1, which prop:almostortho needs, is the caller's check (frame_data makes it).

source
CertifiedPseudospectra.isometry_bounds — Function
isometry_bounds(fd::FrameData, a) -> (s, γ1, γ2)

Bounds for the isometry Z of the polar decomposition, valid whenever ‖A‖ ≤ a: ‖G11‖ ≤ s_Q(a)/(1 − α), ‖G12‖ ≤ γ1_Q(a)/√(1 − α), ‖G21‖ ≤ γ2_Q(a)/√(1 − α) (proof of prop:almostortho).

source

The far block (§4)

CertifiedPseudospectra.epsP_up — Function
epsP_up(α, n, k, T) -> ε_P

eq:epsP: ‖fl(y − Q fl(Q*y)) − P⊥y‖ ≤ ε_P ‖y‖ with ε_P = α + u + (1+u)(1+α)√k (u_n + u_k(1 + √k u_n)), u_ℓ = γ_ℓ (complex: γ_{ℓ+2}).

source
CertifiedPseudospectra.etaP_up — Function
etaP_up(n, k, T) -> η_P

The absolute (underflow) term of the projector, not in the paper: the inner products of length n of fl(Q*y) carry at most nη each (4nη complex), k of them, multiplied by ‖Q‖ ≤ √2; the inner products of length k of fl(Qt) at most kη each, n of them; the subtraction is exact in the subnormal range.

source
CertifiedPseudospectra.onestep_up — Function
onestep_up(a, g, γ1, γ2, εA, ηA, εP, ηP) -> (ε_B, η_B)

Lemma lem:onestep: ‖fl(By) − By‖ ≤ ε_B ‖y‖ + η_B for B = P⊥AP⊥ applied as fl(P⊥ fl(A fl(P⊥y))), whenever ‖A‖ ≤ a, ‖G12‖ ≤ γ1, ‖G21‖ ≤ γ2, ‖G22‖ ≤ g: ε_B = ε_P√(γ2² + g²) + ε_A a(1+ε_P) + ε_P(√(γ1² + g²) + a(ε_P + ε_A(1+ε_P))), the larger of the constants for B and for B* (γ1 and γ2 exchanged), and η_B = √(γ2²+g²)η_P + ε_A a η_P + η_A + ε_P(aη_P + ε_A aη_P + η_A) + η_P, the absolute term (zero when ηA = ηP = 0, the paper's case).

source
CertifiedPseudospectra.trace_sweep — Function
trace_sweep(op, Q, m; scale = 1.0, blocksize, nthreads, cols = 1:n) -> SweepSums

The floating-point sweep of order m over the canonical basis (eq:sweep), for the operator c·A with c = scale a power of two (Remark rem:impl: the scale is exact in binary floating point, apart from underflow, which the absolute terms cover). Columns are processed in blocks of blocksize, the projector as two matrix products per block; blocks are independent tasks on nthreads threads, each keeping its own sums, combined with upward rounding at the end. Memory: O(n·blocksize) per thread plus one length-n accumulator per thread for Σ_j |x_{j,1}|. For each computed vector the norm bound is ν ≥ ‖x‖ from the computed sum of squares ŝ, ‖x‖² ≤ ŝ/(1 − γ_n) + 2nη, and the ℓ¹ norm ‖x‖₁ ≤ ŝ₁/(1 − γ_{n+2}) + nη (complex moduli are computed by hypot, whose error is taken as at most 2u, hence the extra terms).

source
CertifiedPseudospectra.SweepSums — Type
SweepSums

The running sums of one sweep of order m (upper bounds, rounded upward): Γ[s+1, s'+1] ≥ Σ_j ν_{j,s}ν_{j,s'}, Σν[s+1] ≥ Σ_j ν_{j,s} and νmax[s+1] ≥ max_j ν_{j,s} for s, s' = 0:m; N1s[t] ≥ max_j ‖x_{j,t}‖₁ and Ninfs[t] ≥ ‖Σ_j |x_{j,t}|‖_∞ for t = 1:m, N1, Ninf their values at t = 1; and the plain floating-point values fp[t] = Σ_j ‖x_{j,t}‖² (t = 1:m), N1fp, Ninffp, used only to choose where to start the checks.

source
CertifiedPseudospectra.estimate_orders — Function
estimate_orders(op, Q, mmax; nsamples = 8, rng) -> Vector{Float64}

Floating-point estimates v_t ≈ (tr H^t)^{1/2t}, t = 1:mmax, from nsamples Gaussian vectors x: E‖x_t‖² = tr H^t for the chain x_t of the sweep started at x. Costs mmax·nsamples applications of B; each column is renormalised at every step and the logarithms accumulated. Used to choose the order of the certified sweep and the power-of-two scale; it certifies nothing.

source
CertifiedPseudospectra.FarBlockCertificate — Type
FarBlockCertificate

ok means that ‖G22‖ < gbar and ‖A‖ < abar are certified (prop:fpchecks), gbar the least of the certified bounds over the orders t = 1:m of the trace half and the interpolation half (eq:mincert); passed (:trace or :interp) and tpass say which check gave it, tpass = 0 for the interpolation half of eq:FI at the first order. Also: gbar_trace[t], gbar_interp_order[t] and gbar_interp (NaN when a check did not pass), the floating-point values trace_fp[t] = (Σ_j‖x_t‖²)^{1/2t} and interp_fp, the estimates used to choose the order, the scale, the one-step constants at the returned pair, and timings.

source
CertifiedPseudospectra.certify_far_block — Function
certify_far_block(op, Q, fd; order = :auto, order_max = 64, order_tol = 0.05, target = nothing,
                  nsamples = 8, blocksize, nthreads) -> FarBlockCertificate

Algorithm alg:fpsweep. The order m is order if an integer, else predicted from estimate_orders: the sweep measures a Frobenius norm over a block of rank at most n − k and tests it against g^{2t}, so the certified bound behaves like v_t·(n − k)^{1/2t}, and m is the least order whose prediction clears target, or, with no target, the least at which the prediction stops improving. The operator is scaled by the power of two c = 2^{-e} that brings the least estimate into [1, 2) (rem:impl). One sweep of order m (trace_sweep); then, for every t ≤ m and for the interpolation half, the least ḡ passing (i) with ā(ḡ) the least number passing (ii) (bisection, at no further matvec). The frame data fd supplies α (for ε_P) and the affine isometry bounds.

source

Building the frame, in floating point (§5.1, §5.3)

CertifiedPseudospectra.arnoldi — Function
arnoldi(Amul, n, L; v0, T) -> (V, H)

L steps of Arnoldi with full reorthogonalisation (twice), A V[:, 1:L] ≈ V H, V of size n×(L+1) and H (L+1)×L; stops early at a breakdown.

source
CertifiedPseudospectra.gkl — Function
gkl(Amul, Aadj, n, L; T) -> (Vr, Ul, σ)

L steps of Golub–Kahan–Lanczos bidiagonalisation with full reorthogonalisation (twice), and the Ritz singular triplets of the bidiagonal: right vectors Vr, left vectors Ul (columns ordered by decreasing Ritz singular value σ). "A Lanczos on AA and on AA at two matvecs per step" (sec:frame).

source
CertifiedPseudospectra.eigendirections — Function
eigendirections(Amul, n, R; L = 60) -> (W, θ)

Ritz vectors of L Arnoldi steps for the Ritz values of modulus > R: the "Arnoldi eigendirections with |λ| > R" of Definition def:Q.

source
CertifiedPseudospectra.rrqr_frame — Function
rrqr_frame(M; droptol = 1e-8, method = :qr) -> Q

The orthonormal factor of a rank-revealing factorisation of M (Definition def:Q), the directions whose diagonal falls below droptol times the largest being dropped. method = :qr is column-pivoted QR, |R_ii| < droptol |R_11|; :svd keeps the left singular vectors with s_i >= droptol s_1; :qlp is Stewart's QLP, a second column-pivoted QR applied to the transpose of R, whose diagonal tracks the singular values more closely than that of R: the rank is read off it, and the leading columns of the first orthonormal factor are kept.

source
CertifiedPseudospectra.two_sided_frame — Function
two_sided_frame(Amul, Aadj, n, R; ks, keig = true, Leig = 60, Lsv = 2ks + 20, droptol,
                sides = :both) -> (Q, info)

Definition def:Q: Q is the orthonormal factor of a rank-revealing factorisation of [W_λ | V_σ | U_σ], with W_λ the Arnoldi eigendirections of modulus > R and V_σ, U_σ the leading ks right and left Ritz singular vectors. sides = :right or :left keeps one side only (the "eigen + right", "eigen + left" rows of the table of sec:frame).

source
CertifiedPseudospectra.lanczos_frame — Function
lanczos_frame(Amul, n, L; tol = 1e-10, kmax = L) -> (Q, info)

Remark rem:lanczos, for Hermitian A: L Lanczos steps (full reorthogonalisation, twice), Ritz pairs (θ_i, s_i) of T_L, residuals r_i = β_L |(s_i)_L|, and Q = Q_L S_C for the Ritz vectors with r_i ≤ tol · max|θ|, largest |θ| first, at most kmax. Q is not re-orthonormalised: its defect α is certified downstream, and γ̄ is taken from the Gram bound on the frame actually computed, not from the r_i.

source

The certified splitting and the entry points (§5)

CertifiedPseudospectra.SplitCertificate — Type
SplitCertificate

Everything certified for one operator and one frame Q (n×k):

  • α ≥ ‖I − Q*Q‖ < 1, G ⊇ Q*AQ, M ⊇ Q*Q (ball matrices);
  • gbar > ‖G22‖ and abar > ‖A‖ (prop:fpchecks), or supplied by the caller (far = nothing);
  • γ1 ≥ ‖G12‖, γ2 ≥ ‖G21‖, snorm ≥ ‖G11‖ for the isometry Z of the polar decomposition Q = ZS (the factors of prop:almostortho already applied);
  • comp, the inclusions of the eigenvalues of the midpoint of G by verifyeigall, or nothing;
  • etaG ≥ ‖mid(G) − Z*AZ‖, the homotopy bound of the header.
source
CertifiedPseudospectra.certify_split — Function
certify_split(op::LinOp, Q; order = :auto, compression = :full, target = nothing,
              coupling = :gram, hermitian = false, far_bound = nothing, kwargs...)
    -> SplitCertificate
certify_split(A::AbstractMatrix, Q; kwargs...)
certify_split(Amul, Aadj, n, Q; epsA, etaA = 0, kwargs...)

Certify the four numbers for the frame Q: frame data (couplings.jl), the far block by the floating-point sweep and prop:fpchecks (farblock.jl; keyword arguments are passed to certify_far_block), and the eigenvalues of the compression by verifyeigall when compression = :full (or true); :none (or false) skips them, which is all a resolvent bound needs. far_bound = (ḡ, ā) skips the sweep and uses the caller's bounds ‖G22‖ ≤ ḡ, ‖A‖ ≤ ā instead. hermitian = true asserts A = A* (checked exactly for a stored matrix). target is the radius R the certificate is aimed at, passed to the sweep.

source
CertifiedPseudospectra.sigma11_lo — Function
sigma11_lo(sc, z) -> Float64

Certified lower bound on σ11(z) = σ_min(G11 − zI), G11 = ZAZ the compression of the isometry: `σ_min(QAQ − zQQ)/(1 + α)(prop:almostortho), withσ_min(QAQ − zQ*Q)bounded below by onesvdboxof the whole ball pencil (thm:svdbox) atO(k³)perz. The keywordmethod = :svd` is accepted for the callers that name it; it is the only method.

source
CertifiedPseudospectra.resolvent_floor — Function
resolvent_floor(sc, z; method = :svd) -> NamedTuple

Certified lower bound on σ_min(A − zI) = 1/‖(A − zI)⁻¹‖ at one point: Theorem thm:assembly (assembly) and Proposition prop:blockdom (blockdom), each only under its own hypothesis, and floor their maximum (both are lower bounds on the same number). ok = false and floor = 0 mean "no bound".

source
CertifiedPseudospectra.count_disc — Function
count_disc(sc, c, r; kwargs...) -> (count, ok, check)

Proposition prop:count for the open disc D(c, r): if the hypothesis holds on its boundary and D ∪ Γ ⊆ {|z| > ḡ}, A and G11 have the same number of eigenvalues in D; that number is read off the inclusions of verifyeigall on G (no disc meets the circle) and transferred to G11 by the homotopy of the header.

source
CertifiedPseudospectra.count_exterior — Function
count_exterior(sc, R; kwargs...) -> (count, ok, check)

Proposition prop:count for D = {|z| > R}, R > ḡ: the hypothesis on |z| = R, and the number of eigenvalues of G11 of modulus > R, read off the inclusions of verifyeigall on G and transferred by the homotopy of the header.

source
CertifiedPseudospectra.count_union — Function
count_union(sc, centres, radii; nθ = 64, maxdepth = 6) -> NamedTuple

Proposition prop:count for the union U of the closed discs D(c_i, r_i): the hypothesis is certified on every arc of every circle that can belong to ∂U (union_boundary_arcs), U ⊆ {|z| > ḡ} is checked disc by disc, and the connected components of the interior of U (discs joined when certified to overlap; a pair neither certified overlapping nor certified apart makes the call fail) each receive the number of eigenvalues of G11 they contain, read off the components of the inclusions (each inside one disc or disjoint from all) and transferred by the homotopy of the header. On ok, counts[c] is also the number of eigenvalues of A in the component members[c].

source
CertifiedPseudospectra.certify_exterior — Function
certify_exterior(sc, R; nθ = 64, nradii = 12, kwargs...) -> NamedTuple

Corollary cor:agree. Certifies the hypothesis on |z| = R and counts the eigenvalues outside; then, for every component of the inclusions of G outside R, looks for the smallest radius (in a geometric sequence between the component's radius and the largest admissible one) at which the boundary of the isolation disc passes the hypothesis of prop:count, keeping the discs pairwise disjoint and inside {|z| > R}. On success every eigenvalue of A of modulus > R lies in the union of the discs, and each disc holds as many eigenvalues of A as of G11 (discs[i].count).

source
CertifiedPseudospectra.certify_gap — Function
certify_gap(sc, R; kwargs...) -> NamedTuple

Corollary cor:gap: if G11 has exactly one eigenvalue of modulus > R and the exterior count is certified, so does A, and every other eigenvalue of A satisfies |λ| < R, since the hypothesis of prop:count certified on |z| = R leaves no eigenvalue on the circle. certified is true exactly when the hypothesis holds on the whole circle and the count is one.

source
CertifiedPseudospectra.ProjectorCertificate — Type
ProjectorCertificate

Proposition prop:projector on a circle: bound ≥ ‖P − P₀‖, P the Riesz projector of A for its spectrum in the region, P₀ the spectral projector of G11 for its eigenvalues there, padded by zero on ran P⊥. M ≥ sup_Γ ‖(A − zI)⁻¹‖ and M0 ≥ sup_Γ max(1/σ11, 1/σ22), the resolvent bound of the block-diagonal part, both taken from the same certified arc cover as the counts (check.floor, check.minσ11, check.minσ22); arclen = |Γ|; normP ≥ ‖P‖; gap ≥ gap(ran P, ran P₀), which is bound. count is the dimension of ran P₀, read off the inclusions as in count_disc, or -1 when no count is certified.

source
CertifiedPseudospectra.certify_projector — Function
certify_projector(sc, c, r; region = :interior, nθ = 64, maxdepth = 6) -> ProjectorCertificate

Proposition prop:projector for the circle Γ = {|z − c| = r} and the region named by region (:interior, the open disc; :exterior, {|z| > r} with c = 0), under the hypotheses of prop:count, which are certified on the whole contour by the arc cover of check_circle: with M = 1/min_Γ (right-hand side of eq:assembly) and M0 = 1/min_Γ min(σ11, σ22),

‖P − P₀‖ ≤ (|Γ|/2π) M M₀ max(γ1, γ2) = r M M₀ max(γ1, γ2).

For the exterior the contour of the projector is the circle together with a circle of radius M' → ∞, on which the integrand is O(1/M'²), so its contribution vanishes and the bound is unchanged; P = I − P_in there, and ‖P‖ ≤ 1 + rM instead of rM.

source
CertifiedPseudospectra.certify_selfadjoint — Function
certify_selfadjoint(Amul, n; L = 80, tol = 1e-10, kmax = L, epsA, etaA = 0, kwargs...)
certify_selfadjoint(A::AbstractMatrix; kwargs...)

Remark rem:lanczos and Corollaries cor:selfadj, cor:weyl for A = A*: a Lanczos frame of converged Ritz vectors (lanczos_frame), one certified split (hermitian = true), and the eigenvalue intervals of G11. Returns (; split, θ, γ̄, ḡ, enclosure, weyl, frame) with enclosure = selfadj_enclosure(θ, ḡ, γ̄) and weyl = weyl_pairing(θ, ḡ, γ̄, n); counts on intervals by selfadj_count.

source
CertifiedPseudospectra.eig_intervals — Function
eig_intervals(sc; nθ = 64, maxdepth = 6) -> Vector{EigInterval}

For a certificate made with hermitian = true (A = A): disjoint real intervals, each holding count eigenvalues of G11 = ZAZ with multiplicity. The eigenvalues are enclosed for the midpoint Ĝ of G by verifyeigall, which does not assume Ĝ Hermitian (it is not: it is a floating-point compression). Each component of the inclusions, of centre c and radius r, is surrounded by the circle of radius r + μ on which σ_min(G11 − zI) > etaG ≥ ‖Ĝ − G11‖ is certified (check_circle's cover); μ is tried at 4·etaG (at least 16u(|c| + r)) and multiplied by 4 until the cover passes, never beyond half the distance to the nearest other component, so the discs are disjoint. By the homotopy of the header the disc holds as many eigenvalues of G11 as the component holds of Ĝ. G11 is Hermitian, so they are real and lie in [Re c − r − μ, Re c + r + μ]; overlapping intervals are merged with their counts added. Empty when the inclusions carry no counts or a circle fails. Throws for a certificate that is not Hermitian.

source
CertifiedPseudospectra.coupling_hermitian — Function
coupling_hermitian(sc::SplitCertificate) -> γ̄

For a certificate made with hermitian = true, γ̄ = min(γ1, γ2) ≥ ‖P⊥AZ‖₂, Z the isometry of the frame: for a Hermitian A, G21 = G12*, so the two couplings have the same norm and each of the two certified bounds bounds it (proof of cor:selfadj). Throws for a certificate that is not Hermitian.

source

Floating-point estimates of the parameters of a run

CertifiedPseudospectra.helper_gaps — Function
helper_gaps(op::LinOp; L = 200) -> Vector{NamedTuple}

Uncertified. The gaps between consecutive distinct moduli of the leading Ritz values of an Arnoldi run of length L, as candidate radii: for each N with |θ_N| > |θ_{N+1}|, the radius R = √(|θ_N| |θ_{N+1}|) with N Ritz values outside it. Ritz values approximate the outer spectrum only, so the list is a starting point for helper_diagnose, not a statement about the eigenvalues of op.

source
CertifiedPseudospectra.helper_diagnose — Function
helper_diagnose(op::LinOp, R; ks = nothing, Leig = 200, Lsv = 200, mmax = 16, nθ = 32,
                Lfar = 60, method = :qr, verbose = true) -> NamedTuple

Uncertified. Floating-point estimates, at the radius R, of what certify_split and the cover of the circle |z| = R will compute:

  • nout, the number of Ritz values of modulus greater than R (an Arnoldi run of length Leig);
  • K = #{σ_i ≥ R} and dmin, the least d with σ_{2d+1} < R, from the singular values of a Golub-Kahan-Lanczos run of length Lsv (K_reached = true when all of them are ≥ R, so that K and dmin are only lower bounds); by Proposition prop:frame no frame of dimension below dmin gives ‖G22‖ < R;
  • for the frame of def:Q with ks singular vectors per side (default K): dimQ; the leading singular values σG22 of the far block B = P⊥AP⊥, from a Golub-Kahan-Lanczos run of length Lfar applied matrix-free, so that σG22[1] estimates ‖G22‖; the predictions gbar_est[t] = (Σ_{i≤L} σ_i^{2t} + (n − k − L) σ_L^{2t})^{1/2t} of (tr H^t)^{1/2t}, the quantity the sweep of order t ≤ mmax bounds, with the singular values not computed taken equal to the last one computed, which overestimates them; and the order m, the least t whose prediction is below R with a margin of 5%, or else the least within 5% of the best. Pass it to certify_split as order = m;
  • γ1, γ2 and the least σ11 = σ_min(G11 − zI) over nθ points of the circle, formed in floating point on that frame, and margin = σ11 (R − gbar_est[m]) − γ1γ2, whose sign predicts whether the hypothesis of thm:assembly holds at the samples.

With verbose = true the numbers are also printed.

source

Internal steps

The functions the routines above are built from, by source file; they are not exported.

The operator and its rounding model

CertifiedPseudospectra.norm_lower — Function
norm_lower(Amul, n, η, ηA) -> a_lo

A certified lower bound on ‖A‖ for an operator obeying ‖fl(Ay) − Ay‖ ≤ η‖y‖ + ηA, from one application to the constant vector x = (1, …, 1): ‖A‖ ≥ ‖Ax‖/‖x‖ ≥ (‖fl(Ax)‖ − η‖x‖ − ηA)/‖x‖, with ‖fl(Ax)‖ summed rounding downward and ‖x‖ = √n rounded upward. Used to turn an absolute rounding constant η into the relative ε_A = η/a_lo of eq:roundA, which then satisfies ε_A a ≥ η for every a ≥ ‖A‖. Errors when the bound is not positive.

source

The frame and the couplings

The far block

CertifiedPseudospectra.I_up — Function
I_up(S, t, εB, ηB, g)

Upper bound of I_{a,t}(g) of eq:FIt, which bounds ‖B‖^{2t} = ‖M_t‖₂² for g ≥ ‖B‖, M_t the matrix of the t-th vectors of the chains, by interpolation, ‖M_t‖₂² ≤ ‖M_t‖₁‖M_t‖_∞ (eq:interpt). The computed vector x_{j,t} is within δ_{j,t} = Σ_{s<t} g^{t−1−s}(εB ν_{j,s} + ηB) of M_t e_j (lem:onestep at each application and ‖B‖ ≤ g), so ‖M_t‖₁ ≤ N1s[t] + √n max_j δ_{j,t} and ‖M_t‖_∞ ≤ Ninfs[t] + Σ_j δ_{j,t}. At t = 1 this is I_up(S, εB, ηB). Returns Inf when the order was not accumulated.

source

Upper bound of I(g) of eq:FI.

source
CertifiedPseudospectra.FPCheckData — Type
FPCheckData

Everything the checks of prop:fpchecks need, in the units of the scaled operator c·A: the affine isometry bounds s(a), γ1(a), γ2(a) (coefficients (c0, c1)), εA, ηA, εP, ηP, and the sweep sums.

source
CertifiedPseudospectra.least_g — Function
least_g(D, test, g0) -> (ḡ, ā)

Smallest ḡ ≥ g0 found at which test(ā(ḡ), ḡ) passes, ā(ḡ) the least number passing (ii): bracketed by g0(1 + δ), δ doubling from 1e-15, then bisected. (NaN, NaN) if nothing passes.

source

The certified splitting

CertifiedPseudospectra._comps — Function

The components of the inclusions of the eigenvalues of G: the discs of inclusion_discs (those of Theorem 2.2, or the Gershgorin discs of the transformed matrix) grouped by overlap (overlap_components), each with the hull of its discs (ball_hull) and the number of eigenvalues of G it holds, with multiplicity.

source