Documentation

LeanPool.Monlib4.LinearAlgebra.Matrix.PosEqLinearMapIsPositive

Positivity of matrices and linear maps #

Compatibility wrappers for the part of Monlib's matrix-positive API now covered by Mathlib.

theorem Matrix.conjTranspose_eq_adjoint {๐•œ : Type u_1} {m : Type u_2} {n : Type u_3} [RCLike ๐•œ] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] (A : Matrix m n ๐•œ) :

The adjoint of the linear map associated to a matrix is the map associated to its conjugate transpose.

theorem Matrix.posSemidef_star_mul_self {m : Type u_1} {n : Type u_2} {R : Type u_3} [Ring R] [PartialOrder R] [StarRing R] [Fintype m] [Finite n] [StarOrderedRing R] (A : Matrix m n R) :

Alias of Matrix.posSemidef_conjTranspose_mul_self.


The conjugate transpose of a matrix multiplied by the matrix is positive semidefinite

theorem Matrix.posSemidef_mul_star_self {m : Type u_1} {n : Type u_2} {R : Type u_3} [Ring R] [PartialOrder R] [StarRing R] [Fintype n] [Finite m] [StarOrderedRing R] (A : Matrix m n R) :

Alias of Matrix.posSemidef_self_mul_conjTranspose.


A matrix multiplied by its conjugate transpose is positive semidefinite

theorem Matrix.toEuclideanLin_eq_piLp_linearEquiv {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] :
toEuclideanLin = toLin (PiLp.basisFun 2 ๐•œ n) (PiLp.basisFun 2 ๐•œ n)
theorem Matrix.of_isHermitian' {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] {x : Matrix n n ๐•œ} (hx : x.IsHermitian) (x_1 : n โ†’ ๐•œ) :
โ†‘(RCLike.re (โˆ‘ i : n, star x_1 i * โˆ‘ x_2 : n, x i x_2 * x_1 x_2)) = โˆ‘ x_2 : n, star x_1 x_2 * โˆ‘ x_3 : n, x x_2 x_3 * x_1 x_3
theorem Matrix.posSemidef_eq_linearMap_positive' {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] (x : Matrix n n ๐•œ) :
theorem Matrix.posSemidef_iff {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] (x : Matrix n n ๐•œ) :
x.PosSemidef โ†” โˆƒ (y : Matrix n n ๐•œ), x = y.conjTranspose * y
theorem Matrix.dotProduct_eq_inner {๐•œ : Type u_2} [RCLike ๐•œ] {n : Type u_3} [Fintype n] (x y : n โ†’ ๐•œ) :
star x โฌแตฅ y = โˆ‘ i : n, inner ๐•œ (x i) (y i)
theorem Matrix.isHermitian_self_hMul_conjTranspose {๐•œ : Type u_2} [RCLike ๐•œ] {m : Type u_3} {n : Type u_4} [Fintype m] (A : Matrix m n ๐•œ) :
theorem Matrix.trace_star {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] {A : Matrix n n ๐•œ} :
theorem Matrix.nonneg_eigenvalues_of_posSemidef {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] {ฮผ : โ„} {A : Matrix n n ๐•œ} (hฮผ : Module.End.HasEigenvalue (toEuclideanLin A) โ†‘ฮผ) (H : A.PosSemidef) :
0 โ‰ค ฮผ
theorem Matrix.IsHermitian.nonneg_eigenvalues_of_posSemidef {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] {A : Matrix n n ๐•œ} (hA : A.PosSemidef) (i : n) :
0 โ‰ค โ‹ฏ.eigenvalues i
@[reducible]
noncomputable def Matrix.invertibleOfBijToLin' {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] {Q : Matrix n n ๐•œ} (h : Function.Bijective โ‡‘(toLin' Q)) :

A matrix is invertible when its associated linear map is bijective.

