Documentation

CslibFrontier.Foundations.LinearAlgebra.Matrix.SpectralCut

Spectral cuts in a diagonal basis #

For a nonnegative spectrum, the projection at a positive threshold keeps the coordinates whose eigenvalues meet that threshold. Integrating its diagonal recovers the spectrum. Integrating the squared Frobenius norm of its commutator with a matrix weights each squared entry by the gap between the two eigenvalues. The cut weights are lengths of the intervals on which the retained coordinate set is fixed. Their finite sum can replace integration for any function of the cut that vanishes on the empty set.

These identities implement the diagonal-basis spectral-cut step of Vidick, §2.4 and §3.2.

theorem Matrix.frobenius_norm_sq_eq_sum {ι : Type u_1} {κ : Type u_2} {E : Type u_3} [Fintype ι] [Fintype κ] [SeminormedAddCommGroup E] (A : Matrix ι κ E) :
‖A‖ ^ 2 = ∑ i : ι, ∑ j : κ, ‖A i j‖ ^ 2

The squared Frobenius norm is the sum of the squared entry norms.

theorem Matrix.re_star_mul_self_diag {ι : Type u_1} [Fintype ι] (A : Matrix ι ι ℂ) (i : ι) :
((star A * A) i i).re = ∑ j : ι, ‖A j i‖ ^ 2

The diagonal of a Gram matrix gives the squared column norm.

noncomputable def Matrix.diagonalCut {ι : Type u_1} [DecidableEq ι] (d : ι → ℝ) (t : ℝ) :
Matrix ι ι ℂ

The diagonal projection keeping the eigenvalues at least t for a positive threshold.

@[simp]
theorem Matrix.diagonalCut_apply_diag {ι : Type u_1} [DecidableEq ι] (d : ι → ℝ) (t : ℝ) (i : ι) :
diagonalCut d t i i = (Set.Ioc 0 (d i)).indicator (fun (x : ℝ) => 1) t
theorem Matrix.integral_diagonalCut_apply_diag {ι : Type u_1} [DecidableEq ι] (d : ι → ℝ) (i : ι) (hi : 0 ≤ d i) :
∫ (t : ℝ), diagonalCut d t i i = ↑(d i)

The integral of the diagonal of the cut projection recovers each eigenvalue.

@[simp]
theorem Matrix.diagonalCut_mul_self {ι : Type u_1} [DecidableEq ι] [Fintype ι] (d : ι → ℝ) (t : ℝ) :
theorem Matrix.integral_norm_commutator_diagonalCut_sq {ι : Type u_1} [DecidableEq ι] [Fintype ι] (d : ι → ℝ) (hd : ∀ (i : ι), 0 ≤ d i) (A : Matrix ι ι ℂ) :
∫ (t : ℝ), ‖A * diagonalCut d t - diagonalCut d t * A‖ ^ 2 = ∑ i : ι, ∑ j : ι, |d i - d j| * ‖A i j‖ ^ 2

The integrated squared commutator with the cuts is a sum weighted by the spectral gaps.

theorem Matrix.sum_integral_norm_commutator_diagonalCut_sq_le {ι : Type u_1} [DecidableEq ι] [Fintype ι] {α : Type u_2} [Fintype α] (d : ι → ℝ) (hd : ∀ (i : ι), 0 ≤ d i) (w : α → ℝ) (hw : ∀ (a : α), 0 ≤ w a) (A : α → Matrix ι ι ℂ) :
have D := diagonal fun (i : ι) => ↑√(d i); ∑ a : α, w a * ∫ (t : ℝ), ‖A a * diagonalCut d t - diagonalCut d t * A a‖ ^ 2 ≤ √(∑ a : α, w a * ‖A a * D - D * A a‖ ^ 2) * √(∑ a : α, w a * ‖A a * D + D * A a‖ ^ 2)

The cut commutator bound for a weighted family of matrices. The two factors are the commutator and anticommutator energies at the square root of the spectrum.

noncomputable def Matrix.diagonalCutSupport {ι : Type u_1} [Fintype ι] (d : ι → ℝ) (t : ℝ) :

The coordinates kept by a spectral cut.

