GaussianAnalysisRocq library documentation
Main resultsGlossary
On this page

Von Neumann's trace inequality and the Hoffman-Wielandt inequality

GaussianAnalysis.matrix.von_neumannlibrary/matrix/von_neumann.v395 lines21 lemmas and theorems, 2 definitionssource
Imports 2 library modules and 12 external

External: HB.structures, mathcomp.classical.all_ssreflect_compat, mathcomp.finite_group.fingroup, mathcomp.finite_group.perm, mathcomp.algebra.algebraic_hierarchy.ssralg, mathcomp.algebra.numeric_hierarchy.ssrnum, mathcomp.algebra.matrix, mathcomp.algebra.sesquilinear, mathcomp.classical.boolp, mathcomp.classical.classical_sets, mathcomp.reals.reals, mathcomp.algebra.ring_tactic

Imported by 5
Required by 8 files of the paper proofs

For a real symmetric matrix A of size n, spec A is the row vector of its eigenvalues in decreasing order, obtained by sorting the diagonal of the spectral decomposition of real_spectral.v (sym_spectral_diag). This file is part of item G7 of phase 5 (the semicircle law, random_matrix/wigner.v): the Hoffman-Wielandt inequality makes the linear statistics of eigenvalues Lipschitz functions of the matrix, so that Gaussian concentration applies to them, and von Neumann's inequality is used in Lemma 5.14 of Koehler and Sohn (arXiv 2608.27372, line 5909).

Main results:

spec_seq Athe sorted list of the eigenvalues of A
spec Athe eigenvalues of the symmetric matrix A, in decreasing order

Main results

ResultsStatement
spec A is the row of the eigenvalues of a symmetric matrix A in decreasing order (the sorted diagonal of sym_spectral_diag A): A = P^T diag_mx (spec A) P for some orthogonal P, and \sum_i f (spec A 0 i) is the same sum over the diagonal of any spectral decomposition.
Abel summation: sum_i a_i w_i >= 0 for a decreasing and w with nonnegative partial sums, when a >= 0 or sum_i w_i = 0. For a and b decreasing and M doubly stochastic, sum_(i, j) a_i b_j M_ij <= sum_i a_i b_i, without Birkhoff's theorem; the squared entries of an orthogonal matrix form a doubly stochastic matrix.
Von Neumann's trace inequality \tr (A B) <= sum_i spec A 0 i * spec B 0 i and the Hoffman-Wielandt inequality sum_i (spec A 0 i - spec B 0 i)^2 <= |A - B|_F^2 for A, B symmetric. So each eigenvalue is 1-Lipschitz for the Frobenius norm, and for f L-Lipschitz, A |-> sum_i f (spec A 0 i) is (L sqrt n)-Lipschitz.

Declarations23 exported

