Skip to content

Commit d7dfaf9

Browse files
committed
feat(Analysis/InnerProductSpace/Positive): A.toEuclideanLin.IsPositive iff A.PosSemidef (#28553)
1 parent 8e70088 commit d7dfaf9

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Mathlib/Analysis/InnerProductSpace/Positive.lean

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Anatole Dedecker
55
-/
66
import Mathlib.Analysis.InnerProductSpace.Adjoint
77
import Mathlib.Analysis.InnerProductSpace.Spectrum
8+
import Mathlib.LinearAlgebra.Matrix.PosDef
89

910
/-!
1011
# Positive operators
@@ -176,6 +177,16 @@ theorem isPositive_linearIsometryEquiv_conj_iff {T : E →ₗ[𝕜] E} (f : E
176177
Function.comp_apply, LinearIsometryEquiv.inner_map_eq_flip]
177178
exact fun _ => ⟨fun h x => by simpa using h (f x), fun h x => h _⟩
178179

180+
open scoped ComplexOrder in
181+
/-- `A.toEuclideanLin` is positive if and only if `A` is positive semi-definite. -/
182+
@[simp] theorem _root_.Matrix.isPositive_toEuclideanLin_iff {n : Type*} [Fintype n] [DecidableEq n]
183+
{A : Matrix n n 𝕜} : A.toEuclideanLin.IsPositive ↔ A.PosSemidef := by
184+
simp_rw [LinearMap.IsPositive, ← Matrix.isHermitian_iff_isSymmetric, inner_re_symm,
185+
EuclideanSpace.inner_eq_star_dotProduct, Matrix.piLp_ofLp_toEuclideanLin, Matrix.toLin'_apply,
186+
dotProduct_comm (A.mulVec _), Matrix.PosSemidef, and_congr_right_iff, RCLike.nonneg_iff (K:=𝕜)]
187+
refine fun hA ↦ (EuclideanSpace.equiv n 𝕜).forall_congr' fun x ↦ ?_
188+
simp [hA.im_star_dotProduct_mulVec_self]
189+
179190
/-- A symmetric projection is positive. -/
180191
@[aesop 10% apply, grind →]
181192
theorem IsPositive.of_isSymmetricProjection {p : E →ₗ[𝕜] E} (hp : p.IsSymmetricProjection) :

Mathlib/LinearAlgebra/Matrix/Hermitian.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ theorem isHermitian_iff_isSymmetric [Fintype n] [DecidableEq n] {A : Matrix n n
281281
ext i j
282282
simpa [(Pi.single_star i 1).symm] using h (Pi.single i 1) (Pi.single j 1)
283283

284+
theorem IsHermitian.im_star_dotProduct_mulVec_self [Fintype n] {A : Matrix n n α}
285+
(hA : A.IsHermitian) (x : n → α) : RCLike.im (star x ⬝ᵥ A *ᵥ x) = 0 := by
286+
classical
287+
exact dotProduct_comm _ (star x) ▸ (isHermitian_iff_isSymmetric.mp hA).im_inner_self_apply _
288+
284289
end RCLike
285290

286291
end Matrix

0 commit comments

Comments
 (0)