NLA-lib Explorer

Matrix inequalities and majorization

Matrix inequalities compare operators, their spectra, or scalar quantities such as trace and determinant. Keeping these comparisons distinct makes their hypotheses easier to read.

Definition (Loewner order and majorization). For Hermitian matrices, \mathbf{A}\preceq\mathbf{B} means \mathbf{x}^{\mathsf{H}}(\mathbf{B}-\mathbf{A})\mathbf{x}\ge0 for every vector \mathbf{x}. Majorization instead compares partial sums of ordered scalar lists, such as eigenvalues or singular values. A statement about one of these orders does not automatically imply a statement about every other matrix quantity.

Copy link

Background

Results

Theorem (Strict contraction factorization).

With positive definite diagonal blocks, the full block is positive definite precisely when the off-diagonal block factors through a strict contraction between the two positive square roots. [HornJohnson2013, Theorem 7.7.7].

Lean statement and details
Matrix.PosDef.posDef_fromBlocks_iff_exists_sqrt_mul_mul_sqrt.{u_1, u_2, u_3} {𝕜 : Type u_1}
  [RCLike 𝕜] {m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n] {A : Matrix m m 𝕜}
  {B : Matrix m n 𝕜} {C : Matrix n n 𝕜} (hA : A.PosDef) (hC : C.PosDef) :
  (fromBlocks A B Bᴴ C).PosDef ↔ ∃ X, specNorm X < 1 ∧ B = CFC.sqrt A * X * CFC.sqrt C

Full source on GitHub

Copy link

Theorem (The entrywise exponential of a positive semidefinite matrix is positive definite exactly when its rows are distinct).

for real positive semidefinite \mathbf{A}, the matrix with entries e^{\mathbf{A}_{i,j}} is positive definite iff no two rows of \mathbf{A} are equal. [HornJohnson2013, Theorem 7.5.9 context].

Lean statement and details
Matrix.PosSemidef.posDef_map_exp_iff.{u_2} {n : Type u_2} [Finite n] {A : Matrix n n ℝ}
  (hA : A.PosSemidef) : (A.map rexp).PosDef ↔ Function.Injective A.row

Full source on GitHub

Copy link