Equations
Instances For
    theorem Matrix.bij_toLin'_of_invertible {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] {Q : Matrix n n ๐•œ} (h : Invertible Q) :
    theorem Matrix.PosSemidef.invertibleIff_posDef {๐•œ : Type u_2} [RCLike ๐•œ] {n : Type u_3} [Fintype n] [DecidableEq n] {x : Matrix n n ๐•œ} (hx : x.PosSemidef) :
    @[reducible]
    noncomputable def Matrix.PosDef.invertible {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] {Q : Matrix n n ๐•œ} (hQ : Q.PosDef) :

    A positive definite matrix is invertible.

    Equations
    Instances For
      theorem Matrix.posSemidef_iff_vecMulVec {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Finite n] {x : Matrix n n ๐•œ} :
      x.PosSemidef โ†” โˆƒ (m : โ„•) (v : Fin m โ†’ EuclideanSpace ๐•œ n), x = โˆ‘ i : Fin m, vecMulVec (v i).ofLp (star (v i).ofLp)
      theorem vecMulVec_posSemidef {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Finite n] (x : n โ†’ ๐•œ) :
      theorem Matrix.posDefOne {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [DecidableEq n] :

      The identity is a positive definite matrix.

      theorem Matrix.PosDef.pos_eigenvalues {n : Type u_2} {๐•œ : Type u_3} [Fintype n] [RCLike ๐•œ] {A : Matrix n n ๐•œ} [DecidableEq n] (hA : A.PosDef) (i : n) :
      0 < โ‹ฏ.eigenvalues i

      Alias of Matrix.PosDef.eigenvalues_pos.


      The eigenvalues of a positive definite matrix are positive.

      theorem Matrix.PosDef.trace_ne_zero {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [Nonempty n] {x : Matrix n n ๐•œ} (hx : x.PosDef) :
      theorem Matrix.PosDef.pos_trace {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [Nonempty n] {x : Matrix n n ๐•œ} (hx : x.PosDef) :

      A positive definite matrix has trace with positive real part.

      theorem Matrix.toEuclideanLin_apply' {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] (x : Matrix n n ๐•œ) (v : EuclideanSpace ๐•œ n) :

      The Euclidean linear map associated to a matrix acts by matrix-vector multiplication.

      theorem rankOne.EuclideanSpace.toEuclideanLin_symm {๐•œ : Type u_3} [RCLike ๐•œ] {n : Type u_4} {m : Type u_5} [Fintype n] [Fintype m] [DecidableEq m] (x : EuclideanSpace ๐•œ n) (y : EuclideanSpace ๐•œ m) :
      theorem rankOne.EuclideanSpace.toMatrix' {๐•œ : Type u_3} [RCLike ๐•œ] {n : Type u_4} {m : Type u_5} [Fintype n] [Fintype m] [DecidableEq m] (x : EuclideanSpace ๐•œ n) (y : EuclideanSpace ๐•œ m) :
      theorem rankOne.Pi.toMatrix'' {๐•œ : Type u_3} [RCLike ๐•œ] {n : Type u_4} [Fintype n] [DecidableEq n] (x y : n โ†’ ๐•œ) :
      theorem Matrix.vecMulVec_eq_replicateCol_conjTranspose {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] (v : n โ†’ ๐•œ) :
      theorem Matrix.posSemidef_iff_replicateCol_mul_conjTranspose_replicateCol {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Finite n] {x : Matrix n n ๐•œ} :
      x.PosSemidef โ†” โˆƒ (m : โ„•) (v : Fin m โ†’ EuclideanSpace ๐•œ n), x = โˆ‘ i : Fin m, replicateCol (Fin 1) (v i).ofLp * (replicateCol (Fin 1) (v i).ofLp).conjTranspose
      theorem Matrix.posSemidef_iff_vecMulVec' {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Finite n] {x : Matrix n n ๐•œ} :
      x.PosSemidef โ†” โˆƒ (m : Type) (_hm : Fintype m) (v : m โ†’ EuclideanSpace ๐•œ n), x = โˆ‘ i : m, vecMulVec (v i).ofLp (star (v i).ofLp)
      theorem Matrix.posSemidef_iff_replicateCol_mul_conjTranspose_replicateCol' {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Finite n] {x : Matrix n n ๐•œ} :
      x.PosSemidef โ†” โˆƒ (m : Type) (_hm : Fintype m) (v : m โ†’ EuclideanSpace ๐•œ n), x = โˆ‘ i : m, replicateCol (Fin 1) (v i).ofLp * (replicateCol (Fin 1) (v i).ofLp).conjTranspose
      theorem Matrix.posSemidef_iff_eq_rankOne {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] {x : Matrix n n ๐•œ} :
      x.PosSemidef โ†” โˆƒ (m : โ„•) (v : Fin m โ†’ EuclideanSpace ๐•œ n), x = โˆ‘ i : Fin m, toEuclideanLin.symm โ†‘(((rankOne ๐•œ) (v i)) (v i))
      theorem Matrix.posSemidef_iff_eq_rankOne' {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] {x : Matrix n n ๐•œ} :
      x.PosSemidef โ†” โˆƒ (m : โ„•) (v : Fin m โ†’ n โ†’ ๐•œ), x = โˆ‘ i : Fin m, toEuclideanLin.symm โ†‘(((rankOne ๐•œ) ((EuclideanSpace.equiv n ๐•œ).symm (v i))) ((EuclideanSpace.equiv n ๐•œ).symm (v i)))
      theorem Matrix.posSemidef_iff_eq_rankOne'' {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] {x : Matrix n n ๐•œ} :
      x.PosSemidef โ†” โˆƒ (m : Type) (_hm : Fintype m) (v : m โ†’ n โ†’ ๐•œ), x = โˆ‘ i : m, toEuclideanLin.symm โ†‘(((rankOne ๐•œ) ((EuclideanSpace.equiv n ๐•œ).symm (v i))) ((EuclideanSpace.equiv n ๐•œ).symm (v i)))
      theorem Matrix.PosSemidef.complex {n : Type u_1} [Fintype n] (x : Matrix n n โ„‚) :
      x.PosSemidef โ†” โˆ€ (y : n โ†’ โ„‚), 0 โ‰ค star y โฌแตฅ x.mulVec y

      For complex matrices, positive semidefiniteness is equivalent to nonnegative quadratic forms.

      theorem PosSemidef.complex {n : Type u_1} [Fintype n] (x : Matrix n n โ„‚) :
      x.PosSemidef โ†” โˆ€ (y : n โ†’ โ„‚), 0 โ‰ค star y โฌแตฅ x.mulVec y
      theorem single.sum_eq_one {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] (a : ๐•œ) :
      โˆ‘ k : n, Matrix.single k k a = a โ€ข 1
      theorem single_hMul {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] (i j k l : n) (a b : ๐•œ) :
      Matrix.single i j a * Matrix.single k l b = (if j = k then 1 else 0) โ€ข Matrix.single i l (a * b)
      theorem Matrix.smul_single' {n : Type u_3} {R : Type u_4} [CommSemiring R] [DecidableEq n] (i j : n) (c : R) :
      single i j c = c โ€ข single i j 1
      theorem Matrix.trace_iff' {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] (x : Matrix n n ๐•œ) :
      x.trace = โˆ‘ i : n, x i i
      theorem existsUnique_trace {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] [Nontrivial n] :
      โˆƒ! ฯ† : Matrix n n ๐•œ โ†’โ‚—[๐•œ] ๐•œ, (โˆ€ (a b : Matrix n n ๐•œ), ฯ† (a * b) = ฯ† (b * a)) โˆง ฯ† 1 = 1
      theorem Matrix.single.trace {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Fintype n] [DecidableEq n] (i j : n) (a : ๐•œ) :
      (single i j a).trace = if i = j then a else 0
      theorem Matrix.single_eq {R : Type u_3} {n : Type u_4} {m : Type u_5} [Semiring R] [DecidableEq n] [DecidableEq m] (i : n) (j : m) (a : R) :
      single i j a = fun (i' : n) (j' : m) => if i = i' โˆง j = j' then a else 0
      theorem vecMulVec_eq_zero_iff {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] (x : n โ†’ ๐•œ) :
      theorem norm_ite {ฮฑ : Type u_3} [Norm ฮฑ] (P : Prop) [Decidable P] (a b : ฮฑ) :
      theorem Matrix.PosSemidef.diagonal_iff {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [DecidableEq n] (x : n โ†’ ๐•œ) :
      (diagonal x).PosSemidef โ†” โˆ€ (i : n), 0 โ‰ค x i
      theorem Matrix.PosDef.diagonal_iff {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [DecidableEq n] (x : n โ†’ ๐•œ) :
      (diagonal x).PosDef โ†” โˆ€ (i : n), 0 < x i
      theorem Matrix.toLin_piLp_eq_toLin' {๐•œ : Type u_2} [RCLike ๐•œ] {n : Type u_3} [Fintype n] [DecidableEq n] :
      toLpLin 2 2 = toLin (PiLp.basisFun 2 ๐•œ n) (PiLp.basisFun 2 ๐•œ n)
      theorem Matrix.commute_iff {ฮฑ : Type u_1} {n : Type u_4} [NonUnitalSemiring ฮฑ] [StarRing ฮฑ] [Fintype n] {A B : Matrix n n ฮฑ} (hA : A.IsHermitian) (hB : B.IsHermitian) :

      Alias of Matrix.IsHermitian.commute_iff.

      theorem Matrix.Finset.sum_abs_eq_zero_iff' {๐•œ : Type u_2} [RCLike ๐•œ] {s : Type u_3} [Fintype s] {x : s โ†’ ๐•œ} :
      โˆ‘ i : s, โ€–x iโ€– ^ 2 = 0 โ†” โˆ€ (i : s), โ€–x iโ€– ^ 2 = 0
      theorem Matrix.trace_conjTranspose_hMul_self_nonneg {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] {m : Type u_3} [Fintype m] [Fintype n] (x : Matrix m n ๐•œ) :

      The trace of xแดด * x is nonnegative.

      theorem Matrix.PosSemidef.trace_conjTranspose_hMul_self_nonneg {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] {m : Type u_3} [Fintype m] [Fintype n] {Q : Matrix m m ๐•œ} (hQ : Q.PosSemidef) (x : Matrix n m ๐•œ) :

      A positive semidefinite matrix gives a nonnegative weighted xแดด * x trace.

      theorem Matrix.trace_conjTranspose_hMul_self_eq_zero {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] {m : Type u_3} [Fintype n] [Fintype m] (x : Matrix n m ๐•œ) :

      The trace of xแดด * x vanishes exactly when x is zero.

      theorem Matrix.PosDef.trace_conjTranspose_hMul_self_eq_zero {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] {m : Type u_3} [Fintype m] [Fintype n] {Q : Matrix m m ๐•œ} (hQ : Q.PosDef) {x : Matrix n m ๐•œ} :
      (Q * x.conjTranspose * x).trace = 0 โ†” x = 0

      A positive definite matrix gives a faithful weighted xแดด * x trace.

      theorem Matrix.Nontracial.trace_conjTranspose_hMul_self_eq_zero {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] {m : Type u_3} [Fintype m] [Fintype n] {Q : Matrix m m ๐•œ} (hQ : Q.PosDef) {x : Matrix n m ๐•œ} :
      (Q * x.conjTranspose * x).trace = 0 โ†” x = 0

      Alias of Matrix.PosDef.trace_conjTranspose_hMul_self_eq_zero.


      A positive definite matrix gives a faithful weighted xแดด * x trace.

      theorem Matrix.IsHermitian.trace_conj_symm_star_hMul {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] {m : Type u_3} [Fintype m] [Fintype n] {Q : Matrix m m ๐•œ} (hQ : Q.IsHermitian) (x y : Matrix n m ๐•œ) :
      (starRingEnd ๐•œ) (Q * y.conjTranspose * x).trace = (Q * x.conjTranspose * y).trace

      Hermitian weighted traces are conjugate symmetric.

      theorem Matrix.conjTranspose_hMul_self_eq_zero {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] {m : Type u_3} [Fintype n] (x : Matrix n m ๐•œ) :

      xแดด * x vanishes exactly when x is zero.

      theorem Matrix.PosSemidef.replicateColMulConjTransposereplicateCol {n : Type u_1} {๐•œ : Type u_2} [RCLike ๐•œ] [Finite n] (x : n โ†’ ๐•œ) :