analysis.normed_space.spectrum ⟷ Mathlib.Analysis.NormedSpace.Spectrum

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)

(last sync)

feat(analysis/calculus/fderiv/mul): derivative of inverse in division rings (#19127)
Diff
@@ -314,7 +314,7 @@ begin
     simpa only [norm_to_nnreal, real.to_nnreal_coe]
       using real.to_nnreal_mono (mem_closed_ball_zero_iff.mp z_mem) },
   have H₁ : differentiable π•œ (Ξ» w : π•œ, 1 - w β€’ a) := (differentiable_id.smul_const a).const_sub 1,
-  exact differentiable_at.comp z (differentiable_at_inverse hu.unit) (H₁.differentiable_at),
+  exact differentiable_at.comp z (differentiable_at_inverse hu) (H₁.differentiable_at),
 end
 
 end one_sub_smul

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -340,7 +340,7 @@ theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
           le_trans (le_trans (mul_le_mul_right' (nnnorm_pow_le' a n.succ_pos) (r ^ n.succ)) _)
             (le_max_left _ _)
         Β· by_cases β€–aβ€–β‚Š = 0
-          Β· simp only [h, MulZeroClass.zero_mul, zero_le', pow_succ]
+          Β· simp only [h, MulZeroClass.zero_mul, zero_le', pow_succ']
           Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr
             simpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ
     r_pos := ENNReal.inv_pos.mpr coe_ne_top
@@ -579,7 +579,7 @@ local notation "↑ₐ" => algebraMap π•œ A
 
 #print spectrum.exp_mem_exp /-
 /-- For `π•œ = ℝ` or `π•œ = β„‚`, `exp π•œ` maps the spectrum of `a` into the spectrum of `exp π•œ a`. -/
-theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A] (a : A) {z : π•œ}
+theorem exp_mem_exp [RCLike π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A] (a : A) {z : π•œ}
     (hz : z ∈ spectrum π•œ a) : NormedSpace.exp π•œ z ∈ spectrum π•œ (NormedSpace.exp π•œ a) :=
   by
   have hexpmul : NormedSpace.exp π•œ a = NormedSpace.exp π•œ (a - ↑ₐ z) * ↑ₐ (NormedSpace.exp π•œ z) := by
@@ -590,15 +590,15 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
     by
     refine' Summable.of_norm_bounded_eventually _ (Real.summable_pow_div_factorial β€–a - ↑ₐ zβ€–) _
     filter_upwards [Filter.eventually_cofinite_ne 0] with n hn
-    rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_natCast, ← div_eq_mul_inv]
+    rw [norm_smul, mul_comm, norm_inv, RCLike.norm_natCast, ← div_eq_mul_inv]
     exact
       div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))
         (by exact_mod_cast Nat.factorial_pos n)
         (by exact_mod_cast Nat.factorial_le (lt_add_one n).le)
   have hβ‚€ : βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1) = (a - ↑ₐ z) * b := by
-    simpa only [mul_smul_comm, pow_succ] using hb.tsum_mul_left (a - ↑ₐ z)
+    simpa only [mul_smul_comm, pow_succ'] using hb.tsum_mul_left (a - ↑ₐ z)
   have h₁ : βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1) = b * (a - ↑ₐ z) := by