@[simp]
theorem Matrix.mem_diagonalCutSupport {ι : Type u_1} [Fintype ι] (d : ι → ℝ) (t : ℝ) (i : ι) :
theorem Matrix.diagonalCut_eq_diagonal_support {ι : Type u_1} [Fintype ι] [DecidableEq ι] (d : ι → ℝ) (t : ℝ) :
diagonalCut d t = diagonal fun (i : ι) => if i ∈ diagonalCutSupport d t then 1 else 0
noncomputable def Matrix.diagonalCutWidth {ι : Type u_1} [Fintype ι] (d : ι → ℝ) (s : { s : Finset ι // s.Nonempty }) :

The total length of positive thresholds that keep exactly the nonempty set s.

theorem Matrix.diagonalCutWidth_nonneg {ι : Type u_1} [Fintype ι] (d : ι → ℝ) (s : { s : Finset ι // s.Nonempty }) :
theorem Matrix.integral_diagonalCutSupport {ι : Type u_1} [Fintype ι] (d : ι → ℝ) (F : Finset ι → ℝ) (hF : F ∅ = 0) :
∫ (t : ℝ), F (diagonalCutSupport d t) = ∑ s : { s : Finset ι // s.Nonempty }, diagonalCutWidth d s * F ↑s

Integrating a function of a cut is a finite weighted sum. The empty cut contributes zero.

theorem Matrix.sum_diagonalCutWidth_mem {ι : Type u_1} [Fintype ι] [DecidableEq ι] (d : ι → ℝ) (i : ι) (hi : 0 ≤ d i) :
(∑ s : { s : Finset ι // s.Nonempty }, diagonalCutWidth d s * if i ∈ ↑s then 1 else 0) = d i

The widths of the cuts containing a given coordinate sum to its eigenvalue.

theorem Matrix.sum_diagonalCutWidth_card {ι : Type u_1} [Fintype ι] (d : ι → ℝ) (hd : ∀ (i : ι), 0 ≤ d i) :
∑ s : { s : Finset ι // s.Nonempty }, diagonalCutWidth d s * ↑(↑s).card = ∑ i : ι, d i

Multiplying each cut width by its dimension gives weights summing to the spectral trace.

theorem Matrix.diagonal_eq_sum_diagonalCutWidth {ι : Type u_1} [Fintype ι] [DecidableEq ι] (d : ι → ℝ) (hd : ∀ (i : ι), 0 ≤ d i) :
(diagonal fun (i : ι) => ↑(d i)) = ∑ s : { s : Finset ι // s.Nonempty }, diagonalCutWidth d s • diagonal fun (i : ι) => if i ∈ ↑s then 1 else 0

The weighted sum of the coordinate projections recovers the original diagonal matrix.

theorem Matrix.sum_diagonalCutWidth_norm_commutator_sq_le {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : Type u_2} [Fintype α] (d : ι → ℝ) (hd : ∀ (i : ι), 0 ≤ d i) (w : α → ℝ) (hw : ∀ (a : α), 0 ≤ w a) (A : α → Matrix ι ι ℂ) :
have D := diagonal fun (i : ι) => ↑√(d i); have P := fun (s : Finset ι) => diagonal fun (i : ι) => if i ∈ s then 1 else 0; ∑ s : { s : Finset ι // s.Nonempty }, diagonalCutWidth d s * ∑ a : α, w a * ‖A a * P ↑s - P ↑s * A a‖ ^ 2 ≤ √(∑ a : α, w a * ‖A a * D - D * A a‖ ^ 2) * √(∑ a : α, w a * ‖A a * D + D * A a‖ ^ 2)

The commutator estimate as a finite sum, with one term per nonempty retained coordinate set.

theorem Matrix.sum_diagonalCutWidth_norm_commutator_sq_le_of_agreement {ι : Type u_1} [Fintype ι] [DecidableEq ι] {α : Type u_2} [Fintype α] (d : ι → ℝ) (hd : ∀ (i : ι), 0 ≤ d i) (w : α → ℝ) (hw : ∀ (a : α), 0 ≤ w a) (A : α → Matrix ι ι ℂ) (δ : ℝ) :
have N := fun (i j : ι) => ∑ a : α, w a * ‖A a i j‖ ^ 2; (∀ (i : ι), ∑ j : ι, N i j ≤ 1) → (∀ (j : ι), ∑ i : ι, N i j ≤ 1) → ∑ i : ι, d i - δ ≤ ∑ i : ι, ∑ j : ι, √(d i) * √(d j) * N i j → have P := fun (s : Finset ι) => diagonal fun (i : ι) => if i ∈ s then 1 else 0; ∑ s : { s : Finset ι // s.Nonempty }, diagonalCutWidth d s * ∑ a : α, w a * ‖A a * P ↑s - P ↑s * A a‖ ^ 2 ≤ √(2 * δ) * √(4 * ∑ i : ι, d i)

For a matrix family of bounded row and column square mass, a lower bound on its geometric-mean-weighted square mass bounds the average cut commutator. For measurements in a Schmidt basis, the geometric-mean-weighted mass is the diagonal answer agreement.