Theorem (Fischer's inequality).

The determinant of a positive semidefinite block matrix is at most the product of the determinants of its diagonal blocks: \operatorname{Re} \det \begin{bmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{B}^{\mathsf{H}} & \mathbf{C} \end{bmatrix} \le \operatorname{Re} \det \mathbf{A} \cdot \operatorname{Re} \det \mathbf{C}\,. [HornJohnson2013, Theorem 7.8.5].

Lean statement and details
Matrix.PosSemidef.re_det_fromBlocks_le.{u_1, u_2, u_3} {𝕜 : Type u_1} [RCLike 𝕜] {m : Type u_2}
  {n : Type u_3} [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n] {A : Matrix m m 𝕜}
  {B : Matrix m n 𝕜} {C : Matrix n n 𝕜} (h : (fromBlocks A B Bᴴ C).PosSemidef) :
  RCLike.re (fromBlocks A B Bᴴ C).det ≤ RCLike.re A.det * RCLike.re C.det

Full source on GitHub

Copy link

Theorem (Hadamard's inequality).

The determinant of a positive semidefinite matrix is at most the product of its diagonal entries: \operatorname{Re} \det \mathbf{A} \le \prod_i \operatorname{Re} \mathbf{A}_{i,i}. [HornJohnson2013, Theorem 7.8.1].

Lean statement and details
Matrix.PosSemidef.re_det_le_prod_re_diag.{u_1, u_3} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_3}
  [Fintype n] [DecidableEq n] {A : Matrix n n 𝕜} (hA : A.PosSemidef) :
  RCLike.re A.det ≤ ∏ i, RCLike.re (A i i)

Full source on GitHub

Copy link

Theorem (Hardy–Littlewood–Pólya).

\mathbf{x} is majorized by \mathbf{y} exactly when \mathbf{x} = \mathbf{D}\mathbf{y} for some doubly stochastic matrix \mathbf{D}. [HornJohnson2013, Theorem 4.3.49].

Lean statement and details
NLAlib.majorized_iff_exists_doublyStochastic.{u_1} {ι : Type u_1} [Fintype ι] [DecidableEq ι]
  {x y : ι → ℝ} : Majorized x y ↔ ∃ D ∈ doublyStochastic ℝ ι, D *ᵥ y = x

Full source on GitHub

Copy link

Theorem (Hoffman–Wielandt for Hermitian matrices).

The sorted eigenvalues are 1-Lipschitz in the Frobenius norm: for Hermitian \mathbf{A}, \mathbf{B} and any finite set S of indices, \sum_{i \in S} \bigl(\lambda_i(\mathbf{A}) - \lambda_i(\mathbf{B})\bigr)^2 \le \|\mathbf{A} - \mathbf{B}\|_{\mathsf{F}}^2 \,. [HornJohnson2013, Corollary 6.3.8].

Lean statement and details
Matrix.IsHermitian.sum_eigenvalue_sub_sq_le_frobNorm_sub_sq.{u_1, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_3} [Fintype n] {A B : Matrix n n 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian)
  (S : Finset ℕ) : ∑ i ∈ S, (eigenvalue A i - eigenvalue B i) ^ 2 ≤ frobNorm (A - B) ^ 2

Full source on GitHub

Copy link

Theorem (Horn's product inequality).

For every k, \prod_{i < k} \sigma_i(\mathbf{A}\mathbf{B}) \le \prod_{i < k} \sigma_i(\mathbf{A}) \, \sigma_i(\mathbf{B}) \,, singular values indexed from 0 and non-increasing. [HornJohnson1991, Theorem 3.3.4].

Lean statement and details
NLAlib.prod_range_singularValues_mul_le.{u_1, u_2, u_3, u_4} {𝕜 : Type u_1} [RCLike 𝕜]
  {m : Type u_2} {n : Type u_3} {p : Type u_4} [Fintype m] [Fintype n] [Fintype p]
  (A : Matrix m p 𝕜) (B : Matrix p n 𝕜) (k : ℕ) :
  ∏ i ∈ Finset.range k, singularValues (A * B) i ≤
    ∏ i ∈ Finset.range k, singularValues A i * singularValues B i

Full source on GitHub

Copy link

Theorem (The Kantorovich inequality with the condition number).

for positive definite \mathbf{A} and every vector \mathbf{x}, with \kappa = \|\mathbf{A}\|_2 \|\mathbf{A}^{+}\|_2 (NLAlib.pseudoConditionNumber; \mathbf{A} is invertible, so this is the classical \kappa(\mathbf{A}) = \|\mathbf{A}\|_2 \|\mathbf{A}^{-1}\|_2), \operatorname{Re}(\mathbf{x}^{\mathsf{H}}\mathbf{A}\mathbf{x}) \, \operatorname{Re}(\mathbf{x}^{\mathsf{H}}\mathbf{A}^{-1}\mathbf{x}) \le \frac{(\kappa + 1)^2}{4\kappa} \|\mathbf{x}\|^4\,. [HornJohnson2013, (7.4.12.1)].

Lean statement and details
Matrix.PosDef.re_quadForm_mul_re_quadForm_inv_le_pseudoConditionNumber.{u_1, u_2} {𝕜 : Type u_1}
  [RCLike 𝕜] {n : Type u_2} [Fintype n] [DecidableEq n] {A : Matrix n n 𝕜} (hA : A.PosDef)
  (x : n → 𝕜) :
  RCLike.re (quadForm A x) * RCLike.re (quadForm A⁻¹ x) ≤
    (pseudoConditionNumber A + 1) ^ 2 / (4 * pseudoConditionNumber A) * ‖WithLp.toLp 2 x‖ ^ 4

Full source on GitHub

Copy link

Theorem (Karamata's inequality).

If \mathbf{x} is majorized by \mathbf{y} and \varphi is convex on \mathbb{R}, then \sum_i \varphi(\mathbf{x}_i) \le \sum_i \varphi(\mathbf{y}_i). [HornJohnson2013, Theorem 4.3.50].

Lean statement and details
NLAlib.Majorized.sum_convex_le.{u_1} {ι : Type u_1} [Fintype ι] {x y : ι → ℝ} (h : Majorized x y)
  {φ : ℝ → ℝ} (hφ : ConvexOn ℝ Set.univ φ) : ∑ i, φ (x i) ≤ ∑ i, φ (y i)

Full source on GitHub

Copy link

Theorem (Equality in the Hadamard–Fischer inequality).

For positive definite \mathbf{A}, equality holds precisely when the cross block between the two exclusive index sets vanishes after eliminating their intersection. [HornJohnson2013, Theorem 7.8.9].

Lean statement and details
Matrix.PosDef.re_principalMinor_union_mul_inter_eq_iff.{u_1, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_3} [DecidableEq n] {A : Matrix n n 𝕜} (hA : A.PosDef) (s t : Finset n) :
  RCLike.re (principalMinor A (s ∪ t)) * RCLike.re (principalMinor A (s ∩ t)) =
      RCLike.re (principalMinor A s) * RCLike.re (principalMinor A t) ↔
    (A.toBlock (fun x ↦ x ∈ s \ t) fun x ↦ x ∈ t \ s) =
      (A.toBlock (fun x ↦ x ∈ s \ t) fun x ↦ x ∈ s ∩ t) *
          (A.toBlock (fun x ↦ x ∈ s ∩ t) fun x ↦ x ∈ s ∩ t)⁻¹ *
        A.toBlock (fun x ↦ x ∈ s ∩ t) fun x ↦ x ∈ t \ s

Full source on GitHub

Copy link

Theorem (Ky Fan's majorization for sums).

The eigenvalues of \mathbf{A} + \mathbf{B} are majorized by the sums of the sorted eigenvalues of \mathbf{A} and \mathbf{B}: for Hermitian \mathbf{A}, \mathbf{B}, the vector (\lambda_i(\mathbf{A} + \mathbf{B}))_{i < \lvert n \rvert} is majorized by (\lambda_i(\mathbf{A}) + \lambda_i(\mathbf{B}))_{i < \lvert n \rvert}. [HornJohnson2013, Theorem 4.3.47].

Lean statement and details
Matrix.IsHermitian.majorized_eigenvalue_add.{u_1, u_3} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_3}
  [Fintype n] {A B : Matrix n n 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian) :
  Majorized (fun i ↦ eigenvalue (A + B) ↑i) fun i ↦ eigenvalue A ↑i + eigenvalue B ↑i

Full source on GitHub

Copy link

Theorem (Ky Fan's maximum principle, equality case).

The maximum is attained by the leading eigenvectors: for Hermitian \mathbf{A} and k \le \lvert n \rvert there is \mathbf{Q} with k orthonormal columns and \operatorname{Re} \operatorname{tr}(\mathbf{Q}^{\mathsf{H}}\mathbf{A}\mathbf{Q}) = \sum_{i < k} \lambda_i(\mathbf{A}).

General form: sizes are index types

Lean statement and details
Matrix.IsHermitian.exists_re_trace_conjTranspose_mul_mul_eq_sum_eigenvalue.{u_1, u_3} {𝕜 : Type u_1}
  [RCLike 𝕜] {n : Type u_3} [Fintype n] {A : Matrix n n 𝕜} (hA : A.IsHermitian) {k : ℕ}
  (hk : k ≤ Fintype.card n) :
  ∃ Q, HasOrthonormalCols Q ∧ RCLike.re (Qᴴ * A * Q).trace = ∑ i ∈ Finset.range k, eigenvalue A i

Full source on GitHub

Copy link

Theorem (Ky Fan's maximum principle for singular values, equality case).

The maximum is attained by the leading singular vectors, with a real nonnegative trace: for k at most both dimensions there are \mathbf{U}, \mathbf{V} with k orthonormal columns and \operatorname{tr}(\mathbf{U}^{\mathsf{H}}\mathbf{A}\mathbf{V}) = \|\mathbf{A}\|_{(k)}.

General form: sizes are index types

Lean statement and details
NLAlib.exists_trace_conjTranspose_mul_mul_eq_kyFanNorm.{u_1, u_2, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
  {m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n] (A : Matrix m n 𝕜) {k : ℕ}
  (hkm : k ≤ Fintype.card m) (hkn : k ≤ Fintype.card n) :
  ∃ U V, HasOrthonormalCols U ∧ HasOrthonormalCols V ∧ (Uᴴ * A * V).trace = ↑(kyFanNorm k A)

Full source on GitHub

Copy link

Theorem (Lidskii's inequality).

, majorization form. For Hermitian \mathbf{A}, \mathbf{B}, the eigenvalue differences (\lambda_i(\mathbf{A} + \mathbf{B}) - \lambda_i(\mathbf{A}))_{i < \lvert n \rvert} are majorized by the eigenvalues (\lambda_i(\mathbf{B}))_{i < \lvert n \rvert}. [Bhatia1997, Corollary III.4.2].

Lean statement and details
Matrix.IsHermitian.majorized_eigenvalue_add_sub.{u_1, u_3} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_3}
  [Fintype n] {A B : Matrix n n 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian) :
  Majorized (fun i ↦ eigenvalue (A + B) ↑i - eigenvalue A ↑i) fun i ↦ eigenvalue B ↑i

Full source on GitHub

Copy link

Theorem (Lidskii's inequality for singular values).

For any finite set S of indices, \sum_{i \in S} \lvert \sigma_i(\mathbf{A} + \mathbf{E}) - \sigma_i(\mathbf{A}) \rvert \le \|\mathbf{E}\|_{(\lvert S \rvert)} = \sum_{j < \lvert S \rvert} \sigma_j(\mathbf{E}) \,. [HornJohnson1991, Theorem 3.4.5]; [Bhatia1997, Theorem IV.3.4].

Lean statement and details
NLAlib.sum_abs_singularValues_add_sub_le_kyFanNorm.{u_1, u_2, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
  {m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n] (A E : Matrix m n 𝕜) (S : Finset ℕ) :
  ∑ i ∈ S, |singularValues (A + E) i - singularValues A i| ≤ kyFanNorm S.card E

Full source on GitHub

Copy link

Theorem (Rado's theorem).

\mathbf{x} is majorized by \mathbf{y} exactly when \mathbf{x} lies in the convex hull of the permutations of \mathbf{y}. [HornJohnson2013, Theorem 4.3.49].

Lean statement and details
NLAlib.majorized_iff_mem_convexHull_permutations.{u_1} {ι : Type u_1} [Fintype ι] {x y : ι → ℝ} :
  Majorized x y ↔ x ∈ (convexHull ℝ) (Set.range fun σ ↦ y ∘ ⇑σ)

Full source on GitHub

Copy link

Theorem (Equality in Minkowski's determinant inequality).

For positive definite matrices with a nonempty index type and arbitrary positive weights, the determinant root of the weighted sum equals the weighted sum of the determinant roots exactly when the matrices are positive scalar multiples. [HornJohnson2013, Theorem 7.6.10].

General form: sizes are index types

Lean statement and details
Matrix.PosDef.re_det_smul_add_smul_rpow_eq_iff.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2}
  [Fintype n] [DecidableEq n] [Nonempty n] {A B : Matrix n n 𝕜} (hA : A.PosDef) (hB : B.PosDef)
  {a b : ℝ} (ha : 0 < a) (hb : 0 < b) :
  RCLike.re (a • A + b • B).det ^ (↑(Fintype.card n))⁻¹ =
      a * RCLike.re A.det ^ (↑(Fintype.card n))⁻¹ + b * RCLike.re B.det ^ (↑(Fintype.card n))⁻¹ ↔
    ∃ c, 0 < c ∧ A = c • B

Full source on GitHub

Copy link

Theorem (Mirsky's theorem).

In every unitarily invariant norm, the sorted singular values are 1-Lipschitz: the gauge of the difference of the singular value sequences of \mathbf{A} and \mathbf{B} is at most the norm of \mathbf{A} - \mathbf{B}, \Phi\bigl(\sigma_0(\mathbf{A}) - \sigma_0(\mathbf{B}),\, \sigma_1(\mathbf{A}) - \sigma_1(\mathbf{B}),\, \dots\bigr) \le \|\mathbf{A} - \mathbf{B}\|_{\Phi}\,. [HornJohnson2013, Corollary 7.4.9.3]; [Bhatia1997, Theorem IV.3.4].

Lean statement and details
NLAlib.SymmetricGauge.apply_singularValuesFinsupp_sub_le.{u_1, u_3, u_4} {𝕜 : Type u_1} [RCLike 𝕜]
  {m : Type u_3} {n : Type u_4} [Fintype m] [Fintype n] (Φ : SymmetricGauge) (A B : Matrix m n 𝕜) :
  Φ (singularValuesFinsupp A - singularValuesFinsupp B) ≤ Φ.matrixNorm (A - B)

Full source on GitHub

Copy link

Theorem (Oppenheim's inequality).

for positive semidefinite \mathbf{A}, \mathbf{B}, \operatorname{Re} \det \mathbf{A} \cdot \prod_i \operatorname{Re} \mathbf{B}_{i,i} \le \operatorname{Re} \det(\mathbf{A} \circ \mathbf{B})\,. [HornJohnson2013, Theorem 7.8.16].

Lean statement and details
Matrix.PosSemidef.re_det_mul_prod_re_diag_le_re_det_hadamard.{u_1, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_3} [Fintype n] [DecidableEq n] {A B : Matrix n n 𝕜} (hA : A.PosSemidef)
  (hB : B.PosSemidef) : RCLike.re A.det * ∏ i, RCLike.re (B i i) ≤ RCLike.re (A ⊙ B).det

Full source on GitHub

Copy link

Theorem (Equality in Mirsky's inequality).

For real or complex rectangular matrices \mathbf{A},\mathbf{B} of the same shape, the squared Frobenius distance equals the squared distance of their descending singular value lists exactly when \operatorname{Re}\operatorname{tr}(\mathbf{A}\mathbf{B}^{\mathsf{H}}) = \sum_i \sigma_i(\mathbf{A})\sigma_i(\mathbf{B})\,. Both sums extend to the smaller matrix dimension, including zero. [HornJohnson2013, §7.4.1], the Frobenius equality case of the singular-value inequalities. This extends the real statement in the original NLAlib formal library, NLAlib.Matrix.Factorizations.ProcrustesRotations, commit 77514ce42a0e437d837797a063ac161f41022730, to RCLike matrices.

General form: sizes are index types

Lean statement and details
NLAlib.frobNorm_sub_sq_eq_sum_singularValues_sub_sq_iff.{u_1, u_2, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
  {m : Type u_2} {n : Type u_3} [Fintype m] [Fintype n] (A B : Matrix m n 𝕜) :
  frobNorm (A - B) ^ 2 =
      ∑ i ∈ Finset.range (min (Fintype.card m) (Fintype.card n)),
        (singularValues A i - singularValues B i) ^ 2 ↔
    frobInner A B =
      ∑ i ∈ Finset.range (min (Fintype.card m) (Fintype.card n)),
        singularValues A i * singularValues B i

Full source on GitHub

Copy link

Theorem (The condition number of a preconditioned matrix).

If a\mathbf{M} \preceq \mathbf{A} \preceq b\mathbf{M} with 0 < a, 0 \le b, and \mathbf{C}^{\mathsf{H}}\mathbf{M}\mathbf{C} = \mathbf{I}, the symmetrically preconditioned matrix \mathbf{C}^{\mathsf{H}}\mathbf{A}\mathbf{C} has condition number \kappa(\mathbf{C}^{\mathsf{H}}\mathbf{A}\mathbf{C}) \le \frac{b}{a}\,. This is the statement that conjugate gradient rates consume.

Lean statement and details
NLAlib.pseudoConditionNumber_conjTranspose_mul_mul_le_div.{u_1, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_3} [Fintype n] [DecidableEq n] {A M C : Matrix n n 𝕜} (hC : Cᴴ * M * C = 1) {a b : ℝ}
  (ha : 0 < a) (hb : 0 ≤ b) (h₁ : a • M ≤ A) (h₂ : A ≤ b • M) :
  pseudoConditionNumber (Cᴴ * A * C) ≤ b / a

Full source on GitHub

Copy link

Theorem (Spectral equivalence through generalized eigenvalues).

For positive definite \mathbf{A} and Hermitian \mathbf{B}, a\mathbf{A} \preceq \mathbf{B} \preceq b\mathbf{A} exactly when the real spectrum of \mathbf{A}^{-1}\mathbf{B} lies in [a, b]. [HornJohnson2013, Theorem 7.6.4 context].

Lean statement and details
Matrix.PosDef.smul_le_and_le_smul_iff_spectrum_subset.{u_1, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_3} [Fintype n] [DecidableEq n] {A B : Matrix n n 𝕜} (hA : A.PosDef)
  (hB : B.IsHermitian) (a b : ℝ) : a • A ≤ B ∧ B ≤ b • A ↔ spectrum ℝ (A⁻¹ * B) ⊆ Set.Icc a b

Full source on GitHub

Copy link

Theorem (The diagonals of the unitary orbit of a Hermitian matrix).

are exactly the vectors majorized by its eigenvalues: a real vector \mathbf{d} is majorized by the eigenvalues of \mathbf{A} (Mathlib's Matrix.IsHermitian.eigenvalues) iff (\mathbf{U}^{\mathsf{H}}\mathbf{A}\mathbf{U})_{i,i} = \mathbf{d}_i for all i, for some unitary \mathbf{U}. [HornJohnson2013, Theorems 4.3.45 and 4.3.48].

Lean statement and details
Matrix.IsHermitian.majorized_iff_exists_diag_conj_eq.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_2} [Fintype n] [DecidableEq n] {A : Matrix n n 𝕜} (hA : A.IsHermitian) {d : n → ℝ} :
  Majorized d hA.eigenvalues ↔ ∃ U, HasOrthonormalCols U ∧ ∀ (i : n), (Uᴴ * A * U) i i = ↑(d i)

Full source on GitHub

Copy link

Theorem (Schur's theorem).

, for Mathlib's enumeration of the eigenvalues: the real diagonal (\operatorname{Re} \mathbf{A}_{i,i})_i of a Hermitian matrix \mathbf{A} is majorized by its eigenvalues listed as Mathlib's Matrix.IsHermitian.eigenvalues, indexed by n rather than sorted. [HornJohnson2013, Theorem 4.3.45].

Lean statement and details
Matrix.IsHermitian.majorized_re_diag_eigenvalues.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2}
  [Fintype n] [DecidableEq n] {A : Matrix n n 𝕜} (hA : A.IsHermitian) :
  Majorized (fun i ↦ RCLike.re (A i i)) hA.eigenvalues

Full source on GitHub

Copy link

Theorem (Entrywise power series with nonnegative coefficients preserve positive semidefiniteness).

If f(t) = \sum_k c_k t^k with c_k \ge 0, the series converging at every entry of the real positive semidefinite matrix \mathbf{A}, then the matrix with entries f(\mathbf{A}_{i,j}) is positive semidefinite. [HornJohnson2013, Theorem 7.5.9]; [HornJohnson1991, Theorem 6.3.6 context].

Lean statement and details
Matrix.PosSemidef.map_of_hasSum.{u_2} {n : Type u_2} [Finite n] {A : Matrix n n ℝ}
  (hA : A.PosSemidef) {c : ℕ → ℝ} (hc : ∀ (k : ℕ), 0 ≤ c k) {f : ℝ → ℝ}
  (h : ∀ (i j : n), HasSum (fun k ↦ c k * A i j ^ k) (f (A i j))) : (A.map f).PosSemidef

Full source on GitHub

Copy link

Theorem (Normalized Szász inequality).

For a positive semidefinite matrix of dimension d+1, the product of principal minors of order j+1, raised to 1/\binom{d}{j}, decreases with j throughout 0\le j\le d. [HornJohnson2013, Theorem 7.8.11].

General form: sizes are index types

Lean statement and details
Matrix.PosSemidef.prod_re_principalMinor_rpow_le.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2}
  [Fintype n] [DecidableEq n] {A : Matrix n n 𝕜} (hA : A.PosSemidef) {d k l : ℕ}
  (hd : Fintype.card n = d + 1) (hkl : k ≤ l) (hl : l ≤ d) :
  (∏ s ∈ Finset.powersetCard (l + 1) Finset.univ, RCLike.re (principalMinor A s)) ^
      (↑(d.choose l))⁻¹ ≤
    (∏ s ∈ Finset.powersetCard (k + 1) Finset.univ, RCLike.re (principalMinor A s)) ^
      (↑(d.choose k))⁻¹

Full source on GitHub

Copy link

Theorem (Tomić–Weyl).

If \mathbf{x} is weakly majorized by \mathbf{y} and \varphi is monotone and convex on \mathbb{R}, then \sum_i \varphi(\mathbf{x}_i) \le \sum_i \varphi(\mathbf{y}_i). [HornJohnson1991, Theorem 3.3.14 context].

Lean statement and details
NLAlib.WeaklyMajorized.sum_monotone_convex_le.{u_1} {ι : Type u_1} [Fintype ι] {x y : ι → ℝ}
  (h : WeaklyMajorized x y) {φ : ℝ → ℝ} (hφm : Monotone φ) (hφ : ConvexOn ℝ Set.univ φ) :
  ∑ i, φ (x i) ≤ ∑ i, φ (y i)

Full source on GitHub

Copy link

Theorem (Strict positivity of the truncated exponential kernel).

For a real or complex positive semidefinite matrix with N rows, the first N terms of the entrywise exponential series form a positive definite matrix exactly when the rows are distinct. [HornJohnson2013, Theorem 7.5.9 context]. The formal proof adapts tchen-research/NLAlib@77514ce.

General form: sizes are index types

Lean statement and details
Matrix.PosSemidef.posDef_sum_inv_factorial_smul_map_pow_iff.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_2} [Fintype n] {A : Matrix n n 𝕜} (hA : A.PosSemidef) :
  (∑ k ∈ Finset.range (Fintype.card n), (↑k.factorial)⁻¹ • A.map fun t ↦ t ^ k).PosDef ↔
    Function.Injective A.row

Full source on GitHub

Copy link

Theorem (The trace inequality for Hermitian matrices).

\operatorname{Re} \operatorname{tr}(\mathbf{A}\mathbf{B}) \le \sum_{i < \lvert n \rvert} \lambda_i(\mathbf{A}) \, \lambda_i(\mathbf{B}) \,, the eigenvalues of each matrix in non-increasing order. [HornJohnson2013, Theorem 4.3.53].

General form: sizes are index types

Lean statement and details
Matrix.IsHermitian.re_trace_mul_le_sum_eigenvalue_mul.{u_1, u_3} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_3} [Fintype n] {A B : Matrix n n 𝕜} (hA : A.IsHermitian) (hB : B.IsHermitian) :
  RCLike.re (A * B).trace ≤ ∑ i ∈ Finset.range (Fintype.card n), eigenvalue A i * eigenvalue B i

Full source on GitHub

Copy link

Theorem (The Wielandt inequality).

If a\mathbf{I} \preceq \mathbf{A} \preceq b\mathbf{I} with 0 < a and \mathbf{x}, \mathbf{y} are orthogonal, then \lvert \mathbf{x}^{\mathsf{H}}\mathbf{A}\mathbf{y} \rvert^2 \le \Bigl(\frac{b - a}{b + a}\Bigr)^2 \operatorname{Re}(\mathbf{x}^{\mathsf{H}}\mathbf{A}\mathbf{x}) \operatorname{Re}(\mathbf{y}^{\mathsf{H}}\mathbf{A}\mathbf{y})\,. [HornJohnson2013, (7.4.12.2)].

Lean statement and details
NLAlib.norm_star_dotProduct_mulVec_sq_le_of_dotProduct_eq_zero.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
  {n : Type u_2} [Fintype n] [DecidableEq n] {A : Matrix n n 𝕜} {a b : ℝ} (ha : 0 < a)
  (h₁ : a • 1 ≤ A) (h₂ : A ≤ b • 1) {x y : n → 𝕜} (hxy : star x ⬝ᵥ y = 0) :
  ‖star x ⬝ᵥ A *ᵥ y‖ ^ 2 ≤
    ((b - a) / (b + a)) ^ 2 * RCLike.re (quadForm A x) * RCLike.re (quadForm A y)

Full source on GitHub

Copy link

Formal definitions

Broader topics