-    simpa only [pow_succ', Algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐ z)
+    simpa only [pow_succ, Algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐ z)
   have h₃ : NormedSpace.exp π•œ (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b :=
     by
     rw [NormedSpace.exp_eq_tsum]
Diff
@@ -122,7 +122,7 @@ theorem mem_resolventSet_of_norm_lt_mul {a : A} {k : π•œ} (h : β€–aβ€– * β€–(1
     ne_zero_of_norm_ne_zero ((mul_nonneg (norm_nonneg _) (norm_nonneg _)).trans_lt h).ne'
   let ku := Units.map ↑ₐ.toMonoidHom (Units.mk0 k hk)
   rw [← inv_inv β€–(1 : A)β€–,
-    mul_inv_lt_iff (inv_pos.2 <| norm_pos_iff.2 (one_ne_zero : (1 : A) β‰  0))] at h 
+    mul_inv_lt_iff (inv_pos.2 <| norm_pos_iff.2 (one_ne_zero : (1 : A) β‰  0))] at h
   have hku : β€–-aβ€– < β€–(↑ku⁻¹ : A)‖⁻¹ := by simpa [ku, norm_algebraMap] using h
   simpa [ku, sub_eq_add_neg, Algebra.algebraMap_eq_smul_one] using (ku.add (-a) hku).IsUnit
 #align spectrum.mem_resolvent_set_of_norm_lt_mul spectrum.mem_resolventSet_of_norm_lt_mul
@@ -231,7 +231,7 @@ theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
     h (by simpa only [inv_inv, inv_top] using congr_arg (fun x : ℝβ‰₯0∞ => x⁻¹) h')
   simp only [ENNReal.mul_le_iff_le_inv h (hΡ.trans_le le_top).Ne, mul_comm Ρ⁻¹,
     liminf_eq_supr_infi_of_nat', ENNReal.iSup_mul, ENNReal.iInf_mul hΞ΅']
-  rw [← ENNReal.inv_lt_inv, inv_one] at hΞ΅ 
+  rw [← ENNReal.inv_lt_inv, inv_one] at hΞ΅
   obtain ⟨N, hN⟩ :=
     eventually_at_top.mp
       (ENNReal.eventually_pow_one_div_le (ENNReal.coe_ne_top : ↑‖(1 : A)β€–β‚Š β‰  ∞) hΞ΅)
@@ -274,9 +274,9 @@ theorem norm_resolvent_le_forall (a : A) :
     βˆ€ Ξ΅ > 0, βˆƒ R > 0, βˆ€ z : π•œ, R ≀ β€–zβ€– β†’ β€–resolvent a zβ€– ≀ Ξ΅ :=
   by
   obtain ⟨c, c_pos, hc⟩ := (@NormedRing.inverse_one_sub_norm A _ _).exists_pos
-  rw [is_O_with_iff, eventually_iff, Metric.mem_nhds_iff] at hc 
+  rw [is_O_with_iff, eventually_iff, Metric.mem_nhds_iff] at hc
   rcases hc with ⟨δ, δ_pos, hδ⟩
-  simp only [CstarRing.norm_one, mul_one] at hΞ΄ 
+  simp only [CstarRing.norm_one, mul_one] at hΞ΄
   intro Ξ΅ hΞ΅
   have ha₁ : 0 < β€–aβ€– + 1 := lt_of_le_of_lt (norm_nonneg a) (lt_add_one _)
   have min_pos : 0 < min (Ξ΄ * (β€–aβ€– + 1)⁻¹) (Ξ΅ * c⁻¹) :=
@@ -341,7 +341,7 @@ theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
             (le_max_left _ _)
         Β· by_cases β€–aβ€–β‚Š = 0
           Β· simp only [h, MulZeroClass.zero_mul, zero_le', pow_succ]
-          Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr 
+          Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr
             simpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ
     r_pos := ENNReal.inv_pos.mpr coe_ne_top
     HasSum := fun y hy =>
@@ -367,7 +367,7 @@ theorem isUnit_one_sub_smul_of_lt_inv_radius {a : A} {z : π•œ} (h : ↑‖zβ€–
   Β· simp only [hz, isUnit_one, sub_zero, zero_smul]
   Β· let u := Units.mk0 z hz
     suffices hu : IsUnit (u⁻¹ β€’ 1 - a)
-    Β· rwa [IsUnit.smul_sub_iff_sub_inv_smul, inv_inv u] at hu 
+    Β· rwa [IsUnit.smul_sub_iff_sub_inv_smul, inv_inv u] at hu
     Β· rw [Units.smul_def, ← Algebra.algebraMap_eq_smul_one, ← mem_resolvent_set_iff]
       refine' mem_resolvent_set_of_spectral_radius_lt _
       rwa [Units.val_inv_eq_inv_val, nnnorm_inv,
@@ -464,7 +464,7 @@ protected theorem nonempty : (spectrum β„‚ a).Nonempty :=
     is differentiable on `β„‚`. -/
   rw [Set.nonempty_iff_ne_empty]
   by_contra h
-  have Hβ‚€ : resolventSet β„‚ a = Set.univ := by rwa [spectrum, Set.compl_empty_iff] at h 
+  have Hβ‚€ : resolventSet β„‚ a = Set.univ := by rwa [spectrum, Set.compl_empty_iff] at h
   have H₁ : Differentiable β„‚ fun z : β„‚ => resolvent a z := fun z =>
     (has_deriv_at_resolvent (Hβ‚€.symm β–Έ Set.mem_univ z : z ∈ resolventSet β„‚ a)).DifferentiableAt
   /- The norm of the resolvent is small for all sufficently large `z`, and by compactness and
@@ -544,7 +544,7 @@ local notation "Οƒ" => spectrum β„‚
 
 #print spectrum.algebraMap_eq_of_mem /-
 theorem algebraMap_eq_of_mem {a : A} {z : β„‚} (h : z ∈ Οƒ a) : algebraMap β„‚ A z = a := by
-  rwa [mem_iff, hA, Classical.not_not, sub_eq_zero] at h 
+  rwa [mem_iff, hA, Classical.not_not, sub_eq_zero] at h
 #align spectrum.algebra_map_eq_of_mem spectrum.algebraMap_eq_of_mem
 -/
 
Diff
@@ -328,7 +328,7 @@ power series with coefficients `a ^ n` represents the function `(1 - z β€’ a)⁻
 radius `β€–aβ€–β‚Šβ»ΒΉ`. -/
 theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
     HasFPowerSeriesOnBall (fun z : π•œ => Ring.inverse (1 - z β€’ a))
-      (fun n => ContinuousMultilinearMap.mkPiField π•œ (Fin n) (a ^ n)) 0 β€–aβ€–β‚Šβ»ΒΉ :=
+      (fun n => ContinuousMultilinearMap.mkPiRing π•œ (Fin n) (a ^ n)) 0 β€–aβ€–β‚Šβ»ΒΉ :=
   { r_le :=
       by
       refine'
@@ -412,7 +412,7 @@ theorem limsup_pow_nnnorm_pow_one_div_le_spectralRadius (a : A) :
   refine' ennreal.inv_le_inv.mp (le_of_forall_pos_nnreal_lt fun r r_pos r_lt => _)
   simp_rw [inv_limsup, ← one_div]
   let p : FormalMultilinearSeries β„‚ β„‚ A := fun n =>
-    ContinuousMultilinearMap.mkPiField β„‚ (Fin n) (a ^ n)
+    ContinuousMultilinearMap.mkPiRing β„‚ (Fin n) (a ^ n)
   suffices h : (r : ℝβ‰₯0∞) ≀ p.radius
   Β· convert h
     simp only [p.radius_eq_liminf, ← norm_toNNReal, norm_mk_pi_field]
Diff
@@ -674,7 +674,7 @@ local notation "↑ₐ" => algebraMap π•œ A
 @[simp]
 theorem toContinuousLinearMap_norm [NormOneClass A] (Ο† : A →ₐ[π•œ] π•œ) :
     β€–Ο†.toContinuousLinearMapβ€– = 1 :=
-  ContinuousLinearMap.op_norm_eq_of_bounds zero_le_one
+  ContinuousLinearMap.opNorm_eq_of_bounds zero_le_one
     (fun a => (one_mul β€–aβ€–).symm β–Έ spectrum.norm_le_norm_of_mem (apply_mem_spectrum Ο† _))
     fun _ _ h => by simpa only [coe_to_continuous_linear_map, map_one, norm_one, mul_one] using h 1
 #align alg_hom.to_continuous_linear_map_norm AlgHom.toContinuousLinearMap_norm
Diff
@@ -353,7 +353,7 @@ theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
             simpa only [← coe_inv h, mem_ball_zero_iff, Metric.emetric_ball_nnreal] using hy
           rwa [← coe_nnnorm, ← Real.lt_toNNReal_iff_coe_lt, Real.toNNReal_one, nnnorm_smul, ←
             NNReal.lt_inv_iff_mul_lt h]
-      simpa [← smul_pow, (NormedRing.summable_geometric_of_norm_lt_1 _ norm_lt).hasSum_iff] using
+      simpa [← smul_pow, (NormedRing.summable_geometric_of_norm_lt_one _ norm_lt).hasSum_iff] using
         (NormedRing.inverse_one_sub _ norm_lt).symm }
 #align spectrum.has_fpower_series_on_ball_inverse_one_sub_smul spectrum.hasFPowerSeriesOnBall_inverse_one_sub_smul
 -/
Diff
@@ -580,11 +580,11 @@ local notation "↑ₐ" => algebraMap π•œ A
 #print spectrum.exp_mem_exp /-
 /-- For `π•œ = ℝ` or `π•œ = β„‚`, `exp π•œ` maps the spectrum of `a` into the spectrum of `exp π•œ a`. -/
 theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A] (a : A) {z : π•œ}
-    (hz : z ∈ spectrum π•œ a) : exp π•œ z ∈ spectrum π•œ (exp π•œ a) :=
+    (hz : z ∈ spectrum π•œ a) : NormedSpace.exp π•œ z ∈ spectrum π•œ (NormedSpace.exp π•œ a) :=
   by
-  have hexpmul : exp π•œ a = exp π•œ (a - ↑ₐ z) * ↑ₐ (exp π•œ z) := by
-    rw [algebraMap_exp_comm z, ← exp_add_of_commute (Algebra.commutes z (a - ↑ₐ z)).symm,
-      sub_add_cancel]
+  have hexpmul : NormedSpace.exp π•œ a = NormedSpace.exp π•œ (a - ↑ₐ z) * ↑ₐ (NormedSpace.exp π•œ z) := by
+    rw [NormedSpace.algebraMap_exp_comm z, ←
+      NormedSpace.exp_add_of_commute (Algebra.commutes z (a - ↑ₐ z)).symm, sub_add_cancel]
   let b := βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ n
   have hb : Summable fun n : β„• => ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ n :=
     by
@@ -599,14 +599,16 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
     simpa only [mul_smul_comm, pow_succ] using hb.tsum_mul_left (a - ↑ₐ z)
   have h₁ : βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1) = b * (a - ↑ₐ z) := by
     simpa only [pow_succ', Algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐ z)
-  have h₃ : exp π•œ (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b :=
+  have h₃ : NormedSpace.exp π•œ (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b :=
     by
-    rw [exp_eq_tsum]
-    convert tsum_eq_zero_add (expSeries_summable' (a - ↑ₐ z))
+    rw [NormedSpace.exp_eq_tsum]
+    convert tsum_eq_zero_add (NormedSpace.expSeries_summable' (a - ↑ₐ z))
     simp only [Nat.factorial_zero, Nat.cast_one, inv_one, pow_zero, one_smul]
     exact hβ‚€.symm
-  rw [spectrum.mem_iff, IsUnit.sub_iff, ← one_mul (↑ₐ (exp π•œ z)), hexpmul, ← _root_.sub_mul,
-    Commute.isUnit_mul_iff (Algebra.commutes (exp π•œ z) (exp π•œ (a - ↑ₐ z) - 1)).symm,
+  rw [spectrum.mem_iff, IsUnit.sub_iff, ← one_mul (↑ₐ (NormedSpace.exp π•œ z)), hexpmul, ←
+    _root_.sub_mul,
+    Commute.isUnit_mul_iff
+      (Algebra.commutes (NormedSpace.exp π•œ z) (NormedSpace.exp π•œ (a - ↑ₐ z) - 1)).symm,
     sub_eq_iff_eq_add'.mpr h₃, Commute.isUnit_mul_iff (hβ‚€ β–Έ h₁ : (a - ↑ₐ z) * b = b * (a - ↑ₐ z))]
   exact not_and_of_not_left _ (not_and_of_not_left _ ((not_iff_not.mpr IsUnit.sub_iff).mp hz))
 #align spectrum.exp_mem_exp spectrum.exp_mem_exp
Diff
@@ -267,7 +267,6 @@ theorem hasDerivAt_resolvent {a : A} {k : π•œ} (hk : k ∈ ρ a) :
 #align spectrum.has_deriv_at_resolvent spectrum.hasDerivAt_resolvent
 -/
 
-#print spectrum.norm_resolvent_le_forall /-
 /- TODO: Once there is sufficient API for bornology, we should get a nice filter / asymptotics
 version of this, for example: `tendsto (resolvent a) (cobounded π•œ) (𝓝 0)` or more specifically
 `(resolvent a) =O[cobounded π•œ] (Ξ» z, z⁻¹)`. -/
@@ -310,7 +309,6 @@ theorem norm_resolvent_le_forall (a : A) :
         (mul_pos hΞ΅ (inv_pos.mpr c_pos)).le
     _ = _ := inv_mul_cancel_rightβ‚€ c_pos.ne.symm Ξ΅
 #align spectrum.norm_resolvent_le_forall spectrum.norm_resolvent_le_forall
--/
 
 end resolvent
 
@@ -590,7 +588,7 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
   let b := βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ n
   have hb : Summable fun n : β„• => ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ n :=
     by
-    refine' summable_of_norm_bounded_eventually _ (Real.summable_pow_div_factorial β€–a - ↑ₐ zβ€–) _
+    refine' Summable.of_norm_bounded_eventually _ (Real.summable_pow_div_factorial β€–a - ↑ₐ zβ€–) _
     filter_upwards [Filter.eventually_cofinite_ne 0] with n hn
     rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_natCast, ← div_eq_mul_inv]
     exact
Diff
@@ -3,12 +3,12 @@ Copyright (c) 2021 Jireh Loreaux. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jireh Loreaux
 -/
-import Mathbin.FieldTheory.IsAlgClosed.Spectrum
-import Mathbin.Analysis.Complex.Liouville
-import Mathbin.Analysis.Complex.Polynomial
-import Mathbin.Analysis.Analytic.RadiusLiminf
-import Mathbin.Topology.Algebra.Module.CharacterSpace
-import Mathbin.Analysis.NormedSpace.Exponential
+import FieldTheory.IsAlgClosed.Spectrum
+import Analysis.Complex.Liouville
+import Analysis.Complex.Polynomial
+import Analysis.Analytic.RadiusLiminf
+import Topology.Algebra.Module.CharacterSpace
+import Analysis.NormedSpace.Exponential
 
 #align_import analysis.normed_space.spectrum from "leanprover-community/mathlib"@"d608fc5d4e69d4cc21885913fb573a88b0deb521"
 
Diff
@@ -158,15 +158,15 @@ theorem subset_closedBall_norm [NormOneClass A] (a : A) : Οƒ a βŠ† Metric.closed
 #align spectrum.subset_closed_ball_norm spectrum.subset_closedBall_norm
 -/
 
-#print spectrum.is_bounded /-
-theorem is_bounded (a : A) : Metric.Bounded (Οƒ a) :=
-  (Metric.bounded_iff_subset_ball 0).mpr βŸ¨β€–aβ€– * β€–(1 : A)β€–, subset_closedBall_norm_mul a⟩
-#align spectrum.is_bounded spectrum.is_bounded
+#print spectrum.isBounded /-
+theorem isBounded (a : A) : Bornology.IsBounded (Οƒ a) :=
+  (Metric.isBounded_iff_subset_closedBall 0).mpr βŸ¨β€–aβ€– * β€–(1 : A)β€–, subset_closedBall_norm_mul a⟩
+#align spectrum.is_bounded spectrum.isBounded
 -/
 
 #print spectrum.isCompact /-
 protected theorem isCompact [ProperSpace π•œ] (a : A) : IsCompact (Οƒ a) :=
-  Metric.isCompact_of_isClosed_bounded (spectrum.isClosed a) (is_bounded a)
+  Metric.isCompact_of_isClosed_isBounded (spectrum.isClosed a) (isBounded a)
 #align spectrum.is_compact spectrum.isCompact
 -/
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2021 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.spectrum
-! leanprover-community/mathlib commit d608fc5d4e69d4cc21885913fb573a88b0deb521
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.FieldTheory.IsAlgClosed.Spectrum
 import Mathbin.Analysis.Complex.Liouville
@@ -15,6 +10,8 @@ import Mathbin.Analysis.Analytic.RadiusLiminf
 import Mathbin.Topology.Algebra.Module.CharacterSpace
 import Mathbin.Analysis.NormedSpace.Exponential
 
+#align_import analysis.normed_space.spectrum from "leanprover-community/mathlib"@"d608fc5d4e69d4cc21885913fb573a88b0deb521"
+
 /-!
 # The spectrum of elements in a complete normed algebra
 
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.spectrum
-! leanprover-community/mathlib commit 087c325ae0ab42dbdd5dee55bc37d3d5a0bf2197
+! leanprover-community/mathlib commit d608fc5d4e69d4cc21885913fb573a88b0deb521
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -395,7 +395,7 @@ theorem differentiableOn_inverse_one_sub_smul [CompleteSpace A] {a : A} {r : ℝ
     simpa only [norm_toNNReal, Real.toNNReal_coe] using
       Real.toNNReal_mono (mem_closed_ball_zero_iff.mp z_mem)
   have H₁ : Differentiable π•œ fun w : π•œ => 1 - w β€’ a := (differentiable_id.smul_const a).const_sub 1
-  exact DifferentiableAt.comp z (differentiableAt_inverse hu.unit) H₁.differentiable_at
+  exact DifferentiableAt.comp z (differentiableAt_inverse hu) H₁.differentiable_at
 #align spectrum.differentiable_on_inverse_one_sub_smul spectrum.differentiableOn_inverse_one_sub_smul
 -/
 
Diff
@@ -75,40 +75,48 @@ open Filter
 
 variable [NormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A]
 
--- mathport name: exprσ
 local notation "Οƒ" => spectrum π•œ
 
--- mathport name: exprρ
 local notation "ρ" => resolventSet π•œ
 
--- mathport name: Β«expr↑ₐ»
 local notation "↑ₐ" => algebraMap π•œ A
 
+#print spectrum.SpectralRadius.of_subsingleton /-
 @[simp]
 theorem SpectralRadius.of_subsingleton [Subsingleton A] (a : A) : spectralRadius π•œ a = 0 := by
   simp [spectralRadius]
 #align spectrum.spectral_radius.of_subsingleton spectrum.SpectralRadius.of_subsingleton
+-/
 
+#print spectrum.spectralRadius_zero /-
 @[simp]
 theorem spectralRadius_zero : spectralRadius π•œ (0 : A) = 0 := by nontriviality A;
   simp [spectralRadius]
 #align spectrum.spectral_radius_zero spectrum.spectralRadius_zero
+-/
 
+#print spectrum.mem_resolventSet_of_spectralRadius_lt /-
 theorem mem_resolventSet_of_spectralRadius_lt {a : A} {k : π•œ} (h : spectralRadius π•œ a < β€–kβ€–β‚Š) :
     k ∈ ρ a :=
   Classical.not_not.mp fun hn => h.not_le <| le_iSupβ‚‚ k hn
 #align spectrum.mem_resolvent_set_of_spectral_radius_lt spectrum.mem_resolventSet_of_spectralRadius_lt
+-/
 
 variable [CompleteSpace A]
 
+#print spectrum.isOpen_resolventSet /-
 theorem isOpen_resolventSet (a : A) : IsOpen (ρ a) :=
   Units.isOpen.Preimage ((continuous_algebraMap π•œ A).sub continuous_const)
 #align spectrum.is_open_resolvent_set spectrum.isOpen_resolventSet
+-/
 
+#print spectrum.isClosed /-
 protected theorem isClosed (a : A) : IsClosed (Οƒ a) :=
   (isOpen_resolventSet a).isClosed_compl
 #align spectrum.is_closed spectrum.isClosed
+-/
 
+#print spectrum.mem_resolventSet_of_norm_lt_mul /-
 theorem mem_resolventSet_of_norm_lt_mul {a : A} {k : π•œ} (h : β€–aβ€– * β€–(1 : A)β€– < β€–kβ€–) : k ∈ ρ a :=
   by
   rw [resolventSet, Set.mem_setOf_eq, Algebra.algebraMap_eq_smul_one]
@@ -121,46 +129,66 @@ theorem mem_resolventSet_of_norm_lt_mul {a : A} {k : π•œ} (h : β€–aβ€– * β€–(1
   have hku : β€–-aβ€– < β€–(↑ku⁻¹ : A)‖⁻¹ := by simpa [ku, norm_algebraMap] using h
   simpa [ku, sub_eq_add_neg, Algebra.algebraMap_eq_smul_one] using (ku.add (-a) hku).IsUnit
 #align spectrum.mem_resolvent_set_of_norm_lt_mul spectrum.mem_resolventSet_of_norm_lt_mul
+-/
 
+#print spectrum.mem_resolventSet_of_norm_lt /-
 theorem mem_resolventSet_of_norm_lt [NormOneClass A] {a : A} {k : π•œ} (h : β€–aβ€– < β€–kβ€–) : k ∈ ρ a :=
   mem_resolventSet_of_norm_lt_mul (by rwa [norm_one, mul_one])
 #align spectrum.mem_resolvent_set_of_norm_lt spectrum.mem_resolventSet_of_norm_lt
+-/
 
+#print spectrum.norm_le_norm_mul_of_mem /-
 theorem norm_le_norm_mul_of_mem {a : A} {k : π•œ} (hk : k ∈ Οƒ a) : β€–kβ€– ≀ β€–aβ€– * β€–(1 : A)β€– :=
   le_of_not_lt <| mt mem_resolventSet_of_norm_lt_mul hk
 #align spectrum.norm_le_norm_mul_of_mem spectrum.norm_le_norm_mul_of_mem
+-/
 
+#print spectrum.norm_le_norm_of_mem /-
 theorem norm_le_norm_of_mem [NormOneClass A] {a : A} {k : π•œ} (hk : k ∈ Οƒ a) : β€–kβ€– ≀ β€–aβ€– :=
   le_of_not_lt <| mt mem_resolventSet_of_norm_lt hk
 #align spectrum.norm_le_norm_of_mem spectrum.norm_le_norm_of_mem
+-/
 
+#print spectrum.subset_closedBall_norm_mul /-
 theorem subset_closedBall_norm_mul (a : A) : Οƒ a βŠ† Metric.closedBall (0 : π•œ) (β€–aβ€– * β€–(1 : A)β€–) :=
   fun k hk => by simp [norm_le_norm_mul_of_mem hk]
 #align spectrum.subset_closed_ball_norm_mul spectrum.subset_closedBall_norm_mul
+-/
 
+#print spectrum.subset_closedBall_norm /-
 theorem subset_closedBall_norm [NormOneClass A] (a : A) : Οƒ a βŠ† Metric.closedBall (0 : π•œ) β€–aβ€– :=
   fun k hk => by simp [norm_le_norm_of_mem hk]
 #align spectrum.subset_closed_ball_norm spectrum.subset_closedBall_norm
+-/
 
+#print spectrum.is_bounded /-
 theorem is_bounded (a : A) : Metric.Bounded (Οƒ a) :=
   (Metric.bounded_iff_subset_ball 0).mpr βŸ¨β€–aβ€– * β€–(1 : A)β€–, subset_closedBall_norm_mul a⟩
 #align spectrum.is_bounded spectrum.is_bounded
+-/
 
+#print spectrum.isCompact /-
 protected theorem isCompact [ProperSpace π•œ] (a : A) : IsCompact (Οƒ a) :=
   Metric.isCompact_of_isClosed_bounded (spectrum.isClosed a) (is_bounded a)
 #align spectrum.is_compact spectrum.isCompact
+-/
 
+#print spectrum.spectralRadius_le_nnnorm /-
 theorem spectralRadius_le_nnnorm [NormOneClass A] (a : A) : spectralRadius π•œ a ≀ β€–aβ€–β‚Š := by
   refine' iSupβ‚‚_le fun k hk => _; exact_mod_cast norm_le_norm_of_mem hk
 #align spectrum.spectral_radius_le_nnnorm spectrum.spectralRadius_le_nnnorm
+-/
 
+#print spectrum.exists_nnnorm_eq_spectralRadius_of_nonempty /-
 theorem exists_nnnorm_eq_spectralRadius_of_nonempty [ProperSpace π•œ] {a : A} (ha : (Οƒ a).Nonempty) :
     βˆƒ k ∈ Οƒ a, (β€–kβ€–β‚Š : ℝβ‰₯0∞) = spectralRadius π•œ a :=
   by
   obtain ⟨k, hk, h⟩ := (spectrum.isCompact a).exists_forall_ge ha continuous_nnnorm.continuous_on
   exact ⟨k, hk, le_antisymm (le_iSupβ‚‚ k hk) (iSupβ‚‚_le <| by exact_mod_cast h)⟩
 #align spectrum.exists_nnnorm_eq_spectral_radius_of_nonempty spectrum.exists_nnnorm_eq_spectralRadius_of_nonempty
+-/
 
+#print spectrum.spectralRadius_lt_of_forall_lt_of_nonempty /-
 theorem spectralRadius_lt_of_forall_lt_of_nonempty [ProperSpace π•œ] {a : A} (ha : (Οƒ a).Nonempty)
     {r : ℝβ‰₯0} (hr : βˆ€ k ∈ Οƒ a, β€–kβ€–β‚Š < r) : spectralRadius π•œ a < r :=
   sSup_image.symm.trans_lt <|
@@ -168,11 +196,13 @@ theorem spectralRadius_lt_of_forall_lt_of_nonempty [ProperSpace π•œ] {a : A} (h
           (ENNReal.continuous_coe.comp continuous_nnnorm).ContinuousOn (r : ℝβ‰₯0∞)).mpr
       (by exact_mod_cast hr)
 #align spectrum.spectral_radius_lt_of_forall_lt_of_nonempty spectrum.spectralRadius_lt_of_forall_lt_of_nonempty
+-/
 
 open ENNReal Polynomial
 
 variable (π•œ)
 
+#print spectrum.spectralRadius_le_pow_nnnorm_pow_one_div /-
 theorem spectralRadius_le_pow_nnnorm_pow_one_div (a : A) (n : β„•) :
     spectralRadius π•œ a ≀ β€–a ^ (n + 1)β€–β‚Š ^ (1 / (n + 1) : ℝ) * β€–(1 : A)β€–β‚Š ^ (1 / (n + 1) : ℝ) :=
   by
@@ -191,7 +221,9 @@ theorem spectralRadius_le_pow_nnnorm_pow_one_div (a : A) (n : β„•) :
   erw [coe_pow, ← rpow_nat_cast, ← rpow_mul, mul_one_div_cancel hn.ne', rpow_one]
   rw [Nat.cast_succ, ENNReal.coe_mul_rpow]
 #align spectrum.spectral_radius_le_pow_nnnorm_pow_one_div spectrum.spectralRadius_le_pow_nnnorm_pow_one_div
+-/
 
+#print spectrum.spectralRadius_le_liminf_pow_nnnorm_pow_one_div /-
 theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
     spectralRadius π•œ a ≀ atTop.liminf fun n : β„• => (β€–a ^ nβ€–β‚Š : ℝβ‰₯0∞) ^ (1 / n : ℝ) :=
   by
@@ -213,6 +245,7 @@ theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
   norm_cast
   exact mul_le_mul_left' (hN (n + N + 1) (by linarith)) _
 #align spectrum.spectral_radius_le_liminf_pow_nnnorm_pow_one_div spectrum.spectralRadius_le_liminf_pow_nnnorm_pow_one_div
+-/
 
 end SpectrumCompact
 
@@ -222,12 +255,11 @@ open Filter Asymptotics
 
 variable [NontriviallyNormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A]
 
--- mathport name: exprρ
 local notation "ρ" => resolventSet π•œ
 
--- mathport name: Β«expr↑ₐ»
 local notation "↑ₐ" => algebraMap π•œ A
 
+#print spectrum.hasDerivAt_resolvent /-
 theorem hasDerivAt_resolvent {a : A} {k : π•œ} (hk : k ∈ ρ a) :
     HasDerivAt (resolvent a) (-resolvent a k ^ 2) k :=
   by
@@ -236,7 +268,9 @@ theorem hasDerivAt_resolvent {a : A} {k : π•œ} (hk : k ∈ ρ a) :
     simpa using (Algebra.linearMap π•œ A).HasDerivAt.sub_const a
   simpa [resolvent, sq, hk.unit_spec, ← Ring.inverse_unit hk.unit] using H₁.comp_has_deriv_at k Hβ‚‚
 #align spectrum.has_deriv_at_resolvent spectrum.hasDerivAt_resolvent
+-/
 
+#print spectrum.norm_resolvent_le_forall /-
 /- TODO: Once there is sufficient API for bornology, we should get a nice filter / asymptotics
 version of this, for example: `tendsto (resolvent a) (cobounded π•œ) (𝓝 0)` or more specifically
 `(resolvent a) =O[cobounded π•œ] (Ξ» z, z⁻¹)`. -/
@@ -279,6 +313,7 @@ theorem norm_resolvent_le_forall (a : A) :
         (mul_pos hΞ΅ (inv_pos.mpr c_pos)).le
     _ = _ := inv_mul_cancel_rightβ‚€ c_pos.ne.symm Ξ΅
 #align spectrum.norm_resolvent_le_forall spectrum.norm_resolvent_le_forall
+-/
 
 end resolvent
 
@@ -292,6 +327,7 @@ variable [NontriviallyNormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A]
 
 variable (π•œ)
 
+#print spectrum.hasFPowerSeriesOnBall_inverse_one_sub_smul /-
 /-- In a Banach algebra `A` over a nontrivially normed field `π•œ`, for any `a : A` the
 power series with coefficients `a ^ n` represents the function `(1 - z β€’ a)⁻¹` in a disk of
 radius `β€–aβ€–β‚Šβ»ΒΉ`. -/
@@ -325,9 +361,11 @@ theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
       simpa [← smul_pow, (NormedRing.summable_geometric_of_norm_lt_1 _ norm_lt).hasSum_iff] using
         (NormedRing.inverse_one_sub _ norm_lt).symm }
 #align spectrum.has_fpower_series_on_ball_inverse_one_sub_smul spectrum.hasFPowerSeriesOnBall_inverse_one_sub_smul
+-/
 
 variable {π•œ}
 
+#print spectrum.isUnit_one_sub_smul_of_lt_inv_radius /-
 theorem isUnit_one_sub_smul_of_lt_inv_radius {a : A} {z : π•œ} (h : ↑‖zβ€–β‚Š < (spectralRadius π•œ a)⁻¹) :
     IsUnit (1 - z β€’ a) := by
   by_cases hz : z = 0
@@ -340,7 +378,9 @@ theorem isUnit_one_sub_smul_of_lt_inv_radius {a : A} {z : π•œ} (h : ↑‖zβ€–
       rwa [Units.val_inv_eq_inv_val, nnnorm_inv,
         coe_inv (nnnorm_ne_zero_iff.mpr (Units.val_mk0 hz β–Έ hz : (u : π•œ) β‰  0)), lt_inv_iff_lt_inv]
 #align spectrum.is_unit_one_sub_smul_of_lt_inv_radius spectrum.isUnit_one_sub_smul_of_lt_inv_radius
+-/
 
+#print spectrum.differentiableOn_inverse_one_sub_smul /-
 /-- In a Banach algebra `A` over `π•œ`, for `a : A` the function `Ξ» z, (1 - z β€’ a)⁻¹` is
 differentiable on any closed ball centered at zero of radius `r < (spectral_radius π•œ a)⁻¹`. -/
 theorem differentiableOn_inverse_one_sub_smul [CompleteSpace A] {a : A} {r : ℝβ‰₯0}
@@ -357,6 +397,7 @@ theorem differentiableOn_inverse_one_sub_smul [CompleteSpace A] {a : A} {r : ℝ
   have H₁ : Differentiable π•œ fun w : π•œ => 1 - w β€’ a := (differentiable_id.smul_const a).const_sub 1
   exact DifferentiableAt.comp z (differentiableAt_inverse hu.unit) H₁.differentiable_at
 #align spectrum.differentiable_on_inverse_one_sub_smul spectrum.differentiableOn_inverse_one_sub_smul
+-/
 
 end OneSubSmul
 
@@ -368,6 +409,7 @@ open scoped Topology
 
 variable [NormedRing A] [NormedAlgebra β„‚ A] [CompleteSpace A]
 
+#print spectrum.limsup_pow_nnnorm_pow_one_div_le_spectralRadius /-
 /-- The `limsup` relationship for the spectral radius used to prove `spectrum.gelfand_formula`. -/
 theorem limsup_pow_nnnorm_pow_one_div_le_spectralRadius (a : A) :
     limsup (fun n : β„• => ↑‖a ^ nβ€–β‚Š ^ (1 / n : ℝ)) atTop ≀ spectralRadius β„‚ a :=
@@ -386,7 +428,9 @@ theorem limsup_pow_nnnorm_pow_one_div_le_spectralRadius (a : A) :
   Β· have H₁ := (differentiable_on_inverse_one_sub_smul r_lt).HasFPowerSeriesOnBall r_pos
     exact ((has_fpower_series_on_ball_inverse_one_sub_smul β„‚ a).exchange_radius H₁).r_le
 #align spectrum.limsup_pow_nnnorm_pow_one_div_le_spectral_radius spectrum.limsup_pow_nnnorm_pow_one_div_le_spectralRadius
+-/
 
+#print spectrum.pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius /-
 /-- **Gelfand's formula**: Given an element `a : A` of a complex Banach algebra, the
 `spectral_radius` of `a` is the limit of the sequence `β€–a ^ nβ€–β‚Š ^ (1 / n)` -/
 theorem pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius (a : A) :
@@ -394,7 +438,9 @@ theorem pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius (a : A) :
   tendsto_of_le_liminf_of_limsup_le (spectralRadius_le_liminf_pow_nnnorm_pow_one_div β„‚ a)
     (limsup_pow_nnnorm_pow_one_div_le_spectralRadius a)
 #align spectrum.pow_nnnorm_pow_one_div_tendsto_nhds_spectral_radius spectrum.pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius
+-/
 
+#print spectrum.pow_norm_pow_one_div_tendsto_nhds_spectralRadius /-
 /- This is the same as `pow_nnnorm_pow_one_div_tendsto_nhds_spectral_radius` but for `norm`
 instead of `nnnorm`. -/
 /-- **Gelfand's formula**: Given an element `a : A` of a complex Banach algebra, the
@@ -407,6 +453,7 @@ theorem pow_norm_pow_one_div_tendsto_nhds_spectralRadius (a : A) :
   rw [← of_real_rpow_of_nonneg (norm_nonneg _) _, ← coe_nnnorm, coe_nnreal_eq]
   exact one_div_nonneg.mpr (by exact_mod_cast zero_le _)
 #align spectrum.pow_norm_pow_one_div_tendsto_nhds_spectral_radius spectrum.pow_norm_pow_one_div_tendsto_nhds_spectralRadius
+-/
 
 end GelfandFormula
 
@@ -414,6 +461,7 @@ section NonemptySpectrum
 
 variable [NormedRing A] [NormedAlgebra β„‚ A] [CompleteSpace A] [Nontrivial A] (a : A)
 
+#print spectrum.nonempty /-
 /-- In a (nontrivial) complex Banach algebra, every element has nonempty spectrum. -/
 protected theorem nonempty : (spectrum β„‚ a).Nonempty :=
   by
@@ -452,35 +500,44 @@ protected theorem nonempty : (spectrum β„‚ a).Nonempty :=
     not_isUnit_zero
       (Hβ‚….subst (is_unit_resolvent.mp (mem_resolvent_set_iff.mp (Hβ‚€.symm β–Έ Set.mem_univ 0))))
 #align spectrum.nonempty spectrum.nonempty
+-/
 
+#print spectrum.exists_nnnorm_eq_spectralRadius /-
 /-- In a complex Banach algebra, the spectral radius is always attained by some element of the
 spectrum. -/
 theorem exists_nnnorm_eq_spectralRadius : βˆƒ z ∈ spectrum β„‚ a, (β€–zβ€–β‚Š : ℝβ‰₯0∞) = spectralRadius β„‚ a :=
   exists_nnnorm_eq_spectralRadius_of_nonempty (spectrum.nonempty a)
 #align spectrum.exists_nnnorm_eq_spectral_radius spectrum.exists_nnnorm_eq_spectralRadius
+-/
 
+#print spectrum.spectralRadius_lt_of_forall_lt /-
 /-- In a complex Banach algebra, if every element of the spectrum has norm strictly less than
 `r : ℝβ‰₯0`, then the spectral radius is also strictly less than `r`. -/
 theorem spectralRadius_lt_of_forall_lt {r : ℝβ‰₯0} (hr : βˆ€ z ∈ spectrum β„‚ a, β€–zβ€–β‚Š < r) :
     spectralRadius β„‚ a < r :=
   spectralRadius_lt_of_forall_lt_of_nonempty (spectrum.nonempty a) hr
 #align spectrum.spectral_radius_lt_of_forall_lt spectrum.spectralRadius_lt_of_forall_lt
+-/
 
 open scoped Polynomial
 
 open Polynomial
 
+#print spectrum.map_polynomial_aeval /-
 /-- The **spectral mapping theorem** for polynomials in a Banach algebra over `β„‚`. -/
 theorem map_polynomial_aeval (p : β„‚[X]) :
     spectrum β„‚ (aeval a p) = (fun k => eval k p) '' spectrum β„‚ a :=
   map_polynomial_aeval_of_nonempty a p (spectrum.nonempty a)
 #align spectrum.map_polynomial_aeval spectrum.map_polynomial_aeval
+-/
 
+#print spectrum.map_pow /-
 /-- A specialization of the spectral mapping theorem for polynomials in a Banach algebra over `β„‚`
 to monic monomials. -/
 protected theorem map_pow (n : β„•) : spectrum β„‚ (a ^ n) = (fun x => x ^ n) '' spectrum β„‚ a := by
   simpa only [aeval_X_pow, eval_pow, eval_X] using map_polynomial_aeval a (X ^ n)
 #align spectrum.map_pow spectrum.map_pow
+-/
 
 end NonemptySpectrum
 
@@ -488,15 +545,15 @@ section GelfandMazurIsomorphism
 
 variable [NormedRing A] [NormedAlgebra β„‚ A] (hA : βˆ€ {a : A}, IsUnit a ↔ a β‰  0)
 
-include hA
-
--- mathport name: exprσ
 local notation "Οƒ" => spectrum β„‚
 
+#print spectrum.algebraMap_eq_of_mem /-
 theorem algebraMap_eq_of_mem {a : A} {z : β„‚} (h : z ∈ Οƒ a) : algebraMap β„‚ A z = a := by
   rwa [mem_iff, hA, Classical.not_not, sub_eq_zero] at h 
 #align spectrum.algebra_map_eq_of_mem spectrum.algebraMap_eq_of_mem
+-/
 
+#print NormedRing.algEquivComplexOfComplete /-
 /-- **Gelfand-Mazur theorem**: For a complex Banach division algebra, the natural `algebra_map β„‚ A`
 is an algebra isomorphism whose inverse is given by selecting the (unique) element of
 `spectrum β„‚ a`. In addition, `algebra_map_isometry` guarantees this map is an isometry.
@@ -517,14 +574,15 @@ noncomputable def NormedRing.algEquivComplexOfComplete [CompleteSpace A] : β„‚ 
         (@spectrum.nonempty _ _ _ _ nt <| algebraMap β„‚ A z).some_mem
     right_inv := fun a => algebraMap_eq_of_mem (@hA) (@spectrum.nonempty _ _ _ _ nt a).some_mem }
 #align normed_ring.alg_equiv_complex_of_complete NormedRing.algEquivComplexOfComplete
+-/
 
 end GelfandMazurIsomorphism
 
 section ExpMapping
 
--- mathport name: Β«expr↑ₐ»
 local notation "↑ₐ" => algebraMap π•œ A
 
+#print spectrum.exp_mem_exp /-
 /-- For `π•œ = ℝ` or `π•œ = β„‚`, `exp π•œ` maps the spectrum of `a` into the spectrum of `exp π•œ a`. -/
 theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A] (a : A) {z : π•œ}
     (hz : z ∈ spectrum π•œ a) : exp π•œ z ∈ spectrum π•œ (exp π•œ a) :=
@@ -557,6 +615,7 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
     sub_eq_iff_eq_add'.mpr h₃, Commute.isUnit_mul_iff (hβ‚€ β–Έ h₁ : (a - ↑ₐ z) * b = b * (a - ↑ₐ z))]
   exact not_and_of_not_left _ (not_and_of_not_left _ ((not_iff_not.mpr IsUnit.sub_iff).mp hz))
 #align spectrum.exp_mem_exp spectrum.exp_mem_exp
+-/
 
 end ExpMapping
 
@@ -568,7 +627,6 @@ section NormedField
 
 variable {F : Type _} [NormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A]
 
--- mathport name: Β«expr↑ₐ»
 local notation "↑ₐ" => algebraMap π•œ A
 
 /-- An algebra homomorphism into the base field, as a continuous linear map (since it is
@@ -587,19 +645,25 @@ def toContinuousLinearMap (Ο† : A →ₐ[π•œ] π•œ) : A β†’L[π•œ] π•œ :=
 #align alg_hom.to_continuous_linear_map AlgHom.toContinuousLinearMap
 -/
 
+#print AlgHom.coe_toContinuousLinearMap /-
 @[simp]
 theorem coe_toContinuousLinearMap (Ο† : A →ₐ[π•œ] π•œ) : ⇑φ.toContinuousLinearMap = Ο† :=
   rfl
 #align alg_hom.coe_to_continuous_linear_map AlgHom.coe_toContinuousLinearMap
+-/
 
+#print AlgHom.norm_apply_le_self_mul_norm_one /-
 theorem norm_apply_le_self_mul_norm_one [AlgHomClass F π•œ A π•œ] (f : F) (a : A) :
     β€–f aβ€– ≀ β€–aβ€– * β€–(1 : A)β€– :=
   spectrum.norm_le_norm_mul_of_mem (apply_mem_spectrum f _)
 #align alg_hom.norm_apply_le_self_mul_norm_one AlgHom.norm_apply_le_self_mul_norm_one
+-/
 
+#print AlgHom.norm_apply_le_self /-
 theorem norm_apply_le_self [NormOneClass A] [AlgHomClass F π•œ A π•œ] (f : F) (a : A) : β€–f aβ€– ≀ β€–aβ€– :=
   spectrum.norm_le_norm_of_mem (apply_mem_spectrum f _)
 #align alg_hom.norm_apply_le_self AlgHom.norm_apply_le_self
+-/
 
 end NormedField
 
@@ -607,9 +671,9 @@ section NontriviallyNormedField
 
 variable [NontriviallyNormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A]
 
--- mathport name: Β«expr↑ₐ»
 local notation "↑ₐ" => algebraMap π•œ A
 
+#print AlgHom.toContinuousLinearMap_norm /-
 @[simp]
 theorem toContinuousLinearMap_norm [NormOneClass A] (Ο† : A →ₐ[π•œ] π•œ) :
     β€–Ο†.toContinuousLinearMapβ€– = 1 :=
@@ -617,6 +681,7 @@ theorem toContinuousLinearMap_norm [NormOneClass A] (Ο† : A →ₐ[π•œ] π•œ) :
     (fun a => (one_mul β€–aβ€–).symm β–Έ spectrum.norm_le_norm_of_mem (apply_mem_spectrum Ο† _))
     fun _ _ h => by simpa only [coe_to_continuous_linear_map, map_one, norm_one, mul_one] using h 1
 #align alg_hom.to_continuous_linear_map_norm AlgHom.toContinuousLinearMap_norm
+-/
 
 end NontriviallyNormedField
 
@@ -643,15 +708,19 @@ def equivAlgHom : characterSpace π•œ A ≃ (A →ₐ[π•œ] π•œ)
 #align weak_dual.character_space.equiv_alg_hom WeakDual.CharacterSpace.equivAlgHom
 -/
 
+#print WeakDual.CharacterSpace.equivAlgHom_coe /-
 @[simp]
 theorem equivAlgHom_coe (f : characterSpace π•œ A) : ⇑(equivAlgHom f) = f :=
   rfl
 #align weak_dual.character_space.equiv_alg_hom_coe WeakDual.CharacterSpace.equivAlgHom_coe
+-/
 
+#print WeakDual.CharacterSpace.equivAlgHom_symm_coe /-
 @[simp]
 theorem equivAlgHom_symm_coe (f : A →ₐ[π•œ] π•œ) : ⇑(equivAlgHom.symm f) = f :=
   rfl
 #align weak_dual.character_space.equiv_alg_hom_symm_coe WeakDual.CharacterSpace.equivAlgHom_symm_coe
+-/
 
 end CharacterSpace
 
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.spectrum
-! leanprover-community/mathlib commit 58a272265b5e05f258161260dd2c5d247213cbd3
+! leanprover-community/mathlib commit 087c325ae0ab42dbdd5dee55bc37d3d5a0bf2197
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -18,6 +18,9 @@ import Mathbin.Analysis.NormedSpace.Exponential
 /-!
 # The spectrum of elements in a complete normed algebra
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file contains the basic theory for the resolvent and spectrum of a Banach algebra.
 
 ## Main definitions
Diff
@@ -50,6 +50,7 @@ This file contains the basic theory for the resolvent and spectrum of a Banach a
 
 open scoped ENNReal NNReal
 
+#print spectralRadius /-
 /-- The *spectral radius* is the supremum of the `nnnorm` (`β€–β¬β€–β‚Š`) of elements in the spectrum,
     coerced into an element of `ℝβ‰₯0∞`. Note that it is possible for `spectrum π•œ a = βˆ…`. In this
     case, `spectral_radius a = 0`.  It is also possible that `spectrum π•œ a` be unbounded (though
@@ -59,6 +60,7 @@ noncomputable def spectralRadius (π•œ : Type _) {A : Type _} [NormedField π•œ]
     (a : A) : ℝβ‰₯0∞ :=
   ⨆ k ∈ spectrum π•œ a, β€–kβ€–β‚Š
 #align spectral_radius spectralRadius
+-/
 
 variable {π•œ : Type _} {A : Type _}
 
@@ -574,11 +576,13 @@ instance (priority := 100) [AlgHomClass F π•œ A π•œ] : ContinuousLinearMapClas
       AddMonoidHomClass.continuous_of_bound Ο† β€–(1 : A)β€– fun a =>
         mul_comm β€–aβ€– β€–(1 : A)β€– β–Έ spectrum.norm_le_norm_mul_of_mem (apply_mem_spectrum Ο† _) }
 
+#print AlgHom.toContinuousLinearMap /-
 /-- An algebra homomorphism into the base field, as a continuous linear map (since it is
 automatically bounded). -/
 def toContinuousLinearMap (Ο† : A →ₐ[π•œ] π•œ) : A β†’L[π•œ] π•œ :=
   { Ο†.toLinearMap with cont := map_continuous Ο† }
 #align alg_hom.to_continuous_linear_map AlgHom.toContinuousLinearMap
+-/
 
 @[simp]
 theorem coe_toContinuousLinearMap (Ο† : A →ₐ[π•œ] π•œ) : ⇑φ.toContinuousLinearMap = Ο† :=
@@ -623,6 +627,7 @@ variable [NontriviallyNormedField π•œ] [NormedRing A] [CompleteSpace A]
 
 variable [NormedAlgebra π•œ A]
 
+#print WeakDual.CharacterSpace.equivAlgHom /-
 /-- The equivalence between characters and algebra homomorphisms into the base field. -/
 def equivAlgHom : characterSpace π•œ A ≃ (A →ₐ[π•œ] π•œ)
     where
@@ -632,17 +637,18 @@ def equivAlgHom : characterSpace π•œ A ≃ (A →ₐ[π•œ] π•œ)
       property := by rw [eq_set_map_one_map_mul]; exact ⟨map_one f, map_mul f⟩ }
   left_inv f := Subtype.ext <| ContinuousLinearMap.ext fun x => rfl
   right_inv f := AlgHom.ext fun x => rfl
-#align weak_dual.character_space.equiv_alg_hom WeakDual.characterSpace.equivAlgHom
+#align weak_dual.character_space.equiv_alg_hom WeakDual.CharacterSpace.equivAlgHom
+-/
 
 @[simp]
 theorem equivAlgHom_coe (f : characterSpace π•œ A) : ⇑(equivAlgHom f) = f :=
   rfl
-#align weak_dual.character_space.equiv_alg_hom_coe WeakDual.characterSpace.equivAlgHom_coe
+#align weak_dual.character_space.equiv_alg_hom_coe WeakDual.CharacterSpace.equivAlgHom_coe
 
 @[simp]
 theorem equivAlgHom_symm_coe (f : A →ₐ[π•œ] π•œ) : ⇑(equivAlgHom.symm f) = f :=
   rfl
-#align weak_dual.character_space.equiv_alg_hom_symm_coe WeakDual.characterSpace.equivAlgHom_symm_coe
+#align weak_dual.character_space.equiv_alg_hom_symm_coe WeakDual.CharacterSpace.equivAlgHom_symm_coe
 
 end CharacterSpace
 
Diff
@@ -537,9 +537,9 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
       div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))
         (by exact_mod_cast Nat.factorial_pos n)
         (by exact_mod_cast Nat.factorial_le (lt_add_one n).le)
-  have hβ‚€ : (βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1)) = (a - ↑ₐ z) * b := by
+  have hβ‚€ : βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1) = (a - ↑ₐ z) * b := by
     simpa only [mul_smul_comm, pow_succ] using hb.tsum_mul_left (a - ↑ₐ z)
-  have h₁ : (βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1)) = b * (a - ↑ₐ z) := by
+  have h₁ : βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1) = b * (a - ↑ₐ z) := by
     simpa only [pow_succ', Algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐ z)
   have h₃ : exp π•œ (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b :=
     by
Diff
@@ -265,7 +265,6 @@ theorem norm_resolvent_le_forall (a : A) :
         exact
           mul_lt_mul_of_pos_left
             ((inv_mul_lt_iff ha₁).mpr ((mul_one (β€–aβ€– + 1)).symm β–Έ lt_add_one _)) Ξ΄_pos
-      
   rw [← inv_smul_smul z (resolvent a (z : π•œ)), units_smul_resolvent_self, resolvent,
     Algebra.algebraMap_eq_smul_one, one_smul, Units.smul_def, norm_smul, Units.val_inv_eq_inv_val,
     norm_inv]
@@ -274,7 +273,6 @@ theorem norm_resolvent_le_forall (a : A) :
       mul_le_mul (hz.trans (min_le_right _ _)) (hΞ΄ (mem_ball_zero_iff.mpr lt_Ξ΄)) (norm_nonneg _)
         (mul_pos hΞ΅ (inv_pos.mpr c_pos)).le
     _ = _ := inv_mul_cancel_rightβ‚€ c_pos.ne.symm Ξ΅
-    
 #align spectrum.norm_resolvent_le_forall spectrum.norm_resolvent_le_forall
 
 end resolvent
Diff
@@ -4,11 +4,11 @@ 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.spectrum
-! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
+! leanprover-community/mathlib commit 58a272265b5e05f258161260dd2c5d247213cbd3
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.Algebra.Algebra.Spectrum
+import Mathbin.FieldTheory.IsAlgClosed.Spectrum
 import Mathbin.Analysis.Complex.Liouville
 import Mathbin.Analysis.Complex.Polynomial
 import Mathbin.Analysis.Analytic.RadiusLiminf
Diff
@@ -533,7 +533,7 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
   have hb : Summable fun n : β„• => ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ n :=
     by
     refine' summable_of_norm_bounded_eventually _ (Real.summable_pow_div_factorial β€–a - ↑ₐ zβ€–) _
-    filter_upwards [Filter.eventually_cofinite_ne 0]with n hn
+    filter_upwards [Filter.eventually_cofinite_ne 0] with n hn
     rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_natCast, ← div_eq_mul_inv]
     exact
       div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))
@@ -546,7 +546,7 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
   have h₃ : exp π•œ (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b :=
     by
     rw [exp_eq_tsum]
-    convert tsum_eq_zero_add (exp_series_summable' (a - ↑ₐ z))
+    convert tsum_eq_zero_add (expSeries_summable' (a - ↑ₐ z))
     simp only [Nat.factorial_zero, Nat.cast_one, inv_one, pow_zero, one_smul]
     exact hβ‚€.symm
   rw [spectrum.mem_iff, IsUnit.sub_iff, ← one_mul (↑ₐ (exp π•œ z)), hexpmul, ← _root_.sub_mul,
Diff
@@ -292,8 +292,8 @@ variable (π•œ)
 /-- In a Banach algebra `A` over a nontrivially normed field `π•œ`, for any `a : A` the
 power series with coefficients `a ^ n` represents the function `(1 - z β€’ a)⁻¹` in a disk of
 radius `β€–aβ€–β‚Šβ»ΒΉ`. -/
-theorem hasFpowerSeriesOnBallInverseOneSubSmul [CompleteSpace A] (a : A) :
-    HasFpowerSeriesOnBall (fun z : π•œ => Ring.inverse (1 - z β€’ a))
+theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
+    HasFPowerSeriesOnBall (fun z : π•œ => Ring.inverse (1 - z β€’ a))
       (fun n => ContinuousMultilinearMap.mkPiField π•œ (Fin n) (a ^ n)) 0 β€–aβ€–β‚Šβ»ΒΉ :=
   { r_le :=
       by
@@ -321,7 +321,7 @@ theorem hasFpowerSeriesOnBallInverseOneSubSmul [CompleteSpace A] (a : A) :
             NNReal.lt_inv_iff_mul_lt h]
       simpa [← smul_pow, (NormedRing.summable_geometric_of_norm_lt_1 _ norm_lt).hasSum_iff] using
         (NormedRing.inverse_one_sub _ norm_lt).symm }
-#align spectrum.has_fpower_series_on_ball_inverse_one_sub_smul spectrum.hasFpowerSeriesOnBallInverseOneSubSmul
+#align spectrum.has_fpower_series_on_ball_inverse_one_sub_smul spectrum.hasFPowerSeriesOnBall_inverse_one_sub_smul
 
 variable {π•œ}
 
@@ -380,8 +380,8 @@ theorem limsup_pow_nnnorm_pow_one_div_le_spectralRadius (a : A) :
     ext n
     rw [norm_toNNReal, ENNReal.coe_rpow_def β€–a ^ nβ€–β‚Š (1 / n : ℝ), if_neg]
     exact fun ha => by linarith [ha.2, (one_div_nonneg.mpr n.cast_nonneg : 0 ≀ (1 / n : ℝ))]
-  Β· have H₁ := (differentiable_on_inverse_one_sub_smul r_lt).HasFpowerSeriesOnBall r_pos
-    exact ((has_fpower_series_on_ball_inverse_one_sub_smul β„‚ a).exchangeRadius H₁).r_le
+  Β· have H₁ := (differentiable_on_inverse_one_sub_smul r_lt).HasFPowerSeriesOnBall r_pos
+    exact ((has_fpower_series_on_ball_inverse_one_sub_smul β„‚ a).exchange_radius H₁).r_le
 #align spectrum.limsup_pow_nnnorm_pow_one_div_le_spectral_radius spectrum.limsup_pow_nnnorm_pow_one_div_le_spectralRadius
 
 /-- **Gelfand's formula**: Given an element `a : A` of a complex Banach algebra, the
Diff
@@ -112,7 +112,7 @@ theorem mem_resolventSet_of_norm_lt_mul {a : A} {k : π•œ} (h : β€–aβ€– * β€–(1
     ne_zero_of_norm_ne_zero ((mul_nonneg (norm_nonneg _) (norm_nonneg _)).trans_lt h).ne'
   let ku := Units.map ↑ₐ.toMonoidHom (Units.mk0 k hk)
   rw [← inv_inv β€–(1 : A)β€–,
-    mul_inv_lt_iff (inv_pos.2 <| norm_pos_iff.2 (one_ne_zero : (1 : A) β‰  0))] at h
+    mul_inv_lt_iff (inv_pos.2 <| norm_pos_iff.2 (one_ne_zero : (1 : A) β‰  0))] at h 
   have hku : β€–-aβ€– < β€–(↑ku⁻¹ : A)‖⁻¹ := by simpa [ku, norm_algebraMap] using h
   simpa [ku, sub_eq_add_neg, Algebra.algebraMap_eq_smul_one] using (ku.add (-a) hku).IsUnit
 #align spectrum.mem_resolvent_set_of_norm_lt_mul spectrum.mem_resolventSet_of_norm_lt_mul
@@ -197,7 +197,7 @@ theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
     h (by simpa only [inv_inv, inv_top] using congr_arg (fun x : ℝβ‰₯0∞ => x⁻¹) h')
   simp only [ENNReal.mul_le_iff_le_inv h (hΡ.trans_le le_top).Ne, mul_comm Ρ⁻¹,
     liminf_eq_supr_infi_of_nat', ENNReal.iSup_mul, ENNReal.iInf_mul hΞ΅']
-  rw [← ENNReal.inv_lt_inv, inv_one] at hΞ΅
+  rw [← ENNReal.inv_lt_inv, inv_one] at hΞ΅ 
   obtain ⟨N, hN⟩ :=
     eventually_at_top.mp
       (ENNReal.eventually_pow_one_div_le (ENNReal.coe_ne_top : ↑‖(1 : A)β€–β‚Š β‰  ∞) hΞ΅)
@@ -239,9 +239,9 @@ theorem norm_resolvent_le_forall (a : A) :
     βˆ€ Ξ΅ > 0, βˆƒ R > 0, βˆ€ z : π•œ, R ≀ β€–zβ€– β†’ β€–resolvent a zβ€– ≀ Ξ΅ :=
   by
   obtain ⟨c, c_pos, hc⟩ := (@NormedRing.inverse_one_sub_norm A _ _).exists_pos
-  rw [is_O_with_iff, eventually_iff, Metric.mem_nhds_iff] at hc
+  rw [is_O_with_iff, eventually_iff, Metric.mem_nhds_iff] at hc 
   rcases hc with ⟨δ, δ_pos, hδ⟩
-  simp only [CstarRing.norm_one, mul_one] at hΞ΄
+  simp only [CstarRing.norm_one, mul_one] at hΞ΄ 
   intro Ξ΅ hΞ΅
   have ha₁ : 0 < β€–aβ€– + 1 := lt_of_le_of_lt (norm_nonneg a) (lt_add_one _)
   have min_pos : 0 < min (Ξ΄ * (β€–aβ€– + 1)⁻¹) (Ξ΅ * c⁻¹) :=
@@ -307,7 +307,7 @@ theorem hasFpowerSeriesOnBallInverseOneSubSmul [CompleteSpace A] (a : A) :
             (le_max_left _ _)
         Β· by_cases β€–aβ€–β‚Š = 0
           Β· simp only [h, MulZeroClass.zero_mul, zero_le', pow_succ]
-          Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr
+          Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr 
             simpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ
     r_pos := ENNReal.inv_pos.mpr coe_ne_top
     HasSum := fun y hy =>
@@ -331,7 +331,7 @@ theorem isUnit_one_sub_smul_of_lt_inv_radius {a : A} {z : π•œ} (h : ↑‖zβ€–
   Β· simp only [hz, isUnit_one, sub_zero, zero_smul]
   Β· let u := Units.mk0 z hz
     suffices hu : IsUnit (u⁻¹ β€’ 1 - a)
-    Β· rwa [IsUnit.smul_sub_iff_sub_inv_smul, inv_inv u] at hu
+    Β· rwa [IsUnit.smul_sub_iff_sub_inv_smul, inv_inv u] at hu 
     Β· rw [Units.smul_def, ← Algebra.algebraMap_eq_smul_one, ← mem_resolvent_set_iff]
       refine' mem_resolvent_set_of_spectral_radius_lt _
       rwa [Units.val_inv_eq_inv_val, nnnorm_inv,
@@ -418,7 +418,7 @@ protected theorem nonempty : (spectrum β„‚ a).Nonempty :=
     is differentiable on `β„‚`. -/
   rw [Set.nonempty_iff_ne_empty]
   by_contra h
-  have Hβ‚€ : resolventSet β„‚ a = Set.univ := by rwa [spectrum, Set.compl_empty_iff] at h
+  have Hβ‚€ : resolventSet β„‚ a = Set.univ := by rwa [spectrum, Set.compl_empty_iff] at h 
   have H₁ : Differentiable β„‚ fun z : β„‚ => resolvent a z := fun z =>
     (has_deriv_at_resolvent (Hβ‚€.symm β–Έ Set.mem_univ z : z ∈ resolventSet β„‚ a)).DifferentiableAt
   /- The norm of the resolvent is small for all sufficently large `z`, and by compactness and
@@ -491,7 +491,7 @@ include hA
 local notation "Οƒ" => spectrum β„‚
 
 theorem algebraMap_eq_of_mem {a : A} {z : β„‚} (h : z ∈ Οƒ a) : algebraMap β„‚ A z = a := by
-  rwa [mem_iff, hA, Classical.not_not, sub_eq_zero] at h
+  rwa [mem_iff, hA, Classical.not_not, sub_eq_zero] at h 
 #align spectrum.algebra_map_eq_of_mem spectrum.algebraMap_eq_of_mem
 
 /-- **Gelfand-Mazur theorem**: For a complex Banach division algebra, the natural `algebra_map β„‚ A`
Diff
@@ -48,7 +48,7 @@ This file contains the basic theory for the resolvent and spectrum of a Banach a
 -/
 
 
-open ENNReal NNReal
+open scoped ENNReal NNReal
 
 /-- The *spectral radius* is the supremum of the `nnnorm` (`β€–β¬β€–β‚Š`) of elements in the spectrum,
     coerced into an element of `ℝβ‰₯0∞`. Note that it is possible for `spectrum π•œ a = βˆ…`. In this
@@ -283,7 +283,7 @@ section OneSubSmul
 
 open ContinuousMultilinearMap ENNReal FormalMultilinearSeries
 
-open NNReal ENNReal
+open scoped NNReal ENNReal
 
 variable [NontriviallyNormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A]
 
@@ -361,7 +361,7 @@ section GelfandFormula
 
 open Filter ENNReal ContinuousMultilinearMap
 
-open Topology
+open scoped Topology
 
 variable [NormedRing A] [NormedAlgebra β„‚ A] [CompleteSpace A]
 
@@ -463,7 +463,7 @@ theorem spectralRadius_lt_of_forall_lt {r : ℝβ‰₯0} (hr : βˆ€ z ∈ spectrum 
   spectralRadius_lt_of_forall_lt_of_nonempty (spectrum.nonempty a) hr
 #align spectrum.spectral_radius_lt_of_forall_lt spectrum.spectralRadius_lt_of_forall_lt
 
-open Polynomial
+open scoped Polynomial
 
 open Polynomial
 
Diff
@@ -85,9 +85,7 @@ theorem SpectralRadius.of_subsingleton [Subsingleton A] (a : A) : spectralRadius
 #align spectrum.spectral_radius.of_subsingleton spectrum.SpectralRadius.of_subsingleton
 
 @[simp]
-theorem spectralRadius_zero : spectralRadius π•œ (0 : A) = 0 :=
-  by
-  nontriviality A
+theorem spectralRadius_zero : spectralRadius π•œ (0 : A) = 0 := by nontriviality A;
   simp [spectralRadius]
 #align spectrum.spectral_radius_zero spectrum.spectralRadius_zero
 
@@ -147,10 +145,8 @@ protected theorem isCompact [ProperSpace π•œ] (a : A) : IsCompact (Οƒ a) :=
   Metric.isCompact_of_isClosed_bounded (spectrum.isClosed a) (is_bounded a)
 #align spectrum.is_compact spectrum.isCompact
 
-theorem spectralRadius_le_nnnorm [NormOneClass A] (a : A) : spectralRadius π•œ a ≀ β€–aβ€–β‚Š :=
-  by
-  refine' iSupβ‚‚_le fun k hk => _
-  exact_mod_cast norm_le_norm_of_mem hk
+theorem spectralRadius_le_nnnorm [NormOneClass A] (a : A) : spectralRadius π•œ a ≀ β€–aβ€–β‚Š := by
+  refine' iSupβ‚‚_le fun k hk => _; exact_mod_cast norm_le_norm_of_mem hk
 #align spectrum.spectral_radius_le_nnnorm spectrum.spectralRadius_le_nnnorm
 
 theorem exists_nnnorm_eq_spectralRadius_of_nonempty [ProperSpace π•œ] {a : A} (ha : (Οƒ a).Nonempty) :
@@ -635,9 +631,7 @@ def equivAlgHom : characterSpace π•œ A ≃ (A →ₐ[π•œ] π•œ)
   toFun := toAlgHom
   invFun f :=
     { val := f.toContinuousLinearMap
-      property := by
-        rw [eq_set_map_one_map_mul]
-        exact ⟨map_one f, map_mul f⟩ }
+      property := by rw [eq_set_map_one_map_mul]; exact ⟨map_one f, map_mul f⟩ }
   left_inv f := Subtype.ext <| ContinuousLinearMap.ext fun x => rfl
   right_inv f := AlgHom.ext fun x => rfl
 #align weak_dual.character_space.equiv_alg_hom WeakDual.characterSpace.equivAlgHom
Diff
@@ -230,7 +230,7 @@ local notation "↑ₐ" => algebraMap π•œ A
 theorem hasDerivAt_resolvent {a : A} {k : π•œ} (hk : k ∈ ρ a) :
     HasDerivAt (resolvent a) (-resolvent a k ^ 2) k :=
   by
-  have H₁ : HasFderivAt Ring.inverse _ (↑ₐ k - a) := hasFderivAt_ring_inverse hk.unit
+  have H₁ : HasFDerivAt Ring.inverse _ (↑ₐ k - a) := hasFDerivAt_ring_inverse hk.unit
   have Hβ‚‚ : HasDerivAt (fun k => ↑ₐ k - a) 1 k := by
     simpa using (Algebra.linearMap π•œ A).HasDerivAt.sub_const a
   simpa [resolvent, sq, hk.unit_spec, ← Ring.inverse_unit hk.unit] using H₁.comp_has_deriv_at k Hβ‚‚
Diff
@@ -4,12 +4,11 @@ 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.spectrum
-! leanprover-community/mathlib commit 3f655f5297b030a87d641ad4e825af8d9679eb0b
+! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Algebra.Spectrum
-import Mathbin.Analysis.SpecialFunctions.Pow
 import Mathbin.Analysis.Complex.Liouville
 import Mathbin.Analysis.Complex.Polynomial
 import Mathbin.Analysis.Analytic.RadiusLiminf
Diff
@@ -94,7 +94,7 @@ theorem spectralRadius_zero : spectralRadius π•œ (0 : A) = 0 :=
 
 theorem mem_resolventSet_of_spectralRadius_lt {a : A} {k : π•œ} (h : spectralRadius π•œ a < β€–kβ€–β‚Š) :
     k ∈ ρ a :=
-  Classical.not_not.mp fun hn => h.not_le <| le_supα΅’β‚‚ k hn
+  Classical.not_not.mp fun hn => h.not_le <| le_iSupβ‚‚ k hn
 #align spectrum.mem_resolvent_set_of_spectral_radius_lt spectrum.mem_resolventSet_of_spectralRadius_lt
 
 variable [CompleteSpace A]
@@ -150,7 +150,7 @@ protected theorem isCompact [ProperSpace π•œ] (a : A) : IsCompact (Οƒ a) :=
 
 theorem spectralRadius_le_nnnorm [NormOneClass A] (a : A) : spectralRadius π•œ a ≀ β€–aβ€–β‚Š :=
   by
-  refine' supα΅’β‚‚_le fun k hk => _
+  refine' iSupβ‚‚_le fun k hk => _
   exact_mod_cast norm_le_norm_of_mem hk
 #align spectrum.spectral_radius_le_nnnorm spectrum.spectralRadius_le_nnnorm
 
@@ -158,13 +158,13 @@ theorem exists_nnnorm_eq_spectralRadius_of_nonempty [ProperSpace π•œ] {a : A} (
     βˆƒ k ∈ Οƒ a, (β€–kβ€–β‚Š : ℝβ‰₯0∞) = spectralRadius π•œ a :=
   by
   obtain ⟨k, hk, h⟩ := (spectrum.isCompact a).exists_forall_ge ha continuous_nnnorm.continuous_on
-  exact ⟨k, hk, le_antisymm (le_supα΅’β‚‚ k hk) (supα΅’β‚‚_le <| by exact_mod_cast h)⟩
+  exact ⟨k, hk, le_antisymm (le_iSupβ‚‚ k hk) (iSupβ‚‚_le <| by exact_mod_cast h)⟩
 #align spectrum.exists_nnnorm_eq_spectral_radius_of_nonempty spectrum.exists_nnnorm_eq_spectralRadius_of_nonempty
 
 theorem spectralRadius_lt_of_forall_lt_of_nonempty [ProperSpace π•œ] {a : A} (ha : (Οƒ a).Nonempty)
     {r : ℝβ‰₯0} (hr : βˆ€ k ∈ Οƒ a, β€–kβ€–β‚Š < r) : spectralRadius π•œ a < r :=
-  supβ‚›_image.symm.trans_lt <|
-    ((spectrum.isCompact a).supβ‚›_lt_iff_of_continuous ha
+  sSup_image.symm.trans_lt <|
+    ((spectrum.isCompact a).sSup_lt_iff_of_continuous ha
           (ENNReal.continuous_coe.comp continuous_nnnorm).ContinuousOn (r : ℝβ‰₯0∞)).mpr
       (by exact_mod_cast hr)
 #align spectrum.spectral_radius_lt_of_forall_lt_of_nonempty spectrum.spectralRadius_lt_of_forall_lt_of_nonempty
@@ -176,7 +176,7 @@ variable (π•œ)
 theorem spectralRadius_le_pow_nnnorm_pow_one_div (a : A) (n : β„•) :
     spectralRadius π•œ a ≀ β€–a ^ (n + 1)β€–β‚Š ^ (1 / (n + 1) : ℝ) * β€–(1 : A)β€–β‚Š ^ (1 / (n + 1) : ℝ) :=
   by
-  refine' supα΅’β‚‚_le fun k hk => _
+  refine' iSupβ‚‚_le fun k hk => _
   -- apply easy direction of the spectral mapping theorem for polynomials
   have pow_mem : k ^ (n + 1) ∈ Οƒ (a ^ (n + 1)) := by
     simpa only [one_mul, Algebra.algebraMap_eq_smul_one, one_smul, aeval_monomial, one_mul,
@@ -201,13 +201,13 @@ theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
   have hΞ΅' : Ρ⁻¹ β‰  ∞ := fun h' =>
     h (by simpa only [inv_inv, inv_top] using congr_arg (fun x : ℝβ‰₯0∞ => x⁻¹) h')
   simp only [ENNReal.mul_le_iff_le_inv h (hΡ.trans_le le_top).Ne, mul_comm Ρ⁻¹,
-    liminf_eq_supr_infi_of_nat', ENNReal.supα΅’_mul, ENNReal.infα΅’_mul hΞ΅']
+    liminf_eq_supr_infi_of_nat', ENNReal.iSup_mul, ENNReal.iInf_mul hΞ΅']
   rw [← ENNReal.inv_lt_inv, inv_one] at hΞ΅
   obtain ⟨N, hN⟩ :=
     eventually_at_top.mp
       (ENNReal.eventually_pow_one_div_le (ENNReal.coe_ne_top : ↑‖(1 : A)β€–β‚Š β‰  ∞) hΞ΅)
-  refine' le_trans _ (le_supα΅’ _ (N + 1))
-  refine' le_infα΅’ fun n => _
+  refine' le_trans _ (le_iSup _ (N + 1))
+  refine' le_iInf fun n => _
   simp only [← add_assoc]
   refine' (spectral_radius_le_pow_nnnorm_pow_one_div π•œ a (n + N)).trans _
   norm_cast
Diff
@@ -539,7 +539,7 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
     by
     refine' summable_of_norm_bounded_eventually _ (Real.summable_pow_div_factorial β€–a - ↑ₐ zβ€–) _
     filter_upwards [Filter.eventually_cofinite_ne 0]with n hn
-    rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_nat_cast, ← div_eq_mul_inv]
+    rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_natCast, ← div_eq_mul_inv]
     exact
       div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))
         (by exact_mod_cast Nat.factorial_pos n)
Diff
@@ -325,7 +325,7 @@ theorem hasFpowerSeriesOnBallInverseOneSubSmul [CompleteSpace A] (a : A) :
           rwa [← coe_nnnorm, ← Real.lt_toNNReal_iff_coe_lt, Real.toNNReal_one, nnnorm_smul, ←
             NNReal.lt_inv_iff_mul_lt h]
       simpa [← smul_pow, (NormedRing.summable_geometric_of_norm_lt_1 _ norm_lt).hasSum_iff] using
-        (NormedRing.inverse_oneSub _ norm_lt).symm }
+        (NormedRing.inverse_one_sub _ norm_lt).symm }
 #align spectrum.has_fpower_series_on_ball_inverse_one_sub_smul spectrum.hasFpowerSeriesOnBallInverseOneSubSmul
 
 variable {π•œ}
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.spectrum
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 3f655f5297b030a87d641ad4e825af8d9679eb0b
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -539,7 +539,7 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
     by
     refine' summable_of_norm_bounded_eventually _ (Real.summable_pow_div_factorial β€–a - ↑ₐ zβ€–) _
     filter_upwards [Filter.eventually_cofinite_ne 0]with n hn
-    rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_eq_abs, IsROrC.abs_cast_nat, ← div_eq_mul_inv]
+    rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_nat_cast, ← div_eq_mul_inv]
     exact
       div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))
         (by exact_mod_cast Nat.factorial_pos n)
Diff
@@ -197,7 +197,7 @@ theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
   by
   refine' ENNReal.le_of_forall_lt_one_mul_le fun Ξ΅ hΞ΅ => _
   by_cases Ξ΅ = 0
-  Β· simp only [h, zero_mul, zero_le']
+  Β· simp only [h, MulZeroClass.zero_mul, zero_le']
   have hΞ΅' : Ρ⁻¹ β‰  ∞ := fun h' =>
     h (by simpa only [inv_inv, inv_top] using congr_arg (fun x : ℝβ‰₯0∞ => x⁻¹) h')
   simp only [ENNReal.mul_le_iff_le_inv h (hΡ.trans_le le_top).Ne, mul_comm Ρ⁻¹,
@@ -311,7 +311,7 @@ theorem hasFpowerSeriesOnBallInverseOneSubSmul [CompleteSpace A] (a : A) :
           le_trans (le_trans (mul_le_mul_right' (nnnorm_pow_le' a n.succ_pos) (r ^ n.succ)) _)
             (le_max_left _ _)
         Β· by_cases β€–aβ€–β‚Š = 0
-          Β· simp only [h, zero_mul, zero_le', pow_succ]
+          Β· simp only [h, MulZeroClass.zero_mul, zero_le', pow_succ]
           Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr
             simpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ
     r_pos := ENNReal.inv_pos.mpr coe_ne_top
Diff
@@ -321,7 +321,7 @@ theorem hasFpowerSeriesOnBallInverseOneSubSmul [CompleteSpace A] (a : A) :
         by_cases h : β€–aβ€–β‚Š = 0
         Β· simp only [nnnorm_eq_zero.mp h, norm_zero, zero_lt_one, smul_zero]
         Β· have nnnorm_lt : β€–yβ€–β‚Š < β€–aβ€–β‚Šβ»ΒΉ := by
-            simpa only [← coe_inv h, mem_ball_zero_iff, Metric.emetric_ball_nNReal] using hy
+            simpa only [← coe_inv h, mem_ball_zero_iff, Metric.emetric_ball_nnreal] using hy
           rwa [← coe_nnnorm, ← Real.lt_toNNReal_iff_coe_lt, Real.toNNReal_one, nnnorm_smul, ←
             NNReal.lt_inv_iff_mul_lt h]
       simpa [← smul_pow, (NormedRing.summable_geometric_of_norm_lt_1 _ norm_lt).hasSum_iff] using
Diff
@@ -49,7 +49,7 @@ This file contains the basic theory for the resolvent and spectrum of a Banach a
 -/
 
 
-open Ennreal NNReal
+open ENNReal NNReal
 
 /-- The *spectral radius* is the supremum of the `nnnorm` (`β€–β¬β€–β‚Š`) of elements in the spectrum,
     coerced into an element of `ℝβ‰₯0∞`. Note that it is possible for `spectrum π•œ a = βˆ…`. In this
@@ -165,11 +165,11 @@ theorem spectralRadius_lt_of_forall_lt_of_nonempty [ProperSpace π•œ] {a : A} (h
     {r : ℝβ‰₯0} (hr : βˆ€ k ∈ Οƒ a, β€–kβ€–β‚Š < r) : spectralRadius π•œ a < r :=
   supβ‚›_image.symm.trans_lt <|
     ((spectrum.isCompact a).supβ‚›_lt_iff_of_continuous ha
-          (Ennreal.continuous_coe.comp continuous_nnnorm).ContinuousOn (r : ℝβ‰₯0∞)).mpr
+          (ENNReal.continuous_coe.comp continuous_nnnorm).ContinuousOn (r : ℝβ‰₯0∞)).mpr
       (by exact_mod_cast hr)
 #align spectrum.spectral_radius_lt_of_forall_lt_of_nonempty spectrum.spectralRadius_lt_of_forall_lt_of_nonempty
 
-open Ennreal Polynomial
+open ENNReal Polynomial
 
 variable (π•œ)
 
@@ -184,28 +184,28 @@ theorem spectralRadius_le_pow_nnnorm_pow_one_div (a : A) (n : β„•) :
   -- power of the norm is bounded by norm of the power
   have nnnorm_pow_le : (↑(β€–kβ€–β‚Š ^ (n + 1)) : ℝβ‰₯0∞) ≀ β€–a ^ (n + 1)β€–β‚Š * β€–(1 : A)β€–β‚Š := by
     simpa only [Real.toNNReal_mul (norm_nonneg _), norm_toNNReal, nnnorm_pow k (n + 1),
-      Ennreal.coe_mul] using coe_mono (Real.toNNReal_mono (norm_le_norm_mul_of_mem pow_mem))
+      ENNReal.coe_mul] using coe_mono (Real.toNNReal_mono (norm_le_norm_mul_of_mem pow_mem))
   -- take (n + 1)α΅—Κ° roots and clean up the left-hand side
   have hn : 0 < ((n + 1 : β„•) : ℝ) := by exact_mod_cast Nat.succ_pos'
   convert monotone_rpow_of_nonneg (one_div_pos.mpr hn).le nnnorm_pow_le
   erw [coe_pow, ← rpow_nat_cast, ← rpow_mul, mul_one_div_cancel hn.ne', rpow_one]
-  rw [Nat.cast_succ, Ennreal.coe_mul_rpow]
+  rw [Nat.cast_succ, ENNReal.coe_mul_rpow]
 #align spectrum.spectral_radius_le_pow_nnnorm_pow_one_div spectrum.spectralRadius_le_pow_nnnorm_pow_one_div
 
 theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
     spectralRadius π•œ a ≀ atTop.liminf fun n : β„• => (β€–a ^ nβ€–β‚Š : ℝβ‰₯0∞) ^ (1 / n : ℝ) :=
   by
-  refine' Ennreal.le_of_forall_lt_one_mul_le fun Ξ΅ hΞ΅ => _
+  refine' ENNReal.le_of_forall_lt_one_mul_le fun Ξ΅ hΞ΅ => _
   by_cases Ξ΅ = 0
   Β· simp only [h, zero_mul, zero_le']
   have hΞ΅' : Ρ⁻¹ β‰  ∞ := fun h' =>
     h (by simpa only [inv_inv, inv_top] using congr_arg (fun x : ℝβ‰₯0∞ => x⁻¹) h')
-  simp only [Ennreal.mul_le_iff_le_inv h (hΡ.trans_le le_top).Ne, mul_comm Ρ⁻¹,
-    liminf_eq_supr_infi_of_nat', Ennreal.supα΅’_mul, Ennreal.infα΅’_mul hΞ΅']
-  rw [← Ennreal.inv_lt_inv, inv_one] at hΞ΅
+  simp only [ENNReal.mul_le_iff_le_inv h (hΡ.trans_le le_top).Ne, mul_comm Ρ⁻¹,
+    liminf_eq_supr_infi_of_nat', ENNReal.supα΅’_mul, ENNReal.infα΅’_mul hΞ΅']
+  rw [← ENNReal.inv_lt_inv, inv_one] at hΞ΅
   obtain ⟨N, hN⟩ :=
     eventually_at_top.mp
-      (Ennreal.eventually_pow_one_div_le (Ennreal.coe_ne_top : ↑‖(1 : A)β€–β‚Š β‰  ∞) hΞ΅)
+      (ENNReal.eventually_pow_one_div_le (ENNReal.coe_ne_top : ↑‖(1 : A)β€–β‚Š β‰  ∞) hΞ΅)
   refine' le_trans _ (le_supα΅’ _ (N + 1))
   refine' le_infα΅’ fun n => _
   simp only [← add_assoc]
@@ -286,9 +286,9 @@ end resolvent
 
 section OneSubSmul
 
-open ContinuousMultilinearMap Ennreal FormalMultilinearSeries
+open ContinuousMultilinearMap ENNReal FormalMultilinearSeries
 
-open NNReal Ennreal
+open NNReal ENNReal
 
 variable [NontriviallyNormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A]
 
@@ -314,7 +314,7 @@ theorem hasFpowerSeriesOnBallInverseOneSubSmul [CompleteSpace A] (a : A) :
           Β· simp only [h, zero_mul, zero_le', pow_succ]
           Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr
             simpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ
-    r_pos := Ennreal.inv_pos.mpr coe_ne_top
+    r_pos := ENNReal.inv_pos.mpr coe_ne_top
     HasSum := fun y hy =>
       by
       have norm_lt : β€–y β€’ aβ€– < 1 := by
@@ -364,7 +364,7 @@ end OneSubSmul
 
 section GelfandFormula
 
-open Filter Ennreal ContinuousMultilinearMap
+open Filter ENNReal ContinuousMultilinearMap
 
 open Topology
 
@@ -383,7 +383,7 @@ theorem limsup_pow_nnnorm_pow_one_div_le_spectralRadius (a : A) :
     simp only [p.radius_eq_liminf, ← norm_toNNReal, norm_mk_pi_field]
     congr
     ext n
-    rw [norm_toNNReal, Ennreal.coe_rpow_def β€–a ^ nβ€–β‚Š (1 / n : ℝ), if_neg]
+    rw [norm_toNNReal, ENNReal.coe_rpow_def β€–a ^ nβ€–β‚Š (1 / n : ℝ), if_neg]
     exact fun ha => by linarith [ha.2, (one_div_nonneg.mpr n.cast_nonneg : 0 ≀ (1 / n : ℝ))]
   Β· have H₁ := (differentiable_on_inverse_one_sub_smul r_lt).HasFpowerSeriesOnBall r_pos
     exact ((has_fpower_series_on_ball_inverse_one_sub_smul β„‚ a).exchangeRadius H₁).r_le
@@ -402,7 +402,7 @@ instead of `nnnorm`. -/
 /-- **Gelfand's formula**: Given an element `a : A` of a complex Banach algebra, the
 `spectral_radius` of `a` is the limit of the sequence `β€–a ^ nβ€–β‚Š ^ (1 / n)` -/
 theorem pow_norm_pow_one_div_tendsto_nhds_spectralRadius (a : A) :
-    Tendsto (fun n : β„• => Ennreal.ofReal (β€–a ^ nβ€– ^ (1 / n : ℝ))) atTop (𝓝 (spectralRadius β„‚ a)) :=
+    Tendsto (fun n : β„• => ENNReal.ofReal (β€–a ^ nβ€– ^ (1 / n : ℝ))) atTop (𝓝 (spectralRadius β„‚ a)) :=
   by
   convert pow_nnnorm_pow_one_div_tendsto_nhds_spectral_radius a
   ext1

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 2 (#12361)

A PR analogous to #12338: reformatting proofs following the multiple goals linter of #12339.

Diff
@@ -188,8 +188,8 @@ theorem spectralRadius_le_pow_nnnorm_pow_one_div (a : A) (n : β„•) :
   have hn : 0 < ((n + 1 : β„•) : ℝ) := mod_cast Nat.succ_pos'
   convert monotone_rpow_of_nonneg (one_div_pos.mpr hn).le nnnorm_pow_le using 1
   all_goals dsimp
-  rw [one_div, pow_rpow_inv_natCast]
-  positivity
+  Β· rw [one_div, pow_rpow_inv_natCast]
+    positivity
   rw [Nat.cast_succ, ENNReal.coe_mul_rpow]
 #align spectrum.spectral_radius_le_pow_nnnorm_pow_one_div spectrum.spectralRadius_le_pow_nnnorm_pow_one_div
 
@@ -489,8 +489,8 @@ theorem exp_mem_exp [RCLike π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
   have h₃ : exp π•œ (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b := by
     rw [exp_eq_tsum]
     convert tsum_eq_zero_add (expSeries_summable' (𝕂 := π•œ) (a - ↑ₐ z))
-    simp only [Nat.factorial_zero, Nat.cast_one, inv_one, pow_zero, one_smul]
-    exact hβ‚€.symm
+    Β· simp only [Nat.factorial_zero, Nat.cast_one, inv_one, pow_zero, one_smul]
+    Β· exact hβ‚€.symm
   rw [spectrum.mem_iff, IsUnit.sub_iff, ← one_mul (↑ₐ (exp π•œ z)), hexpmul, ← _root_.sub_mul,
     Commute.isUnit_mul_iff (Algebra.commutes (exp π•œ z) (exp π•œ (a - ↑ₐ z) - 1)).symm,
     sub_eq_iff_eq_add'.mpr h₃, Commute.isUnit_mul_iff (hβ‚€ β–Έ h₁ : (a - ↑ₐ z) * b = b * (a - ↑ₐ z))]
feat: add a class to encode that the spectrum of nonnegative elements is nonnegative (#11993)

When working with the continuous functional calculus generically, it is currently hard to establish lemmas that work well for positive across the board.

This is in part due to the fact that one cannot conclude from the continuous functional calculus alone that the spectrum of nonnegative elements in a star-ordered ring is nonnegative. So, we use a type class to encode this, and this type class actually uses the quasispectrum, because for unital algebras the two notions are equivalent.

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2021 Jireh Loreaux. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jireh Loreaux
 -/
+import Mathlib.Algebra.Algebra.Quasispectrum
 import Mathlib.FieldTheory.IsAlgClosed.Spectrum
 import Mathlib.Analysis.Complex.Liouville
 import Mathlib.Analysis.Complex.Polynomial
@@ -618,6 +619,11 @@ lemma nnreal_iff [Algebra ℝ A] {a : A} :
   Β· exact .of_subset_range_algebraMap _ _ (fun _ ↦ Real.toNNReal_coe)
       fun x hx ↦ ⟨⟨x, h x hx⟩, rfl⟩
 
+lemma nnreal_of_nonneg {A : Type*} [Ring A] [PartialOrder A] [Algebra ℝ A]
+    [NonnegSpectrumClass ℝ A] {a : A} (ha : 0 ≀ a) :
+    SpectrumRestricts a ContinuousMap.realToNNReal :=
+  nnreal_iff.mpr <| spectrum_nonneg_of_nonneg ha
+
 lemma real_iff [Algebra β„‚ A] {a : A} :
     SpectrumRestricts a Complex.reCLM ↔ βˆ€ x ∈ spectrum β„‚ a, x = x.re := by
   refine ⟨fun h x hx ↦ ?_, fun h ↦ ?_⟩
chore(Analysis): fix mathlib3 names; automated fixes (#11950)
Diff
@@ -47,12 +47,12 @@ This file contains the basic theory for the resolvent and spectrum of a Banach a
 
 open scoped ENNReal NNReal
 
-open NormedSpace -- For `exp`.
+open NormedSpace -- For `NormedSpace.exp`.
 
 /-- The *spectral radius* is the supremum of the `nnnorm` (`β€–Β·β€–β‚Š`) of elements in the spectrum,
     coerced into an element of `ℝβ‰₯0∞`. Note that it is possible for `spectrum π•œ a = βˆ…`. In this
     case, `spectralRadius a = 0`. It is also possible that `spectrum π•œ a` be unbounded (though
-    not for Banach algebras, see `spectrum.is_bounded`, below).  In this case,
+    not for Banach algebras, see `spectrum.isBounded`, below).  In this case,
     `spectralRadius a = ∞`. -/
 noncomputable def spectralRadius (π•œ : Type*) {A : Type*} [NormedField π•œ] [Ring A] [Algebra π•œ A]
     (a : A) : ℝβ‰₯0∞ :=
change the order of operation in zsmulRec and nsmulRec (#11451)

We change the following field in the definition of an additive commutative monoid:

 nsmul_succ : βˆ€ (n : β„•) (x : G),
-  AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+  AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x

where the latter is more natural

We adjust the definitions of ^ in monoids, groups, etc. Originally there was a warning comment about why this natural order was preferred

use x * npowRec n x and not npowRec n x * x in the definition to make sure that definitional unfolding of npowRec is blocked, to avoid deep recursion issues.

but it seems to no longer apply.

Remarks on the PR :

  • pow_succ and pow_succ' have switched their meanings.
  • Most of the time, the proofs were adjusted by priming/unpriming one lemma, or exchanging left and right; a few proofs were more complicated to adjust.
  • In particular, [Mathlib/NumberTheory/RamificationInertia.lean] used Ideal.IsPrime.mul_mem_pow which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul.
  • the docstring for Cauchy condensation test in [Mathlib/Analysis/PSeries.lean] was mathematically incorrect, I added the mention that the function is antitone.
Diff
@@ -282,7 +282,7 @@ theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
           le_trans (le_trans (mul_le_mul_right' (nnnorm_pow_le' a n.succ_pos) (r ^ n.succ)) _)
             (le_max_left _ _)
         Β· by_cases h : β€–aβ€–β‚Š = 0
-          Β· simp only [h, zero_mul, zero_le', pow_succ]
+          Β· simp only [h, zero_mul, zero_le', pow_succ']
           Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr
             simpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ
     r_pos := ENNReal.inv_pos.mpr coe_ne_top
@@ -482,9 +482,9 @@ theorem exp_mem_exp [RCLike π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
     exact div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))
       (mod_cast Nat.factorial_pos n) (mod_cast Nat.factorial_le (lt_add_one n).le)
   have hβ‚€ : (βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1)) = (a - ↑ₐ z) * b := by
-    simpa only [mul_smul_comm, pow_succ] using hb.tsum_mul_left (a - ↑ₐ z)
+    simpa only [mul_smul_comm, pow_succ'] using hb.tsum_mul_left (a - ↑ₐ z)
   have h₁ : (βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1)) = b * (a - ↑ₐ z) := by
-    simpa only [pow_succ', Algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐ z)
+    simpa only [pow_succ, Algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐ z)
   have h₃ : exp π•œ (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b := by
     rw [exp_eq_tsum]
     convert tsum_eq_zero_add (expSeries_summable' (𝕂 := π•œ) (a - ↑ₐ z))
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
@@ -469,8 +469,8 @@ section ExpMapping
 local notation "↑ₐ" => algebraMap π•œ A
 
 /-- For `π•œ = ℝ` or `π•œ = β„‚`, `exp π•œ` maps the spectrum of `a` into the spectrum of `exp π•œ a`. -/
-theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A] (a : A) {z : π•œ}
-    (hz : z ∈ spectrum π•œ a) : exp π•œ z ∈ spectrum π•œ (exp π•œ a) := by
+theorem exp_mem_exp [RCLike π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A] (a : A)
+    {z : π•œ} (hz : z ∈ spectrum π•œ a) : exp π•œ z ∈ spectrum π•œ (exp π•œ a) := by
   have hexpmul : exp π•œ a = exp π•œ (a - ↑ₐ z) * ↑ₐ (exp π•œ z) := by
     rw [algebraMap_exp_comm z, ← exp_add_of_commute (Algebra.commutes z (a - ↑ₐ z)).symm,
       sub_add_cancel]
@@ -478,7 +478,7 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
   have hb : Summable fun n : β„• => ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ n := by
     refine' .of_norm_bounded_eventually _ (Real.summable_pow_div_factorial β€–a - ↑ₐ zβ€–) _
     filter_upwards [Filter.eventually_cofinite_ne 0] with n hn
-    rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_natCast, ← div_eq_mul_inv]
+    rw [norm_smul, mul_comm, norm_inv, RCLike.norm_natCast, ← div_eq_mul_inv]
     exact div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))
       (mod_cast Nat.factorial_pos n) (mod_cast Nat.factorial_le (lt_add_one n).le)
   have hβ‚€ : (βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1)) = (a - ↑ₐ z) * b := by
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
@@ -264,7 +264,6 @@ open ContinuousMultilinearMap ENNReal FormalMultilinearSeries
 open scoped NNReal ENNReal
 
 variable [NontriviallyNormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A]
-
 variable (π•œ)
 
 /-- In a Banach algebra `A` over a nontrivially normed field `π•œ`, for any `a : A` the
@@ -562,7 +561,6 @@ namespace WeakDual
 namespace CharacterSpace
 
 variable [NontriviallyNormedField π•œ] [NormedRing A] [CompleteSpace A]
-
 variable [NormedAlgebra π•œ A]
 
 /-- The equivalence between characters and algebra homomorphisms into the base field. -/
refactor: optimize proofs with omega (#11093)

I ran tryAtEachStep on all files under Mathlib to find all locations where omega succeeds. For each that was a linarith without an only, I tried replacing it with omega, and I verified that elaboration time got smaller. (In almost all cases, there was a noticeable speedup.) I also replaced some slow aesops along the way.

Diff
@@ -210,7 +210,7 @@ theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
   simp only [← add_assoc]
   refine' (spectralRadius_le_pow_nnnorm_pow_one_div π•œ a (n + N)).trans _
   norm_cast
-  exact mul_le_mul_left' (hN (n + N + 1) (by linarith)) _
+  exact mul_le_mul_left' (hN (n + N + 1) (by omega)) _
 #align spectrum.spectral_radius_le_liminf_pow_nnnorm_pow_one_div spectrum.spectralRadius_le_liminf_pow_nnnorm_pow_one_div
 
 end SpectrumCompact
chore: prepare Lean version bump with explicit simp (#10999)

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

Diff
@@ -107,8 +107,8 @@ theorem mem_resolventSet_of_norm_lt_mul {a : A} {k : π•œ} (h : β€–aβ€– * β€–(1
   letI ku := Units.map ↑ₐ.toMonoidHom (Units.mk0 k hk)
   rw [← inv_inv β€–(1 : A)β€–,
     mul_inv_lt_iff (inv_pos.2 <| norm_pos_iff.2 (one_ne_zero : (1 : A) β‰  0))] at h
-  have hku : β€–-aβ€– < β€–(↑ku⁻¹ : A)‖⁻¹ := by simpa [norm_algebraMap] using h
-  simpa [sub_eq_add_neg, Algebra.algebraMap_eq_smul_one] using (ku.add (-a) hku).isUnit
+  have hku : β€–-aβ€– < β€–(↑ku⁻¹ : A)‖⁻¹ := by simpa [ku, norm_algebraMap] using h
+  simpa [ku, sub_eq_add_neg, Algebra.algebraMap_eq_smul_one] using (ku.add (-a) hku).isUnit
 #align spectrum.mem_resolvent_set_of_norm_lt_mul spectrum.mem_resolventSet_of_norm_lt_mul
 
 theorem mem_resolventSet_of_norm_lt [NormOneClass A] {a : A} {k : π•œ} (h : β€–aβ€– < β€–kβ€–) : k ∈ ρ a :=
@@ -348,7 +348,7 @@ theorem limsup_pow_nnnorm_pow_one_div_le_spectralRadius (a : A) :
     ContinuousMultilinearMap.mkPiRing β„‚ (Fin n) (a ^ n)
   suffices h : (r : ℝβ‰₯0∞) ≀ p.radius by
     convert h
-    simp only [p.radius_eq_liminf, ← norm_toNNReal, norm_mkPiRing]
+    simp only [p, p.radius_eq_liminf, ← norm_toNNReal, norm_mkPiRing]
     congr
     ext n
     rw [norm_toNNReal, ENNReal.coe_rpow_def β€–a ^ nβ€–β‚Š (1 / n : ℝ), if_neg]
feat: simpler conditions for SpectrumRestricts for β„‚, ℝ and ℝβ‰₯0. (#10826)

This provides conditions which are easier to verify for SpectrumRestricts when the scalar rings are β„‚, ℝ, or ℝβ‰₯0. In addition, it provides a condition for the spectrum to restrict to ℝβ‰₯0 in terms of the spectral radius.

Diff
@@ -588,3 +588,65 @@ theorem equivAlgHom_symm_coe (f : A →ₐ[π•œ] π•œ) : ⇑(equivAlgHom.symm f)
 end CharacterSpace
 
 end WeakDual
+
+namespace SpectrumRestricts
+
+open NNReal ENNReal
+
+/-- If `π•œβ‚` is a normed field contained as subfield of a larger normed field `π•œβ‚‚`, and if `a : A`
+is an element whose `π•œβ‚‚` spectrum restricts to `π•œβ‚`, then the spectral radii over each scalar
+field coincide. -/
+lemma spectralRadius_eq {π•œβ‚ π•œβ‚‚ A : Type*} [NormedField π•œβ‚] [NormedField π•œβ‚‚]
+    [NormedRing A] [NormedAlgebra π•œβ‚ A] [NormedAlgebra π•œβ‚‚ A] [NormedAlgebra π•œβ‚ π•œβ‚‚]
+    [IsScalarTower π•œβ‚ π•œβ‚‚ A] {f : π•œβ‚‚ β†’ π•œβ‚} {a : A} (h : SpectrumRestricts a f) :
+    spectralRadius π•œβ‚ a = spectralRadius π•œβ‚‚ a := by
+  rw [spectralRadius, spectralRadius]
+  have := algebraMap_isometry π•œβ‚ π•œβ‚‚ |>.nnnorm_map_of_map_zero (map_zero _)
+  apply le_antisymm
+  all_goals apply iSupβ‚‚_le fun x hx ↦ ?_
+  Β· refine congr_arg ((↑) : ℝβ‰₯0 β†’ ℝβ‰₯0∞) (this x) |>.symm.trans_le <| le_iSupβ‚‚ (Ξ± := ℝβ‰₯0∞) _ ?_
+    exact (spectrum.algebraMap_mem_iff _).mpr hx
+  Β· have ⟨y, hy, hy'⟩ := h.algebraMap_image.symm β–Έ hx
+    subst hy'
+    exact this y β–Έ le_iSupβ‚‚ (Ξ± := ℝβ‰₯0∞) y hy
+
+variable {A : Type*} [Ring A]
+
+lemma nnreal_iff [Algebra ℝ A] {a : A} :
+    SpectrumRestricts a ContinuousMap.realToNNReal ↔ βˆ€ x ∈ spectrum ℝ a, 0 ≀ x := by
+  refine ⟨fun h x hx ↦ ?_, fun h ↦ ?_⟩
+  Β· obtain ⟨x, -, rfl⟩ := h.algebraMap_image.symm β–Έ hx
+    exact coe_nonneg x
+  Β· exact .of_subset_range_algebraMap _ _ (fun _ ↦ Real.toNNReal_coe)
+      fun x hx ↦ ⟨⟨x, h x hx⟩, rfl⟩
+
+lemma real_iff [Algebra β„‚ A] {a : A} :
+    SpectrumRestricts a Complex.reCLM ↔ βˆ€ x ∈ spectrum β„‚ a, x = x.re := by
+  refine ⟨fun h x hx ↦ ?_, fun h ↦ ?_⟩
+  Β· obtain ⟨x, -, rfl⟩ := h.algebraMap_image.symm β–Έ hx
+    simp
+  Β· exact .of_subset_range_algebraMap _ _ Complex.ofReal_re fun x hx ↦ ⟨x.re, (h x hx).symm⟩
+
+lemma nnreal_iff_spectralRadius_le [Algebra ℝ A] {a : A} {t : ℝβ‰₯0} (ht : spectralRadius ℝ a ≀ t) :
+    SpectrumRestricts a ContinuousMap.realToNNReal ↔
+      spectralRadius ℝ (algebraMap ℝ A t - a) ≀ t := by
+  have : spectrum ℝ a βŠ† Set.Icc (-t) t := by
+    intro x hx
+    rw [Set.mem_Icc, ← abs_le, ← Real.norm_eq_abs, ← coe_nnnorm, NNReal.coe_le_coe,
+      ← ENNReal.coe_le_coe]
+    exact le_iSupβ‚‚ (Ξ± := ℝβ‰₯0∞) x hx |>.trans ht
+  rw [nnreal_iff]
+  refine ⟨fun h ↦ iSupβ‚‚_le fun x hx ↦ ?_, fun h ↦ ?_⟩
+  Β· rw [← spectrum.singleton_sub_eq] at hx
+    obtain ⟨y, hy, rfl⟩ : βˆƒ y ∈ spectrum ℝ a, ↑t - y = x := by simpa using hx
+    obtain ⟨hty, hyt⟩ := Set.mem_Icc.mp <| this hy
+    lift y to ℝβ‰₯0 using h y hy
+    rw [← NNReal.coe_sub (by exact_mod_cast hyt)]
+    simp
+  Β· replace h : βˆ€ x ∈ spectrum ℝ a, β€–t - xβ€–β‚Š ≀ t := by
+      simpa [spectralRadius, iSupβ‚‚_le_iff, ← spectrum.singleton_sub_eq] using h
+    peel h with x hx h_le
+    rw [← NNReal.coe_le_coe, coe_nnnorm, Real.norm_eq_abs, abs_le] at h_le
+    linarith [h_le.2]
+
+end SpectrumRestricts
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
@@ -306,12 +306,12 @@ theorem isUnit_one_sub_smul_of_lt_inv_radius {a : A} {z : π•œ} (h : ↑‖zβ€–
   by_cases hz : z = 0
   Β· simp only [hz, isUnit_one, sub_zero, zero_smul]
   Β· let u := Units.mk0 z hz
-    suffices hu : IsUnit (u⁻¹ β€’ (1 : A) - a)
-    Β· rwa [IsUnit.smul_sub_iff_sub_inv_smul, inv_inv u] at hu
-    Β· rw [Units.smul_def, ← Algebra.algebraMap_eq_smul_one, ← mem_resolventSet_iff]
-      refine' mem_resolventSet_of_spectralRadius_lt _
-      rwa [Units.val_inv_eq_inv_val, nnnorm_inv,
-        coe_inv (nnnorm_ne_zero_iff.mpr (Units.val_mk0 hz β–Έ hz : (u : π•œ) β‰  0)), lt_inv_iff_lt_inv]
+    suffices hu : IsUnit (u⁻¹ β€’ (1 : A) - a) by
+      rwa [IsUnit.smul_sub_iff_sub_inv_smul, inv_inv u] at hu
+    rw [Units.smul_def, ← Algebra.algebraMap_eq_smul_one, ← mem_resolventSet_iff]
+    refine mem_resolventSet_of_spectralRadius_lt ?_
+    rwa [Units.val_inv_eq_inv_val, nnnorm_inv,
+      coe_inv (nnnorm_ne_zero_iff.mpr (Units.val_mk0 hz β–Έ hz : (u : π•œ) β‰  0)), lt_inv_iff_lt_inv]
 #align spectrum.is_unit_one_sub_smul_of_lt_inv_radius spectrum.isUnit_one_sub_smul_of_lt_inv_radius
 
 /-- In a Banach algebra `A` over `π•œ`, for `a : A` the function `fun z ↦ (1 - z β€’ a)⁻¹` is
@@ -346,16 +346,16 @@ theorem limsup_pow_nnnorm_pow_one_div_le_spectralRadius (a : A) :
   simp_rw [inv_limsup, ← one_div]
   let p : FormalMultilinearSeries β„‚ β„‚ A := fun n =>
     ContinuousMultilinearMap.mkPiRing β„‚ (Fin n) (a ^ n)
-  suffices h : (r : ℝβ‰₯0∞) ≀ p.radius
-  Β· convert h
+  suffices h : (r : ℝβ‰₯0∞) ≀ p.radius by
+    convert h
     simp only [p.radius_eq_liminf, ← norm_toNNReal, norm_mkPiRing]
     congr
     ext n
     rw [norm_toNNReal, ENNReal.coe_rpow_def β€–a ^ nβ€–β‚Š (1 / n : ℝ), if_neg]
     exact fun ha => (lt_self_iff_false _).mp
       (ha.2.trans_le (one_div_nonneg.mpr n.cast_nonneg : 0 ≀ (1 / n : ℝ)))
-  Β· have H₁ := (differentiableOn_inverse_one_sub_smul r_lt).hasFPowerSeriesOnBall r_pos
-    exact ((hasFPowerSeriesOnBall_inverse_one_sub_smul β„‚ a).exchange_radius H₁).r_le
+  have H₁ := (differentiableOn_inverse_one_sub_smul r_lt).hasFPowerSeriesOnBall r_pos
+  exact ((hasFPowerSeriesOnBall_inverse_one_sub_smul β„‚ a).exchange_radius H₁).r_le
 #align spectrum.limsup_pow_nnnorm_pow_one_div_le_spectral_radius spectrum.limsup_pow_nnnorm_pow_one_div_le_spectralRadius
 
 /-- **Gelfand's formula**: Given an element `a : A` of a complex Banach algebra, the
feat: add compactness of the spectrum as an instance (#10371)
Diff
@@ -139,6 +139,15 @@ protected theorem isCompact [ProperSpace π•œ] (a : A) : IsCompact (Οƒ a) :=
   Metric.isCompact_of_isClosed_isBounded (spectrum.isClosed a) (isBounded a)
 #align spectrum.is_compact spectrum.isCompact
 
+instance instCompactSpace [ProperSpace π•œ] (a : A) : CompactSpace (spectrum π•œ a) :=
+  isCompact_iff_compactSpace.mp <| spectrum.isCompact a
+
+instance instCompactSpaceNNReal {A : Type*} [NormedRing A] [NormedAlgebra ℝ A]
+    (a : A) [CompactSpace (spectrum ℝ a)] : CompactSpace (spectrum ℝβ‰₯0 a) := by
+  rw [← isCompact_iff_compactSpace] at *
+  rw [← preimage_algebraMap ℝ]
+  exact closedEmbedding_subtype_val isClosed_nonneg |>.isCompact_preimage <| by assumption
+
 theorem spectralRadius_le_nnnorm [NormOneClass A] (a : A) : spectralRadius π•œ a ≀ β€–aβ€–β‚Š := by
   refine' iSupβ‚‚_le fun k hk => _
   exact mod_cast norm_le_norm_of_mem hk
feat: generalize ContinuousMultilinearLinearMap.mkPiField to mkPiRing (#9910)

This matches the generality of the non-continuous versions.

The norm_smulRight lemma is the only new result.

Diff
@@ -263,11 +263,11 @@ power series with coefficients `a ^ n` represents the function `(1 - z β€’ a)⁻
 radius `β€–aβ€–β‚Šβ»ΒΉ`. -/
 theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
     HasFPowerSeriesOnBall (fun z : π•œ => Ring.inverse (1 - z β€’ a))
-      (fun n => ContinuousMultilinearMap.mkPiField π•œ (Fin n) (a ^ n)) 0 β€–aβ€–β‚Šβ»ΒΉ :=
+      (fun n => ContinuousMultilinearMap.mkPiRing π•œ (Fin n) (a ^ n)) 0 β€–aβ€–β‚Šβ»ΒΉ :=
   { r_le := by
       refine'
         le_of_forall_nnreal_lt fun r hr => le_radius_of_bound_nnreal _ (max 1 β€–(1 : A)β€–β‚Š) fun n => _
-      rw [← norm_toNNReal, norm_mkPiField, norm_toNNReal]
+      rw [← norm_toNNReal, norm_mkPiRing, norm_toNNReal]
       cases' n with n
       Β· simp only [Nat.zero_eq, le_refl, mul_one, or_true_iff, le_max_iff, pow_zero]
       Β· refine'
@@ -336,10 +336,10 @@ theorem limsup_pow_nnnorm_pow_one_div_le_spectralRadius (a : A) :
   refine' ENNReal.inv_le_inv.mp (le_of_forall_pos_nnreal_lt fun r r_pos r_lt => _)
   simp_rw [inv_limsup, ← one_div]
   let p : FormalMultilinearSeries β„‚ β„‚ A := fun n =>
-    ContinuousMultilinearMap.mkPiField β„‚ (Fin n) (a ^ n)
+    ContinuousMultilinearMap.mkPiRing β„‚ (Fin n) (a ^ n)
   suffices h : (r : ℝβ‰₯0∞) ≀ p.radius
   Β· convert h
-    simp only [p.radius_eq_liminf, ← norm_toNNReal, norm_mkPiField]
+    simp only [p.radius_eq_liminf, ← norm_toNNReal, norm_mkPiRing]
     congr
     ext n
     rw [norm_toNNReal, ENNReal.coe_rpow_def β€–a ^ nβ€–β‚Š (1 / n : ℝ), if_neg]
feat: Make the coercion ℝβ‰₯0 β†’ ℝβ‰₯0∞ commute defeqly with nsmul and pow (#10225)

by tweaking the definition of the AddMonoid and MonoidWithZero instances for WithTop. Also unprotect ENNReal.coe_injective and rename ENNReal.coe_eq_coe β†’ ENNReal.coe_inj.

From LeanAPAP

Diff
@@ -178,7 +178,8 @@ theorem spectralRadius_le_pow_nnnorm_pow_one_div (a : A) (n : β„•) :
   have hn : 0 < ((n + 1 : β„•) : ℝ) := mod_cast Nat.succ_pos'
   convert monotone_rpow_of_nonneg (one_div_pos.mpr hn).le nnnorm_pow_le using 1
   all_goals dsimp
-  erw [coe_pow, ← rpow_nat_cast, ← rpow_mul, mul_one_div_cancel hn.ne', rpow_one]
+  rw [one_div, pow_rpow_inv_natCast]
+  positivity
   rw [Nat.cast_succ, ENNReal.coe_mul_rpow]
 #align spectrum.spectral_radius_le_pow_nnnorm_pow_one_div spectrum.spectralRadius_le_pow_nnnorm_pow_one_div
 
refactor(Data/FunLike): use unbundled inheritance from FunLike (#8386)

The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike is EquivLike, since that has a custom coe_injective' field that is easier to implement. All other classes should take FunLike or EquivLike as a parameter.

Zulip thread

Important changes

Previously, morphism classes would be Type-valued and extend FunLike:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  extends FunLike F A B :=
(map_op : βˆ€ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

After this PR, they should be Prop-valued and take FunLike as a parameter:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  [FunLike F A B] : Prop :=
(map_op : βˆ€ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

(Note that A B stay marked as outParam even though they are not purely required to be so due to the FunLike parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam is slightly faster.)

Similarly, MyEquivClass should take EquivLike as a parameter.

As a result, every mention of [MyHomClass F A B] should become [FunLike F A B] [MyHomClass F A B].

Remaining issues

Slower (failing) search

While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul is more expensive. This is due to suboptimal processing of arguments. For example:

variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)

theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y

example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _

Before this PR, applying map_mul f gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Since M and N are out_params, [MulHomClass F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found.

After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Now [FunLike F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found, before trying MulHomClass F M N which fails. Since the Mul hierarchy is very big, this can be slow to fail, especially when there is no such Mul instance.

A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N] because MulHomClass fails or succeeds much faster than the others.

As a consequence, the simpNF linter is much slower since by design it tries and fails to apply many map_ lemmas. The same issue occurs a few times in existing calls to simp [map_mul], where map_mul is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.

simp not firing sometimes

This affects map_smulβ‚›β‚— and related definitions. For simp lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw can find every argument to map_smulβ‚›β‚— successfully but simp can't: leanprover/lean4#3701.

Missing instances due to unification failing

Especially in the category theory library, we might sometimes have a type A which is also accessible as a synonym (Bundled A hA).1. Instance synthesis doesn't always work if we have f : A β†’* B but x * y : (Bundled A hA).1 or vice versa. This seems to be mostly fixed by keeping A B as outParams in MulHomClass F A B. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1 instead of using the syntax in the discrimination tree.)

Workaround for issues

The timeouts can be worked around for now by specifying which map_mul we mean, either as map_mul f for some explicit f, or as e.g. MonoidHomClass.map_mul.

map_smulβ‚›β‚— not firing as simp lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulβ‚›β‚— a simp lemma instead of the generic map_smulβ‚›β‚—. Writing simp [map_smulβ‚›β‚— _] also works.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -499,9 +499,8 @@ variable {F : Type*} [NormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A] [C
 
 local notation "↑ₐ" => algebraMap π•œ A
 
-/-- An algebra homomorphism into the base field, as a continuous linear map (since it is
-automatically bounded). See note [lower instance priority] -/
-instance (priority := 100) [AlgHomClass F π•œ A π•œ] : ContinuousLinearMapClass F π•œ A π•œ :=
+instance (priority := 100) [FunLike F A π•œ] [AlgHomClass F π•œ A π•œ] :
+    ContinuousLinearMapClass F π•œ A π•œ :=
   { AlgHomClass.linearMapClass with
     map_continuous := fun Ο† =>
       AddMonoidHomClass.continuous_of_bound Ο† β€–(1 : A)β€– fun a =>
@@ -518,12 +517,13 @@ theorem coe_toContinuousLinearMap (Ο† : A →ₐ[π•œ] π•œ) : ⇑φ.toContinuou
   rfl
 #align alg_hom.coe_to_continuous_linear_map AlgHom.coe_toContinuousLinearMap
 
-theorem norm_apply_le_self_mul_norm_one [AlgHomClass F π•œ A π•œ] (f : F) (a : A) :
+theorem norm_apply_le_self_mul_norm_one [FunLike F A π•œ] [AlgHomClass F π•œ A π•œ] (f : F) (a : A) :
     β€–f aβ€– ≀ β€–aβ€– * β€–(1 : A)β€– :=
   spectrum.norm_le_norm_mul_of_mem (apply_mem_spectrum f _)
 #align alg_hom.norm_apply_le_self_mul_norm_one AlgHom.norm_apply_le_self_mul_norm_one
 
-theorem norm_apply_le_self [NormOneClass A] [AlgHomClass F π•œ A π•œ] (f : F) (a : A) : β€–f aβ€– ≀ β€–aβ€– :=
+theorem norm_apply_le_self [NormOneClass A] [FunLike F A π•œ] [AlgHomClass F π•œ A π•œ]
+    (f : F) (a : A) : β€–f aβ€– ≀ β€–aβ€– :=
   spectrum.norm_le_norm_of_mem (apply_mem_spectrum f _)
 #align alg_hom.norm_apply_le_self AlgHom.norm_apply_le_self
 
chore: rename op_norm to opNorm (#10185)

Co-authored-by: adomani <adomani@gmail.com>

Diff
@@ -538,7 +538,7 @@ local notation "↑ₐ" => algebraMap π•œ A
 @[simp]
 theorem toContinuousLinearMap_norm [NormOneClass A] (Ο† : A →ₐ[π•œ] π•œ) :
     β€–Ο†.toContinuousLinearMapβ€– = 1 :=
-  ContinuousLinearMap.op_norm_eq_of_bounds zero_le_one
+  ContinuousLinearMap.opNorm_eq_of_bounds zero_le_one
     (fun a => (one_mul β€–aβ€–).symm β–Έ spectrum.norm_le_norm_of_mem (apply_mem_spectrum Ο† _))
     fun _ _ h => by simpa only [coe_toContinuousLinearMap, map_one, norm_one, mul_one] using h 1
 #align alg_hom.to_continuous_linear_map_norm AlgHom.toContinuousLinearMap_norm
chore(Analysis/SpecificLimits/* and others): rename _0 -> _zero, _1 -> _one (#10077)

See here on Zulip.

This PR changes a bunch of names containing nhds_0 or/and lt_1 to nhds_zero or/and lt_one.

Diff
@@ -285,7 +285,7 @@ theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
             simpa only [← coe_inv h, mem_ball_zero_iff, Metric.emetric_ball_nnreal] using hy
           rwa [← coe_nnnorm, ← Real.lt_toNNReal_iff_coe_lt, Real.toNNReal_one, nnnorm_smul,
             ← NNReal.lt_inv_iff_mul_lt h]
-      simpa [← smul_pow, (NormedRing.summable_geometric_of_norm_lt_1 _ norm_lt).hasSum_iff] using
+      simpa [← smul_pow, (NormedRing.summable_geometric_of_norm_lt_one _ norm_lt).hasSum_iff] using
         (NormedRing.inverse_one_sub _ norm_lt).symm }
 #align spectrum.has_fpower_series_on_ball_inverse_one_sub_smul spectrum.hasFPowerSeriesOnBall_inverse_one_sub_smul
 
feat(Normed/Group): add Filter.HasBasis.cobounded_of_norm (#9244)
Diff
@@ -226,9 +226,8 @@ theorem hasDerivAt_resolvent {a : A} {k : π•œ} (hk : k ∈ ρ a) :
 #noalign spectrum.norm_resolvent_le_forall
 
 theorem eventually_isUnit_resolvent (a : A) : βˆ€αΆ  z in cobounded π•œ, IsUnit (resolvent a z) := by
-  rw [← comap_norm_atTop, atTop_basis.comap (β€–Β·β€–) |>.eventually_iff]
-  refine βŸ¨β€–aβ€– * β€–(1 : A)β€– + 1, by trivial, fun z hz ↦ ?_⟩
-  exact isUnit_resolvent.mp <| mem_resolventSet_of_norm_lt_mul <| (lt_add_one (β€–aβ€– * _)).trans_le hz
+  rw [atTop_basis_Ioi.cobounded_of_norm.eventually_iff]
+  exact βŸ¨β€–aβ€– * β€–(1 : A)β€–, trivial, fun _ ↦ isUnit_resolvent.mp ∘ mem_resolventSet_of_norm_lt_mul⟩
 
 theorem resolvent_isBigO_inv (a : A) : resolvent a =O[cobounded π•œ] Inv.inv :=
   have h : (fun z ↦ resolvent (z⁻¹ β€’ a) (1 : π•œ)) =O[cobounded π•œ] (fun _ ↦ (1 : ℝ)) := by
@@ -240,7 +239,7 @@ theorem resolvent_isBigO_inv (a : A) : resolvent a =O[cobounded π•œ] Inv.inv :=
       filter_upwards [isBounded_singleton (x := 0)] with z hz
       lift z to π•œΛ£ using Ne.isUnit hz
       simpa [Units.smul_def] using congr(z⁻¹ β€’ $(units_smul_resolvent_self (r := z) (a := a)))
-    _ =O[cobounded π•œ] (Β· ⁻¹) := IsBigO.of_norm_right <| by
+    _ =O[cobounded π•œ] (Β· ⁻¹) := .of_norm_right <| by
       simpa using (isBigO_refl (Β· ⁻¹) (cobounded π•œ)).norm_right.smul h
 
 theorem resolvent_tendsto_cobounded (a : A) : Tendsto (resolvent a) (cobounded π•œ) (𝓝 0) :=
chore: Nsmul -> NSMul, Zpow -> ZPow, etc (#9067)

Normalising to naming convention rule number 6.

Diff
@@ -248,7 +248,7 @@ theorem resolvent_tendsto_cobounded (a : A) : Tendsto (resolvent a) (cobounded 
 
 end resolvent
 
-section OneSubSmul
+section OneSubSMul
 
 open ContinuousMultilinearMap ENNReal FormalMultilinearSeries
 
@@ -320,7 +320,7 @@ theorem differentiableOn_inverse_one_sub_smul [CompleteSpace A] {a : A} {r : ℝ
   exact DifferentiableAt.comp z (differentiableAt_inverse hu) H₁.differentiableAt
 #align spectrum.differentiable_on_inverse_one_sub_smul spectrum.differentiableOn_inverse_one_sub_smul
 
-end OneSubSmul
+end OneSubSMul
 
 section GelfandFormula
 
chore: rename by_contra' to by_contra! (#8797)

To fit with the "please try harder" convention of ! tactics.

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

Diff
@@ -380,7 +380,7 @@ variable [NormedRing A] [NormedAlgebra β„‚ A] [CompleteSpace A] [Nontrivial A] (
 protected theorem nonempty : (spectrum β„‚ a).Nonempty := by
   /- Suppose `Οƒ a = βˆ…`, then resolvent set is `β„‚`, any `(z β€’ 1 - a)` is a unit, and `resolvent a`
     is differentiable on `β„‚`. -/
-  by_contra' h
+  by_contra! h
   have Hβ‚€ : resolventSet β„‚ a = Set.univ := by rwa [spectrum, Set.compl_empty_iff] at h
   have H₁ : Differentiable β„‚ fun z : β„‚ => resolvent a z := fun z =>
     (hasDerivAt_resolvent (Hβ‚€.symm β–Έ Set.mem_univ z : z ∈ resolventSet β„‚ a)).differentiableAt
chore: space after ← (#8178)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -226,7 +226,7 @@ theorem hasDerivAt_resolvent {a : A} {k : π•œ} (hk : k ∈ ρ a) :
 #noalign spectrum.norm_resolvent_le_forall
 
 theorem eventually_isUnit_resolvent (a : A) : βˆ€αΆ  z in cobounded π•œ, IsUnit (resolvent a z) := by
-  rw [←comap_norm_atTop, atTop_basis.comap (β€–Β·β€–) |>.eventually_iff]
+  rw [← comap_norm_atTop, atTop_basis.comap (β€–Β·β€–) |>.eventually_iff]
   refine βŸ¨β€–aβ€– * β€–(1 : A)β€– + 1, by trivial, fun z hz ↦ ?_⟩
   exact isUnit_resolvent.mp <| mem_resolventSet_of_norm_lt_mul <| (lt_add_one (β€–aβ€– * _)).trans_le hz
 
chore: add missing hypothesis names to by_cases (#8533)

I've also got a change to make this required, but I'd like to land this first.

Diff
@@ -185,7 +185,7 @@ theorem spectralRadius_le_pow_nnnorm_pow_one_div (a : A) (n : β„•) :
 theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
     spectralRadius π•œ a ≀ atTop.liminf fun n : β„• => (β€–a ^ nβ€–β‚Š : ℝβ‰₯0∞) ^ (1 / n : ℝ) := by
   refine' ENNReal.le_of_forall_lt_one_mul_le fun Ξ΅ hΞ΅ => _
-  by_cases Ξ΅ = 0
+  by_cases h : Ξ΅ = 0
   Β· simp only [h, zero_mul, zero_le']
   have hΞ΅' : Ρ⁻¹ β‰  ∞ := fun h' =>
     h (by simpa only [inv_inv, inv_top] using congr_arg (fun x : ℝβ‰₯0∞ => x⁻¹) h')
@@ -273,7 +273,7 @@ theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
       Β· refine'
           le_trans (le_trans (mul_le_mul_right' (nnnorm_pow_le' a n.succ_pos) (r ^ n.succ)) _)
             (le_max_left _ _)
-        Β· by_cases β€–aβ€–β‚Š = 0
+        Β· by_cases h : β€–aβ€–β‚Š = 0
           Β· simp only [h, zero_mul, zero_le', pow_succ]
           Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr
             simpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ
chore: replace exact_mod_cast tactic with mod_cast elaborator where possible (#8404)

We still have the exact_mod_cast tactic, used in a few places, which somehow (?) works a little bit harder to prevent the expected type influencing the elaboration of the term. I would like to get to the bottom of this, and it will be easier once the only usages of exact_mod_cast are the ones that don't work using the term elaborator by itself.

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

Diff
@@ -141,13 +141,13 @@ protected theorem isCompact [ProperSpace π•œ] (a : A) : IsCompact (Οƒ a) :=
 
 theorem spectralRadius_le_nnnorm [NormOneClass A] (a : A) : spectralRadius π•œ a ≀ β€–aβ€–β‚Š := by
   refine' iSupβ‚‚_le fun k hk => _
-  exact_mod_cast norm_le_norm_of_mem hk
+  exact mod_cast norm_le_norm_of_mem hk
 #align spectrum.spectral_radius_le_nnnorm spectrum.spectralRadius_le_nnnorm
 
 theorem exists_nnnorm_eq_spectralRadius_of_nonempty [ProperSpace π•œ] {a : A} (ha : (Οƒ a).Nonempty) :
     βˆƒ k ∈ Οƒ a, (β€–kβ€–β‚Š : ℝβ‰₯0∞) = spectralRadius π•œ a := by
   obtain ⟨k, hk, h⟩ := (spectrum.isCompact a).exists_forall_ge ha continuous_nnnorm.continuousOn
-  exact ⟨k, hk, le_antisymm (le_iSupβ‚‚ (Ξ± := ℝβ‰₯0∞) k hk) (iSupβ‚‚_le <| by exact_mod_cast h)⟩
+  exact ⟨k, hk, le_antisymm (le_iSupβ‚‚ (Ξ± := ℝβ‰₯0∞) k hk) (iSupβ‚‚_le <| mod_cast h)⟩
 #align spectrum.exists_nnnorm_eq_spectral_radius_of_nonempty spectrum.exists_nnnorm_eq_spectralRadius_of_nonempty
 
 theorem spectralRadius_lt_of_forall_lt_of_nonempty [ProperSpace π•œ] {a : A} (ha : (Οƒ a).Nonempty)
@@ -155,7 +155,7 @@ theorem spectralRadius_lt_of_forall_lt_of_nonempty [ProperSpace π•œ] {a : A} (h
   sSup_image.symm.trans_lt <|
     ((spectrum.isCompact a).sSup_lt_iff_of_continuous ha
           (ENNReal.continuous_coe.comp continuous_nnnorm).continuousOn (r : ℝβ‰₯0∞)).mpr
-      (by dsimp only [(· ∘ ·)]; exact_mod_cast hr)
+      (by dsimp only [(· ∘ ·)]; exact mod_cast hr)
 #align spectrum.spectral_radius_lt_of_forall_lt_of_nonempty spectrum.spectralRadius_lt_of_forall_lt_of_nonempty
 
 open ENNReal Polynomial
@@ -175,7 +175,7 @@ theorem spectralRadius_le_pow_nnnorm_pow_one_div (a : A) (n : β„•) :
     simpa only [Real.toNNReal_mul (norm_nonneg _), norm_toNNReal, nnnorm_pow k (n + 1),
       ENNReal.coe_mul] using coe_mono (Real.toNNReal_mono (norm_le_norm_mul_of_mem pow_mem))
   -- take (n + 1)α΅—Κ° roots and clean up the left-hand side
-  have hn : 0 < ((n + 1 : β„•) : ℝ) := by exact_mod_cast Nat.succ_pos'
+  have hn : 0 < ((n + 1 : β„•) : ℝ) := mod_cast Nat.succ_pos'
   convert monotone_rpow_of_nonneg (one_div_pos.mpr hn).le nnnorm_pow_le using 1
   all_goals dsimp
   erw [coe_pow, ← rpow_nat_cast, ← rpow_mul, mul_one_div_cancel hn.ne', rpow_one]
@@ -367,7 +367,7 @@ theorem pow_norm_pow_one_div_tendsto_nhds_spectralRadius (a : A) :
   convert pow_nnnorm_pow_one_div_tendsto_nhds_spectralRadius a using 1
   ext1
   rw [← ofReal_rpow_of_nonneg (norm_nonneg _) _, ← coe_nnnorm, coe_nnreal_eq]
-  exact one_div_nonneg.mpr (by exact_mod_cast zero_le _)
+  exact one_div_nonneg.mpr (mod_cast zero_le _)
 #align spectrum.pow_norm_pow_one_div_tendsto_nhds_spectral_radius spectrum.pow_norm_pow_one_div_tendsto_nhds_spectralRadius
 
 end GelfandFormula
@@ -472,7 +472,7 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
     filter_upwards [Filter.eventually_cofinite_ne 0] with n hn
     rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_natCast, ← div_eq_mul_inv]
     exact div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))
-      (by exact_mod_cast Nat.factorial_pos n) (by exact_mod_cast Nat.factorial_le (lt_add_one n).le)
+      (mod_cast Nat.factorial_pos n) (mod_cast Nat.factorial_le (lt_add_one n).le)
   have hβ‚€ : (βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1)) = (a - ↑ₐ z) * b := by
     simpa only [mul_smul_comm, pow_succ] using hb.tsum_mul_left (a - ↑ₐ z)
   have h₁ : (βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ (n + 1)) = b * (a - ↑ₐ z) := by
fix: remove remaining ^ fixes (#8463)
Diff
@@ -414,11 +414,10 @@ theorem map_polynomial_aeval (p : β„‚[X]) :
   map_polynomial_aeval_of_nonempty a p (spectrum.nonempty a)
 #align spectrum.map_polynomial_aeval spectrum.map_polynomial_aeval
 
--- Porting note: Replaced `x ^ n` with `HPow.hPow x n`
 /-- A specialization of the spectral mapping theorem for polynomials in a Banach algebra over `β„‚`
 to monic monomials. -/
 protected theorem map_pow (n : β„•) :
-    spectrum β„‚ (a ^ n) = (fun x : β„‚ => HPow.hPow x n) '' spectrum β„‚ a := by
+    spectrum β„‚ (a ^ n) = (Β· ^ n) '' spectrum β„‚ a := by
   simpa only [aeval_X_pow, eval_pow, eval_X] using map_polynomial_aeval a (X ^ n)
 #align spectrum.map_pow spectrum.map_pow
 
chore: exp -> NormedSpace.exp (#8436)

Per discussion at zulip

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

Diff
@@ -47,6 +47,8 @@ This file contains the basic theory for the resolvent and spectrum of a Banach a
 
 open scoped ENNReal NNReal
 
+open NormedSpace -- For `exp`.
+
 /-- The *spectral radius* is the supremum of the `nnnorm` (`β€–Β·β€–β‚Š`) of elements in the spectrum,
     coerced into an element of `ℝβ‰₯0∞`. Note that it is possible for `spectrum π•œ a = βˆ…`. In this
     case, `spectralRadius a = 0`. It is also possible that `spectrum π•œ a` be unbounded (though
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -230,8 +230,9 @@ theorem eventually_isUnit_resolvent (a : A) : βˆ€αΆ  z in cobounded π•œ, IsUnit
 
 theorem resolvent_isBigO_inv (a : A) : resolvent a =O[cobounded π•œ] Inv.inv :=
   have h : (fun z ↦ resolvent (z⁻¹ β€’ a) (1 : π•œ)) =O[cobounded π•œ] (fun _ ↦ (1 : ℝ)) := by
-    simpa [Function.comp, resolvent] using (NormedRing.inverse_one_sub_norm (R := A)).comp_tendsto
-      (by simpa using (tendsto_invβ‚€_cobounded (Ξ± := π•œ)).smul_const a)
+    simpa [Function.comp_def, resolvent] using
+      (NormedRing.inverse_one_sub_norm (R := A)).comp_tendsto
+        (by simpa using (tendsto_invβ‚€_cobounded (Ξ± := π•œ)).smul_const a)
   calc
     resolvent a =αΆ [cobounded π•œ] fun z ↦ z⁻¹ β€’ resolvent (z⁻¹ β€’ a) (1 : π•œ) := by
       filter_upwards [isBounded_singleton (x := 0)] with z hz
feat: simplify proof of spectrum.nonempty using the cobounded filter (#8246)

This uses the API developed in these recent PRs (for the cobounded filter and some corollaries to Liouville's theorem) to greatly simplify the proof of spectrum.nonempty. Previously, this depended on the technical lemma spectrum.norm_resolvent_le_forall, and now we instead prove the greatly simplified spectrum.resolvent_isBigO_inv and spectrum.resolvent_tendsto_cobounded.

Diff
@@ -205,7 +205,7 @@ end SpectrumCompact
 
 section resolvent
 
-open Filter Asymptotics
+open Filter Asymptotics Bornology Topology
 
 variable [NontriviallyNormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A]
 
@@ -220,41 +220,28 @@ theorem hasDerivAt_resolvent {a : A} {k : π•œ} (hk : k ∈ ρ a) :
   simpa [resolvent, sq, hk.unit_spec, ← Ring.inverse_unit hk.unit] using H₁.comp_hasDerivAt k Hβ‚‚
 #align spectrum.has_deriv_at_resolvent spectrum.hasDerivAt_resolvent
 
-/- TODO: Once there is sufficient API for bornology, we should get a nice filter / asymptotics
-version of this, for example: `Tendsto (resolvent a) (cobounded π•œ) (𝓝 0)` or more specifically
-`(resolvent a) =O[cobounded π•œ] (fun z ↦ z⁻¹)`. -/
-theorem norm_resolvent_le_forall (a : A) :
-    βˆ€ Ξ΅ > 0, βˆƒ R > 0, βˆ€ z : π•œ, R ≀ β€–zβ€– β†’ β€–resolvent a zβ€– ≀ Ξ΅ := by
-  obtain ⟨c, c_pos, hc⟩ := (@NormedRing.inverse_one_sub_norm A _ _).exists_pos
-  rw [isBigOWith_iff, eventually_iff, Metric.mem_nhds_iff] at hc
-  rcases hc with ⟨δ, δ_pos, hδ⟩
-  simp only [CstarRing.norm_one, mul_one] at hΞ΄
-  intro Ξ΅ hΞ΅
-  have ha₁ : 0 < β€–aβ€– + 1 := lt_of_le_of_lt (norm_nonneg a) (lt_add_one _)
-  have min_pos : 0 < min (Ξ΄ * (β€–aβ€– + 1)⁻¹) (Ξ΅ * c⁻¹) :=
-    lt_min (mul_pos Ξ΄_pos (inv_pos.mpr ha₁)) (mul_pos hΞ΅ (inv_pos.mpr c_pos))
-  refine' ⟨(min (Ξ΄ * (β€–aβ€– + 1)⁻¹) (Ξ΅ * c⁻¹))⁻¹, inv_pos.mpr min_pos, fun z hz => _⟩
-  have hnz : z β‰  0 := norm_pos_iff.mp (lt_of_lt_of_le (inv_pos.mpr min_pos) hz)
-  replace hz := inv_le_of_inv_le min_pos hz
-  rcases (⟨Units.mk0 z hnz, Units.val_mk0 hnz⟩ : IsUnit z) with ⟨z, rfl⟩
-  have lt_Ξ΄ : β€–z⁻¹ β€’ aβ€– < Ξ΄ := by
-    rw [Units.smul_def, norm_smul, Units.val_inv_eq_inv_val, norm_inv]
-    calc
-      β€–(z : π•œ)‖⁻¹ * β€–aβ€– ≀ Ξ΄ * (β€–aβ€– + 1)⁻¹ * β€–aβ€– :=
-        mul_le_mul_of_nonneg_right (hz.trans (min_le_left _ _)) (norm_nonneg _)
-      _ < Ξ΄ := by
-        conv => rw [mul_assoc]; rhs; rw [(mul_one Ξ΄).symm]
-        exact mul_lt_mul_of_pos_left
-          ((inv_mul_lt_iff ha₁).mpr ((mul_one (β€–aβ€– + 1)).symm β–Έ lt_add_one _)) Ξ΄_pos
-  rw [← inv_smul_smul z (resolvent a (z : π•œ)), units_smul_resolvent_self, resolvent,
-    Algebra.algebraMap_eq_smul_one, one_smul, Units.smul_def, norm_smul, Units.val_inv_eq_inv_val,
-    norm_inv]
+-- refactored so this result was no longer necessary or useful
+#noalign spectrum.norm_resolvent_le_forall
+
+theorem eventually_isUnit_resolvent (a : A) : βˆ€αΆ  z in cobounded π•œ, IsUnit (resolvent a z) := by
+  rw [←comap_norm_atTop, atTop_basis.comap (β€–Β·β€–) |>.eventually_iff]
+  refine βŸ¨β€–aβ€– * β€–(1 : A)β€– + 1, by trivial, fun z hz ↦ ?_⟩
+  exact isUnit_resolvent.mp <| mem_resolventSet_of_norm_lt_mul <| (lt_add_one (β€–aβ€– * _)).trans_le hz
+
+theorem resolvent_isBigO_inv (a : A) : resolvent a =O[cobounded π•œ] Inv.inv :=
+  have h : (fun z ↦ resolvent (z⁻¹ β€’ a) (1 : π•œ)) =O[cobounded π•œ] (fun _ ↦ (1 : ℝ)) := by
+    simpa [Function.comp, resolvent] using (NormedRing.inverse_one_sub_norm (R := A)).comp_tendsto
+      (by simpa using (tendsto_invβ‚€_cobounded (Ξ± := π•œ)).smul_const a)
   calc
-    _ ≀ Ξ΅ * c⁻¹ * c :=
-      mul_le_mul (hz.trans (min_le_right _ _)) (hΞ΄ (mem_ball_zero_iff.mpr lt_Ξ΄)) (norm_nonneg _)
-        (mul_pos hΞ΅ (inv_pos.mpr c_pos)).le
-    _ = _ := inv_mul_cancel_rightβ‚€ c_pos.ne.symm Ξ΅
-#align spectrum.norm_resolvent_le_forall spectrum.norm_resolvent_le_forall
+    resolvent a =αΆ [cobounded π•œ] fun z ↦ z⁻¹ β€’ resolvent (z⁻¹ β€’ a) (1 : π•œ) := by
+      filter_upwards [isBounded_singleton (x := 0)] with z hz
+      lift z to π•œΛ£ using Ne.isUnit hz
+      simpa [Units.smul_def] using congr(z⁻¹ β€’ $(units_smul_resolvent_self (r := z) (a := a)))
+    _ =O[cobounded π•œ] (Β· ⁻¹) := IsBigO.of_norm_right <| by
+      simpa using (isBigO_refl (Β· ⁻¹) (cobounded π•œ)).norm_right.smul h
+
+theorem resolvent_tendsto_cobounded (a : A) : Tendsto (resolvent a) (cobounded π•œ) (𝓝 0) :=
+  resolvent_isBigO_inv a |>.trans_tendsto tendsto_invβ‚€_cobounded
 
 end resolvent
 
@@ -388,36 +375,17 @@ variable [NormedRing A] [NormedAlgebra β„‚ A] [CompleteSpace A] [Nontrivial A] (
 
 /-- In a (nontrivial) complex Banach algebra, every element has nonempty spectrum. -/
 protected theorem nonempty : (spectrum β„‚ a).Nonempty := by
-  /- Suppose `Οƒ a = βˆ…`, then resolvent set is `β„‚`, any `(z β€’ 1 - a)` is a unit, and `resolvent`
+  /- Suppose `Οƒ a = βˆ…`, then resolvent set is `β„‚`, any `(z β€’ 1 - a)` is a unit, and `resolvent a`
     is differentiable on `β„‚`. -/
-  rw [Set.nonempty_iff_ne_empty]
-  by_contra h
+  by_contra' h
   have Hβ‚€ : resolventSet β„‚ a = Set.univ := by rwa [spectrum, Set.compl_empty_iff] at h
   have H₁ : Differentiable β„‚ fun z : β„‚ => resolvent a z := fun z =>
     (hasDerivAt_resolvent (Hβ‚€.symm β–Έ Set.mem_univ z : z ∈ resolventSet β„‚ a)).differentiableAt
-  /- The norm of the resolvent is small for all sufficiently large `z`, and by compactness and
-    continuity it is bounded on the complement of a large ball, thus uniformly bounded on `β„‚`.
-    By Liouville's theorem `fun z ↦ resolvent a z` is constant. -/
-  have Hβ‚‚ := norm_resolvent_le_forall (π•œ := β„‚) a
-  have H₃ : βˆ€ z : β„‚, resolvent a z = resolvent a (0 : β„‚) := by
-    refine' fun z => H₁.apply_eq_apply_of_bounded (isBounded_iff_forall_norm_le.mpr _) z 0
-    rcases Hβ‚‚ 1 zero_lt_one with ⟨R, _, hR⟩
-    rcases (ProperSpace.isCompact_closedBall (0 : β„‚) R).exists_bound_of_continuousOn
-        H₁.continuous.continuousOn with
-      ⟨C, hC⟩
-    use max C 1
-    rintro _ ⟨w, rfl⟩
-    refine' Or.elim (em (β€–wβ€– ≀ R)) (fun hw => _) fun hw => _
-    Β· exact (hC w (mem_closedBall_zero_iff.mpr hw)).trans (le_max_left _ _)
-    Β· exact (hR w (not_le.mp hw).le).trans (le_max_right _ _)
-  -- `resolvent a 0 = 0`, which is a contradiction because it isn't a unit.
-  have Hβ‚… : resolvent a (0 : β„‚) = 0 := by
-    refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ hΞ΅ => _) (norm_nonneg _))
-    rcases Hβ‚‚ Ξ΅ hΞ΅ with ⟨R, _, hR⟩
-    simpa only [H₃ R] using (zero_add Ξ΅).symm.subst (hR R (by simp [le_abs_self]))
-  -- `not_isUnit_zero` is where we need `Nontrivial A`, it is unavoidable.
-  exact not_isUnit_zero
-    (Hβ‚….subst (isUnit_resolvent.mp (mem_resolventSet_iff.mp (Hβ‚€.symm β–Έ Set.mem_univ 0))))
+  /- Since `resolvent a` tends to zero at infinity, by Liouville's theorem `resolvent a = 0`,
+  which contradicts that `resolvent a z` is invertible. -/
+  have H₃ := H₁.apply_eq_of_tendsto_cocompact 0 <| by
+    simpa [Metric.cobounded_eq_cocompact] using resolvent_tendsto_cobounded a (π•œ := β„‚)
+  exact not_isUnit_zero <| H₃ β–Έ (isUnit_resolvent.mp <| Hβ‚€.symm β–Έ Set.mem_univ 0)
 #align spectrum.nonempty spectrum.nonempty
 
 /-- In a complex Banach algebra, the spectral radius is always attained by some element of the
chore(InfiniteSum): use dot notation (#8358)

Rename

  • summable_of_norm_bounded -> Summable.of_norm_bounded;
  • summable_of_norm_bounded_eventually -> Summable.of_norm_bounded_eventually;
  • summable_of_nnnorm_bounded -> Summable.of_nnnorm_bounded;
  • summable_of_summable_norm -> Summable.of_norm;
  • summable_of_summable_nnnorm -> Summable.of_nnnorm;

New lemmas

  • Summable.of_norm_bounded_eventually_nat
  • Summable.norm

Misc changes

  • Golf a few proofs.
Diff
@@ -498,7 +498,7 @@ theorem exp_mem_exp [IsROrC π•œ] [NormedRing A] [NormedAlgebra π•œ A] [Complet
       sub_add_cancel]
   let b := βˆ‘' n : β„•, ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ n
   have hb : Summable fun n : β„• => ((n + 1).factorial⁻¹ : π•œ) β€’ (a - ↑ₐ z) ^ n := by
-    refine' summable_of_norm_bounded_eventually _ (Real.summable_pow_div_factorial β€–a - ↑ₐ zβ€–) _
+    refine' .of_norm_bounded_eventually _ (Real.summable_pow_div_factorial β€–a - ↑ₐ zβ€–) _
     filter_upwards [Filter.eventually_cofinite_ne 0] with n hn
     rw [norm_smul, mul_comm, norm_inv, IsROrC.norm_natCast, ← div_eq_mul_inv]
     exact div_le_div (pow_nonneg (norm_nonneg _) n) (norm_pow_le' (a - ↑ₐ z) (zero_lt_iff.mpr hn))
refactor(Topology/MetricSpace): remove Metric.Bounded (#7240)

Use Bornology.IsBounded instead.

Diff
@@ -129,12 +129,12 @@ theorem subset_closedBall_norm [NormOneClass A] (a : A) : Οƒ a βŠ† Metric.closed
   fun k hk => by simp [norm_le_norm_of_mem hk]
 #align spectrum.subset_closed_ball_norm spectrum.subset_closedBall_norm
 
-theorem is_bounded (a : A) : Metric.Bounded (Οƒ a) :=
-  (Metric.bounded_iff_subset_ball 0).mpr βŸ¨β€–aβ€– * β€–(1 : A)β€–, subset_closedBall_norm_mul a⟩
-#align spectrum.is_bounded spectrum.is_bounded
+theorem isBounded (a : A) : Bornology.IsBounded (Οƒ a) :=
+  Metric.isBounded_closedBall.subset (subset_closedBall_norm_mul a)
+#align spectrum.is_bounded spectrum.isBounded
 
 protected theorem isCompact [ProperSpace π•œ] (a : A) : IsCompact (Οƒ a) :=
-  Metric.isCompact_of_isClosed_bounded (spectrum.isClosed a) (is_bounded a)
+  Metric.isCompact_of_isClosed_isBounded (spectrum.isClosed a) (isBounded a)
 #align spectrum.is_compact spectrum.isCompact
 
 theorem spectralRadius_le_nnnorm [NormOneClass A] (a : A) : spectralRadius π•œ a ≀ β€–aβ€–β‚Š := by
@@ -400,7 +400,7 @@ protected theorem nonempty : (spectrum β„‚ a).Nonempty := by
     By Liouville's theorem `fun z ↦ resolvent a z` is constant. -/
   have Hβ‚‚ := norm_resolvent_le_forall (π•œ := β„‚) a
   have H₃ : βˆ€ z : β„‚, resolvent a z = resolvent a (0 : β„‚) := by
-    refine' fun z => H₁.apply_eq_apply_of_bounded (bounded_iff_forall_norm_le.mpr _) z 0
+    refine' fun z => H₁.apply_eq_apply_of_bounded (isBounded_iff_forall_norm_le.mpr _) z 0
     rcases Hβ‚‚ 1 zero_lt_one with ⟨R, _, hR⟩
     rcases (ProperSpace.isCompact_closedBall (0 : β„‚) R).exists_bound_of_continuousOn
         H₁.continuous.continuousOn with
chore: drop MulZeroClass. in mul_zero/zero_mul (#6682)

Search&replace MulZeroClass.mul_zero -> mul_zero, MulZeroClass.zero_mul -> zero_mul.

These were introduced by Mathport, as the full name of mul_zero is actually MulZeroClass.mul_zero (it's exported with the short name).

Diff
@@ -184,7 +184,7 @@ theorem spectralRadius_le_liminf_pow_nnnorm_pow_one_div (a : A) :
     spectralRadius π•œ a ≀ atTop.liminf fun n : β„• => (β€–a ^ nβ€–β‚Š : ℝβ‰₯0∞) ^ (1 / n : ℝ) := by
   refine' ENNReal.le_of_forall_lt_one_mul_le fun Ξ΅ hΞ΅ => _
   by_cases Ξ΅ = 0
-  Β· simp only [h, MulZeroClass.zero_mul, zero_le']
+  Β· simp only [h, zero_mul, zero_le']
   have hΞ΅' : Ρ⁻¹ β‰  ∞ := fun h' =>
     h (by simpa only [inv_inv, inv_top] using congr_arg (fun x : ℝβ‰₯0∞ => x⁻¹) h')
   simp only [ENNReal.mul_le_iff_le_inv h (hΡ.trans_le le_top).ne, mul_comm Ρ⁻¹,
@@ -284,7 +284,7 @@ theorem hasFPowerSeriesOnBall_inverse_one_sub_smul [CompleteSpace A] (a : A) :
           le_trans (le_trans (mul_le_mul_right' (nnnorm_pow_le' a n.succ_pos) (r ^ n.succ)) _)
             (le_max_left _ _)
         Β· by_cases β€–aβ€–β‚Š = 0
-          Β· simp only [h, MulZeroClass.zero_mul, zero_le', pow_succ]
+          Β· simp only [h, zero_mul, zero_le', pow_succ]
           Β· rw [← coe_inv h, coe_lt_coe, NNReal.lt_inv_iff_mul_lt h] at hr
             simpa only [← mul_pow, mul_comm] using pow_le_one' hr.le n.succ
     r_pos := ENNReal.inv_pos.mpr coe_ne_top
docs: replace ⬝ BLACK VERY SMALL SQUARE with · MIDDLE DOT (#6522)

MIDDLE DOT is now valid Lean syntax for function arguments, which is what these docstrings are referring to.

Diff
@@ -47,7 +47,7 @@ This file contains the basic theory for the resolvent and spectrum of a Banach a
 
 open scoped ENNReal NNReal
 
-/-- The *spectral radius* is the supremum of the `nnnorm` (`β€–β¬β€–β‚Š`) of elements in the spectrum,
+/-- The *spectral radius* is the supremum of the `nnnorm` (`β€–Β·β€–β‚Š`) of elements in the spectrum,
     coerced into an element of `ℝβ‰₯0∞`. Note that it is possible for `spectrum π•œ a = βˆ…`. In this
     case, `spectralRadius a = 0`. It is also possible that `spectrum π•œ a` be unbounded (though
     not for Banach algebras, see `spectrum.is_bounded`, below).  In this case,
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
@@ -52,12 +52,12 @@ open scoped ENNReal NNReal
     case, `spectralRadius a = 0`. It is also possible that `spectrum π•œ a` be unbounded (though
     not for Banach algebras, see `spectrum.is_bounded`, below).  In this case,
     `spectralRadius a = ∞`. -/
-noncomputable def spectralRadius (π•œ : Type _) {A : Type _} [NormedField π•œ] [Ring A] [Algebra π•œ A]
+noncomputable def spectralRadius (π•œ : Type*) {A : Type*} [NormedField π•œ] [Ring A] [Algebra π•œ A]
     (a : A) : ℝβ‰₯0∞ :=
   ⨆ k ∈ spectrum π•œ a, β€–kβ€–β‚Š
 #align spectral_radius spectralRadius
 
-variable {π•œ : Type _} {A : Type _}
+variable {π•œ : Type*} {A : Type*}
 
 namespace spectrum
 
@@ -526,7 +526,7 @@ namespace AlgHom
 
 section NormedField
 
-variable {F : Type _} [NormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A]
+variable {F : Type*} [NormedField π•œ] [NormedRing A] [NormedAlgebra π•œ A] [CompleteSpace A]
 
 local notation "↑ₐ" => algebraMap π•œ A
 
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,11 +2,6 @@
 Copyright (c) 2021 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.spectrum
-! leanprover-community/mathlib commit d608fc5d4e69d4cc21885913fb573a88b0deb521
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.FieldTheory.IsAlgClosed.Spectrum
 import Mathlib.Analysis.Complex.Liouville
@@ -15,6 +10,8 @@ import Mathlib.Analysis.Analytic.RadiusLiminf
 import Mathlib.Topology.Algebra.Module.CharacterSpace
 import Mathlib.Analysis.NormedSpace.Exponential
 
+#align_import analysis.normed_space.spectrum from "leanprover-community/mathlib"@"d608fc5d4e69d4cc21885913fb573a88b0deb521"
+
 /-!
 # The spectrum of elements in a complete normed algebra
 
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.spectrum
-! leanprover-community/mathlib commit 58a272265b5e05f258161260dd2c5d247213cbd3
+! leanprover-community/mathlib commit d608fc5d4e69d4cc21885913fb573a88b0deb521
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -330,7 +330,7 @@ theorem differentiableOn_inverse_one_sub_smul [CompleteSpace A] {a : A} {r : ℝ
     simpa only [norm_toNNReal, Real.toNNReal_coe] using
       Real.toNNReal_mono (mem_closedBall_zero_iff.mp z_mem)
   have H₁ : Differentiable π•œ fun w : π•œ => 1 - w β€’ a := (differentiable_id.smul_const a).const_sub 1
-  exact DifferentiableAt.comp z (differentiableAt_inverse hu.unit) H₁.differentiableAt
+  exact DifferentiableAt.comp z (differentiableAt_inverse hu) H₁.differentiableAt
 #align spectrum.differentiable_on_inverse_one_sub_smul spectrum.differentiableOn_inverse_one_sub_smul
 
 end OneSubSmul
chore: fix many typos (#4983)

These are all doc fixes

Diff
@@ -398,7 +398,7 @@ protected theorem nonempty : (spectrum β„‚ a).Nonempty := by
   have Hβ‚€ : resolventSet β„‚ a = Set.univ := by rwa [spectrum, Set.compl_empty_iff] at h
   have H₁ : Differentiable β„‚ fun z : β„‚ => resolvent a z := fun z =>
     (hasDerivAt_resolvent (Hβ‚€.symm β–Έ Set.mem_univ z : z ∈ resolventSet β„‚ a)).differentiableAt
-  /- The norm of the resolvent is small for all sufficently large `z`, and by compactness and
+  /- The norm of the resolvent is small for all sufficiently large `z`, and by compactness and
     continuity it is bounded on the complement of a large ball, thus uniformly bounded on `β„‚`.
     By Liouville's theorem `fun z ↦ resolvent a z` is constant. -/
   have Hβ‚‚ := norm_resolvent_le_forall (π•œ := β„‚) a
@@ -413,7 +413,7 @@ protected theorem nonempty : (spectrum β„‚ a).Nonempty := by
     refine' Or.elim (em (β€–wβ€– ≀ R)) (fun hw => _) fun hw => _
     Β· exact (hC w (mem_closedBall_zero_iff.mpr hw)).trans (le_max_left _ _)
     Β· exact (hR w (not_le.mp hw).le).trans (le_max_right _ _)
-  -- `resolvent a 0 = 0`, which is a contradition because it isn't a unit.
+  -- `resolvent a 0 = 0`, which is a contradiction because it isn't a unit.
   have Hβ‚… : resolvent a (0 : β„‚) = 0 := by
     refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ hΞ΅ => _) (norm_nonneg _))
     rcases Hβ‚‚ Ξ΅ hΞ΅ with ⟨R, _, hR⟩
feat: port Analysis.NormedSpace.Spectrum (#4946)

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Dependencies 12 + 1133

1134 files ported (99.0%)
505040 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