analysis.inner_product_space.positive ⟷ Mathlib.Analysis.InnerProductSpace.Positive

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -39,13 +39,13 @@ Positive operator
 -/
 
 
-open InnerProductSpace IsROrC ContinuousLinearMap
+open InnerProductSpace RCLike ContinuousLinearMap
 
 open scoped InnerProduct ComplexConjugate
 
 namespace ContinuousLinearMap
 
-variable {π•œ E F : Type _} [IsROrC π•œ]
+variable {π•œ E F : Type _} [RCLike π•œ]
 
 variable [NormedAddCommGroup E] [NormedAddCommGroup F]
 
Diff
@@ -132,7 +132,7 @@ theorem IsPositive.conj_orthogonalProjection (U : Submodule π•œ E) {T : E β†’L[
         orthogonalProjection U ∘L T ∘L U.subtypeL ∘L orthogonalProjection U).IsPositive :=
   by
   have := hT.conj_adjoint (U.subtypeL ∘L orthogonalProjection U)
-  rwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this 
+  rwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this
 #align continuous_linear_map.is_positive.conj_orthogonal_projection ContinuousLinearMap.IsPositive.conj_orthogonalProjection
 -/
 
@@ -141,7 +141,7 @@ theorem IsPositive.orthogonalProjection_comp {T : E β†’L[π•œ] E} (hT : T.IsPosi
     [CompleteSpace U] : (orthogonalProjection U ∘L T ∘L U.subtypeL).IsPositive :=
   by
   have := hT.conj_adjoint (orthogonalProjection U : E β†’L[π•œ] U)
-  rwa [U.adjoint_orthogonal_projection] at this 
+  rwa [U.adjoint_orthogonal_projection] at this
 #align continuous_linear_map.is_positive.orthogonal_projection_comp ContinuousLinearMap.IsPositive.orthogonalProjection_comp
 -/
 
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2022 Anatole Dedecker. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anatole Dedecker
 -/
-import Mathbin.Analysis.InnerProductSpace.Adjoint
+import Analysis.InnerProductSpace.Adjoint
 
 #align_import analysis.inner_product_space.positive from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2022 Anatole Dedecker. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anatole Dedecker
-
-! This file was ported from Lean 3 source module analysis.inner_product_space.positive
-! leanprover-community/mathlib commit 2ebc1d6c2fed9f54c95bbc3998eaa5570527129a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.InnerProductSpace.Adjoint
 
+#align_import analysis.inner_product_space.positive from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
+
 /-!
 # Positive operators
 
Diff
@@ -56,7 +56,6 @@ variable [InnerProductSpace π•œ E] [InnerProductSpace π•œ F]
 
 variable [CompleteSpace E] [CompleteSpace F]
 
--- mathport name: Β«exprβŸͺ , ⟫»
 local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y
 
 #print ContinuousLinearMap.IsPositive /-
@@ -67,30 +66,41 @@ def IsPositive (T : E β†’L[π•œ] E) : Prop :=
 #align continuous_linear_map.is_positive ContinuousLinearMap.IsPositive
 -/
 
+#print ContinuousLinearMap.IsPositive.isSelfAdjoint /-
 theorem IsPositive.isSelfAdjoint {T : E β†’L[π•œ] E} (hT : IsPositive T) : IsSelfAdjoint T :=
   hT.1
 #align continuous_linear_map.is_positive.is_self_adjoint ContinuousLinearMap.IsPositive.isSelfAdjoint
+-/
 
+#print ContinuousLinearMap.IsPositive.inner_nonneg_left /-
 theorem IsPositive.inner_nonneg_left {T : E β†’L[π•œ] E} (hT : IsPositive T) (x : E) :
     0 ≀ re βŸͺT x, x⟫ :=
   hT.2 x
 #align continuous_linear_map.is_positive.inner_nonneg_left ContinuousLinearMap.IsPositive.inner_nonneg_left
+-/
 
+#print ContinuousLinearMap.IsPositive.inner_nonneg_right /-
 theorem IsPositive.inner_nonneg_right {T : E β†’L[π•œ] E} (hT : IsPositive T) (x : E) :
     0 ≀ re βŸͺx, T x⟫ := by rw [inner_re_symm] <;> exact hT.inner_nonneg_left x
 #align continuous_linear_map.is_positive.inner_nonneg_right ContinuousLinearMap.IsPositive.inner_nonneg_right
+-/
 
+#print ContinuousLinearMap.isPositive_zero /-
 theorem isPositive_zero : IsPositive (0 : E β†’L[π•œ] E) :=
   by
   refine' ⟨isSelfAdjoint_zero _, fun x => _⟩
   change 0 ≀ re βŸͺ_, _⟫
   rw [zero_apply, inner_zero_left, ZeroHomClass.map_zero]
 #align continuous_linear_map.is_positive_zero ContinuousLinearMap.isPositive_zero
+-/
 
+#print ContinuousLinearMap.isPositive_one /-
 theorem isPositive_one : IsPositive (1 : E β†’L[π•œ] E) :=
   ⟨isSelfAdjoint_one _, fun x => inner_self_nonneg⟩
 #align continuous_linear_map.is_positive_one ContinuousLinearMap.isPositive_one
+-/
 
+#print ContinuousLinearMap.IsPositive.add /-
 theorem IsPositive.add {T S : E β†’L[π•œ] E} (hT : T.IsPositive) (hS : S.IsPositive) :
     (T + S).IsPositive :=
   by
@@ -98,7 +108,9 @@ theorem IsPositive.add {T S : E β†’L[π•œ] E} (hT : T.IsPositive) (hS : S.IsPosi
   rw [re_apply_inner_self, add_apply, inner_add_left, map_add]
   exact add_nonneg (hT.inner_nonneg_left x) (hS.inner_nonneg_left x)
 #align continuous_linear_map.is_positive.add ContinuousLinearMap.IsPositive.add
+-/
 
+#print ContinuousLinearMap.IsPositive.conj_adjoint /-
 theorem IsPositive.conj_adjoint {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : E β†’L[π•œ] F) :
     (S ∘L T ∘L S†).IsPositive :=
   by
@@ -106,13 +118,17 @@ theorem IsPositive.conj_adjoint {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : E
   rw [re_apply_inner_self, comp_apply, ← adjoint_inner_right]
   exact hT.inner_nonneg_left _
 #align continuous_linear_map.is_positive.conj_adjoint ContinuousLinearMap.IsPositive.conj_adjoint
+-/
 
+#print ContinuousLinearMap.IsPositive.adjoint_conj /-
 theorem IsPositive.adjoint_conj {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]
 #align continuous_linear_map.is_positive.adjoint_conj ContinuousLinearMap.IsPositive.adjoint_conj
+-/
 
+#print ContinuousLinearMap.IsPositive.conj_orthogonalProjection /-
 theorem IsPositive.conj_orthogonalProjection (U : Submodule π•œ E) {T : E β†’L[π•œ] E} (hT : T.IsPositive)
     [CompleteSpace U] :
     (U.subtypeL ∘L
@@ -121,18 +137,22 @@ theorem IsPositive.conj_orthogonalProjection (U : Submodule π•œ E) {T : E β†’L[
   have := hT.conj_adjoint (U.subtypeL ∘L orthogonalProjection U)
   rwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this 
 #align continuous_linear_map.is_positive.conj_orthogonal_projection ContinuousLinearMap.IsPositive.conj_orthogonalProjection
+-/
 
+#print ContinuousLinearMap.IsPositive.orthogonalProjection_comp /-
 theorem IsPositive.orthogonalProjection_comp {T : E β†’L[π•œ] E} (hT : T.IsPositive) (U : Submodule π•œ E)
     [CompleteSpace U] : (orthogonalProjection U ∘L T ∘L U.subtypeL).IsPositive :=
   by
   have := hT.conj_adjoint (orthogonalProjection U : E β†’L[π•œ] U)
   rwa [U.adjoint_orthogonal_projection] at this 
 #align continuous_linear_map.is_positive.orthogonal_projection_comp ContinuousLinearMap.IsPositive.orthogonalProjection_comp
+-/
 
 section Complex
 
 variable {E' : Type _} [NormedAddCommGroup E'] [InnerProductSpace β„‚ E'] [CompleteSpace E']
 
+#print ContinuousLinearMap.isPositive_iff_complex /-
 theorem isPositive_iff_complex (T : E' β†’L[β„‚] E') :
     IsPositive T ↔ βˆ€ x, (re βŸͺT x, x⟫_β„‚ : β„‚) = βŸͺT x, x⟫_β„‚ ∧ 0 ≀ re βŸͺT x, x⟫_β„‚ :=
   by
@@ -140,6 +160,7 @@ theorem isPositive_iff_complex (T : E' β†’L[β„‚] E') :
     LinearMap.isSymmetric_iff_inner_map_self_real, conj_eq_iff_re]
   rfl
 #align continuous_linear_map.is_positive_iff_complex ContinuousLinearMap.isPositive_iff_complex
+-/
 
 end Complex
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anatole Dedecker
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.positive
-! leanprover-community/mathlib commit caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c
+! leanprover-community/mathlib commit 2ebc1d6c2fed9f54c95bbc3998eaa5570527129a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.Analysis.InnerProductSpace.Adjoint
 /-!
 # Positive operators
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we define positive operators in a Hilbert space. We follow Bourbaki's choice
 of requiring self adjointness in the definition.
 
Diff
@@ -56,11 +56,13 @@ variable [CompleteSpace E] [CompleteSpace F]
 -- mathport name: Β«exprβŸͺ , ⟫»
 local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y
 
+#print ContinuousLinearMap.IsPositive /-
 /-- A continuous linear endomorphism `T` of a Hilbert space is **positive** if it is self adjoint
   and `βˆ€ x, 0 ≀ re βŸͺT x, x⟫`. -/
 def IsPositive (T : E β†’L[π•œ] E) : Prop :=
   IsSelfAdjoint T ∧ βˆ€ x, 0 ≀ T.reApplyInnerSelf x
 #align continuous_linear_map.is_positive ContinuousLinearMap.IsPositive
+-/
 
 theorem IsPositive.isSelfAdjoint {T : E β†’L[π•œ] E} (hT : IsPositive T) : IsSelfAdjoint T :=
   hT.1
@@ -114,14 +116,14 @@ theorem IsPositive.conj_orthogonalProjection (U : Submodule π•œ E) {T : E β†’L[
         orthogonalProjection U ∘L T ∘L U.subtypeL ∘L orthogonalProjection U).IsPositive :=
   by
   have := hT.conj_adjoint (U.subtypeL ∘L orthogonalProjection U)
-  rwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this
+  rwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this 
 #align continuous_linear_map.is_positive.conj_orthogonal_projection ContinuousLinearMap.IsPositive.conj_orthogonalProjection
 
 theorem IsPositive.orthogonalProjection_comp {T : E β†’L[π•œ] E} (hT : T.IsPositive) (U : Submodule π•œ E)
     [CompleteSpace U] : (orthogonalProjection U ∘L T ∘L U.subtypeL).IsPositive :=
   by
   have := hT.conj_adjoint (orthogonalProjection U : E β†’L[π•œ] U)
-  rwa [U.adjoint_orthogonal_projection] at this
+  rwa [U.adjoint_orthogonal_projection] at this 
 #align continuous_linear_map.is_positive.orthogonal_projection_comp ContinuousLinearMap.IsPositive.orthogonalProjection_comp
 
 section Complex
Diff
@@ -41,7 +41,7 @@ Positive operator
 
 open InnerProductSpace IsROrC ContinuousLinearMap
 
-open InnerProduct ComplexConjugate
+open scoped InnerProduct ComplexConjugate
 
 namespace ContinuousLinearMap
 
Diff
@@ -75,16 +75,16 @@ theorem IsPositive.inner_nonneg_right {T : E β†’L[π•œ] E} (hT : IsPositive T) (
     0 ≀ re βŸͺx, T x⟫ := by rw [inner_re_symm] <;> exact hT.inner_nonneg_left x
 #align continuous_linear_map.is_positive.inner_nonneg_right ContinuousLinearMap.IsPositive.inner_nonneg_right
 
-theorem isPositiveZero : IsPositive (0 : E β†’L[π•œ] E) :=
+theorem isPositive_zero : IsPositive (0 : E β†’L[π•œ] E) :=
   by
   refine' ⟨isSelfAdjoint_zero _, fun x => _⟩
   change 0 ≀ re βŸͺ_, _⟫
   rw [zero_apply, inner_zero_left, ZeroHomClass.map_zero]
-#align continuous_linear_map.is_positive_zero ContinuousLinearMap.isPositiveZero
+#align continuous_linear_map.is_positive_zero ContinuousLinearMap.isPositive_zero
 
-theorem isPositiveOne : IsPositive (1 : E β†’L[π•œ] E) :=
+theorem isPositive_one : IsPositive (1 : E β†’L[π•œ] E) :=
   ⟨isSelfAdjoint_one _, fun x => inner_self_nonneg⟩
-#align continuous_linear_map.is_positive_one ContinuousLinearMap.isPositiveOne
+#align continuous_linear_map.is_positive_one ContinuousLinearMap.isPositive_one
 
 theorem IsPositive.add {T S : E β†’L[π•œ] E} (hT : T.IsPositive) (hS : S.IsPositive) :
     (T + S).IsPositive :=
@@ -94,35 +94,35 @@ theorem IsPositive.add {T S : E β†’L[π•œ] E} (hT : T.IsPositive) (hS : S.IsPosi
   exact add_nonneg (hT.inner_nonneg_left x) (hS.inner_nonneg_left x)
 #align continuous_linear_map.is_positive.add ContinuousLinearMap.IsPositive.add
 
-theorem IsPositive.conjAdjoint {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : E β†’L[π•œ] F) :
+theorem IsPositive.conj_adjoint {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : E β†’L[π•œ] F) :
     (S ∘L T ∘L S†).IsPositive :=
   by
   refine' ⟨hT.is_self_adjoint.conj_adjoint S, fun x => _⟩
   rw [re_apply_inner_self, comp_apply, ← adjoint_inner_right]
   exact hT.inner_nonneg_left _
-#align continuous_linear_map.is_positive.conj_adjoint ContinuousLinearMap.IsPositive.conjAdjoint
+#align continuous_linear_map.is_positive.conj_adjoint ContinuousLinearMap.IsPositive.conj_adjoint
 
-theorem IsPositive.adjointConj {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : F β†’L[π•œ] E) :
+theorem IsPositive.adjoint_conj {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]
-#align continuous_linear_map.is_positive.adjoint_conj ContinuousLinearMap.IsPositive.adjointConj
+#align continuous_linear_map.is_positive.adjoint_conj ContinuousLinearMap.IsPositive.adjoint_conj
 
-theorem IsPositive.conjOrthogonalProjection (U : Submodule π•œ E) {T : E β†’L[π•œ] E} (hT : T.IsPositive)
+theorem IsPositive.conj_orthogonalProjection (U : Submodule π•œ E) {T : E β†’L[π•œ] E} (hT : T.IsPositive)
     [CompleteSpace U] :
     (U.subtypeL ∘L
         orthogonalProjection U ∘L T ∘L U.subtypeL ∘L orthogonalProjection U).IsPositive :=
   by
   have := hT.conj_adjoint (U.subtypeL ∘L orthogonalProjection U)
   rwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this
-#align continuous_linear_map.is_positive.conj_orthogonal_projection ContinuousLinearMap.IsPositive.conjOrthogonalProjection
+#align continuous_linear_map.is_positive.conj_orthogonal_projection ContinuousLinearMap.IsPositive.conj_orthogonalProjection
 
-theorem IsPositive.orthogonalProjectionComp {T : E β†’L[π•œ] E} (hT : T.IsPositive) (U : Submodule π•œ E)
+theorem IsPositive.orthogonalProjection_comp {T : E β†’L[π•œ] E} (hT : T.IsPositive) (U : Submodule π•œ E)
     [CompleteSpace U] : (orthogonalProjection U ∘L T ∘L U.subtypeL).IsPositive :=
   by
   have := hT.conj_adjoint (orthogonalProjection U : E β†’L[π•œ] U)
   rwa [U.adjoint_orthogonal_projection] at this
-#align continuous_linear_map.is_positive.orthogonal_projection_comp ContinuousLinearMap.IsPositive.orthogonalProjectionComp
+#align continuous_linear_map.is_positive.orthogonal_projection_comp ContinuousLinearMap.IsPositive.orthogonalProjection_comp
 
 section Complex
 
Diff
@@ -75,16 +75,16 @@ theorem IsPositive.inner_nonneg_right {T : E β†’L[π•œ] E} (hT : IsPositive T) (
     0 ≀ re βŸͺx, T x⟫ := by rw [inner_re_symm] <;> exact hT.inner_nonneg_left x
 #align continuous_linear_map.is_positive.inner_nonneg_right ContinuousLinearMap.IsPositive.inner_nonneg_right
 
-theorem isPositive_zero : IsPositive (0 : E β†’L[π•œ] E) :=
+theorem isPositiveZero : IsPositive (0 : E β†’L[π•œ] E) :=
   by
   refine' ⟨isSelfAdjoint_zero _, fun x => _⟩
   change 0 ≀ re βŸͺ_, _⟫
   rw [zero_apply, inner_zero_left, ZeroHomClass.map_zero]
-#align continuous_linear_map.is_positive_zero ContinuousLinearMap.isPositive_zero
+#align continuous_linear_map.is_positive_zero ContinuousLinearMap.isPositiveZero
 
-theorem isPositive_one : IsPositive (1 : E β†’L[π•œ] E) :=
+theorem isPositiveOne : IsPositive (1 : E β†’L[π•œ] E) :=
   ⟨isSelfAdjoint_one _, fun x => inner_self_nonneg⟩
-#align continuous_linear_map.is_positive_one ContinuousLinearMap.isPositive_one
+#align continuous_linear_map.is_positive_one ContinuousLinearMap.isPositiveOne
 
 theorem IsPositive.add {T S : E β†’L[π•œ] E} (hT : T.IsPositive) (hS : S.IsPositive) :
     (T + S).IsPositive :=
@@ -94,35 +94,35 @@ theorem IsPositive.add {T S : E β†’L[π•œ] E} (hT : T.IsPositive) (hS : S.IsPosi
   exact add_nonneg (hT.inner_nonneg_left x) (hS.inner_nonneg_left x)
 #align continuous_linear_map.is_positive.add ContinuousLinearMap.IsPositive.add
 
-theorem IsPositive.conj_adjoint {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : E β†’L[π•œ] F) :
+theorem IsPositive.conjAdjoint {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : E β†’L[π•œ] F) :
     (S ∘L T ∘L S†).IsPositive :=
   by
   refine' ⟨hT.is_self_adjoint.conj_adjoint S, fun x => _⟩
   rw [re_apply_inner_self, comp_apply, ← adjoint_inner_right]
   exact hT.inner_nonneg_left _
-#align continuous_linear_map.is_positive.conj_adjoint ContinuousLinearMap.IsPositive.conj_adjoint
+#align continuous_linear_map.is_positive.conj_adjoint ContinuousLinearMap.IsPositive.conjAdjoint
 
-theorem IsPositive.adjoint_conj {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : F β†’L[π•œ] E) :
+theorem IsPositive.adjointConj {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]
-#align continuous_linear_map.is_positive.adjoint_conj ContinuousLinearMap.IsPositive.adjoint_conj
+#align continuous_linear_map.is_positive.adjoint_conj ContinuousLinearMap.IsPositive.adjointConj
 
-theorem IsPositive.conj_orthogonalProjection (U : Submodule π•œ E) {T : E β†’L[π•œ] E} (hT : T.IsPositive)
+theorem IsPositive.conjOrthogonalProjection (U : Submodule π•œ E) {T : E β†’L[π•œ] E} (hT : T.IsPositive)
     [CompleteSpace U] :
     (U.subtypeL ∘L
         orthogonalProjection U ∘L T ∘L U.subtypeL ∘L orthogonalProjection U).IsPositive :=
   by
   have := hT.conj_adjoint (U.subtypeL ∘L orthogonalProjection U)
   rwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this
-#align continuous_linear_map.is_positive.conj_orthogonal_projection ContinuousLinearMap.IsPositive.conj_orthogonalProjection
+#align continuous_linear_map.is_positive.conj_orthogonal_projection ContinuousLinearMap.IsPositive.conjOrthogonalProjection
 
-theorem IsPositive.orthogonalProjection_comp {T : E β†’L[π•œ] E} (hT : T.IsPositive) (U : Submodule π•œ E)
+theorem IsPositive.orthogonalProjectionComp {T : E β†’L[π•œ] E} (hT : T.IsPositive) (U : Submodule π•œ E)
     [CompleteSpace U] : (orthogonalProjection U ∘L T ∘L U.subtypeL).IsPositive :=
   by
   have := hT.conj_adjoint (orthogonalProjection U : E β†’L[π•œ] U)
   rwa [U.adjoint_orthogonal_projection] at this
-#align continuous_linear_map.is_positive.orthogonal_projection_comp ContinuousLinearMap.IsPositive.orthogonalProjection_comp
+#align continuous_linear_map.is_positive.orthogonal_projection_comp ContinuousLinearMap.IsPositive.orthogonalProjectionComp
 
 section Complex
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anatole Dedecker
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.positive
-! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
+! leanprover-community/mathlib commit caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -132,7 +132,7 @@ theorem isPositive_iff_complex (T : E' β†’L[β„‚] E') :
     IsPositive T ↔ βˆ€ x, (re βŸͺT x, x⟫_β„‚ : β„‚) = βŸͺT x, x⟫_β„‚ ∧ 0 ≀ re βŸͺT x, x⟫_β„‚ :=
   by
   simp_rw [is_positive, forall_and, is_self_adjoint_iff_is_symmetric,
-    LinearMap.isSymmetric_iff_inner_map_self_real, eq_conj_iff_re]
+    LinearMap.isSymmetric_iff_inner_map_self_real, conj_eq_iff_re]
   rfl
 #align continuous_linear_map.is_positive_iff_complex ContinuousLinearMap.isPositive_iff_complex
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anatole Dedecker
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.positive
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -45,8 +45,13 @@ open InnerProduct ComplexConjugate
 
 namespace ContinuousLinearMap
 
-variable {π•œ E F : Type _} [IsROrC π•œ] [InnerProductSpace π•œ E] [InnerProductSpace π•œ F]
-  [CompleteSpace E] [CompleteSpace F]
+variable {π•œ E F : Type _} [IsROrC π•œ]
+
+variable [NormedAddCommGroup E] [NormedAddCommGroup F]
+
+variable [InnerProductSpace π•œ E] [InnerProductSpace π•œ F]
+
+variable [CompleteSpace E] [CompleteSpace F]
 
 -- mathport name: Β«exprβŸͺ , ⟫»
 local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y
@@ -121,7 +126,7 @@ theorem IsPositive.orthogonalProjection_comp {T : E β†’L[π•œ] E} (hT : T.IsPosi
 
 section Complex
 
-variable {E' : Type _} [InnerProductSpace β„‚ E'] [CompleteSpace E']
+variable {E' : Type _} [NormedAddCommGroup E'] [InnerProductSpace β„‚ E'] [CompleteSpace E']
 
 theorem isPositive_iff_complex (T : E' β†’L[β„‚] E') :
     IsPositive T ↔ βˆ€ x, (re βŸͺT x, x⟫_β„‚ : β„‚) = βŸͺT x, x⟫_β„‚ ∧ 0 ≀ re βŸͺT x, x⟫_β„‚ :=
Diff
@@ -70,16 +70,16 @@ theorem IsPositive.inner_nonneg_right {T : E β†’L[π•œ] E} (hT : IsPositive T) (
     0 ≀ re βŸͺx, T x⟫ := by rw [inner_re_symm] <;> exact hT.inner_nonneg_left x
 #align continuous_linear_map.is_positive.inner_nonneg_right ContinuousLinearMap.IsPositive.inner_nonneg_right
 
-theorem isPositiveZero : IsPositive (0 : E β†’L[π•œ] E) :=
+theorem isPositive_zero : IsPositive (0 : E β†’L[π•œ] E) :=
   by
   refine' ⟨isSelfAdjoint_zero _, fun x => _⟩
   change 0 ≀ re βŸͺ_, _⟫
   rw [zero_apply, inner_zero_left, ZeroHomClass.map_zero]
-#align continuous_linear_map.is_positive_zero ContinuousLinearMap.isPositiveZero
+#align continuous_linear_map.is_positive_zero ContinuousLinearMap.isPositive_zero
 
-theorem isPositiveOne : IsPositive (1 : E β†’L[π•œ] E) :=
+theorem isPositive_one : IsPositive (1 : E β†’L[π•œ] E) :=
   ⟨isSelfAdjoint_one _, fun x => inner_self_nonneg⟩
-#align continuous_linear_map.is_positive_one ContinuousLinearMap.isPositiveOne
+#align continuous_linear_map.is_positive_one ContinuousLinearMap.isPositive_one
 
 theorem IsPositive.add {T S : E β†’L[π•œ] E} (hT : T.IsPositive) (hS : S.IsPositive) :
     (T + S).IsPositive :=
@@ -89,35 +89,35 @@ theorem IsPositive.add {T S : E β†’L[π•œ] E} (hT : T.IsPositive) (hS : S.IsPosi
   exact add_nonneg (hT.inner_nonneg_left x) (hS.inner_nonneg_left x)
 #align continuous_linear_map.is_positive.add ContinuousLinearMap.IsPositive.add
 
-theorem IsPositive.conjAdjoint {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : E β†’L[π•œ] F) :
+theorem IsPositive.conj_adjoint {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : E β†’L[π•œ] F) :
     (S ∘L T ∘L S†).IsPositive :=
   by
   refine' ⟨hT.is_self_adjoint.conj_adjoint S, fun x => _⟩
   rw [re_apply_inner_self, comp_apply, ← adjoint_inner_right]
   exact hT.inner_nonneg_left _
-#align continuous_linear_map.is_positive.conj_adjoint ContinuousLinearMap.IsPositive.conjAdjoint
+#align continuous_linear_map.is_positive.conj_adjoint ContinuousLinearMap.IsPositive.conj_adjoint
 
-theorem IsPositive.adjointConj {T : E β†’L[π•œ] E} (hT : T.IsPositive) (S : F β†’L[π•œ] E) :
+theorem IsPositive.adjoint_conj {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]
-#align continuous_linear_map.is_positive.adjoint_conj ContinuousLinearMap.IsPositive.adjointConj
+#align continuous_linear_map.is_positive.adjoint_conj ContinuousLinearMap.IsPositive.adjoint_conj
 
-theorem IsPositive.conjOrthogonalProjection (U : Submodule π•œ E) {T : E β†’L[π•œ] E} (hT : T.IsPositive)
+theorem IsPositive.conj_orthogonalProjection (U : Submodule π•œ E) {T : E β†’L[π•œ] E} (hT : T.IsPositive)
     [CompleteSpace U] :
     (U.subtypeL ∘L
         orthogonalProjection U ∘L T ∘L U.subtypeL ∘L orthogonalProjection U).IsPositive :=
   by
   have := hT.conj_adjoint (U.subtypeL ∘L orthogonalProjection U)
   rwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this
-#align continuous_linear_map.is_positive.conj_orthogonal_projection ContinuousLinearMap.IsPositive.conjOrthogonalProjection
+#align continuous_linear_map.is_positive.conj_orthogonal_projection ContinuousLinearMap.IsPositive.conj_orthogonalProjection
 
-theorem IsPositive.orthogonalProjectionComp {T : E β†’L[π•œ] E} (hT : T.IsPositive) (U : Submodule π•œ E)
+theorem IsPositive.orthogonalProjection_comp {T : E β†’L[π•œ] E} (hT : T.IsPositive) (U : Submodule π•œ E)
     [CompleteSpace U] : (orthogonalProjection U ∘L T ∘L U.subtypeL).IsPositive :=
   by
   have := hT.conj_adjoint (orthogonalProjection U : E β†’L[π•œ] U)
   rwa [U.adjoint_orthogonal_projection] at this
-#align continuous_linear_map.is_positive.orthogonal_projection_comp ContinuousLinearMap.IsPositive.orthogonalProjectionComp
+#align continuous_linear_map.is_positive.orthogonal_projection_comp ContinuousLinearMap.IsPositive.orthogonalProjection_comp
 
 section Complex
 

Changes in mathlib4

mathlib3
mathlib4
feat: add the Loewner partial order on continuous linear maps on a Hilbert space (#12026)

The (Loewner) partial order on continuous linear maps on a Hilbert space determined by f ≀ g if and only if g - f is a positive linear map (in the sense of ContinuousLinearMap.IsPositive). With this partial order, the continuous linear maps form a StarOrderedRing.

Diff
@@ -125,4 +125,34 @@ theorem isPositive_iff_complex (T : E' β†’L[β„‚] E') :
 
 end Complex
 
+section PartialOrder
+
+/-- The (Loewner) partial order on continuous linear maps on a Hilbert space determined by
+`f ≀ g` if and only if `g - f` is a positive linear map (in the sense of
+`ContinuousLinearMap.IsPositive`). With this partial order, the continuous linear maps form a
+`StarOrderedRing`. -/
+instance instLoewnerPartialOrder : PartialOrder (E β†’L[π•œ] E) where
+  le f g := (g - f).IsPositive
+  le_refl _ := by simpa using isPositive_zero
+  le_trans _ _ _ h₁ hβ‚‚ := by simpa using h₁.add hβ‚‚
+  le_antisymm f₁ fβ‚‚ h₁ hβ‚‚ := by
+    rw [← sub_eq_zero]
+    have h_isSymm := isSelfAdjoint_iff_isSymmetric.mp hβ‚‚.isSelfAdjoint
+    exact_mod_cast h_isSymm.inner_map_self_eq_zero.mp fun x ↦ by
+      apply RCLike.ext
+      Β· rw [map_zero]
+        apply le_antisymm
+        Β· rw [← neg_nonneg, ← map_neg, ← inner_neg_left]
+          simpa using h₁.inner_nonneg_left _
+        Β· exact hβ‚‚.inner_nonneg_left _
+      Β· rw [coe_sub, LinearMap.sub_apply, coe_coe, coe_coe, map_zero, ← sub_apply,
+          ← h_isSymm.coe_reApplyInnerSelf_apply (T := f₁ - fβ‚‚) x, RCLike.ofReal_im]
+
+lemma le_def (f g : E β†’L[π•œ] E) : f ≀ g ↔ (g - f).IsPositive := Iff.rfl
+
+lemma nonneg_iff_isPositive (f : E β†’L[π•œ] E) : 0 ≀ f ↔ f.IsPositive := by
+  simpa using le_def 0 f
+
+end PartialOrder
+
 end ContinuousLinearMap
chore: Rename IsROrC to RCLike (#10819)

IsROrC contains data, which goes against the expectation that classes prefixed with Is are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC to RCLike.

Diff
@@ -36,13 +36,13 @@ Positive operator
 -/
 
 
-open InnerProductSpace IsROrC ContinuousLinearMap
+open InnerProductSpace RCLike ContinuousLinearMap
 
 open scoped InnerProduct ComplexConjugate
 
 namespace ContinuousLinearMap
 
-variable {π•œ E F : Type*} [IsROrC π•œ]
+variable {π•œ E F : Type*} [RCLike π•œ]
 variable [NormedAddCommGroup E] [NormedAddCommGroup F]
 variable [InnerProductSpace π•œ E] [InnerProductSpace π•œ F]
 variable [CompleteSpace E] [CompleteSpace F]
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -43,11 +43,8 @@ open scoped InnerProduct ComplexConjugate
 namespace ContinuousLinearMap
 
 variable {π•œ E F : Type*} [IsROrC π•œ]
-
 variable [NormedAddCommGroup E] [NormedAddCommGroup F]
-
 variable [InnerProductSpace π•œ E] [InnerProductSpace π•œ F]
-
 variable [CompleteSpace E] [CompleteSpace F]
 
 local notation "βŸͺ" x ", " y "⟫" => @inner π•œ _ _ x y
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -42,7 +42,7 @@ open scoped InnerProduct ComplexConjugate
 
 namespace ContinuousLinearMap
 
-variable {π•œ E F : Type _} [IsROrC π•œ]
+variable {π•œ E F : Type*} [IsROrC π•œ]
 
 variable [NormedAddCommGroup E] [NormedAddCommGroup F]
 
@@ -117,7 +117,7 @@ theorem IsPositive.orthogonalProjection_comp {T : E β†’L[π•œ] E} (hT : T.IsPosi
 
 section Complex
 
-variable {E' : Type _} [NormedAddCommGroup E'] [InnerProductSpace β„‚ E'] [CompleteSpace E']
+variable {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace β„‚ E'] [CompleteSpace 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
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2022 Anatole Dedecker. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Anatole Dedecker
-
-! This file was ported from Lean 3 source module analysis.inner_product_space.positive
-! leanprover-community/mathlib commit caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.InnerProductSpace.Adjoint
 
+#align_import analysis.inner_product_space.positive from "leanprover-community/mathlib"@"caa58cbf5bfb7f81ccbaca4e8b8ac4bc2b39cc1c"
+
 /-!
 # Positive operators
 
feat: port Analysis.InnerProductSpace.Positive (#4553)

Dependencies 12 + 917

918 files ported (98.7%)
405847 lines ported (98.6%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file