-
Notifications
You must be signed in to change notification settings - Fork 839
[Merged by Bors] - refactor(Analysis/InnerProductSpace/Positive): generalize positivity to use IsSymmetric
instead of IsSelfAdjoint
and CompleteSpace
#30000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
themathqueen
wants to merge
12
commits into
leanprover-community:master
from
themathqueen:refactor_clm_positive
+73
−56
Closed
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a0dc1ec
refactor clm ispositive
themathqueen 348b199
cleanup
themathqueen 87086f9
fix
themathqueen 823561d
remove simp
themathqueen d33432b
fixes
themathqueen 95c2690
add docstrings because of the name change
themathqueen 1e758ec
add _def
themathqueen 1432e2e
remove completespace
themathqueen 94ee93c
cleanup
themathqueen 8d097a4
cleanup
themathqueen 6b4217a
Merge branch 'master' into refactor_clm_positive
themathqueen a09c2ff
fix
themathqueen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ of requiring self adjointness in the definition. | |
|
||
* `LinearMap.IsPositive` : a linear map is positive if it is symmetric and | ||
`∀ x, 0 ≤ re ⟪T x, x⟫`. | ||
* `ContinuousLinearMap.IsPositive` : a continuous linear map is positive if it is self adjoint and | ||
* `ContinuousLinearMap.IsPositive` : a continuous linear map is positive if it is symmetric and | ||
`∀ x, 0 ≤ re ⟪T x, x⟫`. | ||
|
||
## Main statements | ||
|
@@ -104,6 +104,9 @@ theorem isPositive_zero : IsPositive (0 : E →ₗ[𝕜] E) := ⟨.zero, by simp | |
@[simp] | ||
theorem isPositive_one : IsPositive (1 : E →ₗ[𝕜] E) := ⟨.id, fun _ => inner_self_nonneg⟩ | ||
|
||
@[simp] | ||
theorem isPositive_id : IsPositive (id : E →ₗ[𝕜] E) := isPositive_one | ||
|
||
@[simp] | ||
theorem isPositive_natCast {n : ℕ} : IsPositive (n : E →ₗ[𝕜] E) := by | ||
refine ⟨IsSymmetric.natCast n, fun x => ?_⟩ | ||
|
@@ -211,65 +214,66 @@ end LinearMap | |
|
||
namespace ContinuousLinearMap | ||
|
||
variable [CompleteSpace E] [CompleteSpace F] | ||
|
||
/-- A continuous linear endomorphism `T` of a Hilbert space is **positive** if it is self adjoint | ||
/-- A continuous linear endomorphism `T` of a Hilbert space is **positive** if it is symmetric | ||
and `∀ x, 0 ≤ re ⟪T x, x⟫`. -/ | ||
def IsPositive (T : E →L[𝕜] E) : Prop := | ||
IsSelfAdjoint T ∧ ∀ x, 0 ≤ T.reApplyInnerSelf x | ||
(∀ x y, ⟪T x, y⟫ = ⟪x, T y⟫) ∧ ∀ x, 0 ≤ T.reApplyInnerSelf x | ||
|
||
theorem IsPositive.isSelfAdjoint {T : E →L[𝕜] E} (hT : IsPositive T) : IsSelfAdjoint T := | ||
hT.1 | ||
/-- In a complete space, a continuous linear endomorphism `T` is **positive** if it is | ||
symmetric and `∀ x, 0 ≤ re ⟪T x, x⟫`. -/ | ||
theorem isPositive_def [CompleteSpace E] {T : E →L[𝕜] E} : | ||
T.IsPositive ↔ IsSelfAdjoint T ∧ ∀ x, 0 ≤ T.reApplyInnerSelf x := by | ||
simp [IsPositive, isSelfAdjoint_iff_isSymmetric, LinearMap.IsSymmetric] | ||
themathqueen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
theorem IsPositive.inner_left_eq_inner_right {T : E →L[𝕜] E} (hT : IsPositive T) (x : E) : | ||
⟪T x, x⟫ = ⟪x, T x⟫ := by | ||
rw [← adjoint_inner_left, hT.isSelfAdjoint.adjoint_eq] | ||
theorem IsPositive.isSymmetric {T : E →L[𝕜] E} (hT : T.IsPositive) : | ||
T.IsSymmetric := hT.1 | ||
|
||
theorem IsPositive.re_inner_nonneg_left {T : E →L[𝕜] E} (hT : IsPositive T) (x : E) : | ||
0 ≤ re ⟪T x, x⟫ := | ||
hT.2 x | ||
theorem IsPositive.isSelfAdjoint [CompleteSpace E] {T : E →L[𝕜] E} (hT : IsPositive T) : | ||
IsSelfAdjoint T := hT.isSymmetric.isSelfAdjoint | ||
|
||
theorem IsPositive.re_inner_nonneg_right {T : E →L[𝕜] E} (hT : IsPositive T) (x : E) : | ||
0 ≤ re ⟪x, T x⟫ := by rw [inner_re_symm]; exact hT.re_inner_nonneg_left x | ||
theorem IsPositive.inner_left_eq_inner_right {T : E →L[𝕜] E} (hT : IsPositive T) (x y : E) : | ||
⟪T x, y⟫ = ⟪x, T y⟫ := hT.isSymmetric _ _ | ||
Comment on lines
+237
to
+238
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for fixing this to have |
||
|
||
theorem IsPositive.re_inner_nonneg_left {T : E →L[𝕜] E} (hT : IsPositive T) (x : E) : | ||
0 ≤ re ⟪T x, x⟫ := hT.2 x | ||
|
||
omit [CompleteSpace E] in | ||
lemma _root_.LinearMap.isPositive_toContinuousLinearMap_iff | ||
[FiniteDimensional 𝕜 E] (T : E →ₗ[𝕜] E) : | ||
have : CompleteSpace E := FiniteDimensional.complete 𝕜 _ | ||
T.toContinuousLinearMap.IsPositive ↔ T.IsPositive := by | ||
simp only [IsPositive, isSelfAdjoint_iff_isSymmetric, coe_toContinuousLinearMap, reApplyInnerSelf, | ||
coe_toContinuousLinearMap', LinearMap.IsPositive] | ||
T.toContinuousLinearMap.IsPositive ↔ T.IsPositive := Iff.rfl | ||
|
||
lemma isPositive_toLinearMap_iff (T : E →L[𝕜] E) : | ||
(T : E →ₗ[𝕜] E).IsPositive ↔ T.IsPositive := by | ||
simp only [LinearMap.IsPositive, ← isSelfAdjoint_iff_isSymmetric, coe_coe, IsPositive, | ||
reApplyInnerSelf] | ||
(T : E →ₗ[𝕜] E).IsPositive ↔ T.IsPositive := Iff.rfl | ||
|
||
alias ⟨_, IsPositive.toLinearMap⟩ := isPositive_toLinearMap_iff | ||
|
||
theorem IsPositive.re_inner_nonneg_right {T : E →L[𝕜] E} (hT : IsPositive T) (x : E) : | ||
0 ≤ re ⟪x, T x⟫ := hT.toLinearMap.re_inner_nonneg_right x | ||
|
||
open ComplexOrder in | ||
theorem isPositive_iff (T : E →L[𝕜] E) : | ||
IsPositive T ↔ T.IsSymmetric ∧ ∀ x, 0 ≤ ⟪T x, x⟫ := LinearMap.isPositive_iff _ | ||
|
||
open ComplexOrder in | ||
theorem isPositive_iff' [CompleteSpace E] (T : E →L[𝕜] E) : | ||
IsPositive T ↔ IsSelfAdjoint T ∧ ∀ x, 0 ≤ ⟪T x, x⟫ := by | ||
simp [← isPositive_toLinearMap_iff, isSelfAdjoint_iff_isSymmetric, LinearMap.isPositive_iff] | ||
simp [isSelfAdjoint_iff_isSymmetric, isPositive_iff] | ||
|
||
open ComplexOrder in | ||
theorem IsPositive.inner_nonneg_left {T : E →L[𝕜] E} (hT : IsPositive T) (x : E) : | ||
0 ≤ ⟪T x, x⟫ := | ||
(T.isPositive_iff.mp hT).right x | ||
0 ≤ ⟪T x, x⟫ := hT.toLinearMap.inner_nonneg_left x | ||
|
||
open ComplexOrder in | ||
theorem IsPositive.inner_nonneg_right {T : E →L[𝕜] E} (hT : IsPositive T) (x : E) : | ||
0 ≤ ⟪x, T x⟫ := by | ||
rw [← hT.inner_left_eq_inner_right] | ||
exact inner_nonneg_left hT x | ||
0 ≤ ⟪x, T x⟫ := hT.toLinearMap.inner_nonneg_right x | ||
|
||
@[simp] | ||
theorem isPositive_zero : IsPositive (0 : E →L[𝕜] E) := | ||
(isPositive_toLinearMap_iff _).mp LinearMap.isPositive_zero | ||
theorem isPositive_zero : IsPositive (0 : E →L[𝕜] E) := LinearMap.isPositive_zero | ||
|
||
@[simp] | ||
theorem isPositive_one : IsPositive (1 : E →L[𝕜] E) := | ||
⟨.one _, fun _ => inner_self_nonneg⟩ | ||
theorem isPositive_id : IsPositive (id 𝕜 E : E →L[𝕜] E) := LinearMap.isPositive_id | ||
|
||
@[simp] | ||
theorem isPositive_one : IsPositive (1 : E →L[𝕜] E) := LinearMap.isPositive_one | ||
|
||
@[simp] | ||
theorem isPositive_natCast {n : ℕ} : IsPositive (n : E →L[𝕜] E) := | ||
|
@@ -291,30 +295,28 @@ theorem IsPositive.smul_of_nonneg {T : E →L[𝕜] E} (hT : T.IsPositive) {c : | |
(isPositive_toLinearMap_iff _).mp (hT.toLinearMap.smul_of_nonneg hc) | ||
|
||
@[aesop safe apply] | ||
theorem IsPositive.conj_adjoint {T : E →L[𝕜] E} (hT : T.IsPositive) (S : E →L[𝕜] F) : | ||
(S ∘L T ∘L S†).IsPositive := by | ||
refine ⟨hT.isSelfAdjoint.conj_adjoint S, fun x => ?_⟩ | ||
theorem IsPositive.conj_adjoint [CompleteSpace E] [CompleteSpace F] {T : E →L[𝕜] E} | ||
(hT : T.IsPositive) (S : E →L[𝕜] F) : (S ∘L T ∘L S†).IsPositive := by | ||
refine isPositive_def.mpr ⟨hT.isSelfAdjoint.conj_adjoint S, fun x => ?_⟩ | ||
rw [reApplyInnerSelf, comp_apply, ← adjoint_inner_right] | ||
exact hT.re_inner_nonneg_left _ | ||
|
||
theorem isPositive_self_comp_adjoint (S : E →L[𝕜] F) : | ||
theorem isPositive_self_comp_adjoint [CompleteSpace E] [CompleteSpace F] (S : E →L[𝕜] F) : | ||
(S ∘L S†).IsPositive := by | ||
simpa using isPositive_one.conj_adjoint S | ||
|
||
@[aesop safe apply] | ||
theorem IsPositive.adjoint_conj {T : E →L[𝕜] E} (hT : T.IsPositive) (S : F →L[𝕜] E) : | ||
(S† ∘L T ∘L S).IsPositive := by | ||
theorem IsPositive.adjoint_conj [CompleteSpace E] [CompleteSpace F] {T : E →L[𝕜] E} | ||
(hT : T.IsPositive) (S : F →L[𝕜] E) : (S† ∘L T ∘L S).IsPositive := by | ||
convert hT.conj_adjoint (S†) | ||
rw [adjoint_adjoint] | ||
|
||
theorem isPositive_adjoint_comp_self (S : E →L[𝕜] F) : | ||
theorem isPositive_adjoint_comp_self [CompleteSpace E] [CompleteSpace F] (S : E →L[𝕜] F) : | ||
(S† ∘L S).IsPositive := by | ||
simpa using isPositive_one.adjoint_conj S | ||
|
||
section LinearMap | ||
|
||
omit [CompleteSpace E] [CompleteSpace F] | ||
|
||
variable [FiniteDimensional 𝕜 E] [FiniteDimensional 𝕜 F] | ||
|
||
@[aesop safe apply] | ||
|
@@ -341,14 +343,15 @@ theorem _root_.LinearMap.isPositive_adjoint_comp_self (S : E →ₗ[𝕜] F) : | |
|
||
end LinearMap | ||
|
||
theorem IsPositive.conj_starProjection (U : Submodule 𝕜 E) {T : E →L[𝕜] E} (hT : T.IsPositive) | ||
[U.HasOrthogonalProjection] : | ||
theorem IsPositive.conj_starProjection [CompleteSpace E] (U : Submodule 𝕜 E) {T : E →L[𝕜] E} | ||
(hT : T.IsPositive) [U.HasOrthogonalProjection] : | ||
(U.starProjection ∘L T ∘L U.starProjection).IsPositive := by | ||
have := hT.conj_adjoint (U.starProjection) | ||
rwa [(isSelfAdjoint_starProjection U).adjoint_eq] at this | ||
|
||
theorem IsPositive.orthogonalProjection_comp {T : E →L[𝕜] E} (hT : T.IsPositive) (U : Submodule 𝕜 E) | ||
[CompleteSpace U] : (U.orthogonalProjection ∘L T ∘L U.subtypeL).IsPositive := by | ||
theorem IsPositive.orthogonalProjection_comp [CompleteSpace E] {T : E →L[𝕜] E} (hT : T.IsPositive) | ||
(U : Submodule 𝕜 E) [CompleteSpace U] : | ||
(U.orthogonalProjection ∘L T ∘L U.subtypeL).IsPositive := by | ||
have := hT.conj_adjoint (U.orthogonalProjection : E →L[𝕜] U) | ||
rwa [U.adjoint_orthogonalProjection] at this | ||
|
||
|
@@ -365,7 +368,7 @@ lemma antilipschitz_of_forall_le_inner_map {H : Type*} [NormedAddCommGroup H] | |
· apply (map_le_map_iff <| OrderIso.mulLeft₀ ‖x‖ (norm_pos_iff.mpr hx0)).mp | ||
exact (h x).trans <| (norm_inner_le_norm _ _).trans <| (mul_comm _ _).le | ||
|
||
lemma isUnit_of_forall_le_norm_inner_map (f : E →L[𝕜] E) {c : ℝ≥0} (hc : 0 < c) | ||
lemma isUnit_of_forall_le_norm_inner_map [CompleteSpace E] (f : E →L[𝕜] E) {c : ℝ≥0} (hc : 0 < c) | ||
(h : ∀ x, ‖x‖ ^ 2 * c ≤ ‖⟪f x, x⟫_𝕜‖) : IsUnit f := by | ||
rw [isUnit_iff_bijective, bijective_iff_dense_range_and_antilipschitz] | ||
have h_anti : AntilipschitzWith c⁻¹ f := antilipschitz_of_forall_le_inner_map f hc h | ||
|
@@ -377,8 +380,7 @@ lemma isUnit_of_forall_le_norm_inner_map (f : E →L[𝕜] E) {c : ℝ≥0} (hc | |
aesop | ||
|
||
section Complex | ||
|
||
variable {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace ℂ E'] [CompleteSpace E'] | ||
variable {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace ℂ E'] | ||
|
||
theorem isPositive_iff_complex (T : E' →L[ℂ] E') : | ||
IsPositive T ↔ ∀ x, (re ⟪T x, x⟫_ℂ : ℂ) = ⟪T x, x⟫_ℂ ∧ 0 ≤ re ⟪T x, x⟫_ℂ := by | ||
|
@@ -411,7 +413,7 @@ end PartialOrder | |
|
||
/-- An idempotent operator is positive if and only if it is self-adjoint. -/ | ||
@[grind →] | ||
theorem IsIdempotentElem.isPositive_iff_isSelfAdjoint | ||
theorem IsIdempotentElem.isPositive_iff_isSelfAdjoint [CompleteSpace E] | ||
{p : E →L[𝕜] E} (hp : IsIdempotentElem p) : p.IsPositive ↔ IsSelfAdjoint p := by | ||
rw [← isPositive_toLinearMap_iff, IsIdempotentElem.isPositive_iff_isSymmetric hp.toLinearMap] | ||
exact isSelfAdjoint_iff_isSymmetric.symm | ||
|
@@ -421,7 +423,7 @@ theorem IsIdempotentElem.isPositive_iff_isSelfAdjoint | |
The proof of this will soon be simplified to `IsStarProjection.nonneg` when we | ||
have `StarOrderedRing (E →L[𝕜] E)`. -/ | ||
@[aesop 10% apply, grind →] | ||
theorem IsPositive.of_isStarProjection {p : E →L[𝕜] E} | ||
theorem IsPositive.of_isStarProjection [CompleteSpace E] {p : E →L[𝕜] E} | ||
(hp : IsStarProjection p) : p.IsPositive := | ||
hp.isIdempotentElem.isPositive_iff_isSelfAdjoint.mpr hp.isSelfAdjoint | ||
|
||
|
@@ -430,7 +432,7 @@ theorem IsPositive.of_isStarProjection {p : E →L[𝕜] E} | |
* `p` is normal | ||
* `p` is self-adjoint | ||
* `p` is positive -/ | ||
theorem IsIdempotentElem.TFAE {p : E →L[𝕜] E} (hp : IsIdempotentElem p) : | ||
theorem IsIdempotentElem.TFAE [CompleteSpace E] {p : E →L[𝕜] E} (hp : IsIdempotentElem p) : | ||
[(LinearMap.range p)ᗮ = LinearMap.ker p, | ||
IsStarNormal p, | ||
IsSelfAdjoint p, | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.