lemma, theoremdefinitioninstancelocal
sectionspec
Context {R : realType} {n : nat}.
Implicit Types A B : 'M[R]_n.
Type
forall {R : realType} {n : nat}, 'M_n -> seq R
Definition
Definition spec_seq A : seq R :=
  sort (fun x y => y <= x) [seq sym_spectral_diag A 0 i | i <- enum 'I_n].

The eigenvalues of a symmetric matrix, sorted decreasingly.

Used by 7 declarations in 2 files
definition spec main result source, line 65
Type
forall {R : realType} {n : nat}, 'M_n -> 'rV_n
Definition
Definition spec A : 'rV[R]_n := \row_i nth 0 (spec_seq A) i.
Main result, as the README states it

spec A is the row of the eigenvalues of a symmetric matrix A in decreasing order (the sorted diagonal of sym_spectral_diag A): A = P^T diag_mx (spec A) P for some orthogonal P, and \sum_i f (spec A 0 i) is the same sum over the diagonal of any spectral decomposition.

Used by 37 declarations in 6 files
forall {R : realType} {n : nat} (A : 'M_n), size (spec_seq A) = n
Statement as written in the source
Lemma size_spec_seq A : size (spec_seq A) = n.
Used by 1 declaration in 1 file
forall {R : realType} {n : nat} (A : 'M_n),
perm_eq (spec_seq A) [seq sym_spectral_diag A 0 i | i <- enum 'I_n]
Statement as written in the source
Lemma perm_spec_seq A :
  perm_eq (spec_seq A) [seq sym_spectral_diag A 0 i | i <- enum 'I_n].
Used by 1 declaration in 1 file
forall {R : realType} {n : nat} (A : 'M_n), sorted (fun x : R => <=%R^~ x) (spec_seq A)
Statement as written in the source
Lemma sorted_spec_seq A : sorted (fun x y : R => y <= x) (spec_seq A).
Used by 1 declaration in 1 file
lemma spec_decr main result source, line 78
forall {R : realType} {n : nat} (A : 'M_n) [i j : 'I_n],
(i <= j)%N -> spec A 0 j <= spec A 0 i

The spectrum is decreasing.

Main result

Stated in the README together with spec.

Statement as written in the source
Lemma spec_decr A (i j : 'I_n) : (i <= j)%N -> spec A 0 j <= spec A 0 i.
Used by 4 declarations in 4 files
lemma spec_perm main result source, line 89
forall {R : realType} {n : nat} (A : 'M_n),
exists s : {perm 'I_n}, forall i : 'I_n, spec A 0 i = sym_spectral_diag A 0 (s i)

The spectrum is a permutation of the diagonal of the chosen spectral decomposition.

Main result

Stated in the README together with spec.

Statement as written in the source
Lemma spec_perm A : exists s : 'S_n,
  forall i, spec A 0 i = sym_spectral_diag A 0 (s i).
Used by 2 declarations in 1 file
lemma sum_spec main result source, line 99
forall {R : realType} {n : nat} (A : 'M_n) (f : R -> R),
\sum_i f (spec A 0 i) = \sum_i f (sym_spectral_diag A 0 i)

Sums over the spectrum.

Main result

Stated in the README together with spec.

Statement as written in the source
Lemma sum_spec A (f : R -> R) :
  \sum_i f (spec A 0 i) = \sum_i f (sym_spectral_diag A 0 i).
Used by 1 declaration in 1 file
forall {R : realType} {n : nat} [A : 'M_n],
A \is symmetricmx ->
exists2 P : 'M_n, P \is orthogonalmx & A = P^T *m diag_mx (spec A) *m P

A = P^T diag (spec A) P for some orthogonal P.

Main result

Stated in the README together with spec.

Statement as written in the source
Lemma spec_decomposition A : A \is symmetricmx ->
  exists2 P : 'M[R]_n, P \is orthogonalmx & A = P^T *m diag_mx (spec A) *m P.
Used by 15 declarations in 5 files
sectionabel
Context {R : realFieldType}.
forall {R : realFieldType} [n : nat] [a : nat -> R],
(forall i : nat, (i.+1 < n)%N -> a i.+1 <= a i) ->
forall [i j : nat], (i <= j)%N -> (j < n)%N -> a j <= a i

A sequence decreasing on [0, n) is decreasing between any two indices.

Statement as written in the source
Lemma decr_le n (a : nat -> R) : (forall i, (i.+1 < n)%N -> a i.+1 <= a i) ->
  forall i j, (i <= j)%N -> (j < n)%N -> a j <= a i.
Used by 2 declarations in 1 file
lemma abel_ge0 main result source, line 142
forall {R : realFieldType} [n : nat] [a w : nat -> R],
(forall i : nat, (i.+1 < n)%N -> a i.+1 <= a i) ->
(forall i : nat, (i < n)%N -> 0 <= a i) ->
(forall k : nat, (k <= n)%N -> 0 <= \sum_(i < k) w i) -> 0 <= \sum_(i < n) a i * w i

Abel summation: if a is decreasing and nonnegative on [0, n) and the partial sums of w are nonnegative, then sum_(i < n) a i w i >= 0.

Main result, as the README states it

Abel summation: sum_i a_i w_i >= 0 for a decreasing and w with nonnegative partial sums, when a >= 0 or sum_i w_i = 0. For a and b decreasing and M doubly stochastic, sum_(i, j) a_i b_j M_ij <= sum_i a_i b_i, without Birkhoff's theorem; the squared entries of an orthogonal matrix form a doubly stochastic matrix.

Statement as written in the source
Lemma abel_ge0 n (a w : nat -> R) :
  (forall i, (i.+1 < n)%N -> a i.+1 <= a i) ->
  (forall i, (i < n)%N -> 0 <= a i) ->
  (forall k, (k <= n)%N -> 0 <= \sum_(i < k) w i) ->
  0 <= \sum_(i < n) a i * w i.
Used by 1 declaration in 1 file
lemma abel_ge0_sum0 main result source, line 162
forall {R : realFieldType} [n : nat] [a w : nat -> R],
(forall i : nat, (i.+1 < n)%N -> a i.+1 <= a i) ->
(forall k : nat, (k <= n)%N -> 0 <= \sum_(i < k) w i) ->
\sum_(i < n) w i = 0 -> 0 <= \sum_(i < n) a i * w i

The same with a of any sign, when the sum of w is 0.

Main result

Stated in the README together with abel_ge0.

Statement as written in the source
Lemma abel_ge0_sum0 n (a w : nat -> R) :
  (forall i, (i.+1 < n)%N -> a i.+1 <= a i) ->
  (forall k, (k <= n)%N -> 0 <= \sum_(i < k) w i) -> \sum_(i < n) w i = 0 ->
  0 <= \sum_(i < n) a i * w i.
Used by 2 declarations in 1 file
lemma sum_weight_le main result source, line 178
forall {R : realFieldType} [n k : nat] [b c : nat -> R],
(k <= n)%N ->
(forall i : nat, (i.+1 < n)%N -> b i.+1 <= b i) ->
(forall j : nat, (j < n)%N -> 0 <= c j <= 1) ->
\sum_(j < n) c j = k%:R -> \sum_(j < n) b j * c j <= \sum_(j < k) b j

For b decreasing and 0 <= c j <= 1 with sum_j c j = k, the sum of b j c j is at most the sum of the k largest b j.

Main result

Stated in the README together with abel_ge0.

Statement as written in the source
Lemma sum_weight_le n k (b c : nat -> R) : (k <= n)%N ->
  (forall i, (i.+1 < n)%N -> b i.+1 <= b i) ->
  (forall j, (j < n)%N -> 0 <= c j <= 1) -> \sum_(j < n) c j = k%:R ->
  \sum_(j < n) b j * c j <= \sum_(j < k) b j.
Used by 1 declaration in 1 file
forall {R : realFieldType} [n : nat] [a b : nat -> R] [M : 'M_n],
(forall i : nat, (i.+1 < n)%N -> a i.+1 <= a i) ->
(forall i : nat, (i.+1 < n)%N -> b i.+1 <= b i) ->
(forall i j : 'I_n, 0 <= M i j) ->
(forall i : 'I_n, \sum_j M i j = 1) ->
(forall j : 'I_n, \sum_i M i j = 1) ->
\sum_(i < n) \sum_(j < n) a i * b j * M i j <= \sum_(i < n) a i * b i

For a and b decreasing and M doubly stochastic, sum_(i, j) a i b j M i j <= sum_i a i b i.

Main result

Stated in the README together with abel_ge0.

Statement as written in the source
Lemma doubly_stochastic_le n (a b : nat -> R) (M : 'M[R]_n) :
  (forall i, (i.+1 < n)%N -> a i.+1 <= a i) ->
  (forall i, (i.+1 < n)%N -> b i.+1 <= b i) ->
  (forall i j, 0 <= M i j) -> (forall i, \sum_j M i j = 1) ->
  (forall j, \sum_i M i j = 1) ->
  \sum_(i < n) \sum_(j < n) a i * b j * M i j <= \sum_(i < n) a i * b i.
Used by 1 declaration in 1 file
forall {R : realFieldType} [n : nat] [a b : 'rV_n] [M : 'M_n],
(forall i j : 'I_n, (i <= j)%N -> a 0 j <= a 0 i) ->
(forall i j : 'I_n, (i <= j)%N -> b 0 j <= b 0 i) ->
(forall i j : 'I_n, 0 <= M i j) ->
(forall i : 'I_n, \sum_j M i j = 1) ->
(forall j : 'I_n, \sum_i M i j = 1) ->
\sum_i \sum_j a 0 i * b 0 j * M i j <= \sum_i a 0 i * b 0 i

The same for row vectors a and b, decreasing in the order of 'I_n.

Main result

Stated in the README together with abel_ge0.

Statement as written in the source
Lemma doubly_stochastic_le_mx n (a b : 'rV[R]_n) (M : 'M[R]_n) :
  (forall i j : 'I_n, (i <= j)%N -> a 0 j <= a 0 i) ->
  (forall i j : 'I_n, (i <= j)%N -> b 0 j <= b 0 i) ->
  (forall i j, 0 <= M i j) -> (forall i, \sum_j M i j = 1) ->
  (forall j, \sum_i M i j = 1) ->
  \sum_i \sum_j a 0 i * b 0 j * M i j <= \sum_i a 0 i * b 0 i.
Used by 1 declaration in 1 file
sectionvon_neumann
Context {R : realType} {n : nat}.
Implicit Types A B : 'M[R]_n.
forall {R : realType} {n : nat} [U : 'M_n] (i : 'I_n),
U \is orthogonalmx -> \sum_j U i j ^+ 2 = 1

The squared entries of an orthogonal matrix form a doubly stochastic matrix.

Main result

Stated in the README together with abel_ge0.

Statement as written in the source
Lemma orthogonal_sqr_row (U : 'M[R]_n) i : U \is orthogonalmx ->
  \sum_j U i j ^+ 2 = 1.
Used by 2 declarations in 1 file
forall {R : realType} {n : nat} [U : 'M_n] (j : 'I_n),
U \is orthogonalmx -> \sum_i U i j ^+ 2 = 1
Main result

Stated in the README together with abel_ge0.

Statement as written in the source
Lemma orthogonal_sqr_col (U : 'M[R]_n) j : U \is orthogonalmx ->
  \sum_i U i j ^+ 2 = 1.
Used by 1 declaration in 1 file
forall {R : realType} {n : nat} [A : 'M_n] (k : nat),
A \is symmetricmx -> \sum_i spec A 0 i ^+ k = \tr (A ^+ k)

The power sums of the spectrum are the traces of the powers.

Statement as written in the source
Lemma sum_spec_exp A k : A \is symmetricmx ->
  \sum_i spec A 0 i ^+ k = \tr (A ^+ k).
Used by 1 declaration in 1 file
  • GaussianAnalysis.random_matrix.goe: goe_trE
theorem von_neumann_trace main result source, line 301
forall {R : realType} {n : nat} [A B : 'M_n],
A \is symmetricmx -> B \is symmetricmx -> \tr (A *m B) <= \sum_i spec A 0 i * spec B 0 i

von Neumann's trace inequality.

Main result, as the README states it

Von Neumann's trace inequality \tr (A B) <= sum_i spec A 0 i * spec B 0 i and the Hoffman-Wielandt inequality sum_i (spec A 0 i - spec B 0 i)^2 <= |A - B|_F^2 for A, B symmetric. So each eigenvalue is 1-Lipschitz for the Frobenius norm, and for f L-Lipschitz, A |-> sum_i f (spec A 0 i) is (L sqrt n)-Lipschitz.

Statement as written in the source
Theorem von_neumann_trace A B : A \is symmetricmx -> B \is symmetricmx ->
  \tr (A *m B) <= \sum_i spec A 0 i * spec B 0 i.
Used by 2 declarations in 2 files
lemma mxdot_spec main result source, line 329
forall {R : realType} {n : nat} [A : 'M_n],
A \is symmetricmx -> mxdot A A = \sum_i spec A 0 i ^+ 2

The Frobenius norm is the Euclidean norm of the spectrum.

Main result

Stated in the README together with von_neumann_trace.

Statement as written in the source
Lemma mxdot_spec A : A \is symmetricmx -> mxdot A A = \sum_i spec A 0 i ^+ 2.
Used by 2 declarations in 2 files
theorem hoffman_wielandt main result source, line 336
forall {R : realType} {n : nat} [A B : 'M_n],
A \is symmetricmx ->
B \is symmetricmx -> \sum_i (spec A 0 i - spec B 0 i) ^+ 2 <= mxdot (A - B) (A - B)

The Hoffman-Wielandt inequality.

Main result

Stated in the README together with von_neumann_trace.

Statement as written in the source
Theorem hoffman_wielandt A B : A \is symmetricmx -> B \is symmetricmx ->
  \sum_i (spec A 0 i - spec B 0 i) ^+ 2 <= mxdot (A - B) (A - B).
Used by 3 declarations in 2 files
lemma spec_lipschitz main result source, line 354
forall {R : realType} {n : nat} [A B : 'M_n] (i : 'I_n),
A \is symmetricmx -> B \is symmetricmx -> `|spec A 0 i - spec B 0 i| <= frobenius (A - B)

The sorted spectrum is 1-Lipschitz for the Frobenius norm.

Main result

Stated in the README together with von_neumann_trace.

Statement as written in the source
Lemma spec_lipschitz A B (i : 'I_n) : A \is symmetricmx -> B \is symmetricmx ->
  `|spec A 0 i - spec B 0 i| <= frobenius (A - B).
Used by 1 declaration in 1 file
forall {R : realType} {n : nat} [f : R -> R] [L : R] [A B : 'M_n],
A \is symmetricmx ->
B \is symmetricmx ->
(forall x y : R, `|f x - f y| <= L * `|x - y|) ->
`|\sum_i f (spec A 0 i) - \sum_i f (spec B 0 i)| <=
L * Num.ExtraDef.sqrtr n%:R * frobenius (A - B)

A linear statistic of the spectrum of an L-Lipschitz function is (L sqrt n)-Lipschitz for the Frobenius norm.

Main result

Stated in the README together with von_neumann_trace.

Statement as written in the source
Lemma spec_stat_lipschitz (f : R -> R) (L : R) A B :
  A \is symmetricmx -> B \is symmetricmx ->
  (forall x y, `|f x - f y| <= L * `|x - y|) ->
  `|\sum_i f (spec A 0 i) - \sum_i f (spec B 0 i)| <=
    L * Num.sqrt n%:R * frobenius (A - B).
Used by 2 declarations in 2 files
Generated from commit 9046883 (tag phase12) of the ellipsoid fitting repository. Signatures are printed by Rocq 9.1.1; links in the source statements come from the compiled .glob files. The source links open the files on GitHub at this commit, in the now-public repository.