analysis.normed_space.star.continuous_functional_calculusMathlib.Analysis.NormedSpace.Star.ContinuousFunctionalCalculus

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -189,8 +189,8 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
         _ = spectralRadius ℂ (algebraMap ℂ A ‖star a * a‖ - star a * a) :=
           by
           refine' (IsSelfAdjoint.spectralRadius_eq_nnnorm _).symm
-          rw [IsSelfAdjoint, star_sub, star_mul, star_star, ← algebraMap_star_comm, IsROrC.star_def,
-            IsROrC.conj_ofReal]
+          rw [IsSelfAdjoint, star_sub, star_mul, star_star, ← algebraMap_star_comm, RCLike.star_def,
+            RCLike.conj_ofReal]
         _ < ‖star a * a‖₊ := spectrum.spectralRadius_lt_of_forall_lt _ h₂)
 #align elemental_star_algebra.is_unit_of_is_unit_of_is_star_normal elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal
 -/
Diff
@@ -162,20 +162,20 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
   have h₂ : ∀ z ∈ spectrum ℂ (algebraMap ℂ A ‖star a * a‖ - star a * a), ‖z‖₊ < ‖star a * a‖₊ :=
     by
     intro z hz
-    rw [← spectrum.singleton_sub_eq, Set.singleton_sub] at hz 
+    rw [← spectrum.singleton_sub_eq, Set.singleton_sub] at hz
     have h₃ : z ∈ Set.Icc (0 : ℂ) ‖star a * a‖ :=
       by
       replace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz
-      rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz 
+      rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz
     refine' lt_of_le_of_ne (Complex.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _
     · intro hz'
       replace hz' := congr_arg (fun x : ℝ≥0 => ((x : ℝ) : ℂ)) hz'
-      simp only [coe_nnnorm] at hz' 
-      rw [← Complex.eq_coe_norm_of_nonneg h₃.1] at hz' 
+      simp only [coe_nnnorm] at hz'
+      rw [← Complex.eq_coe_norm_of_nonneg h₃.1] at hz'
       obtain ⟨w, hw₁, hw₂⟩ := hz
       refine' (spectrum.zero_not_mem_iff ℂ).mpr h _
-      rw [hz', sub_eq_self] at hw₂ 
-      rwa [hw₂] at hw₁ 
+      rw [hz', sub_eq_self] at hw₂
+      rwa [hw₂] at hw₁
   /- The norm of `‖star a * a‖ • 1 - star a * a` in the subalgebra and in `A` coincide. In `A`,
     because this element is selfadjoint, by `is_self_adjoint.spectral_radius_eq_nnnorm`, its norm is
     the supremum of the norms of the elements of the spectrum, which is strictly less than
@@ -284,7 +284,7 @@ theorem elementalStarAlgebra.bijective_characterSpaceToSpectrum :
   rintro ⟨z, hz⟩
   have hz' :=
     (StarSubalgebra.spectrum_eq (elementalStarAlgebra.isClosed ℂ a) ⟨a, self_mem ℂ a⟩).symm.subst hz
-  rw [character_space.mem_spectrum_iff_exists] at hz' 
+  rw [character_space.mem_spectrum_iff_exists] at hz'
   obtain ⟨φ, rfl⟩ := hz'
   exact ⟨φ, rfl⟩
 #align elemental_star_algebra.bijective_character_space_to_spectrum elementalStarAlgebra.bijective_characterSpaceToSpectrum
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Jireh Loreaux. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jireh Loreaux
 -/
-import Mathbin.Analysis.NormedSpace.Star.GelfandDuality
-import Mathbin.Topology.Algebra.StarSubalgebra
+import Analysis.NormedSpace.Star.GelfandDuality
+import Topology.Algebra.StarSubalgebra
 
 #align_import analysis.normed_space.star.continuous_functional_calculus from "leanprover-community/mathlib"@"44e2ae8cffc713925494e4975ee31ec1d06929b3"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Jireh Loreaux. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jireh Loreaux
-
-! This file was ported from Lean 3 source module analysis.normed_space.star.continuous_functional_calculus
-! leanprover-community/mathlib commit 44e2ae8cffc713925494e4975ee31ec1d06929b3
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.NormedSpace.Star.GelfandDuality
 import Mathbin.Topology.Algebra.StarSubalgebra
 
+#align_import analysis.normed_space.star.continuous_functional_calculus from "leanprover-community/mathlib"@"44e2ae8cffc713925494e4975ee31ec1d06929b3"
+
 /-! # Continuous functional calculus
 
 > THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jireh Loreaux
 
 ! This file was ported from Lean 3 source module analysis.normed_space.star.continuous_functional_calculus
-! leanprover-community/mathlib commit 31c24aa72e7b3e5ed97a8412470e904f82b81004
+! leanprover-community/mathlib commit 44e2ae8cffc713925494e4975ee31ec1d06929b3
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.Topology.Algebra.StarSubalgebra
 
 /-! # Continuous functional calculus
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we construct the `continuous_functional_calculus` for a normal element `a` of a
 (unital) C⋆-algebra over `ℂ`. This is a star algebra equivalence
 `C(spectrum ℂ a, ℂ) ≃⋆ₐ[ℂ] elemental_star_algebra ℂ a` which sends the (restriction of) the
Diff
@@ -88,6 +88,7 @@ noncomputable instance elementalStarAlgebra.Complex.normedAlgebra (a : A) :
 
 variable [CompleteSpace A] (a : A) [IsStarNormal a] (S : StarSubalgebra ℂ A)
 
+#print spectrum_star_mul_self_of_isStarNormal /-
 /-- This lemma is used in the proof of `star_subalgebra.is_unit_of_is_unit_of_is_star_normal`,
 which in turn is the key to spectral permanence `star_subalgebra.spectrum_eq`, which is itself
 necessary for the continuous functional calculus. Using the continuous functional calculus, this
@@ -110,9 +111,11 @@ theorem spectrum_star_mul_self_of_isStarNormal :
       ⟨Complex.zero_le_real.2 (norm_nonneg _),
         Complex.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩
 #align spectrum_star_mul_self_of_is_star_normal spectrum_star_mul_self_of_isStarNormal
+-/
 
 variable {a}
 
+#print elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal /-
 /-- This is the key lemma on the way to establishing spectral permanence for C⋆-algebras, which is
 established in `star_subalgebra.spectrum_eq`. This lemma is superseded by
 `star_subalgebra.coe_is_unit`, which does not require an `is_star_normal` hypothesis and holds for
@@ -190,7 +193,9 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
             IsROrC.conj_ofReal]
         _ < ‖star a * a‖₊ := spectrum.spectralRadius_lt_of_forall_lt _ h₂)
 #align elemental_star_algebra.is_unit_of_is_unit_of_is_star_normal elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal
+-/
 
+#print StarSubalgebra.isUnit_coe_inv_mem /-
 /-- For `x : A` which is invertible in `A`, the inverse lies in any unital C⋆-subalgebra `S`
 containing `x`. -/
 theorem StarSubalgebra.isUnit_coe_inv_mem {S : StarSubalgebra ℂ A} (hS : IsClosed (S : Set A))
@@ -207,7 +212,9 @@ theorem StarSubalgebra.isUnit_coe_inv_mem {S : StarSubalgebra ℂ A} (hS : IsClo
   convert (↑hx'.unit⁻¹ : elementalStarAlgebra ℂ (star x * x)).Prop using 1
   exact left_inv_eq_right_inv hx.unit.inv_mul (congr_arg coe hx'.unit.mul_inv)
 #align star_subalgebra.is_unit_coe_inv_mem StarSubalgebra.isUnit_coe_inv_mem
+-/
 
+#print StarSubalgebra.coe_isUnit /-
 /-- For a unital C⋆-subalgebra `S` of `A` and `x : S`, if `↑x : A` is invertible in `A`, then
 `x` is invertible in `S`. -/
 theorem StarSubalgebra.coe_isUnit {S : StarSubalgebra ℂ A} (hS : IsClosed (S : Set A)) {x : S} :
@@ -218,21 +225,27 @@ theorem StarSubalgebra.coe_isUnit {S : StarSubalgebra ℂ A} (hS : IsClosed (S :
       fun hx => hx.map S.subtype⟩
   exacts [Subtype.coe_injective hx.mul_coe_inv, Subtype.coe_injective hx.coe_inv_mul]
 #align star_subalgebra.coe_is_unit StarSubalgebra.coe_isUnit
+-/
 
+#print StarSubalgebra.mem_spectrum_iff /-
 theorem StarSubalgebra.mem_spectrum_iff {S : StarSubalgebra ℂ A} (hS : IsClosed (S : Set A)) {x : S}
     {z : ℂ} : z ∈ spectrum ℂ x ↔ z ∈ spectrum ℂ (x : A) :=
   not_iff_not.2 (StarSubalgebra.coe_isUnit hS).symm
 #align star_subalgebra.mem_spectrum_iff StarSubalgebra.mem_spectrum_iff
+-/
 
+#print StarSubalgebra.spectrum_eq /-
 /-- **Spectral permanence.** The spectrum of an element is invariant of the (closed)
 `star_subalgebra` in which it is contained. -/
 theorem StarSubalgebra.spectrum_eq {S : StarSubalgebra ℂ A} (hS : IsClosed (S : Set A)) (x : S) :
     spectrum ℂ x = spectrum ℂ (x : A) :=
   Set.ext fun z => StarSubalgebra.mem_spectrum_iff hS
 #align star_subalgebra.spectrum_eq StarSubalgebra.spectrum_eq
+-/
 
 variable (a)
 
+#print elementalStarAlgebra.characterSpaceToSpectrum /-
 /-- The natural map from `character_space ℂ (elemental_star_algebra ℂ x)` to `spectrum ℂ x` given
 by evaluating `φ` at `x`. This is essentially just evaluation of the `gelfand_transform` of `x`,
 but because we want something in `spectrum ℂ x`, as opposed to
@@ -247,13 +260,17 @@ noncomputable def elementalStarAlgebra.characterSpaceToSpectrum (x : A)
         ⟨x, self_mem ℂ x⟩] using
       AlgHom.apply_mem_spectrum φ ⟨x, self_mem ℂ x⟩
 #align elemental_star_algebra.character_space_to_spectrum elementalStarAlgebra.characterSpaceToSpectrum
+-/
 
+#print elementalStarAlgebra.continuous_characterSpaceToSpectrum /-
 theorem elementalStarAlgebra.continuous_characterSpaceToSpectrum (x : A) :
     Continuous (elementalStarAlgebra.characterSpaceToSpectrum x) :=
   continuous_induced_rng.2
     (map_continuous <| gelfandTransform ℂ (elementalStarAlgebra ℂ x) ⟨x, self_mem ℂ x⟩)
 #align elemental_star_algebra.continuous_character_space_to_spectrum elementalStarAlgebra.continuous_characterSpaceToSpectrum
+-/
 
+#print elementalStarAlgebra.bijective_characterSpaceToSpectrum /-
 theorem elementalStarAlgebra.bijective_characterSpaceToSpectrum :
     Function.Bijective (elementalStarAlgebra.characterSpaceToSpectrum a) :=
   by
@@ -271,7 +288,9 @@ theorem elementalStarAlgebra.bijective_characterSpaceToSpectrum :
   obtain ⟨φ, rfl⟩ := hz'
   exact ⟨φ, rfl⟩
 #align elemental_star_algebra.bijective_character_space_to_spectrum elementalStarAlgebra.bijective_characterSpaceToSpectrum
+-/
 
+#print elementalStarAlgebra.characterSpaceHomeo /-
 /-- The homeomorphism between the character space of the unital C⋆-subalgebra generated by a
 single normal element `a : A` and `spectrum ℂ a`. -/
 noncomputable def elementalStarAlgebra.characterSpaceHomeo :
@@ -281,7 +300,9 @@ noncomputable def elementalStarAlgebra.characterSpaceHomeo :
       (elementalStarAlgebra.bijective_characterSpaceToSpectrum a))
     (elementalStarAlgebra.continuous_characterSpaceToSpectrum a)
 #align elemental_star_algebra.character_space_homeo elementalStarAlgebra.characterSpaceHomeo
+-/
 
+#print continuousFunctionalCalculus /-
 /-- **Continuous functional calculus.** Given a normal element `a : A` of a unital C⋆-algebra,
 the continuous functional calculus is a `star_alg_equiv` from the complex-valued continuous
 functions on the spectrum of `a` to the unital C⋆-subalgebra generated by `a`. Moreover, this
@@ -292,10 +313,13 @@ noncomputable def continuousFunctionalCalculus :
   ((elementalStarAlgebra.characterSpaceHomeo a).compStarAlgEquiv' ℂ ℂ).trans
     (gelfandStarTransform (elementalStarAlgebra ℂ a)).symm
 #align continuous_functional_calculus continuousFunctionalCalculus
+-/
 
+#print continuousFunctionalCalculus_map_id /-
 theorem continuousFunctionalCalculus_map_id :
     continuousFunctionalCalculus a ((ContinuousMap.id ℂ).restrict (spectrum ℂ a)) =
       ⟨a, self_mem ℂ a⟩ :=
   StarAlgEquiv.symm_apply_apply _ _
 #align continuous_functional_calculus_map_id continuousFunctionalCalculus_map_id
+-/
 
Diff
@@ -188,8 +188,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
           refine' (IsSelfAdjoint.spectralRadius_eq_nnnorm _).symm
           rw [IsSelfAdjoint, star_sub, star_mul, star_star, ← algebraMap_star_comm, IsROrC.star_def,
             IsROrC.conj_ofReal]
-        _ < ‖star a * a‖₊ := spectrum.spectralRadius_lt_of_forall_lt _ h₂
-        )
+        _ < ‖star a * a‖₊ := spectrum.spectralRadius_lt_of_forall_lt _ h₂)
 #align elemental_star_algebra.is_unit_of_is_unit_of_is_star_normal elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal
 
 /-- For `x : A` which is invertible in `A`, the inverse lies in any unital C⋆-subalgebra `S`
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jireh Loreaux
 
 ! This file was ported from Lean 3 source module analysis.normed_space.star.continuous_functional_calculus
-! leanprover-community/mathlib commit f9dd3204df14a0749cd456fac1e6849dfe7d2b88
+! leanprover-community/mathlib commit 31c24aa72e7b3e5ed97a8412470e904f82b81004
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -105,7 +105,7 @@ theorem spectrum_star_mul_self_of_isStarNormal :
     rw [← spectrum.gelfandTransform_eq (star a' * a'), ContinuousMap.spectrum_eq_range]
     rintro - ⟨φ, rfl⟩
     rw [gelfand_transform_apply_apply ℂ _ (star a' * a') φ, map_mul φ, map_star φ]
-    rw [Complex.eq_coe_norm_of_nonneg star_mul_self_nonneg, ← map_star, ← map_mul]
+    rw [Complex.eq_coe_norm_of_nonneg (star_mul_self_nonneg _), ← map_star, ← map_mul]
     exact
       ⟨Complex.zero_le_real.2 (norm_nonneg _),
         Complex.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩
Diff
@@ -205,7 +205,7 @@ theorem StarSubalgebra.isUnit_coe_inv_mem {S : StarSubalgebra ℂ A} (hS : IsClo
   refine' le_of_is_closed_of_mem ℂ hS (mul_mem (star_mem hxS) hxS) _
   haveI := (IsSelfAdjoint.star_mul_self x).IsStarNormal
   have hx' := elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal hx
-  convert(↑hx'.unit⁻¹ : elementalStarAlgebra ℂ (star x * x)).Prop using 1
+  convert (↑hx'.unit⁻¹ : elementalStarAlgebra ℂ (star x * x)).Prop using 1
   exact left_inv_eq_right_inv hx.unit.inv_mul (congr_arg coe hx'.unit.mul_inv)
 #align star_subalgebra.is_unit_coe_inv_mem StarSubalgebra.isUnit_coe_inv_mem
 
Diff
@@ -159,20 +159,20 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
   have h₂ : ∀ z ∈ spectrum ℂ (algebraMap ℂ A ‖star a * a‖ - star a * a), ‖z‖₊ < ‖star a * a‖₊ :=
     by
     intro z hz
-    rw [← spectrum.singleton_sub_eq, Set.singleton_sub] at hz
+    rw [← spectrum.singleton_sub_eq, Set.singleton_sub] at hz 
     have h₃ : z ∈ Set.Icc (0 : ℂ) ‖star a * a‖ :=
       by
       replace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz
-      rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz
+      rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz 
     refine' lt_of_le_of_ne (Complex.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _
     · intro hz'
       replace hz' := congr_arg (fun x : ℝ≥0 => ((x : ℝ) : ℂ)) hz'
-      simp only [coe_nnnorm] at hz'
-      rw [← Complex.eq_coe_norm_of_nonneg h₃.1] at hz'
+      simp only [coe_nnnorm] at hz' 
+      rw [← Complex.eq_coe_norm_of_nonneg h₃.1] at hz' 
       obtain ⟨w, hw₁, hw₂⟩ := hz
       refine' (spectrum.zero_not_mem_iff ℂ).mpr h _
-      rw [hz', sub_eq_self] at hw₂
-      rwa [hw₂] at hw₁
+      rw [hz', sub_eq_self] at hw₂ 
+      rwa [hw₂] at hw₁ 
   /- The norm of `‖star a * a‖ • 1 - star a * a` in the subalgebra and in `A` coincide. In `A`,
     because this element is selfadjoint, by `is_self_adjoint.spectral_radius_eq_nnnorm`, its norm is
     the supremum of the norms of the elements of the spectrum, which is strictly less than
@@ -217,7 +217,7 @@ theorem StarSubalgebra.coe_isUnit {S : StarSubalgebra ℂ A} (hS : IsClosed (S :
   refine'
     ⟨fun hx => ⟨⟨x, ⟨(↑hx.Unit⁻¹ : A), StarSubalgebra.isUnit_coe_inv_mem hS hx x.prop⟩, _, _⟩, rfl⟩,
       fun hx => hx.map S.subtype⟩
-  exacts[Subtype.coe_injective hx.mul_coe_inv, Subtype.coe_injective hx.coe_inv_mul]
+  exacts [Subtype.coe_injective hx.mul_coe_inv, Subtype.coe_injective hx.coe_inv_mul]
 #align star_subalgebra.coe_is_unit StarSubalgebra.coe_isUnit
 
 theorem StarSubalgebra.mem_spectrum_iff {S : StarSubalgebra ℂ A} (hS : IsClosed (S : Set A)) {x : S}
@@ -268,7 +268,7 @@ theorem elementalStarAlgebra.bijective_characterSpaceToSpectrum :
   rintro ⟨z, hz⟩
   have hz' :=
     (StarSubalgebra.spectrum_eq (elementalStarAlgebra.isClosed ℂ a) ⟨a, self_mem ℂ a⟩).symm.subst hz
-  rw [character_space.mem_spectrum_iff_exists] at hz'
+  rw [character_space.mem_spectrum_iff_exists] at hz' 
   obtain ⟨φ, rfl⟩ := hz'
   exact ⟨φ, rfl⟩
 #align elemental_star_algebra.bijective_character_space_to_spectrum elementalStarAlgebra.bijective_characterSpaceToSpectrum
Diff
@@ -149,9 +149,9 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
   set u : Units (elementalStarAlgebra ℂ a) :=
     Units.map (algebraMap ℂ (elementalStarAlgebra ℂ a)).toMonoidHom (Units.mk0 _ h₁)
   refine' ⟨u.unit_of_nearby _ _, rfl⟩
-  simp only [Complex.abs_ofReal, map_inv₀, Units.coe_map, Units.val_inv_eq_inv_val, [anonymous],
-    RingHom.toMonoidHom_eq_coe, Units.val_mk0, Units.coe_map_inv, norm_algebraMap', inv_inv,
-    Complex.norm_eq_abs, abs_norm, Subtype.val_eq_coe, coe_coe]
+  simp only [Complex.abs_ofReal, map_inv₀, Units.coe_map, Units.val_inv_eq_inv_val,
+    RingHom.coe_monoidHom, RingHom.toMonoidHom_eq_coe, Units.val_mk0, Units.coe_map_inv,
+    norm_algebraMap', inv_inv, Complex.norm_eq_abs, abs_norm, Subtype.val_eq_coe, coe_coe]
   /- Since `a` is invertible, by `spectrum_star_mul_self_of_is_star_normal`, the spectrum (in `A`)
     of `star a * a` is contained in the half-open interval `(0, ‖star a * a‖]`. Therefore, by basic
     spectral mapping properties, the spectrum of `‖star a * a‖ • 1 - star a * a` is contained in
Diff
@@ -59,7 +59,7 @@ the continuous functional calculus (including one for real-valued functions with
 applies to self-adjoint elements of the algebra). -/
 
 
-open Pointwise ENNReal NNReal ComplexOrder
+open scoped Pointwise ENNReal NNReal ComplexOrder
 
 open WeakDual WeakDual.characterSpace elementalStarAlgebra
 
Diff
@@ -140,8 +140,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
     if `star a * a` is invertible, then so is `a`. -/
   nontriviality A
   set a' : elementalStarAlgebra ℂ a := ⟨a, self_mem ℂ a⟩
-  suffices : IsUnit (star a' * a')
-  exact (IsUnit.mul_iff.1 this).2
+  suffices : IsUnit (star a' * a'); exact (IsUnit.mul_iff.1 this).2
   replace h := (show Commute (star a) a from star_comm_self' a).isUnit_mul_iff.2 ⟨h.star, h⟩
   /- Since `a` is invertible, `‖star a * a‖ ≠ 0`, so `‖star a * a‖ • 1` is invertible in
     `elemental_star_algebra ℂ a`, and so it suffices to show that the distance between this unit and
@@ -183,9 +182,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
       (calc
         (‖star a' * a' - algebraMap ℂ _ ‖star a * a‖‖₊ : ℝ≥0∞) =
             ‖algebraMap ℂ A ‖star a * a‖ - star a * a‖₊ :=
-          by
-          rw [← nnnorm_neg, neg_sub]
-          rfl
+          by rw [← nnnorm_neg, neg_sub]; rfl
         _ = spectralRadius ℂ (algebraMap ℂ A ‖star a * a‖ - star a * a) :=
           by
           refine' (IsSelfAdjoint.spectralRadius_eq_nnnorm _).symm
Diff
@@ -190,7 +190,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
           by
           refine' (IsSelfAdjoint.spectralRadius_eq_nnnorm _).symm
           rw [IsSelfAdjoint, star_sub, star_mul, star_star, ← algebraMap_star_comm, IsROrC.star_def,
-            IsROrC.conj_of_real]
+            IsROrC.conj_ofReal]
         _ < ‖star a * a‖₊ := spectrum.spectralRadius_lt_of_forall_lt _ h₂
         )
 #align elemental_star_algebra.is_unit_of_is_unit_of_is_star_normal elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jireh Loreaux
 
 ! This file was ported from Lean 3 source module analysis.normed_space.star.continuous_functional_calculus
-! leanprover-community/mathlib commit e65771194f9e923a70dfb49b6ca7be6e400d8b6f
+! leanprover-community/mathlib commit f9dd3204df14a0749cd456fac1e6849dfe7d2b88
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -152,7 +152,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
   refine' ⟨u.unit_of_nearby _ _, rfl⟩
   simp only [Complex.abs_ofReal, map_inv₀, Units.coe_map, Units.val_inv_eq_inv_val, [anonymous],
     RingHom.toMonoidHom_eq_coe, Units.val_mk0, Units.coe_map_inv, norm_algebraMap', inv_inv,
-    Complex.norm_eq_abs, abs_norm_eq_norm, Subtype.val_eq_coe, coe_coe]
+    Complex.norm_eq_abs, abs_norm, Subtype.val_eq_coe, coe_coe]
   /- Since `a` is invertible, by `spectrum_star_mul_self_of_is_star_normal`, the spectrum (in `A`)
     of `star a * a` is contained in the half-open interval `(0, ‖star a * a‖]`. Therefore, by basic
     spectral mapping properties, the spectrum of `‖star a * a‖ • 1 - star a * a` is contained in
Diff
@@ -151,7 +151,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
     Units.map (algebraMap ℂ (elementalStarAlgebra ℂ a)).toMonoidHom (Units.mk0 _ h₁)
   refine' ⟨u.unit_of_nearby _ _, rfl⟩
   simp only [Complex.abs_ofReal, map_inv₀, Units.coe_map, Units.val_inv_eq_inv_val, [anonymous],
-    RingHom.toMonoidHom_eq_coe, Units.val_mk0, Units.coe_map_inv, norm_algebra_map', inv_inv,
+    RingHom.toMonoidHom_eq_coe, Units.val_mk0, Units.coe_map_inv, norm_algebraMap', inv_inv,
     Complex.norm_eq_abs, abs_norm_eq_norm, Subtype.val_eq_coe, coe_coe]
   /- Since `a` is invertible, by `spectrum_star_mul_self_of_is_star_normal`, the spectrum (in `A`)
     of `star a * a` is contained in the half-open interval `(0, ‖star a * a‖]`. Therefore, by basic
Diff
@@ -107,8 +107,8 @@ theorem spectrum_star_mul_self_of_isStarNormal :
     rw [gelfand_transform_apply_apply ℂ _ (star a' * a') φ, map_mul φ, map_star φ]
     rw [Complex.eq_coe_norm_of_nonneg star_mul_self_nonneg, ← map_star, ← map_mul]
     exact
-      ⟨Complex.ComplexOrder.zero_le_real.2 (norm_nonneg _),
-        Complex.ComplexOrder.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩
+      ⟨Complex.zero_le_real.2 (norm_nonneg _),
+        Complex.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩
 #align spectrum_star_mul_self_of_is_star_normal spectrum_star_mul_self_of_isStarNormal
 
 variable {a}
@@ -165,9 +165,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
       by
       replace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz
       rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz
-    refine'
-      lt_of_le_of_ne
-        (Complex.ComplexOrder.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _
+    refine' lt_of_le_of_ne (Complex.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _
     · intro hz'
       replace hz' := congr_arg (fun x : ℝ≥0 => ((x : ℝ) : ℂ)) hz'
       simp only [coe_nnnorm] at hz'
Diff
@@ -210,7 +210,7 @@ theorem StarSubalgebra.isUnit_coe_inv_mem {S : StarSubalgebra ℂ A} (hS : IsClo
   refine' le_of_is_closed_of_mem ℂ hS (mul_mem (star_mem hxS) hxS) _
   haveI := (IsSelfAdjoint.star_mul_self x).IsStarNormal
   have hx' := elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal hx
-  convert (↑hx'.unit⁻¹ : elementalStarAlgebra ℂ (star x * x)).Prop using 1
+  convert(↑hx'.unit⁻¹ : elementalStarAlgebra ℂ (star x * x)).Prop using 1
   exact left_inv_eq_right_inv hx.unit.inv_mul (congr_arg coe hx'.unit.mul_inv)
 #align star_subalgebra.is_unit_coe_inv_mem StarSubalgebra.isUnit_coe_inv_mem
 
Diff
@@ -107,8 +107,8 @@ theorem spectrum_star_mul_self_of_isStarNormal :
     rw [gelfand_transform_apply_apply ℂ _ (star a' * a') φ, map_mul φ, map_star φ]
     rw [Complex.eq_coe_norm_of_nonneg star_mul_self_nonneg, ← map_star, ← map_mul]
     exact
-      ⟨Complex.zero_le_real.2 (norm_nonneg _),
-        Complex.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩
+      ⟨Complex.ComplexOrder.zero_le_real.2 (norm_nonneg _),
+        Complex.ComplexOrder.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩
 #align spectrum_star_mul_self_of_is_star_normal spectrum_star_mul_self_of_isStarNormal
 
 variable {a}
@@ -150,7 +150,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
   set u : Units (elementalStarAlgebra ℂ a) :=
     Units.map (algebraMap ℂ (elementalStarAlgebra ℂ a)).toMonoidHom (Units.mk0 _ h₁)
   refine' ⟨u.unit_of_nearby _ _, rfl⟩
-  simp only [Complex.abs_of_real, map_inv₀, Units.coe_map, Units.val_inv_eq_inv_val, [anonymous],
+  simp only [Complex.abs_ofReal, map_inv₀, Units.coe_map, Units.val_inv_eq_inv_val, [anonymous],
     RingHom.toMonoidHom_eq_coe, Units.val_mk0, Units.coe_map_inv, norm_algebra_map', inv_inv,
     Complex.norm_eq_abs, abs_norm_eq_norm, Subtype.val_eq_coe, coe_coe]
   /- Since `a` is invertible, by `spectrum_star_mul_self_of_is_star_normal`, the spectrum (in `A`)
@@ -165,7 +165,9 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
       by
       replace hz := Set.image_subset _ (spectrum_star_mul_self_of_isStarNormal a) hz
       rwa [Set.image_const_sub_Icc, sub_self, sub_zero] at hz
-    refine' lt_of_le_of_ne (Complex.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _
+    refine'
+      lt_of_le_of_ne
+        (Complex.ComplexOrder.real_le_real.1 <| Complex.eq_coe_norm_of_nonneg h₃.1 ▸ h₃.2) _
     · intro hz'
       replace hz' := congr_arg (fun x : ℝ≥0 => ((x : ℝ) : ℂ)) hz'
       simp only [coe_nnnorm] at hz'

Changes in mathlib4

mathlib3
mathlib4
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
@@ -170,7 +170,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
         refine' (IsSelfAdjoint.spectralRadius_eq_nnnorm _).symm
         rw [IsSelfAdjoint, star_sub, star_mul, star_star, ← algebraMap_star_comm]
         congr!
-        exact IsROrC.conj_ofReal _
+        exact RCLike.conj_ofReal _
       _ < ‖star a * a‖₊ := spectrum.spectralRadius_lt_of_forall_lt _ h₂)
 #align elemental_star_algebra.is_unit_of_is_unit_of_is_star_normal elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal
 
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
@@ -61,7 +61,6 @@ open scoped Pointwise ENNReal NNReal ComplexOrder
 open WeakDual WeakDual.CharacterSpace elementalStarAlgebra
 
 variable {A : Type*} [NormedRing A] [NormedAlgebra ℂ A]
-
 variable [StarRing A] [CstarRing A] [StarModule ℂ A]
 
 instance {R A : Type*} [CommRing R] [StarRing R] [NormedRing A] [Algebra R A] [StarRing A]
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -70,7 +70,7 @@ instance {R A : Type*} [CommRing R] [StarRing R] [NormedRing A] [Algebra R A] [S
   { SubringClass.toNormedRing (elementalStarAlgebra R a) with
     mul_comm := mul_comm }
 
--- porting note: these hack instances no longer seem to be necessary
+-- Porting note: these hack instances no longer seem to be necessary
 #noalign elemental_star_algebra.complex.normed_algebra
 
 variable [CompleteSpace A] (a : A) [IsStarNormal a] (S : StarSubalgebra ℂ A)
feat: positivity extension for the coercion ℝ → ℂ (#9528)

From LeanAPAP

Diff
@@ -92,9 +92,7 @@ theorem spectrum_star_mul_self_of_isStarNormal :
     rintro - ⟨φ, rfl⟩
     rw [gelfandTransform_apply_apply ℂ _ (star a' * a') φ, map_mul φ, map_star φ]
     rw [Complex.eq_coe_norm_of_nonneg (star_mul_self_nonneg _), ← map_star, ← map_mul]
-    exact
-      ⟨Complex.zero_le_real.2 (norm_nonneg _),
-        Complex.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩
+    exact ⟨by positivity, Complex.real_le_real.2 (AlgHom.norm_apply_le_self φ (star a' * a'))⟩
 #align spectrum_star_mul_self_of_is_star_normal spectrum_star_mul_self_of_isStarNormal
 
 variable {a}
chore: prepare Lean version bump with explicit simp (#10999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -135,7 +135,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
   set u : Units (elementalStarAlgebra ℂ a) :=
     Units.map (algebraMap ℂ (elementalStarAlgebra ℂ a)).toMonoidHom (Units.mk0 _ h₁)
   refine' ⟨u.ofNearby _ _, rfl⟩
-  simp only [Units.coe_map, Units.val_inv_eq_inv_val, RingHom.toMonoidHom_eq_coe, Units.val_mk0,
+  simp only [u, Units.coe_map, Units.val_inv_eq_inv_val, RingHom.toMonoidHom_eq_coe, Units.val_mk0,
     Units.coe_map_inv, MonoidHom.coe_coe, norm_algebraMap', norm_inv, Complex.norm_eq_abs,
     Complex.abs_ofReal, abs_norm, inv_inv]
     --RingHom.coe_monoidHom,
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -126,7 +126,7 @@ theorem elementalStarAlgebra.isUnit_of_isUnit_of_isStarNormal (h : IsUnit a) :
     if `star a * a` is invertible, then so is `a`. -/
   nontriviality A
   set a' : elementalStarAlgebra ℂ a := ⟨a, self_mem ℂ a⟩
-  suffices : IsUnit (star a' * a'); exact (IsUnit.mul_iff.1 this).2
+  suffices IsUnit (star a' * a') from (IsUnit.mul_iff.1 this).2
   replace h := (show Commute (star a) a from star_comm_self' a).isUnit_mul_iff.2 ⟨h.star, h⟩
   /- Since `a` is invertible, `‖star a * a‖ ≠ 0`, so `‖star a * a‖ • 1` is invertible in
     `elementalStarAlgebra ℂ a`, and so it suffices to show that the distance between this unit and
@@ -182,8 +182,8 @@ containing `x`. -/
 theorem StarSubalgebra.isUnit_coe_inv_mem {S : StarSubalgebra ℂ A} (hS : IsClosed (S : Set A))
     {x : A} (h : IsUnit x) (hxS : x ∈ S) : ↑h.unit⁻¹ ∈ S := by
   have hx := h.star.mul h
-  suffices this : (↑hx.unit⁻¹ : A) ∈ S
-  · rw [← one_mul (↑h.unit⁻¹ : A), ← hx.unit.inv_mul, mul_assoc, IsUnit.unit_spec, mul_assoc,
+  suffices this : (↑hx.unit⁻¹ : A) ∈ S by
+    rw [← one_mul (↑h.unit⁻¹ : A), ← hx.unit.inv_mul, mul_assoc, IsUnit.unit_spec, mul_assoc,
       h.mul_val_inv, mul_one]
     exact mul_mem this (star_mem hxS)
   refine' le_of_isClosed_of_mem ℂ hS (mul_mem (star_mem hxS) hxS) _
chore: update/remove heart beat bumps (#6860)

We clean up heart beat bumps after #6474.

Diff
@@ -253,8 +253,6 @@ theorem elementalStarAlgebra.bijective_characterSpaceToSpectrum :
     exact ⟨φ, rfl⟩
 #align elemental_star_algebra.bijective_character_space_to_spectrum elementalStarAlgebra.bijective_characterSpaceToSpectrum
 
--- porting note: it would be good to understand why and where Lean is having trouble here
-set_option synthInstance.maxHeartbeats 40000 in
 /-- The homeomorphism between the character space of the unital C⋆-subalgebra generated by a
 single normal element `a : A` and `spectrum ℂ a`. -/
 noncomputable def elementalStarAlgebra.characterSpaceHomeo :
@@ -265,8 +263,6 @@ noncomputable def elementalStarAlgebra.characterSpaceHomeo :
     (elementalStarAlgebra.continuous_characterSpaceToSpectrum a)
 #align elemental_star_algebra.character_space_homeo elementalStarAlgebra.characterSpaceHomeo
 
--- porting note: it would be good to understand why and where Lean is having trouble here
-set_option maxHeartbeats 350000 in
 /-- **Continuous functional calculus.** Given a normal element `a : A` of a unital C⋆-algebra,
 the continuous functional calculus is a `StarAlgEquiv` from the complex-valued continuous
 functions on the spectrum of `a` to the unital C⋆-subalgebra generated by `a`. Moreover, this
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
@@ -60,11 +60,11 @@ open scoped Pointwise ENNReal NNReal ComplexOrder
 
 open WeakDual WeakDual.CharacterSpace elementalStarAlgebra
 
-variable {A : Type _} [NormedRing A] [NormedAlgebra ℂ A]
+variable {A : Type*} [NormedRing A] [NormedAlgebra ℂ A]
 
 variable [StarRing A] [CstarRing A] [StarModule ℂ A]
 
-instance {R A : Type _} [CommRing R] [StarRing R] [NormedRing A] [Algebra R A] [StarRing A]
+instance {R A : Type*} [CommRing R] [StarRing R] [NormedRing A] [Algebra R A] [StarRing A]
     [ContinuousStar A] [StarModule R A] (a : A) [IsStarNormal a] :
     NormedCommRing (elementalStarAlgebra R a) :=
   { SubringClass.toNormedRing (elementalStarAlgebra R a) with
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,15 +2,12 @@
 Copyright (c) 2022 Jireh Loreaux. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jireh Loreaux
-
-! This file was ported from Lean 3 source module analysis.normed_space.star.continuous_functional_calculus
-! leanprover-community/mathlib commit 31c24aa72e7b3e5ed97a8412470e904f82b81004
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.NormedSpace.Star.GelfandDuality
 import Mathlib.Topology.Algebra.StarSubalgebra
 
+#align_import analysis.normed_space.star.continuous_functional_calculus from "leanprover-community/mathlib"@"31c24aa72e7b3e5ed97a8412470e904f82b81004"
+
 /-! # Continuous functional calculus
 
 In this file we construct the `continuousFunctionalCalculus` for a normal element `a` of a
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -23,7 +23,7 @@ Being a star algebra equivalence between C⋆-algebras, this map is continuous (
 and by the Stone-Weierstrass theorem it is the unique star algebra equivalence which extends the
 polynomial functional calculus (i.e., `Polynomial.aeval`).
 
-For any continuous function `f : spectrum ℂ a →  ℂ`, this makes it possible to define an element
+For any continuous function `f : spectrum ℂ a → ℂ`, this makes it possible to define an element
 `f a` (not valid notation) in the original algebra, which heuristically has the same eigenspaces as
 `a` and acts on eigenvector of `a` for an eigenvalue `λ` as multiplication by `f λ`. This
 description is perfectly accurate in finite dimension, but only heuristic in infinite dimension as
chore: change Field.toEuclideanDomain (#5266)

Modifying the definition of Field.toEuclideanDomain makes some declaration faster.

Co-authored-by: Sébastien Gouëzel

Diff
@@ -257,7 +257,7 @@ theorem elementalStarAlgebra.bijective_characterSpaceToSpectrum :
 #align elemental_star_algebra.bijective_character_space_to_spectrum elementalStarAlgebra.bijective_characterSpaceToSpectrum
 
 -- porting note: it would be good to understand why and where Lean is having trouble here
-set_option synthInstance.maxHeartbeats 43000 in
+set_option synthInstance.maxHeartbeats 40000 in
 /-- The homeomorphism between the character space of the unital C⋆-subalgebra generated by a
 single normal element `a : A` and `spectrum ℂ a`. -/
 noncomputable def elementalStarAlgebra.characterSpaceHomeo :
feat: port Analysis.NormedSpace.Star.ContinuousFunctionalCalculus (#4977)

Dependencies 12 + 1150

1151 files ported (99.0%)
508925 lines ported (98.9%)
Show graph

The unported dependencies are

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