analysis.complex.cauchy_integralMathlib.Analysis.Complex.CauchyIntegral

This file has been ported!

Changes since the initial port

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

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -343,8 +343,8 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
     ∫ θ in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
       ∫ θ in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
     by
-    simpa only [circleIntegral, add_sub_cancel', of_real_exp, ← NormedSpace.exp_add, smul_smul, ←
-      div_eq_mul_inv, mul_div_cancel_left _ (circleMap_ne_center (Real.exp_pos _).ne'),
+    simpa only [circleIntegral, add_sub_cancel_left, of_real_exp, ← NormedSpace.exp_add, smul_smul,
+      ← div_eq_mul_inv, mul_div_cancel_left₀ _ (circleMap_ne_center (Real.exp_pos _).ne'),
       circleMap_sub_center, deriv_circleMap]
   set R := [a, b] ×ℂ [0, 2 * π]
   set g : ℂ → ℂ := (· + ·) c ∘ NormedSpace.exp
Diff
@@ -194,7 +194,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
       neg_sub]
   set R : Set (ℝ × ℝ) := [z.re, w.re] ×ˢ [w.im, z.im]
   set t : Set (ℝ × ℝ) := e ⁻¹' s
-  rw [uIcc_comm z.im] at Hc Hi ; rw [min_comm z.im, max_comm z.im] at Hd 
+  rw [uIcc_comm z.im] at Hc Hi; rw [min_comm z.im, max_comm z.im] at Hd
   have hR : e ⁻¹' ([z.re, w.re] ×ℂ [w.im, z.im]) = R := rfl
   have htc : ContinuousOn F R := Hc.comp e.continuous_on hR.ge
   have htd :
@@ -210,7 +210,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
   rw [←
     (volume_preserving_equiv_real_prod.symm _).integrableOn_comp_preimage
       (MeasurableEquiv.measurableEmbedding _)] at
-    Hi 
+    Hi
   simpa only [hF'] using Hi.neg
 #align complex.integral_boundary_rect_of_has_fderiv_at_real_off_countable Complex.integral_boundary_rect_of_hasFDerivAt_real_off_countable
 -/
@@ -337,7 +337,7 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   set A := closed_ball c R \ ball c r
   obtain ⟨a, rfl⟩ : ∃ a, Real.exp a = r; exact ⟨Real.log r, Real.exp_log h0⟩
   obtain ⟨b, rfl⟩ : ∃ b, Real.exp b = R; exact ⟨Real.log R, Real.exp_log (h0.trans_le hle)⟩
-  rw [Real.exp_le_exp] at hle 
+  rw [Real.exp_le_exp] at hle
   -- Unfold definition of `circle_integral` and cancel some terms.
   suffices
     ∫ θ in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
@@ -436,7 +436,7 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of
       by
       refine' circleIntegral.norm_integral_le_of_norm_le_const hr0.le fun z hz => _
       specialize hzne z hz
-      rw [mem_sphere, dist_eq_norm] at hz 
+      rw [mem_sphere, dist_eq_norm] at hz
       rw [norm_smul, norm_inv, hz, ← dist_eq_norm]
       refine' mul_le_mul_of_nonneg_left (hδ _ ⟨_, hzne⟩).le (inv_nonneg.2 hr0.le)
       rwa [mem_closedBall_iff_norm, hz]
@@ -551,7 +551,7 @@ theorem two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_c
     refine' nonempty_diff.2 fun hsub => _
     have : (Ioo l u).Countable :=
       (hs.preimage ((add_right_injective w).comp of_real_injective)).mono hsub
-    rw [← Cardinal.le_aleph0_iff_set_countable, Cardinal.mk_Ioo_real (hlu₀.1.trans hlu₀.2)] at this 
+    rw [← Cardinal.le_aleph0_iff_set_countable, Cardinal.mk_Ioo_real (hlu₀.1.trans hlu₀.2)] at this
     exact this.not_lt Cardinal.aleph0_lt_continuum
   exact ⟨g x, (hlu_sub hx.1).1, (hlu_sub hx.1).2, hx.2⟩
 #align complex.two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable Complex.two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable
Diff
@@ -343,11 +343,11 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
     ∫ θ in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
       ∫ θ in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
     by
-    simpa only [circleIntegral, add_sub_cancel', of_real_exp, ← exp_add, smul_smul, ←
+    simpa only [circleIntegral, add_sub_cancel', of_real_exp, ← NormedSpace.exp_add, smul_smul, ←
       div_eq_mul_inv, mul_div_cancel_left _ (circleMap_ne_center (Real.exp_pos _).ne'),
       circleMap_sub_center, deriv_circleMap]
   set R := [a, b] ×ℂ [0, 2 * π]
-  set g : ℂ → ℂ := (· + ·) c ∘ exp
+  set g : ℂ → ℂ := (· + ·) c ∘ NormedSpace.exp
   have hdg : Differentiable ℂ g := differentiable_exp.const_add _
   replace hs : (g ⁻¹' s).Countable := (hs.preimage (add_right_injective c)).preimage_cexp
   have h_maps : maps_to g R A := by rintro z ⟨h, -⟩; simpa [dist_eq, g, abs_exp, hle] using h.symm
@@ -357,7 +357,7 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
       DifferentiableAt ℂ (f ∘ g) z
   · refine' fun z hz => (hd (g z) ⟨_, hz.2⟩).comp z (hdg _)
     simpa [g, dist_eq, abs_exp, hle, and_comm] using hz.1.1
-  simpa [g, circleMap, exp_periodic _, sub_eq_zero, ← exp_add] using
+  simpa [g, circleMap, exp_periodic _, sub_eq_zero, ← NormedSpace.exp_add] using
     integral_boundary_rect_eq_zero_of_differentiable_on_off_countable _ ⟨a, 0⟩ ⟨b, 2 * π⟩ _ hs hc hd
 #align complex.circle_integral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable Complex.circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable
 -/
Diff
@@ -3,14 +3,14 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
-import Mathbin.MeasureTheory.Measure.Lebesgue.Complex
-import Mathbin.MeasureTheory.Integral.DivergenceTheorem
-import Mathbin.MeasureTheory.Integral.CircleIntegral
-import Mathbin.Analysis.Calculus.Dslope
-import Mathbin.Analysis.Analytic.Basic
-import Mathbin.Analysis.Complex.ReImTopology
-import Mathbin.Analysis.Calculus.DiffContOnCl
-import Mathbin.Data.Real.Cardinality
+import MeasureTheory.Measure.Lebesgue.Complex
+import MeasureTheory.Integral.DivergenceTheorem
+import MeasureTheory.Integral.CircleIntegral
+import Analysis.Calculus.Dslope
+import Analysis.Analytic.Basic
+import Analysis.Complex.ReImTopology
+import Analysis.Calculus.DiffContOnCl
+import Data.Real.Cardinality
 
 #align_import analysis.complex.cauchy_integral from "leanprover-community/mathlib"@"fd4551cfe4b7484b81c2c9ba3405edae27659676"
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2021 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module analysis.complex.cauchy_integral
-! leanprover-community/mathlib commit fd4551cfe4b7484b81c2c9ba3405edae27659676
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Measure.Lebesgue.Complex
 import Mathbin.MeasureTheory.Integral.DivergenceTheorem
@@ -17,6 +12,8 @@ import Mathbin.Analysis.Complex.ReImTopology
 import Mathbin.Analysis.Calculus.DiffContOnCl
 import Mathbin.Data.Real.Cardinality
 
+#align_import analysis.complex.cauchy_integral from "leanprover-community/mathlib"@"fd4551cfe4b7484b81c2c9ba3405edae27659676"
+
 /-!
 # Cauchy integral formula
 
Diff
@@ -165,6 +165,7 @@ namespace Complex
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Complex.integral_boundary_rect_of_hasFDerivAt_real_off_countable /-
 /-- Suppose that a function `f : ℂ → E` is continuous on a closed rectangle with opposite corners at
 `z w : ℂ`, is *real* differentiable at all but countably many points of the corresponding open
 rectangle, and $\frac{\partial f}{\partial \bar z}$ is integrable on this rectangle. Then the
@@ -215,7 +216,9 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
     Hi 
   simpa only [hF'] using Hi.neg
 #align complex.integral_boundary_rect_of_has_fderiv_at_real_off_countable Complex.integral_boundary_rect_of_hasFDerivAt_real_off_countable
+-/
 
+#print Complex.integral_boundary_rect_of_continuousOn_of_hasFDerivAt_real /-
 /-- Suppose that a function `f : ℂ → E` is continuous on a closed rectangle with opposite corners at
 `z w : ℂ`, is *real* differentiable on the corresponding open rectangle, and
 $\frac{\partial f}{\partial \bar z}$ is integrable on this rectangle. Then the integral of `f` over
@@ -235,7 +238,9 @@ theorem integral_boundary_rect_of_continuousOn_of_hasFDerivAt_real (f : ℂ →
   integral_boundary_rect_of_hasFDerivAt_real_off_countable f f' z w ∅ countable_empty Hc
     (fun x hx => Hd x hx.1) Hi
 #align complex.integral_boundary_rect_of_continuous_on_of_has_fderiv_at_real Complex.integral_boundary_rect_of_continuousOn_of_hasFDerivAt_real
+-/
 
+#print Complex.integral_boundary_rect_of_differentiableOn_real /-
 /-- Suppose that a function `f : ℂ → E` is *real* differentiable on a closed rectangle with opposite
 corners at `z w : ℂ` and $\frac{\partial f}{\partial \bar z}$ is integrable on this rectangle. Then
 the integral of `f` over the boundary of the rectangle is equal to the integral of
@@ -258,7 +263,9 @@ theorem integral_boundary_rect_of_differentiableOn_real (f : ℂ → E) (z w : 
           hx.1)
     Hi
 #align complex.integral_boundary_rect_of_differentiable_on_real Complex.integral_boundary_rect_of_differentiableOn_real
+-/
 
+#print Complex.integral_boundary_rect_eq_zero_of_differentiable_on_off_countable /-
 /-- **Cauchy-Goursat theorem** for a rectangle: the integral of a complex differentiable function
 over the boundary of a rectangle equals zero. More precisely, if `f` is continuous on a closed
 rectangle and is complex differentiable at all but countably many points of the corresponding open
@@ -280,7 +287,9 @@ theorem integral_boundary_rect_eq_zero_of_differentiable_on_off_countable (f : 
         _ <;>
     simp [← ContinuousLinearMap.map_smul]
 #align complex.integral_boundary_rect_eq_zero_of_differentiable_on_off_countable Complex.integral_boundary_rect_eq_zero_of_differentiable_on_off_countable
+-/
 
+#print Complex.integral_boundary_rect_eq_zero_of_continuousOn_of_differentiableOn /-
 /-- **Cauchy-Goursat theorem for a rectangle**: the integral of a complex differentiable function
 over the boundary of a rectangle equals zero. More precisely, if `f` is continuous on a closed
 rectangle and is complex differentiable on the corresponding open rectangle, then its integral over
@@ -297,7 +306,9 @@ theorem integral_boundary_rect_eq_zero_of_continuousOn_of_differentiableOn (f :
   integral_boundary_rect_eq_zero_of_differentiable_on_off_countable f z w ∅ countable_empty Hc
     fun x hx => Hd.DifferentiableAt <| (isOpen_Ioo.reProdIm isOpen_Ioo).mem_nhds hx.1
 #align complex.integral_boundary_rect_eq_zero_of_continuous_on_of_differentiable_on Complex.integral_boundary_rect_eq_zero_of_continuousOn_of_differentiableOn
+-/
 
+#print Complex.integral_boundary_rect_eq_zero_of_differentiableOn /-
 /-- **Cauchy-Goursat theorem** for a rectangle: the integral of a complex differentiable function
 over the boundary of a rectangle equals zero. More precisely, if `f` is complex differentiable on a
 closed rectangle, then its integral over the boundary of the rectangle equals zero. -/
@@ -311,7 +322,9 @@ theorem integral_boundary_rect_eq_zero_of_differentiableOn (f : ℂ → E) (z w
     H.mono <|
       inter_subset_inter (preimage_mono Ioo_subset_Icc_self) (preimage_mono Ioo_subset_Icc_self)
 #align complex.integral_boundary_rect_eq_zero_of_differentiable_on Complex.integral_boundary_rect_eq_zero_of_differentiableOn
+-/
 
+#print Complex.circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable /-
 /-- If `f : ℂ → E` is continuous the closed annulus `r ≤ ‖z - c‖ ≤ R`, `0 < r ≤ R`, and is complex
 differentiable at all but countably many points of its interior, then the integrals of
 `f z / (z - c)` (formally, `(z - c)⁻¹ • f z`) over the circles `‖z - c‖ = r` and `‖z - c‖ = R` are
@@ -350,7 +363,9 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   simpa [g, circleMap, exp_periodic _, sub_eq_zero, ← exp_add] using
     integral_boundary_rect_eq_zero_of_differentiable_on_off_countable _ ⟨a, 0⟩ ⟨b, 2 * π⟩ _ hs hc hd
 #align complex.circle_integral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable Complex.circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable
+-/
 
+#print Complex.circleIntegral_eq_of_differentiable_on_annulus_off_countable /-
 /-- **Cauchy-Goursat theorem** for an annulus. If `f : ℂ → E` is continuous on the closed annulus
 `r ≤ ‖z - c‖ ≤ R`, `0 < r ≤ R`, and is complex differentiable at all but countably many points of
 its interior, then the integrals of `f` over the circles `‖z - c‖ = r` and `‖z - c‖ = R` are equal
@@ -369,7 +384,9 @@ theorem circleIntegral_eq_of_differentiable_on_annulus_off_countable {c : ℂ} {
         (differentiableAt_id.sub_const _).smul (hd z hz))
     _ = ∮ z in C(c, r), f z := circleIntegral.integral_sub_inv_smul_sub_smul _ _ _ _
 #align complex.circle_integral_eq_of_differentiable_on_annulus_off_countable Complex.circleIntegral_eq_of_differentiable_on_annulus_off_countable
+-/
 
+#print Complex.circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto /-
 /-- **Cauchy integral formula** for the value at the center of a disc. If `f` is continuous on a
 punctured closed disc of radius `R`, is differentiable at all but countably many points of the
 interior of this disc, and has a limit `y` at the center of the disc, then the integral
@@ -428,7 +445,9 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of
       rwa [mem_closedBall_iff_norm, hz]
     _ = ε := by field_simp [hr0.ne', real.two_pi_pos.ne']; ac_rfl
 #align complex.circle_integral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto Complex.circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto
+-/
 
+#print Complex.circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable /-
 /-- **Cauchy integral formula** for the value at the center of a disc. If `f : ℂ → E` is continuous
 on a closed disc of radius `R` and is complex differentiable at all but countably many points of its
 interior, then the integral $\oint_{|z-c|=R} \frac{f(z)}{z-c}\,dz$ is equal to $2πiy`. -/
@@ -440,7 +459,9 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable {R
     (hc.mono <| diff_subset _ _) (fun z hz => hd z ⟨hz.1.1, hz.2⟩)
     (hc.ContinuousAt <| closedBall_mem_nhds _ h0).ContinuousWithinAt
 #align complex.circle_integral_sub_center_inv_smul_of_differentiable_on_off_countable Complex.circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable
+-/
 
+#print Complex.circleIntegral_eq_zero_of_differentiable_on_off_countable /-
 /-- **Cauchy-Goursat theorem** for a disk: if `f : ℂ → E` is continuous on a closed disk
 `{z | ‖z - c‖ ≤ R}` and is complex differentiable at all but countably many points of its interior,
 then the integral $\oint_{|z-c|=R}f(z)\,dz$ equals zero. -/
@@ -458,7 +479,9 @@ theorem circleIntegral_eq_zero_of_differentiable_on_off_countable {R : ℝ} (h0
         (differentiable_at_id.sub_const _).smul (hd z hz))
     _ = 0 := by rw [sub_self, zero_smul, smul_zero]
 #align complex.circle_integral_eq_zero_of_differentiable_on_off_countable Complex.circleIntegral_eq_zero_of_differentiable_on_off_countable
+-/
 
+#print Complex.circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux /-
 /-- An auxiliary lemma for
 `complex.circle_integral_sub_inv_smul_of_differentiable_on_off_countable`. This lemma assumes
 `w ∉ s` while the main lemma drops this assumption. -/
@@ -491,7 +514,9 @@ theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux {R :
   exacts [(hc'.smul (hc.mono sphere_subset_closed_ball)).CircleIntegrable hR.le,
     (hc'.smul continuousOn_const).CircleIntegrable hR.le]
 #align complex.circle_integral_sub_inv_smul_of_differentiable_on_off_countable_aux Complex.circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux
+-/
 
+#print Complex.two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable /-
 /-- **Cauchy integral formula**: if `f : ℂ → E` is continuous on a closed disc of radius `R` and is
 complex differentiable at all but countably many points of its interior, then for any `w` in this
 interior we have $\frac{1}{2πi}\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=f(w)$.
@@ -533,7 +558,9 @@ theorem two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_c
     exact this.not_lt Cardinal.aleph0_lt_continuum
   exact ⟨g x, (hlu_sub hx.1).1, (hlu_sub hx.1).2, hx.2⟩
 #align complex.two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable Complex.two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable
+-/
 
+#print Complex.circleIntegral_sub_inv_smul_of_differentiable_on_off_countable /-
 /-- **Cauchy integral formula**: if `f : ℂ → E` is continuous on a closed disc of radius `R` and is
 complex differentiable at all but countably many points of its interior, then for any `w` in this
 interior we have $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$.
@@ -548,7 +575,9 @@ theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable {R : ℝ}
     smul_inv_smul₀]
   simp [Real.pi_ne_zero, I_ne_zero]
 #align complex.circle_integral_sub_inv_smul_of_differentiable_on_off_countable Complex.circleIntegral_sub_inv_smul_of_differentiable_on_off_countable
+-/
 
+#print DiffContOnCl.circleIntegral_sub_inv_smul /-
 /-- **Cauchy integral formula**: if `f : ℂ → E` is complex differentiable on an open disc and is
 continuous on its closure, then for any `w` in this open ball we have
 $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$. -/
@@ -558,7 +587,9 @@ theorem DiffContOnCl.circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f : ℂ
   circleIntegral_sub_inv_smul_of_differentiable_on_off_countable countable_empty hw
     h.continuousOn_ball fun x hx => h.DifferentiableAt isOpen_ball hx.1
 #align diff_cont_on_cl.circle_integral_sub_inv_smul DiffContOnCl.circleIntegral_sub_inv_smul
+-/
 
+#print DiffContOnCl.two_pi_i_inv_smul_circleIntegral_sub_inv_smul /-
 /-- **Cauchy integral formula**: if `f : ℂ → E` is complex differentiable on an open disc and is
 continuous on its closure, then for any `w` in this open ball we have
 $\frac{1}{2πi}\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=f(w)$. -/
@@ -573,7 +604,9 @@ theorem DiffContOnCl.two_pi_i_inv_smul_circleIntegral_sub_inv_smul {R : ℝ} {c
   · simpa only [closure_ball c hR.ne.symm] using hf.continuous_on
   · simpa only [diff_empty] using fun z hz => hf.differentiable_at is_open_ball hz
 #align diff_cont_on_cl.two_pi_I_inv_smul_circle_integral_sub_inv_smul DiffContOnCl.two_pi_i_inv_smul_circleIntegral_sub_inv_smul
+-/
 
+#print DifferentiableOn.circleIntegral_sub_inv_smul /-
 /-- **Cauchy integral formula**: if `f : ℂ → E` is complex differentiable on a closed disc of radius
 `R`, then for any `w` in its interior we have $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$. -/
 theorem DifferentiableOn.circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f : ℂ → E}
@@ -581,7 +614,9 @@ theorem DifferentiableOn.circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f :
     ∮ z in C(c, R), (z - w)⁻¹ • f z = (2 * π * I : ℂ) • f w :=
   (hd.mono closure_ball_subset_closedBall).DiffContOnCl.circleIntegral_sub_inv_smul hw
 #align differentiable_on.circle_integral_sub_inv_smul DifferentiableOn.circleIntegral_sub_inv_smul
+-/
 
+#print Complex.circleIntegral_div_sub_of_differentiable_on_off_countable /-
 /-- **Cauchy integral formula**: if `f : ℂ → ℂ` is continuous on a closed disc of radius `R` and is
 complex differentiable at all but countably many points of its interior, then for any `w` in this
 interior we have $\oint_{|z-c|=R}\frac{f(z)}{z-w}dz=2\pi i\,f(w)$.
@@ -593,7 +628,9 @@ theorem circleIntegral_div_sub_of_differentiable_on_off_countable {R : ℝ} {c w
   simpa only [smul_eq_mul, div_eq_inv_mul] using
     circle_integral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd
 #align complex.circle_integral_div_sub_of_differentiable_on_off_countable Complex.circleIntegral_div_sub_of_differentiable_on_off_countable
+-/
 
+#print Complex.hasFPowerSeriesOnBall_of_differentiable_off_countable /-
 /-- If `f : ℂ → E` is continuous on a closed ball of positive radius and is differentiable at all
 but countably many points of the corresponding open ball, then it is analytic on the open ball with
 coefficients of the power series given by Cauchy integral formulas. -/
@@ -616,7 +653,9 @@ theorem hasFPowerSeriesOnBall_of_differentiable_off_countable {R : ℝ≥0} {c :
               ((hc.mono sphere_subset_closed_ball).CircleIntegrable R.2) hR).HasSum
           hw }
 #align complex.has_fpower_series_on_ball_of_differentiable_off_countable Complex.hasFPowerSeriesOnBall_of_differentiable_off_countable
+-/
 
+#print DiffContOnCl.hasFPowerSeriesOnBall /-
 /-- If `f : ℂ → E` is complex differentiable on an open disc of positive radius and is continuous
 on its closure, then it is analytic on the open disc with coefficients of the power series given by
 Cauchy integral formulas. -/
@@ -626,7 +665,9 @@ theorem DiffContOnCl.hasFPowerSeriesOnBall {R : ℝ≥0} {c : ℂ} {f : ℂ →
   hasFPowerSeriesOnBall_of_differentiable_off_countable countable_empty hf.continuousOn_ball
     (fun z hz => hf.DifferentiableAt isOpen_ball hz.1) hR
 #align diff_cont_on_cl.has_fpower_series_on_ball DiffContOnCl.hasFPowerSeriesOnBall
+-/
 
+#print DifferentiableOn.hasFPowerSeriesOnBall /-
 /-- If `f : ℂ → E` is complex differentiable on a closed disc of positive radius, then it is
 analytic on the corresponding open disc, and the coefficients of the power series are given by
 Cauchy integral formulas. See also
@@ -637,7 +678,9 @@ protected theorem DifferentiableOn.hasFPowerSeriesOnBall {R : ℝ≥0} {c : ℂ}
     HasFPowerSeriesOnBall f (cauchyPowerSeries f c R) c R :=
   (hd.mono closure_ball_subset_closedBall).DiffContOnCl.HasFPowerSeriesOnBall hR
 #align differentiable_on.has_fpower_series_on_ball DifferentiableOn.hasFPowerSeriesOnBall
+-/
 
+#print DifferentiableOn.analyticAt /-
 /-- If `f : ℂ → E` is complex differentiable on some set `s`, then it is analytic at any point `z`
 such that `s ∈ 𝓝 z` (equivalently, `z ∈ interior s`). -/
 protected theorem DifferentiableOn.analyticAt {s : Set ℂ} {f : ℂ → E} {z : ℂ}
@@ -647,17 +690,23 @@ protected theorem DifferentiableOn.analyticAt {s : Set ℂ} {f : ℂ → E} {z :
   lift R to ℝ≥0 using hR0.le
   exact ((hd.mono hRs).HasFPowerSeriesOnBall hR0).AnalyticAt
 #align differentiable_on.analytic_at DifferentiableOn.analyticAt
+-/
 
+#print DifferentiableOn.analyticOn /-
 theorem DifferentiableOn.analyticOn {s : Set ℂ} {f : ℂ → E} (hd : DifferentiableOn ℂ f s)
     (hs : IsOpen s) : AnalyticOn ℂ f s := fun z hz => hd.AnalyticAt (hs.mem_nhds hz)
 #align differentiable_on.analytic_on DifferentiableOn.analyticOn
+-/
 
+#print Differentiable.analyticAt /-
 /-- A complex differentiable function `f : ℂ → E` is analytic at every point. -/
 protected theorem Differentiable.analyticAt {f : ℂ → E} (hf : Differentiable ℂ f) (z : ℂ) :
     AnalyticAt ℂ f z :=
   hf.DifferentiableOn.AnalyticAt univ_mem
 #align differentiable.analytic_at Differentiable.analyticAt
+-/
 
+#print Differentiable.hasFPowerSeriesOnBall /-
 /-- When `f : ℂ → E` is differentiable, the `cauchy_power_series f z R` represents `f` as a power
 series centered at `z` in the entirety of `ℂ`, regardless of `R : ℝ≥0`, with  `0 < R`. -/
 protected theorem Differentiable.hasFPowerSeriesOnBall {f : ℂ → E} (h : Differentiable ℂ f) (z : ℂ)
@@ -665,6 +714,7 @@ protected theorem Differentiable.hasFPowerSeriesOnBall {f : ℂ → E} (h : Diff
   (h.DifferentiableOn.HasFPowerSeriesOnBall hR).r_eq_top_of_exists fun r hr =>
     ⟨_, h.DifferentiableOn.HasFPowerSeriesOnBall hr⟩
 #align differentiable.has_fpower_series_on_ball Differentiable.hasFPowerSeriesOnBall
+-/
 
 end Complex
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module analysis.complex.cauchy_integral
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit fd4551cfe4b7484b81c2c9ba3405edae27659676
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -20,6 +20,9 @@ import Mathbin.Data.Real.Cardinality
 /-!
 # Cauchy integral formula
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we prove the Cauchy-Goursat theorem and the Cauchy integral formula for integrals over
 circles. Most results are formulated for a function `f : ℂ → E` that takes values in a complex
 Banach space with second countable topology.
Diff
@@ -174,9 +174,9 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
       ∀ x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \ s,
         HasFDerivAt f (f' x) x)
     (Hi : IntegrableOn (fun z => I • f' z 1 - f' z I) ([z.re, w.re] ×ℂ [z.im, w.im])) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+    (((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
           I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
-        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I) =
       ∫ x : ℝ in z.re..w.re, ∫ y : ℝ in z.im..w.im, I • f' (x + y * I) 1 - f' (x + y * I) I :=
   by
   set e : (ℝ × ℝ) ≃L[ℝ] ℂ := equiv_real_prod_clm.symm
@@ -225,9 +225,9 @@ theorem integral_boundary_rect_of_continuousOn_of_hasFDerivAt_real (f : ℂ →
       ∀ x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im),
         HasFDerivAt f (f' x) x)
     (Hi : IntegrableOn (fun z => I • f' z 1 - f' z I) ([z.re, w.re] ×ℂ [z.im, w.im])) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+    (((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
           I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
-        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I) =
       ∫ x : ℝ in z.re..w.re, ∫ y : ℝ in z.im..w.im, I • f' (x + y * I) 1 - f' (x + y * I) I :=
   integral_boundary_rect_of_hasFDerivAt_real_off_countable f f' z w ∅ countable_empty Hc
     (fun x hx => Hd x hx.1) Hi
@@ -242,9 +242,9 @@ theorem integral_boundary_rect_of_differentiableOn_real (f : ℂ → E) (z w : 
     (Hd : DifferentiableOn ℝ f ([z.re, w.re] ×ℂ [z.im, w.im]))
     (Hi :
       IntegrableOn (fun z => I • fderiv ℝ f z 1 - fderiv ℝ f z I) ([z.re, w.re] ×ℂ [z.im, w.im])) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+    (((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
           I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
-        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I) =
       ∫ x : ℝ in z.re..w.re,
         ∫ y : ℝ in z.im..w.im, I • fderiv ℝ f (x + y * I) 1 - fderiv ℝ f (x + y * I) I :=
   integral_boundary_rect_of_hasFDerivAt_real_off_countable f (fderiv ℝ f) z w ∅ countable_empty
@@ -265,9 +265,9 @@ theorem integral_boundary_rect_eq_zero_of_differentiable_on_off_countable (f : 
     (Hd :
       ∀ x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \ s,
         DifferentiableAt ℂ f x) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+    (((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
           I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
-        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I) =
       0 :=
   by
   refine'
@@ -287,9 +287,9 @@ theorem integral_boundary_rect_eq_zero_of_continuousOn_of_differentiableOn (f :
     (Hd :
       DifferentiableOn ℂ f
         (Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im))) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+    (((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
           I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
-        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I) =
       0 :=
   integral_boundary_rect_eq_zero_of_differentiable_on_off_countable f z w ∅ countable_empty Hc
     fun x hx => Hd.DifferentiableAt <| (isOpen_Ioo.reProdIm isOpen_Ioo).mem_nhds hx.1
@@ -300,9 +300,9 @@ over the boundary of a rectangle equals zero. More precisely, if `f` is complex
 closed rectangle, then its integral over the boundary of the rectangle equals zero. -/
 theorem integral_boundary_rect_eq_zero_of_differentiableOn (f : ℂ → E) (z w : ℂ)
     (H : DifferentiableOn ℂ f ([z.re, w.re] ×ℂ [z.im, w.im])) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+    (((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
           I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
-        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I) =
       0 :=
   integral_boundary_rect_eq_zero_of_continuousOn_of_differentiableOn f z w H.ContinuousOn <|
     H.mono <|
@@ -317,7 +317,7 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
     {r R : ℝ} (h0 : 0 < r) (hle : r ≤ R) {f : ℂ → E} {s : Set ℂ} (hs : s.Countable)
     (hc : ContinuousOn f (closedBall c R \ ball c r))
     (hd : ∀ z ∈ (ball c R \ closedBall c r) \ s, DifferentiableAt ℂ f z) :
-    (∮ z in C(c, R), (z - c)⁻¹ • f z) = ∮ z in C(c, r), (z - c)⁻¹ • f z :=
+    ∮ z in C(c, R), (z - c)⁻¹ • f z = ∮ z in C(c, r), (z - c)⁻¹ • f z :=
   by
   /- We apply the previous lemma to `λ z, f (c + exp z)` on the rectangle
     `[log r, log R] × [0, 2 * π]`. -/
@@ -327,7 +327,7 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   rw [Real.exp_le_exp] at hle 
   -- Unfold definition of `circle_integral` and cancel some terms.
   suffices
-    (∫ θ in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ)) =
+    ∫ θ in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
       ∫ θ in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
     by
     simpa only [circleIntegral, add_sub_cancel', of_real_exp, ← exp_add, smul_smul, ←
@@ -356,9 +356,9 @@ theorem circleIntegral_eq_of_differentiable_on_annulus_off_countable {c : ℂ} {
     (hle : r ≤ R) {f : ℂ → E} {s : Set ℂ} (hs : s.Countable)
     (hc : ContinuousOn f (closedBall c R \ ball c r))
     (hd : ∀ z ∈ (ball c R \ closedBall c r) \ s, DifferentiableAt ℂ f z) :
-    (∮ z in C(c, R), f z) = ∮ z in C(c, r), f z :=
+    ∮ z in C(c, R), f z = ∮ z in C(c, r), f z :=
   calc
-    (∮ z in C(c, R), f z) = ∮ z in C(c, R), (z - c)⁻¹ • (z - c) • f z :=
+    ∮ z in C(c, R), f z = ∮ z in C(c, R), (z - c)⁻¹ • (z - c) • f z :=
       (circleIntegral.integral_sub_inv_smul_sub_smul _ _ _ _).symm
     _ = ∮ z in C(c, r), (z - c)⁻¹ • (z - c) • f z :=
       (circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable h0 hle hs
@@ -375,7 +375,7 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of
     {R : ℝ} (h0 : 0 < R) {f : ℂ → E} {y : E} {s : Set ℂ} (hs : s.Countable)
     (hc : ContinuousOn f (closedBall c R \ {c}))
     (hd : ∀ z ∈ (ball c R \ {c}) \ s, DifferentiableAt ℂ f z) (hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)) :
-    (∮ z in C(c, R), (z - c)⁻¹ • f z) = (2 * π * I : ℂ) • y :=
+    ∮ z in C(c, R), (z - c)⁻¹ • f z = (2 * π * I : ℂ) • y :=
   by
   rw [← sub_eq_zero, ← norm_le_zero_iff]
   refine' le_of_forall_le_of_dense fun ε ε0 => _
@@ -432,7 +432,7 @@ interior, then the integral $\oint_{|z-c|=R} \frac{f(z)}{z-c}\,dz$ is equal to $
 theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable {R : ℝ} (h0 : 0 < R)
     {f : ℂ → E} {c : ℂ} {s : Set ℂ} (hs : s.Countable) (hc : ContinuousOn f (closedBall c R))
     (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) :
-    (∮ z in C(c, R), (z - c)⁻¹ • f z) = (2 * π * I : ℂ) • f c :=
+    ∮ z in C(c, R), (z - c)⁻¹ • f z = (2 * π * I : ℂ) • f c :=
   circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto h0 hs
     (hc.mono <| diff_subset _ _) (fun z hz => hd z ⟨hz.1.1, hz.2⟩)
     (hc.ContinuousAt <| closedBall_mem_nhds _ h0).ContinuousWithinAt
@@ -443,11 +443,11 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable {R
 then the integral $\oint_{|z-c|=R}f(z)\,dz$ equals zero. -/
 theorem circleIntegral_eq_zero_of_differentiable_on_off_countable {R : ℝ} (h0 : 0 ≤ R) {f : ℂ → E}
     {c : ℂ} {s : Set ℂ} (hs : s.Countable) (hc : ContinuousOn f (closedBall c R))
-    (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) : (∮ z in C(c, R), f z) = 0 :=
+    (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) : ∮ z in C(c, R), f z = 0 :=
   by
   rcases h0.eq_or_lt with (rfl | h0); · apply circleIntegral.integral_radius_zero
   calc
-    (∮ z in C(c, R), f z) = ∮ z in C(c, R), (z - c)⁻¹ • (z - c) • f z :=
+    ∮ z in C(c, R), f z = ∮ z in C(c, R), (z - c)⁻¹ • (z - c) • f z :=
       (circleIntegral.integral_sub_inv_smul_sub_smul _ _ _ _).symm
     _ = (2 * ↑π * I : ℂ) • (c - c) • f c :=
       (circle_integral_sub_center_inv_smul_of_differentiable_on_off_countable h0 hs
@@ -462,7 +462,7 @@ theorem circleIntegral_eq_zero_of_differentiable_on_off_countable {R : ℝ} (h0
 theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux {R : ℝ} {c w : ℂ}
     {f : ℂ → E} {s : Set ℂ} (hs : s.Countable) (hw : w ∈ ball c R \ s)
     (hc : ContinuousOn f (closedBall c R)) (hd : ∀ x ∈ ball c R \ s, DifferentiableAt ℂ f x) :
-    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w :=
+    ∮ z in C(c, R), (z - w)⁻¹ • f z = (2 * π * I : ℂ) • f w :=
   by
   have hR : 0 < R := dist_nonneg.trans_lt hw.1
   set F : ℂ → E := dslope f w
@@ -496,7 +496,7 @@ interior we have $\frac{1}{2πi}\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=f(w)$.
 theorem two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable {R : ℝ}
     {c w : ℂ} {f : ℂ → E} {s : Set ℂ} (hs : s.Countable) (hw : w ∈ ball c R)
     (hc : ContinuousOn f (closedBall c R)) (hd : ∀ x ∈ ball c R \ s, DifferentiableAt ℂ f x) :
-    ((2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) = f w :=
+    (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z = f w :=
   by
   have hR : 0 < R := dist_nonneg.trans_lt hw
   suffices w ∈ closure (ball c R \ s) by
@@ -538,7 +538,7 @@ interior we have $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$.
 theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable {R : ℝ} {c w : ℂ} {f : ℂ → E}
     {s : Set ℂ} (hs : s.Countable) (hw : w ∈ ball c R) (hc : ContinuousOn f (closedBall c R))
     (hd : ∀ x ∈ ball c R \ s, DifferentiableAt ℂ f x) :
-    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w :=
+    ∮ z in C(c, R), (z - w)⁻¹ • f z = (2 * π * I : ℂ) • f w :=
   by
   rw [←
     two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd,
@@ -551,7 +551,7 @@ continuous on its closure, then for any `w` in this open ball we have
 $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$. -/
 theorem DiffContOnCl.circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f : ℂ → E}
     (h : DiffContOnCl ℂ f (ball c R)) (hw : w ∈ ball c R) :
-    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w :=
+    ∮ z in C(c, R), (z - w)⁻¹ • f z = (2 * π * I : ℂ) • f w :=
   circleIntegral_sub_inv_smul_of_differentiable_on_off_countable countable_empty hw
     h.continuousOn_ball fun x hx => h.DifferentiableAt isOpen_ball hx.1
 #align diff_cont_on_cl.circle_integral_sub_inv_smul DiffContOnCl.circleIntegral_sub_inv_smul
@@ -561,7 +561,7 @@ continuous on its closure, then for any `w` in this open ball we have
 $\frac{1}{2πi}\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=f(w)$. -/
 theorem DiffContOnCl.two_pi_i_inv_smul_circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f : ℂ → E}
     (hf : DiffContOnCl ℂ f (ball c R)) (hw : w ∈ ball c R) :
-    ((2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) = f w :=
+    (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z = f w :=
   by
   have hR : 0 < R := not_le.mp (ball_eq_empty.not.mp (nonempty_of_mem hw).ne_empty)
   refine'
@@ -575,7 +575,7 @@ theorem DiffContOnCl.two_pi_i_inv_smul_circleIntegral_sub_inv_smul {R : ℝ} {c
 `R`, then for any `w` in its interior we have $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$. -/
 theorem DifferentiableOn.circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f : ℂ → E}
     (hd : DifferentiableOn ℂ f (closedBall c R)) (hw : w ∈ ball c R) :
-    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w :=
+    ∮ z in C(c, R), (z - w)⁻¹ • f z = (2 * π * I : ℂ) • f w :=
   (hd.mono closure_ball_subset_closedBall).DiffContOnCl.circleIntegral_sub_inv_smul hw
 #align differentiable_on.circle_integral_sub_inv_smul DifferentiableOn.circleIntegral_sub_inv_smul
 
@@ -586,7 +586,7 @@ interior we have $\oint_{|z-c|=R}\frac{f(z)}{z-w}dz=2\pi i\,f(w)$.
 theorem circleIntegral_div_sub_of_differentiable_on_off_countable {R : ℝ} {c w : ℂ} {s : Set ℂ}
     (hs : s.Countable) (hw : w ∈ ball c R) {f : ℂ → ℂ} (hc : ContinuousOn f (closedBall c R))
     (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) :
-    (∮ z in C(c, R), f z / (z - w)) = 2 * π * I * f w := by
+    ∮ z in C(c, R), f z / (z - w) = 2 * π * I * f w := by
   simpa only [smul_eq_mul, div_eq_inv_mul] using
     circle_integral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd
 #align complex.circle_integral_div_sub_of_differentiable_on_off_countable Complex.circleIntegral_div_sub_of_differentiable_on_off_countable
Diff
@@ -493,7 +493,7 @@ theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux {R :
 complex differentiable at all but countably many points of its interior, then for any `w` in this
 interior we have $\frac{1}{2πi}\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=f(w)$.
 -/
-theorem two_pi_i_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable {R : ℝ}
+theorem two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable {R : ℝ}
     {c w : ℂ} {f : ℂ → E} {s : Set ℂ} (hs : s.Countable) (hw : w ∈ ball c R)
     (hc : ContinuousOn f (closedBall c R)) (hd : ∀ x ∈ ball c R \ s, DifferentiableAt ℂ f x) :
     ((2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) = f w :=
@@ -529,7 +529,7 @@ theorem two_pi_i_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_c
     rw [← Cardinal.le_aleph0_iff_set_countable, Cardinal.mk_Ioo_real (hlu₀.1.trans hlu₀.2)] at this 
     exact this.not_lt Cardinal.aleph0_lt_continuum
   exact ⟨g x, (hlu_sub hx.1).1, (hlu_sub hx.1).2, hx.2⟩
-#align complex.two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable Complex.two_pi_i_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable
+#align complex.two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable Complex.two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable
 
 /-- **Cauchy integral formula**: if `f : ℂ → E` is continuous on a closed disc of radius `R` and is
 complex differentiable at all but countably many points of its interior, then for any `w` in this
Diff
@@ -365,7 +365,6 @@ theorem circleIntegral_eq_of_differentiable_on_annulus_off_countable {c : ℂ} {
         ((continuousOn_id.sub continuousOn_const).smul hc) fun z hz =>
         (differentiableAt_id.sub_const _).smul (hd z hz))
     _ = ∮ z in C(c, r), f z := circleIntegral.integral_sub_inv_smul_sub_smul _ _ _ _
-    
 #align complex.circle_integral_eq_of_differentiable_on_annulus_off_countable Complex.circleIntegral_eq_of_differentiable_on_annulus_off_countable
 
 /-- **Cauchy integral formula** for the value at the center of a disc. If `f` is continuous on a
@@ -425,7 +424,6 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of
       refine' mul_le_mul_of_nonneg_left (hδ _ ⟨_, hzne⟩).le (inv_nonneg.2 hr0.le)
       rwa [mem_closedBall_iff_norm, hz]
     _ = ε := by field_simp [hr0.ne', real.two_pi_pos.ne']; ac_rfl
-    
 #align complex.circle_integral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto Complex.circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto
 
 /-- **Cauchy integral formula** for the value at the center of a disc. If `f : ℂ → E` is continuous
@@ -456,7 +454,6 @@ theorem circleIntegral_eq_zero_of_differentiable_on_off_countable {R : ℝ} (h0
         ((continuous_on_id.sub continuousOn_const).smul hc) fun z hz =>
         (differentiable_at_id.sub_const _).smul (hd z hz))
     _ = 0 := by rw [sub_self, zero_smul, smul_zero]
-    
 #align complex.circle_integral_eq_zero_of_differentiable_on_off_countable Complex.circleIntegral_eq_zero_of_differentiable_on_off_countable
 
 /-- An auxiliary lemma for
@@ -484,7 +481,6 @@ theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux {R :
     calc
       F z = (z - w)⁻¹ • (f z - f w) := update_noteq (hne z hz) _ _
       _ = (z - w)⁻¹ • f z - (z - w)⁻¹ • f w := smul_sub _ _ _
-      
   have hc' : ContinuousOn (fun z => (z - w)⁻¹) (sphere c R) :=
     (continuous_on_id.sub continuousOn_const).inv₀ fun z hz => sub_ne_zero.2 <| hne z hz
   rw [← circleIntegral.integral_sub_inv_of_mem_ball hw.1, ← circleIntegral.integral_smul_const, ←
@@ -508,7 +504,7 @@ theorem two_pi_i_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_c
     have A : ContinuousAt (fun w => (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) w :=
       by
       have :=
-        has_fpower_series_on_cauchy_integral
+        hasFPowerSeriesOn_cauchy_integral
           ((hc.mono sphere_subset_closed_ball).CircleIntegrable R.coe_nonneg) hR
       refine' this.continuous_on.continuous_at (emetric.is_open_ball.mem_nhds _)
       rwa [Metric.emetric_ball_nnreal]
@@ -613,7 +609,7 @@ theorem hasFPowerSeriesOnBall_of_differentiable_off_countable {R : ℝ≥0} {c :
         two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable hs hw' hc
           hd]
       exact
-        (has_fpower_series_on_cauchy_integral
+        (hasFPowerSeriesOn_cauchy_integral
               ((hc.mono sphere_subset_closed_ball).CircleIntegrable R.2) hR).HasSum
           hw }
 #align complex.has_fpower_series_on_ball_of_differentiable_off_countable Complex.hasFPowerSeriesOnBall_of_differentiable_off_countable
Diff
@@ -508,7 +508,7 @@ theorem two_pi_i_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_c
     have A : ContinuousAt (fun w => (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) w :=
       by
       have :=
-        hasFpowerSeriesOnCauchyIntegral
+        has_fpower_series_on_cauchy_integral
           ((hc.mono sphere_subset_closed_ball).CircleIntegrable R.coe_nonneg) hR
       refine' this.continuous_on.continuous_at (emetric.is_open_ball.mem_nhds _)
       rwa [Metric.emetric_ball_nnreal]
@@ -598,10 +598,10 @@ theorem circleIntegral_div_sub_of_differentiable_on_off_countable {R : ℝ} {c w
 /-- If `f : ℂ → E` is continuous on a closed ball of positive radius and is differentiable at all
 but countably many points of the corresponding open ball, then it is analytic on the open ball with
 coefficients of the power series given by Cauchy integral formulas. -/
-theorem hasFpowerSeriesOnBallOfDifferentiableOffCountable {R : ℝ≥0} {c : ℂ} {f : ℂ → E} {s : Set ℂ}
-    (hs : s.Countable) (hc : ContinuousOn f (closedBall c R))
+theorem hasFPowerSeriesOnBall_of_differentiable_off_countable {R : ℝ≥0} {c : ℂ} {f : ℂ → E}
+    {s : Set ℂ} (hs : s.Countable) (hc : ContinuousOn f (closedBall c R))
     (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) (hR : 0 < R) :
-    HasFpowerSeriesOnBall f (cauchyPowerSeries f c R) c R :=
+    HasFPowerSeriesOnBall f (cauchyPowerSeries f c R) c R :=
   { r_le := le_radius_cauchyPowerSeries _ _ _
     r_pos := ENNReal.coe_pos.2 hR
     HasSum := fun w hw =>
@@ -613,31 +613,31 @@ theorem hasFpowerSeriesOnBallOfDifferentiableOffCountable {R : ℝ≥0} {c : ℂ
         two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable hs hw' hc
           hd]
       exact
-        (hasFpowerSeriesOnCauchyIntegral ((hc.mono sphere_subset_closed_ball).CircleIntegrable R.2)
-              hR).HasSum
+        (has_fpower_series_on_cauchy_integral
+              ((hc.mono sphere_subset_closed_ball).CircleIntegrable R.2) hR).HasSum
           hw }
-#align complex.has_fpower_series_on_ball_of_differentiable_off_countable Complex.hasFpowerSeriesOnBallOfDifferentiableOffCountable
+#align complex.has_fpower_series_on_ball_of_differentiable_off_countable Complex.hasFPowerSeriesOnBall_of_differentiable_off_countable
 
 /-- If `f : ℂ → E` is complex differentiable on an open disc of positive radius and is continuous
 on its closure, then it is analytic on the open disc with coefficients of the power series given by
 Cauchy integral formulas. -/
-theorem DiffContOnCl.hasFpowerSeriesOnBall {R : ℝ≥0} {c : ℂ} {f : ℂ → E}
+theorem DiffContOnCl.hasFPowerSeriesOnBall {R : ℝ≥0} {c : ℂ} {f : ℂ → E}
     (hf : DiffContOnCl ℂ f (ball c R)) (hR : 0 < R) :
-    HasFpowerSeriesOnBall f (cauchyPowerSeries f c R) c R :=
-  hasFpowerSeriesOnBallOfDifferentiableOffCountable countable_empty hf.continuousOn_ball
+    HasFPowerSeriesOnBall f (cauchyPowerSeries f c R) c R :=
+  hasFPowerSeriesOnBall_of_differentiable_off_countable countable_empty hf.continuousOn_ball
     (fun z hz => hf.DifferentiableAt isOpen_ball hz.1) hR
-#align diff_cont_on_cl.has_fpower_series_on_ball DiffContOnCl.hasFpowerSeriesOnBall
+#align diff_cont_on_cl.has_fpower_series_on_ball DiffContOnCl.hasFPowerSeriesOnBall
 
 /-- If `f : ℂ → E` is complex differentiable on a closed disc of positive radius, then it is
 analytic on the corresponding open disc, and the coefficients of the power series are given by
 Cauchy integral formulas. See also
 `complex.has_fpower_series_on_ball_of_differentiable_off_countable` for a version of this lemma with
 weaker assumptions. -/
-protected theorem DifferentiableOn.hasFpowerSeriesOnBall {R : ℝ≥0} {c : ℂ} {f : ℂ → E}
+protected theorem DifferentiableOn.hasFPowerSeriesOnBall {R : ℝ≥0} {c : ℂ} {f : ℂ → E}
     (hd : DifferentiableOn ℂ f (closedBall c R)) (hR : 0 < R) :
-    HasFpowerSeriesOnBall f (cauchyPowerSeries f c R) c R :=
-  (hd.mono closure_ball_subset_closedBall).DiffContOnCl.HasFpowerSeriesOnBall hR
-#align differentiable_on.has_fpower_series_on_ball DifferentiableOn.hasFpowerSeriesOnBall
+    HasFPowerSeriesOnBall f (cauchyPowerSeries f c R) c R :=
+  (hd.mono closure_ball_subset_closedBall).DiffContOnCl.HasFPowerSeriesOnBall hR
+#align differentiable_on.has_fpower_series_on_ball DifferentiableOn.hasFPowerSeriesOnBall
 
 /-- If `f : ℂ → E` is complex differentiable on some set `s`, then it is analytic at any point `z`
 such that `s ∈ 𝓝 z` (equivalently, `z ∈ interior s`). -/
@@ -646,7 +646,7 @@ protected theorem DifferentiableOn.analyticAt {s : Set ℂ} {f : ℂ → E} {z :
   by
   rcases nhds_basis_closed_ball.mem_iff.1 hz with ⟨R, hR0, hRs⟩
   lift R to ℝ≥0 using hR0.le
-  exact ((hd.mono hRs).HasFpowerSeriesOnBall hR0).AnalyticAt
+  exact ((hd.mono hRs).HasFPowerSeriesOnBall hR0).AnalyticAt
 #align differentiable_on.analytic_at DifferentiableOn.analyticAt
 
 theorem DifferentiableOn.analyticOn {s : Set ℂ} {f : ℂ → E} (hd : DifferentiableOn ℂ f s)
@@ -661,11 +661,11 @@ protected theorem Differentiable.analyticAt {f : ℂ → E} (hf : Differentiable
 
 /-- When `f : ℂ → E` is differentiable, the `cauchy_power_series f z R` represents `f` as a power
 series centered at `z` in the entirety of `ℂ`, regardless of `R : ℝ≥0`, with  `0 < R`. -/
-protected theorem Differentiable.hasFpowerSeriesOnBall {f : ℂ → E} (h : Differentiable ℂ f) (z : ℂ)
-    {R : ℝ≥0} (hR : 0 < R) : HasFpowerSeriesOnBall f (cauchyPowerSeries f z R) z ∞ :=
-  (h.DifferentiableOn.HasFpowerSeriesOnBall hR).rEqTopOfExists fun r hr =>
-    ⟨_, h.DifferentiableOn.HasFpowerSeriesOnBall hr⟩
-#align differentiable.has_fpower_series_on_ball Differentiable.hasFpowerSeriesOnBall
+protected theorem Differentiable.hasFPowerSeriesOnBall {f : ℂ → E} (h : Differentiable ℂ f) (z : ℂ)
+    {R : ℝ≥0} (hR : 0 < R) : HasFPowerSeriesOnBall f (cauchyPowerSeries f z R) z ∞ :=
+  (h.DifferentiableOn.HasFPowerSeriesOnBall hR).r_eq_top_of_exists fun r hr =>
+    ⟨_, h.DifferentiableOn.HasFPowerSeriesOnBall hr⟩
+#align differentiable.has_fpower_series_on_ball Differentiable.hasFPowerSeriesOnBall
 
 end Complex
 
Diff
@@ -193,7 +193,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
       neg_sub]
   set R : Set (ℝ × ℝ) := [z.re, w.re] ×ˢ [w.im, z.im]
   set t : Set (ℝ × ℝ) := e ⁻¹' s
-  rw [uIcc_comm z.im] at Hc Hi; rw [min_comm z.im, max_comm z.im] at Hd
+  rw [uIcc_comm z.im] at Hc Hi ; rw [min_comm z.im, max_comm z.im] at Hd 
   have hR : e ⁻¹' ([z.re, w.re] ×ℂ [w.im, z.im]) = R := rfl
   have htc : ContinuousOn F R := Hc.comp e.continuous_on hR.ge
   have htd :
@@ -209,7 +209,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
   rw [←
     (volume_preserving_equiv_real_prod.symm _).integrableOn_comp_preimage
       (MeasurableEquiv.measurableEmbedding _)] at
-    Hi
+    Hi 
   simpa only [hF'] using Hi.neg
 #align complex.integral_boundary_rect_of_has_fderiv_at_real_off_countable Complex.integral_boundary_rect_of_hasFDerivAt_real_off_countable
 
@@ -324,7 +324,7 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   set A := closed_ball c R \ ball c r
   obtain ⟨a, rfl⟩ : ∃ a, Real.exp a = r; exact ⟨Real.log r, Real.exp_log h0⟩
   obtain ⟨b, rfl⟩ : ∃ b, Real.exp b = R; exact ⟨Real.log R, Real.exp_log (h0.trans_le hle)⟩
-  rw [Real.exp_le_exp] at hle
+  rw [Real.exp_le_exp] at hle 
   -- Unfold definition of `circle_integral` and cancel some terms.
   suffices
     (∫ θ in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ)) =
@@ -420,11 +420,11 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of
       by
       refine' circleIntegral.norm_integral_le_of_norm_le_const hr0.le fun z hz => _
       specialize hzne z hz
-      rw [mem_sphere, dist_eq_norm] at hz
+      rw [mem_sphere, dist_eq_norm] at hz 
       rw [norm_smul, norm_inv, hz, ← dist_eq_norm]
       refine' mul_le_mul_of_nonneg_left (hδ _ ⟨_, hzne⟩).le (inv_nonneg.2 hr0.le)
       rwa [mem_closedBall_iff_norm, hz]
-    _ = ε := by field_simp [hr0.ne', real.two_pi_pos.ne'] ; ac_rfl
+    _ = ε := by field_simp [hr0.ne', real.two_pi_pos.ne']; ac_rfl
     
 #align complex.circle_integral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto Complex.circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto
 
@@ -489,7 +489,7 @@ theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux {R :
     (continuous_on_id.sub continuousOn_const).inv₀ fun z hz => sub_ne_zero.2 <| hne z hz
   rw [← circleIntegral.integral_sub_inv_of_mem_ball hw.1, ← circleIntegral.integral_smul_const, ←
     sub_eq_zero, ← circleIntegral.integral_sub, ← circleIntegral.integral_congr hR.le hFeq, HI]
-  exacts[(hc'.smul (hc.mono sphere_subset_closed_ball)).CircleIntegrable hR.le,
+  exacts [(hc'.smul (hc.mono sphere_subset_closed_ball)).CircleIntegrable hR.le,
     (hc'.smul continuousOn_const).CircleIntegrable hR.le]
 #align complex.circle_integral_sub_inv_smul_of_differentiable_on_off_countable_aux Complex.circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux
 
@@ -530,7 +530,7 @@ theorem two_pi_i_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_c
     refine' nonempty_diff.2 fun hsub => _
     have : (Ioo l u).Countable :=
       (hs.preimage ((add_right_injective w).comp of_real_injective)).mono hsub
-    rw [← Cardinal.le_aleph0_iff_set_countable, Cardinal.mk_Ioo_real (hlu₀.1.trans hlu₀.2)] at this
+    rw [← Cardinal.le_aleph0_iff_set_countable, Cardinal.mk_Ioo_real (hlu₀.1.trans hlu₀.2)] at this 
     exact this.not_lt Cardinal.aleph0_lt_continuum
   exact ⟨g x, (hlu_sub hx.1).1, (hlu_sub hx.1).2, hx.2⟩
 #align complex.two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable Complex.two_pi_i_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable
Diff
@@ -150,7 +150,7 @@ Cauchy-Goursat theorem, Cauchy integral formula
 
 open TopologicalSpace Set MeasureTheory intervalIntegral Metric Filter Function
 
-open Interval Real NNReal ENNReal Topology BigOperators
+open scoped Interval Real NNReal ENNReal Topology BigOperators
 
 noncomputable section
 
Diff
@@ -181,8 +181,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
   by
   set e : (ℝ × ℝ) ≃L[ℝ] ℂ := equiv_real_prod_clm.symm
   have he : ∀ x y : ℝ, ↑x + ↑y * I = e (x, y) := fun x y => (mk_eq_add_mul_I x y).symm
-  have he₁ : e (1, 0) = 1 := rfl
-  have he₂ : e (0, 1) = I := rfl
+  have he₁ : e (1, 0) = 1 := rfl; have he₂ : e (0, 1) = I := rfl
   simp only [he] at *
   set F : ℝ × ℝ → E := f ∘ e
   set F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => (f' (e p)).comp (e : ℝ × ℝ →L[ℝ] ℂ)
@@ -194,8 +193,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
       neg_sub]
   set R : Set (ℝ × ℝ) := [z.re, w.re] ×ˢ [w.im, z.im]
   set t : Set (ℝ × ℝ) := e ⁻¹' s
-  rw [uIcc_comm z.im] at Hc Hi
-  rw [min_comm z.im, max_comm z.im] at Hd
+  rw [uIcc_comm z.im] at Hc Hi; rw [min_comm z.im, max_comm z.im] at Hd
   have hR : e ⁻¹' ([z.re, w.re] ×ℂ [w.im, z.im]) = R := rfl
   have htc : ContinuousOn F R := Hc.comp e.continuous_on hR.ge
   have htd :
@@ -324,10 +322,8 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   /- We apply the previous lemma to `λ z, f (c + exp z)` on the rectangle
     `[log r, log R] × [0, 2 * π]`. -/
   set A := closed_ball c R \ ball c r
-  obtain ⟨a, rfl⟩ : ∃ a, Real.exp a = r
-  exact ⟨Real.log r, Real.exp_log h0⟩
-  obtain ⟨b, rfl⟩ : ∃ b, Real.exp b = R
-  exact ⟨Real.log R, Real.exp_log (h0.trans_le hle)⟩
+  obtain ⟨a, rfl⟩ : ∃ a, Real.exp a = r; exact ⟨Real.log r, Real.exp_log h0⟩
+  obtain ⟨b, rfl⟩ : ∃ b, Real.exp b = R; exact ⟨Real.log R, Real.exp_log (h0.trans_le hle)⟩
   rw [Real.exp_le_exp] at hle
   -- Unfold definition of `circle_integral` and cancel some terms.
   suffices
@@ -341,11 +337,8 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   set g : ℂ → ℂ := (· + ·) c ∘ exp
   have hdg : Differentiable ℂ g := differentiable_exp.const_add _
   replace hs : (g ⁻¹' s).Countable := (hs.preimage (add_right_injective c)).preimage_cexp
-  have h_maps : maps_to g R A := by
-    rintro z ⟨h, -⟩
-    simpa [dist_eq, g, abs_exp, hle] using h.symm
-  replace hc : ContinuousOn (f ∘ g) R
-  exact hc.comp hdg.continuous.continuous_on h_maps
+  have h_maps : maps_to g R A := by rintro z ⟨h, -⟩; simpa [dist_eq, g, abs_exp, hle] using h.symm
+  replace hc : ContinuousOn (f ∘ g) R; exact hc.comp hdg.continuous.continuous_on h_maps
   replace hd :
     ∀ z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \ g ⁻¹' s,
       DifferentiableAt ℂ (f ∘ g) z
@@ -431,9 +424,7 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of
       rw [norm_smul, norm_inv, hz, ← dist_eq_norm]
       refine' mul_le_mul_of_nonneg_left (hδ _ ⟨_, hzne⟩).le (inv_nonneg.2 hr0.le)
       rwa [mem_closedBall_iff_norm, hz]
-    _ = ε := by
-      field_simp [hr0.ne', real.two_pi_pos.ne']
-      ac_rfl
+    _ = ε := by field_simp [hr0.ne', real.two_pi_pos.ne'] ; ac_rfl
     
 #align complex.circle_integral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto Complex.circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto
 
Diff
@@ -168,11 +168,11 @@ rectangle, and $\frac{\partial f}{\partial \bar z}$ is integrable on this rectan
 integral of `f` over the boundary of the rectangle is equal to the integral of
 $2i\frac{\partial f}{\partial \bar z}=i\frac{\partial f}{\partial x}-\frac{\partial f}{\partial y}$
 over the rectangle. -/
-theorem integral_boundary_rect_of_hasFderivAt_real_off_countable (f : ℂ → E) (f' : ℂ → ℂ →L[ℝ] E)
+theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E) (f' : ℂ → ℂ →L[ℝ] E)
     (z w : ℂ) (s : Set ℂ) (hs : s.Countable) (Hc : ContinuousOn f ([z.re, w.re] ×ℂ [z.im, w.im]))
     (Hd :
       ∀ x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \ s,
-        HasFderivAt f (f' x) x)
+        HasFDerivAt f (f' x) x)
     (Hi : IntegrableOn (fun z => I • f' z 1 - f' z I) ([z.re, w.re] ×ℂ [z.im, w.im])) :
     ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
           I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
@@ -200,7 +200,7 @@ theorem integral_boundary_rect_of_hasFderivAt_real_off_countable (f : ℂ → E)
   have htc : ContinuousOn F R := Hc.comp e.continuous_on hR.ge
   have htd :
     ∀ p ∈ Ioo (min z.re w.re) (max z.re w.re) ×ˢ Ioo (min w.im z.im) (max w.im z.im) \ t,
-      HasFderivAt F (F' p) p :=
+      HasFDerivAt F (F' p) p :=
     fun p hp => (Hd (e p) hp).comp p e.has_fderiv_at
   simp_rw [← intervalIntegral.integral_smul, intervalIntegral.integral_symm w.im z.im, ←
     intervalIntegral.integral_neg, ← hF']
@@ -213,7 +213,7 @@ theorem integral_boundary_rect_of_hasFderivAt_real_off_countable (f : ℂ → E)
       (MeasurableEquiv.measurableEmbedding _)] at
     Hi
   simpa only [hF'] using Hi.neg
-#align complex.integral_boundary_rect_of_has_fderiv_at_real_off_countable Complex.integral_boundary_rect_of_hasFderivAt_real_off_countable
+#align complex.integral_boundary_rect_of_has_fderiv_at_real_off_countable Complex.integral_boundary_rect_of_hasFDerivAt_real_off_countable
 
 /-- Suppose that a function `f : ℂ → E` is continuous on a closed rectangle with opposite corners at
 `z w : ℂ`, is *real* differentiable on the corresponding open rectangle, and
@@ -221,19 +221,19 @@ $\frac{\partial f}{\partial \bar z}$ is integrable on this rectangle. Then the i
 the boundary of the rectangle is equal to the integral of
 $2i\frac{\partial f}{\partial \bar z}=i\frac{\partial f}{\partial x}-\frac{\partial f}{\partial y}$
 over the rectangle. -/
-theorem integral_boundary_rect_of_continuousOn_of_hasFderivAt_real (f : ℂ → E) (f' : ℂ → ℂ →L[ℝ] E)
+theorem integral_boundary_rect_of_continuousOn_of_hasFDerivAt_real (f : ℂ → E) (f' : ℂ → ℂ →L[ℝ] E)
     (z w : ℂ) (Hc : ContinuousOn f ([z.re, w.re] ×ℂ [z.im, w.im]))
     (Hd :
       ∀ x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im),
-        HasFderivAt f (f' x) x)
+        HasFDerivAt f (f' x) x)
     (Hi : IntegrableOn (fun z => I • f' z 1 - f' z I) ([z.re, w.re] ×ℂ [z.im, w.im])) :
     ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
           I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
         I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
       ∫ x : ℝ in z.re..w.re, ∫ y : ℝ in z.im..w.im, I • f' (x + y * I) 1 - f' (x + y * I) I :=
-  integral_boundary_rect_of_hasFderivAt_real_off_countable f f' z w ∅ countable_empty Hc
+  integral_boundary_rect_of_hasFDerivAt_real_off_countable f f' z w ∅ countable_empty Hc
     (fun x hx => Hd x hx.1) Hi
-#align complex.integral_boundary_rect_of_continuous_on_of_has_fderiv_at_real Complex.integral_boundary_rect_of_continuousOn_of_hasFderivAt_real
+#align complex.integral_boundary_rect_of_continuous_on_of_has_fderiv_at_real Complex.integral_boundary_rect_of_continuousOn_of_hasFDerivAt_real
 
 /-- Suppose that a function `f : ℂ → E` is *real* differentiable on a closed rectangle with opposite
 corners at `z w : ℂ` and $\frac{\partial f}{\partial \bar z}$ is integrable on this rectangle. Then
@@ -249,10 +249,10 @@ theorem integral_boundary_rect_of_differentiableOn_real (f : ℂ → E) (z w : 
         I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
       ∫ x : ℝ in z.re..w.re,
         ∫ y : ℝ in z.im..w.im, I • fderiv ℝ f (x + y * I) 1 - fderiv ℝ f (x + y * I) I :=
-  integral_boundary_rect_of_hasFderivAt_real_off_countable f (fderiv ℝ f) z w ∅ countable_empty
+  integral_boundary_rect_of_hasFDerivAt_real_off_countable f (fderiv ℝ f) z w ∅ countable_empty
     Hd.ContinuousOn
     (fun x hx =>
-      Hd.HasFderivAt <| by
+      Hd.HasFDerivAt <| by
         simpa only [← mem_interior_iff_mem_nhds, interior_re_prod_im, uIcc, interior_Icc] using
           hx.1)
     Hi
@@ -275,7 +275,7 @@ theorem integral_boundary_rect_eq_zero_of_differentiable_on_off_countable (f : 
   refine'
       (integral_boundary_rect_of_has_fderiv_at_real_off_countable f
             (fun z => (fderiv ℂ f z).restrictScalars ℝ) z w s hs Hc
-            (fun x hx => (Hd x hx).HasFderivAt.restrictScalars ℝ) _).trans
+            (fun x hx => (Hd x hx).HasFDerivAt.restrictScalars ℝ) _).trans
         _ <;>
     simp [← ContinuousLinearMap.map_smul]
 #align complex.integral_boundary_rect_eq_zero_of_differentiable_on_off_countable Complex.integral_boundary_rect_eq_zero_of_differentiable_on_off_countable
Diff
@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module analysis.complex.cauchy_integral
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.MeasureTheory.Measure.ComplexLebesgue
+import Mathbin.MeasureTheory.Measure.Lebesgue.Complex
 import Mathbin.MeasureTheory.Integral.DivergenceTheorem
 import Mathbin.MeasureTheory.Integral.CircleIntegral
 import Mathbin.Analysis.Calculus.Dslope
Diff
@@ -173,11 +173,11 @@ theorem integral_boundary_rect_of_hasFderivAt_real_off_countable (f : ℂ → E)
     (Hd :
       ∀ x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \ s,
         HasFderivAt f (f' x) x)
-    (Hi : IntegrableOn (fun z => i • f' z 1 - f' z i) ([z.re, w.re] ×ℂ [z.im, w.im])) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * i)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * i)) +
-          i • ∫ y : ℝ in z.im..w.im, f (re w + y * i)) -
-        i • ∫ y : ℝ in z.im..w.im, f (re z + y * i)) =
-      ∫ x : ℝ in z.re..w.re, ∫ y : ℝ in z.im..w.im, i • f' (x + y * i) 1 - f' (x + y * i) i :=
+    (Hi : IntegrableOn (fun z => I • f' z 1 - f' z I) ([z.re, w.re] ×ℂ [z.im, w.im])) :
+    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+          I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
+      ∫ x : ℝ in z.re..w.re, ∫ y : ℝ in z.im..w.im, I • f' (x + y * I) 1 - f' (x + y * I) I :=
   by
   set e : (ℝ × ℝ) ≃L[ℝ] ℂ := equiv_real_prod_clm.symm
   have he : ∀ x y : ℝ, ↑x + ↑y * I = e (x, y) := fun x y => (mk_eq_add_mul_I x y).symm
@@ -226,11 +226,11 @@ theorem integral_boundary_rect_of_continuousOn_of_hasFderivAt_real (f : ℂ →
     (Hd :
       ∀ x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im),
         HasFderivAt f (f' x) x)
-    (Hi : IntegrableOn (fun z => i • f' z 1 - f' z i) ([z.re, w.re] ×ℂ [z.im, w.im])) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * i)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * i)) +
-          i • ∫ y : ℝ in z.im..w.im, f (re w + y * i)) -
-        i • ∫ y : ℝ in z.im..w.im, f (re z + y * i)) =
-      ∫ x : ℝ in z.re..w.re, ∫ y : ℝ in z.im..w.im, i • f' (x + y * i) 1 - f' (x + y * i) i :=
+    (Hi : IntegrableOn (fun z => I • f' z 1 - f' z I) ([z.re, w.re] ×ℂ [z.im, w.im])) :
+    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+          I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
+      ∫ x : ℝ in z.re..w.re, ∫ y : ℝ in z.im..w.im, I • f' (x + y * I) 1 - f' (x + y * I) I :=
   integral_boundary_rect_of_hasFderivAt_real_off_countable f f' z w ∅ countable_empty Hc
     (fun x hx => Hd x hx.1) Hi
 #align complex.integral_boundary_rect_of_continuous_on_of_has_fderiv_at_real Complex.integral_boundary_rect_of_continuousOn_of_hasFderivAt_real
@@ -243,12 +243,12 @@ over the rectangle. -/
 theorem integral_boundary_rect_of_differentiableOn_real (f : ℂ → E) (z w : ℂ)
     (Hd : DifferentiableOn ℝ f ([z.re, w.re] ×ℂ [z.im, w.im]))
     (Hi :
-      IntegrableOn (fun z => i • fderiv ℝ f z 1 - fderiv ℝ f z i) ([z.re, w.re] ×ℂ [z.im, w.im])) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * i)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * i)) +
-          i • ∫ y : ℝ in z.im..w.im, f (re w + y * i)) -
-        i • ∫ y : ℝ in z.im..w.im, f (re z + y * i)) =
+      IntegrableOn (fun z => I • fderiv ℝ f z 1 - fderiv ℝ f z I) ([z.re, w.re] ×ℂ [z.im, w.im])) :
+    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+          I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
       ∫ x : ℝ in z.re..w.re,
-        ∫ y : ℝ in z.im..w.im, i • fderiv ℝ f (x + y * i) 1 - fderiv ℝ f (x + y * i) i :=
+        ∫ y : ℝ in z.im..w.im, I • fderiv ℝ f (x + y * I) 1 - fderiv ℝ f (x + y * I) I :=
   integral_boundary_rect_of_hasFderivAt_real_off_countable f (fderiv ℝ f) z w ∅ countable_empty
     Hd.ContinuousOn
     (fun x hx =>
@@ -267,9 +267,9 @@ theorem integral_boundary_rect_eq_zero_of_differentiable_on_off_countable (f : 
     (Hd :
       ∀ x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \ s,
         DifferentiableAt ℂ f x) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * i)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * i)) +
-          i • ∫ y : ℝ in z.im..w.im, f (re w + y * i)) -
-        i • ∫ y : ℝ in z.im..w.im, f (re z + y * i)) =
+    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+          I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
       0 :=
   by
   refine'
@@ -289,9 +289,9 @@ theorem integral_boundary_rect_eq_zero_of_continuousOn_of_differentiableOn (f :
     (Hd :
       DifferentiableOn ℂ f
         (Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im))) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * i)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * i)) +
-          i • ∫ y : ℝ in z.im..w.im, f (re w + y * i)) -
-        i • ∫ y : ℝ in z.im..w.im, f (re z + y * i)) =
+    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+          I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
       0 :=
   integral_boundary_rect_eq_zero_of_differentiable_on_off_countable f z w ∅ countable_empty Hc
     fun x hx => Hd.DifferentiableAt <| (isOpen_Ioo.reProdIm isOpen_Ioo).mem_nhds hx.1
@@ -302,9 +302,9 @@ over the boundary of a rectangle equals zero. More precisely, if `f` is complex
 closed rectangle, then its integral over the boundary of the rectangle equals zero. -/
 theorem integral_boundary_rect_eq_zero_of_differentiableOn (f : ℂ → E) (z w : ℂ)
     (H : DifferentiableOn ℂ f ([z.re, w.re] ×ℂ [z.im, w.im])) :
-    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * i)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * i)) +
-          i • ∫ y : ℝ in z.im..w.im, f (re w + y * i)) -
-        i • ∫ y : ℝ in z.im..w.im, f (re z + y * i)) =
+    ((((∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - ∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
+          I • ∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
+        I • ∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
       0 :=
   integral_boundary_rect_eq_zero_of_continuousOn_of_differentiableOn f z w H.ContinuousOn <|
     H.mono <|
@@ -383,7 +383,7 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of
     {R : ℝ} (h0 : 0 < R) {f : ℂ → E} {y : E} {s : Set ℂ} (hs : s.Countable)
     (hc : ContinuousOn f (closedBall c R \ {c}))
     (hd : ∀ z ∈ (ball c R \ {c}) \ s, DifferentiableAt ℂ f z) (hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)) :
-    (∮ z in C(c, R), (z - c)⁻¹ • f z) = (2 * π * i : ℂ) • y :=
+    (∮ z in C(c, R), (z - c)⁻¹ • f z) = (2 * π * I : ℂ) • y :=
   by
   rw [← sub_eq_zero, ← norm_le_zero_iff]
   refine' le_of_forall_le_of_dense fun ε ε0 => _
@@ -443,7 +443,7 @@ interior, then the integral $\oint_{|z-c|=R} \frac{f(z)}{z-c}\,dz$ is equal to $
 theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable {R : ℝ} (h0 : 0 < R)
     {f : ℂ → E} {c : ℂ} {s : Set ℂ} (hs : s.Countable) (hc : ContinuousOn f (closedBall c R))
     (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) :
-    (∮ z in C(c, R), (z - c)⁻¹ • f z) = (2 * π * i : ℂ) • f c :=
+    (∮ z in C(c, R), (z - c)⁻¹ • f z) = (2 * π * I : ℂ) • f c :=
   circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto h0 hs
     (hc.mono <| diff_subset _ _) (fun z hz => hd z ⟨hz.1.1, hz.2⟩)
     (hc.ContinuousAt <| closedBall_mem_nhds _ h0).ContinuousWithinAt
@@ -474,7 +474,7 @@ theorem circleIntegral_eq_zero_of_differentiable_on_off_countable {R : ℝ} (h0
 theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux {R : ℝ} {c w : ℂ}
     {f : ℂ → E} {s : Set ℂ} (hs : s.Countable) (hw : w ∈ ball c R \ s)
     (hc : ContinuousOn f (closedBall c R)) (hd : ∀ x ∈ ball c R \ s, DifferentiableAt ℂ f x) :
-    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * i : ℂ) • f w :=
+    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w :=
   by
   have hR : 0 < R := dist_nonneg.trans_lt hw.1
   set F : ℂ → E := dslope f w
@@ -509,7 +509,7 @@ interior we have $\frac{1}{2πi}\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=f(w)$.
 theorem two_pi_i_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable {R : ℝ}
     {c w : ℂ} {f : ℂ → E} {s : Set ℂ} (hs : s.Countable) (hw : w ∈ ball c R)
     (hc : ContinuousOn f (closedBall c R)) (hd : ∀ x ∈ ball c R \ s, DifferentiableAt ℂ f x) :
-    ((2 * π * i : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) = f w :=
+    ((2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) = f w :=
   by
   have hR : 0 < R := dist_nonneg.trans_lt hw
   suffices w ∈ closure (ball c R \ s) by
@@ -551,7 +551,7 @@ interior we have $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$.
 theorem circleIntegral_sub_inv_smul_of_differentiable_on_off_countable {R : ℝ} {c w : ℂ} {f : ℂ → E}
     {s : Set ℂ} (hs : s.Countable) (hw : w ∈ ball c R) (hc : ContinuousOn f (closedBall c R))
     (hd : ∀ x ∈ ball c R \ s, DifferentiableAt ℂ f x) :
-    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * i : ℂ) • f w :=
+    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w :=
   by
   rw [←
     two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd,
@@ -564,7 +564,7 @@ continuous on its closure, then for any `w` in this open ball we have
 $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$. -/
 theorem DiffContOnCl.circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f : ℂ → E}
     (h : DiffContOnCl ℂ f (ball c R)) (hw : w ∈ ball c R) :
-    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * i : ℂ) • f w :=
+    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w :=
   circleIntegral_sub_inv_smul_of_differentiable_on_off_countable countable_empty hw
     h.continuousOn_ball fun x hx => h.DifferentiableAt isOpen_ball hx.1
 #align diff_cont_on_cl.circle_integral_sub_inv_smul DiffContOnCl.circleIntegral_sub_inv_smul
@@ -574,7 +574,7 @@ continuous on its closure, then for any `w` in this open ball we have
 $\frac{1}{2πi}\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=f(w)$. -/
 theorem DiffContOnCl.two_pi_i_inv_smul_circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f : ℂ → E}
     (hf : DiffContOnCl ℂ f (ball c R)) (hw : w ∈ ball c R) :
-    ((2 * π * i : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) = f w :=
+    ((2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) = f w :=
   by
   have hR : 0 < R := not_le.mp (ball_eq_empty.not.mp (nonempty_of_mem hw).ne_empty)
   refine'
@@ -588,7 +588,7 @@ theorem DiffContOnCl.two_pi_i_inv_smul_circleIntegral_sub_inv_smul {R : ℝ} {c
 `R`, then for any `w` in its interior we have $\oint_{|z-c|=R}(z-w)^{-1}f(z)\,dz=2πif(w)$. -/
 theorem DifferentiableOn.circleIntegral_sub_inv_smul {R : ℝ} {c w : ℂ} {f : ℂ → E}
     (hd : DifferentiableOn ℂ f (closedBall c R)) (hw : w ∈ ball c R) :
-    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * i : ℂ) • f w :=
+    (∮ z in C(c, R), (z - w)⁻¹ • f z) = (2 * π * I : ℂ) • f w :=
   (hd.mono closure_ball_subset_closedBall).DiffContOnCl.circleIntegral_sub_inv_smul hw
 #align differentiable_on.circle_integral_sub_inv_smul DifferentiableOn.circleIntegral_sub_inv_smul
 
@@ -599,7 +599,7 @@ interior we have $\oint_{|z-c|=R}\frac{f(z)}{z-w}dz=2\pi i\,f(w)$.
 theorem circleIntegral_div_sub_of_differentiable_on_off_countable {R : ℝ} {c w : ℂ} {s : Set ℂ}
     (hs : s.Countable) (hw : w ∈ ball c R) {f : ℂ → ℂ} (hc : ContinuousOn f (closedBall c R))
     (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) :
-    (∮ z in C(c, R), f z / (z - w)) = 2 * π * i * f w := by
+    (∮ z in C(c, R), f z / (z - w)) = 2 * π * I * f w := by
   simpa only [smul_eq_mul, div_eq_inv_mul] using
     circle_integral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd
 #align complex.circle_integral_div_sub_of_differentiable_on_off_countable Complex.circleIntegral_div_sub_of_differentiable_on_off_countable
Diff
@@ -520,7 +520,7 @@ theorem two_pi_i_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_c
         hasFpowerSeriesOnCauchyIntegral
           ((hc.mono sphere_subset_closed_ball).CircleIntegrable R.coe_nonneg) hR
       refine' this.continuous_on.continuous_at (emetric.is_open_ball.mem_nhds _)
-      rwa [Metric.emetric_ball_nNReal]
+      rwa [Metric.emetric_ball_nnreal]
     have B : ContinuousAt f w := hc.continuous_at (closed_ball_mem_nhds_of_mem hw)
     refine' tendsto_nhds_unique_of_frequently_eq A B ((mem_closure_iff_frequently.1 this).mono _)
     intro z hz
Diff
@@ -368,9 +368,9 @@ theorem circleIntegral_eq_of_differentiable_on_annulus_off_countable {c : ℂ} {
     (∮ z in C(c, R), f z) = ∮ z in C(c, R), (z - c)⁻¹ • (z - c) • f z :=
       (circleIntegral.integral_sub_inv_smul_sub_smul _ _ _ _).symm
     _ = ∮ z in C(c, r), (z - c)⁻¹ • (z - c) • f z :=
-      circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable h0 hle hs
+      (circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable h0 hle hs
         ((continuousOn_id.sub continuousOn_const).smul hc) fun z hz =>
-        (differentiableAt_id.sub_const _).smul (hd z hz)
+        (differentiableAt_id.sub_const _).smul (hd z hz))
     _ = ∮ z in C(c, r), f z := circleIntegral.integral_sub_inv_smul_sub_smul _ _ _ _
     
 #align complex.circle_integral_eq_of_differentiable_on_annulus_off_countable Complex.circleIntegral_eq_of_differentiable_on_annulus_off_countable
@@ -461,9 +461,9 @@ theorem circleIntegral_eq_zero_of_differentiable_on_off_countable {R : ℝ} (h0
     (∮ z in C(c, R), f z) = ∮ z in C(c, R), (z - c)⁻¹ • (z - c) • f z :=
       (circleIntegral.integral_sub_inv_smul_sub_smul _ _ _ _).symm
     _ = (2 * ↑π * I : ℂ) • (c - c) • f c :=
-      circle_integral_sub_center_inv_smul_of_differentiable_on_off_countable h0 hs
+      (circle_integral_sub_center_inv_smul_of_differentiable_on_off_countable h0 hs
         ((continuous_on_id.sub continuousOn_const).smul hc) fun z hz =>
-        (differentiable_at_id.sub_const _).smul (hd z hz)
+        (differentiable_at_id.sub_const _).smul (hd z hz))
     _ = 0 := by rw [sub_self, zero_smul, smul_zero]
     
 #align complex.circle_integral_eq_zero_of_differentiable_on_off_countable Complex.circleIntegral_eq_zero_of_differentiable_on_off_countable
Diff
@@ -150,7 +150,7 @@ Cauchy-Goursat theorem, Cauchy integral formula
 
 open TopologicalSpace Set MeasureTheory intervalIntegral Metric Filter Function
 
-open Interval Real NNReal Ennreal Topology BigOperators
+open Interval Real NNReal ENNReal Topology BigOperators
 
 noncomputable section
 
@@ -612,12 +612,12 @@ theorem hasFpowerSeriesOnBallOfDifferentiableOffCountable {R : ℝ≥0} {c : ℂ
     (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) (hR : 0 < R) :
     HasFpowerSeriesOnBall f (cauchyPowerSeries f c R) c R :=
   { r_le := le_radius_cauchyPowerSeries _ _ _
-    r_pos := Ennreal.coe_pos.2 hR
+    r_pos := ENNReal.coe_pos.2 hR
     HasSum := fun w hw =>
       by
       have hw' : c + w ∈ ball c R := by
         simpa only [add_mem_ball_iff_norm, ← coe_nnnorm, mem_emetric_ball_zero_iff,
-          NNReal.coe_lt_coe, Ennreal.coe_lt_coe] using hw
+          NNReal.coe_lt_coe, ENNReal.coe_lt_coe] using hw
       rw [←
         two_pi_I_inv_smul_circle_integral_sub_inv_smul_of_differentiable_on_off_countable hs hw' hc
           hd]

Changes in mathlib4

mathlib3
mathlib4
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -307,8 +307,8 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   suffices
     (∫ θ in (0)..2 * π, I • f (circleMap c (Real.exp b) θ)) =
       ∫ θ in (0)..2 * π, I • f (circleMap c (Real.exp a) θ) by
-    simpa only [circleIntegral, add_sub_cancel', ofReal_exp, ← exp_add, smul_smul, ←
-      div_eq_mul_inv, mul_div_cancel_left _ (circleMap_ne_center (Real.exp_pos _).ne'),
+    simpa only [circleIntegral, add_sub_cancel_left, ofReal_exp, ← exp_add, smul_smul, ←
+      div_eq_mul_inv, mul_div_cancel_left₀ _ (circleMap_ne_center (Real.exp_pos _).ne'),
       circleMap_sub_center, deriv_circleMap]
   set R := [[a, b]] ×ℂ [[0, 2 * π]]
   set g : ℂ → ℂ := (c + exp ·)
chore: remove stream-of-conciousness syntax for obtain (#11045)

This covers many instances, but is not exhaustive.

Independently of whether that syntax should be avoided (similar to #10534), I think all these changes are small improvements.

Diff
@@ -300,8 +300,8 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   /- We apply the previous lemma to `fun z ↦ f (c + exp z)` on the rectangle
     `[log r, log R] × [0, 2 * π]`. -/
   set A := closedBall c R \ ball c r
-  obtain ⟨a, rfl⟩ : ∃ a, Real.exp a = r; exact ⟨Real.log r, Real.exp_log h0⟩
-  obtain ⟨b, rfl⟩ : ∃ b, Real.exp b = R; exact ⟨Real.log R, Real.exp_log (h0.trans_le hle)⟩
+  obtain ⟨a, rfl⟩ : ∃ a, Real.exp a = r := ⟨Real.log r, Real.exp_log h0⟩
+  obtain ⟨b, rfl⟩ : ∃ b, Real.exp b = R := ⟨Real.log R, Real.exp_log (h0.trans_le hle)⟩
   rw [Real.exp_le_exp] at hle
   -- Unfold definition of `circleIntegral` and cancel some terms.
   suffices
@@ -354,9 +354,9 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of
     (∮ z in C(c, R), (z - c)⁻¹ • f z) = (2 * π * I : ℂ) • y := by
   rw [← sub_eq_zero, ← norm_le_zero_iff]
   refine' le_of_forall_le_of_dense fun ε ε0 => _
-  obtain ⟨δ, δ0, hδ⟩ : ∃ δ > (0 : ℝ), ∀ z ∈ closedBall c δ \ {c}, dist (f z) y < ε / (2 * π)
-  exact ((nhdsWithin_hasBasis nhds_basis_closedBall _).tendsto_iff nhds_basis_ball).1 hy _
-    (div_pos ε0 Real.two_pi_pos)
+  obtain ⟨δ, δ0, hδ⟩ : ∃ δ > (0 : ℝ), ∀ z ∈ closedBall c δ \ {c}, dist (f z) y < ε / (2 * π) :=
+    ((nhdsWithin_hasBasis nhds_basis_closedBall _).tendsto_iff nhds_basis_ball).1 hy _
+      (div_pos ε0 Real.two_pi_pos)
   obtain ⟨r, hr0, hrδ, hrR⟩ : ∃ r, 0 < r ∧ r ≤ δ ∧ r ≤ R :=
     ⟨min δ R, lt_min δ0 h0, min_le_left _ _, min_le_right _ _⟩
   have hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c} :=
chore: prepare Lean version bump with explicit simp (#10999)

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

Diff
@@ -181,7 +181,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
   set F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => (f' (e p)).comp (e : ℝ × ℝ →L[ℝ] ℂ)
   have hF' : ∀ p : ℝ × ℝ, (-(I • F' p)) (1, 0) + F' p (0, 1) = -(I • f' (e p) 1 - f' (e p) I) := by
     rintro ⟨x, y⟩
-    simp only [ContinuousLinearMap.neg_apply, ContinuousLinearMap.smul_apply,
+    simp only [F', ContinuousLinearMap.neg_apply, ContinuousLinearMap.smul_apply,
       ContinuousLinearMap.comp_apply, ContinuousLinearEquiv.coe_coe, he₁, he₂, neg_add_eq_sub,
       neg_sub]
   set R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
@@ -314,13 +314,13 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   set g : ℂ → ℂ := (c + exp ·)
   have hdg : Differentiable ℂ g := differentiable_exp.const_add _
   replace hs : (g ⁻¹' s).Countable := (hs.preimage (add_right_injective c)).preimage_cexp
-  have h_maps : MapsTo g R A := by rintro z ⟨h, -⟩; simpa [dist_eq, abs_exp, hle] using h.symm
+  have h_maps : MapsTo g R A := by rintro z ⟨h, -⟩; simpa [g, A, dist_eq, abs_exp, hle] using h.symm
   replace hc : ContinuousOn (f ∘ g) R := hc.comp hdg.continuous.continuousOn h_maps
   replace hd : ∀ z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \ g ⁻¹' s,
       DifferentiableAt ℂ (f ∘ g) z := by
     refine' fun z hz => (hd (g z) ⟨_, hz.2⟩).comp z (hdg _)
-    simpa [dist_eq, abs_exp, hle, and_comm] using hz.1.1
-  simpa [circleMap, exp_periodic _, sub_eq_zero, ← exp_add] using
+    simpa [g, dist_eq, abs_exp, hle, and_comm] using hz.1.1
+  simpa [g, circleMap, exp_periodic _, sub_eq_zero, ← exp_add] using
     integral_boundary_rect_eq_zero_of_differentiable_on_off_countable _ ⟨a, 0⟩ ⟨b, 2 * π⟩ _ hs hc hd
 #align complex.circle_integral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable Complex.circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable
 
fix(Analysis/Normed/Group): make instance helpers reducible (#10726)

Zulip thread

This slightly simplifies two downstream proofs, as a bonus.

Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -254,12 +254,10 @@ theorem integral_boundary_rect_eq_zero_of_differentiable_on_off_countable (f : 
     (∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - (∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
       I • (∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
       I • (∫ y : ℝ in z.im..w.im, f (re z + y * I)) = 0 := by
-  -- porting note: `simp` fails to use `ContinuousLinearMap.coe_restrictScalars'`
-  have : ∀ z, I • (fderiv ℂ f z).restrictScalars ℝ 1 = (fderiv ℂ f z).restrictScalars ℝ I := fun z ↦
-    by rw [(fderiv ℂ f _).coe_restrictScalars', ← (fderiv ℂ f _).map_smul, smul_eq_mul, mul_one]
   refine (integral_boundary_rect_of_hasFDerivAt_real_off_countable f
     (fun z => (fderiv ℂ f z).restrictScalars ℝ) z w s hs Hc
-    (fun x hx => (Hd x hx).hasFDerivAt.restrictScalars ℝ) ?_).trans ?_ <;> simp [this]
+    (fun x hx => (Hd x hx).hasFDerivAt.restrictScalars ℝ) ?_).trans ?_ <;>
+      simp [← ContinuousLinearMap.map_smul]
 #align complex.integral_boundary_rect_eq_zero_of_differentiable_on_off_countable Complex.integral_boundary_rect_eq_zero_of_differentiable_on_off_countable
 
 /-- **Cauchy-Goursat theorem for a rectangle**: the integral of a complex differentiable function
feat: Complex exp, log, and cpow are analytic (#10811)

These are all immediate from differentiability.

We also record several rewrite lemmas for switching between analyticity and differentiability. These are immediate from existing theorems, but as far as I can tell don't yet exist as iffs.

Diff
@@ -626,4 +626,30 @@ protected theorem _root_.Differentiable.hasFPowerSeriesOnBall {f : ℂ → E} (h
     ⟨_, h.differentiableOn.hasFPowerSeriesOnBall hr⟩
 #align differentiable.has_fpower_series_on_ball Differentiable.hasFPowerSeriesOnBall
 
+/-- On an open set, `f : ℂ → E` is analytic iff it is differentiable -/
+theorem analyticOn_iff_differentiableOn {f : ℂ → E} {s : Set ℂ} (o : IsOpen s) :
+    AnalyticOn ℂ f s ↔ DifferentiableOn ℂ f s :=
+  ⟨AnalyticOn.differentiableOn, fun d _ zs ↦ d.analyticAt (o.mem_nhds zs)⟩
+
+/-- `f : ℂ → E` is entire iff it's differentiable -/
+theorem analyticOn_univ_iff_differentiable {f : ℂ → E} :
+    AnalyticOn ℂ f univ ↔ Differentiable ℂ f := by
+  simp only [← differentiableOn_univ]
+  exact analyticOn_iff_differentiableOn isOpen_univ
+
+/-- `f : ℂ → E` is analytic at `z` iff it's differentiable near `z` -/
+theorem analyticAt_iff_eventually_differentiableAt {f : ℂ → E} {c : ℂ} :
+    AnalyticAt ℂ f c ↔ ∀ᶠ z in 𝓝 c, DifferentiableAt ℂ f z := by
+  constructor
+  · intro fa
+    filter_upwards [fa.eventually_analyticAt]
+    apply AnalyticAt.differentiableAt
+  · intro d
+    rcases _root_.eventually_nhds_iff.mp d with ⟨s, d, o, m⟩
+    have h : AnalyticOn ℂ f s := by
+      refine DifferentiableOn.analyticOn ?_ o
+      intro z m
+      exact (d z m).differentiableWithinAt
+    exact h _ m
+
 end Complex
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
@@ -317,11 +317,10 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
   have hdg : Differentiable ℂ g := differentiable_exp.const_add _
   replace hs : (g ⁻¹' s).Countable := (hs.preimage (add_right_injective c)).preimage_cexp
   have h_maps : MapsTo g R A := by rintro z ⟨h, -⟩; simpa [dist_eq, abs_exp, hle] using h.symm
-  replace hc : ContinuousOn (f ∘ g) R; exact hc.comp hdg.continuous.continuousOn h_maps
-  replace hd :
-    ∀ z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \ g ⁻¹' s,
-      DifferentiableAt ℂ (f ∘ g) z
-  · refine' fun z hz => (hd (g z) ⟨_, hz.2⟩).comp z (hdg _)
+  replace hc : ContinuousOn (f ∘ g) R := hc.comp hdg.continuous.continuousOn h_maps
+  replace hd : ∀ z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \ g ⁻¹' s,
+      DifferentiableAt ℂ (f ∘ g) z := by
+    refine' fun z hz => (hd (g z) ⟨_, hz.2⟩).comp z (hdg _)
     simpa [dist_eq, abs_exp, hle, and_comm] using hz.1.1
   simpa [circleMap, exp_periodic _, sub_eq_zero, ← exp_add] using
     integral_boundary_rect_eq_zero_of_differentiable_on_off_countable _ ⟨a, 0⟩ ⟨b, 2 * π⟩ _ hs hc hd
fix: Clm -> CLM, Cle -> CLE (#10018)

Rename

  • Complex.equivRealProdClmComplex.equivRealProdCLM;
    • TODO: should this one use CLE?
  • Complex.reClmComplex.reCLM;
  • Complex.imClmComplex.imCLM;
  • Complex.conjLieComplex.conjLIE;
  • Complex.conjCleComplex.conjCLE;
  • Complex.ofRealLiComplex.ofRealLI;
  • Complex.ofRealClmComplex.ofRealCLM;
  • fderivInnerClmfderivInnerCLM;
  • LinearPMap.adjointDomainMkClmLinearPMap.adjointDomainMkCLM;
  • LinearPMap.adjointDomainMkClmExtendLinearPMap.adjointDomainMkCLMExtend;
  • IsROrC.reClmIsROrC.reCLM;
  • IsROrC.imClmIsROrC.imCLM;
  • IsROrC.conjLieIsROrC.conjLIE;
  • IsROrC.conjCleIsROrC.conjCLE;
  • IsROrC.ofRealLiIsROrC.ofRealLI;
  • IsROrC.ofRealClmIsROrC.ofRealCLM;
  • MeasureTheory.condexpL1ClmMeasureTheory.condexpL1CLM;
  • algebraMapClmalgebraMapCLM;
  • WeakDual.CharacterSpace.toClmWeakDual.CharacterSpace.toCLM;
  • BoundedContinuousFunction.evalClmBoundedContinuousFunction.evalCLM;
  • ContinuousMap.evalClmContinuousMap.evalCLM;
  • TrivSqZeroExt.fstClmTrivSqZeroExt.fstClm;
  • TrivSqZeroExt.sndClmTrivSqZeroExt.sndCLM;
  • TrivSqZeroExt.inlClmTrivSqZeroExt.inlCLM;
  • TrivSqZeroExt.inrClmTrivSqZeroExt.inrCLM

and related theorems.

Diff
@@ -173,7 +173,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
       I • (∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
       I • ∫ y : ℝ in z.im..w.im, f (re z + y * I) =
       ∫ x : ℝ in z.re..w.re, ∫ y : ℝ in z.im..w.im, I • f' (x + y * I) 1 - f' (x + y * I) I := by
-  set e : (ℝ × ℝ) ≃L[ℝ] ℂ := equivRealProdClm.symm
+  set e : (ℝ × ℝ) ≃L[ℝ] ℂ := equivRealProdCLM.symm
   have he : ∀ x y : ℝ, ↑x + ↑y * I = e (x, y) := fun x y => (mk_eq_add_mul_I x y).symm
   have he₁ : e (1, 0) = 1 := rfl; have he₂ : e (0, 1) = I := rfl
   simp only [he] at *
chore(Analysis,Geometry): remove almost all autoImplicit (#9691)

After this PR, no file in Geometry uses autoImplicit, and in Analysis it's scoped to six declarations.

Diff
@@ -145,9 +145,6 @@ function is analytic on the open ball.
 Cauchy-Goursat theorem, Cauchy integral formula
 -/
 
-set_option autoImplicit true
-
-
 open TopologicalSpace Set MeasureTheory intervalIntegral Metric Filter Function
 
 open scoped Interval Real NNReal ENNReal Topology BigOperators
@@ -607,7 +604,7 @@ theorem _root_.DifferentiableOn.analyticOn {s : Set ℂ} {f : ℂ → E} (hd : D
 
 /-- If `f : ℂ → E` is complex differentiable on some open set `s`, then it is continuously
 differentiable on `s`. -/
-protected theorem _root_.DifferentiableOn.contDiffOn {s : Set ℂ} {f : ℂ → E}
+protected theorem _root_.DifferentiableOn.contDiffOn {s : Set ℂ} {f : ℂ → E} {n : ℕ}
     (hd : DifferentiableOn ℂ f s) (hs : IsOpen s) : ContDiffOn ℂ n f s :=
   (hd.analyticOn hs).contDiffOn
 
chore(*): drop $/<| before fun (#9361)

Subset of #9319

Diff
@@ -620,7 +620,7 @@ protected theorem _root_.Differentiable.analyticAt {f : ℂ → E} (hf : Differe
 /-- A complex differentiable function `f : ℂ → E` is continuously differentiable at every point. -/
 protected theorem _root_.Differentiable.contDiff {f : ℂ → E} (hf : Differentiable ℂ f) {n : ℕ∞} :
     ContDiff ℂ n f :=
-  contDiff_iff_contDiffAt.mpr $ fun z ↦ (hf.analyticAt z).contDiffAt
+  contDiff_iff_contDiffAt.mpr fun z ↦ (hf.analyticAt z).contDiffAt
 
 /-- When `f : ℂ → E` is differentiable, the `cauchyPowerSeries f z R` represents `f` as a power
 series centered at `z` in the entirety of `ℂ`, regardless of `R : ℝ≥0`, with `0 < R`. -/
doc(Analysis.Complex.CauchyIntegral): add missing word (#9211)

Replace "continuous the closed annulus" with " continuous on the closed annulus"

Diff
@@ -293,10 +293,10 @@ theorem integral_boundary_rect_eq_zero_of_differentiableOn (f : ℂ → E) (z w
       inter_subset_inter (preimage_mono Ioo_subset_Icc_self) (preimage_mono Ioo_subset_Icc_self)
 #align complex.integral_boundary_rect_eq_zero_of_differentiable_on Complex.integral_boundary_rect_eq_zero_of_differentiableOn
 
-/-- If `f : ℂ → E` is continuous the closed annulus `r ≤ ‖z - c‖ ≤ R`, `0 < r ≤ R`, and is complex
-differentiable at all but countably many points of its interior, then the integrals of
-`f z / (z - c)` (formally, `(z - c)⁻¹ • f z`) over the circles `‖z - c‖ = r` and `‖z - c‖ = R` are
-equal to each other. -/
+/-- If `f : ℂ → E` is continuous on the closed annulus `r ≤ ‖z - c‖ ≤ R`, `0 < r ≤ R`,
+and is complex differentiable at all but countably many points of its interior,
+then the integrals of `f z / (z - c)` (formally, `(z - c)⁻¹ • f z`)
+over the circles `‖z - c‖ = r` and `‖z - c‖ = R` are equal to each other. -/
 theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable {c : ℂ}
     {r R : ℝ} (h0 : 0 < r) (hle : r ≤ R) {f : ℂ → E} {s : Set ℂ} (hs : s.Countable)
     (hc : ContinuousOn f (closedBall c R \ ball c r))
chore: Replace (· op ·) a by (a op ·) (#8843)

I used the regex \(\(· (.) ·\) (.)\), replacing with ($2 $1 ·).

Diff
@@ -316,7 +316,7 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
       div_eq_mul_inv, mul_div_cancel_left _ (circleMap_ne_center (Real.exp_pos _).ne'),
       circleMap_sub_center, deriv_circleMap]
   set R := [[a, b]] ×ℂ [[0, 2 * π]]
-  set g : ℂ → ℂ := (· + ·) c ∘ exp
+  set g : ℂ → ℂ := (c + exp ·)
   have hdg : Differentiable ℂ g := differentiable_exp.const_add _
   replace hs : (g ⁻¹' s).Countable := (hs.preimage (add_right_injective c)).preimage_cexp
   have h_maps : MapsTo g R A := by rintro z ⟨h, -⟩; simpa [dist_eq, abs_exp, hle] using h.symm
fix: disable autoImplicit globally (#6528)

Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.

The intent of this PR is to make autoImplicit opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true in the few files that rely on it.

That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.

I claim that many of the uses of autoImplicit in these files are accidental; situations such as:

  • Assuming variables are in scope, but pasting the lemma in the wrong section
  • Pasting in a lemma from a scratch file without checking to see if the variable names are consistent with the rest of the file
  • Making a copy-paste error between lemmas and forgetting to add an explicit arguments.

Having set_option autoImplicit false as the default prevents these types of mistake being made in the 90% of files where autoImplicits are not used at all, and causes them to be caught by CI during review.

I think there were various points during the port where we encouraged porters to delete the universes u v lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.

A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18 as the no:dontcare:yes vote ratio.

While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true has been placed locally within a section, rather than at the top of the file.

Diff
@@ -145,6 +145,8 @@ function is analytic on the open ball.
 Cauchy-Goursat theorem, Cauchy integral formula
 -/
 
+set_option autoImplicit true
+
 
 open TopologicalSpace Set MeasureTheory intervalIntegral Metric Filter Function
 
chore(Deriv): rename some files (#6167)

Move some files to Analysis/Calculus/FDeriv

Diff
@@ -10,7 +10,7 @@ import Mathlib.Analysis.Calculus.Dslope
 import Mathlib.Analysis.Analytic.Basic
 import Mathlib.Analysis.Complex.ReImTopology
 import Mathlib.Analysis.Calculus.DiffContOnCl
-import Mathlib.Analysis.Calculus.FDerivAnalytic
+import Mathlib.Analysis.Calculus.FDeriv.Analytic
 import Mathlib.Data.Real.Cardinality
 
 #align_import analysis.complex.cauchy_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
chore: fix grammar mistakes (#6121)
Diff
@@ -96,7 +96,7 @@ $\frac{\partial f}{\partial \bar z}$ over the interior of this box. In particula
 differentiable function, the latter derivative is zero, hence the integral over the boundary of a
 rectangle is zero. Thus we get the Cauchy-Goursat theorem for a rectangle in `ℂ`.
 
-Next, we apply the this theorem to the function $F(z)=f(c+e^{z})$ on the rectangle
+Next, we apply this theorem to the function $F(z)=f(c+e^{z})$ on the rectangle
 $[\ln r, \ln R]\times [0, 2\pi]$ to prove that
 $$
   \oint_{|z-c|=r}\frac{f(z)\,dz}{z-c}=\oint_{|z-c|=R}\frac{f(z)\,dz}{z-c}
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 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module analysis.complex.cauchy_integral
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.MeasureTheory.Measure.Lebesgue.Complex
 import Mathlib.MeasureTheory.Integral.DivergenceTheorem
@@ -18,6 +13,8 @@ import Mathlib.Analysis.Calculus.DiffContOnCl
 import Mathlib.Analysis.Calculus.FDerivAnalytic
 import Mathlib.Data.Real.Cardinality
 
+#align_import analysis.complex.cauchy_integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+
 /-!
 # Cauchy integral formula
 
chore: cleanup whitespace (#5988)

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

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

Diff
@@ -624,7 +624,7 @@ protected theorem _root_.Differentiable.contDiff {f : ℂ → E} (hf : Different
   contDiff_iff_contDiffAt.mpr $ fun z ↦ (hf.analyticAt z).contDiffAt
 
 /-- When `f : ℂ → E` is differentiable, the `cauchyPowerSeries f z R` represents `f` as a power
-series centered at `z` in the entirety of `ℂ`, regardless of `R : ℝ≥0`, with  `0 < R`. -/
+series centered at `z` in the entirety of `ℂ`, regardless of `R : ℝ≥0`, with `0 < R`. -/
 protected theorem _root_.Differentiable.hasFPowerSeriesOnBall {f : ℂ → E} (h : Differentiable ℂ f)
     (z : ℂ) {R : ℝ≥0} (hR : 0 < R) : HasFPowerSeriesOnBall f (cauchyPowerSeries f z R) z ∞ :=
   (h.differentiableOn.hasFPowerSeriesOnBall hR).r_eq_top_of_exists fun _r hr =>
feat: complex differentiable functions are continuously differentiable (#5629)
Diff
@@ -15,6 +15,7 @@ import Mathlib.Analysis.Calculus.Dslope
 import Mathlib.Analysis.Analytic.Basic
 import Mathlib.Analysis.Complex.ReImTopology
 import Mathlib.Analysis.Calculus.DiffContOnCl
+import Mathlib.Analysis.Calculus.FDerivAnalytic
 import Mathlib.Data.Real.Cardinality
 
 /-!
@@ -605,12 +606,23 @@ theorem _root_.DifferentiableOn.analyticOn {s : Set ℂ} {f : ℂ → E} (hd : D
     (hs : IsOpen s) : AnalyticOn ℂ f s := fun _z hz => hd.analyticAt (hs.mem_nhds hz)
 #align differentiable_on.analytic_on DifferentiableOn.analyticOn
 
+/-- If `f : ℂ → E` is complex differentiable on some open set `s`, then it is continuously
+differentiable on `s`. -/
+protected theorem _root_.DifferentiableOn.contDiffOn {s : Set ℂ} {f : ℂ → E}
+    (hd : DifferentiableOn ℂ f s) (hs : IsOpen s) : ContDiffOn ℂ n f s :=
+  (hd.analyticOn hs).contDiffOn
+
 /-- A complex differentiable function `f : ℂ → E` is analytic at every point. -/
 protected theorem _root_.Differentiable.analyticAt {f : ℂ → E} (hf : Differentiable ℂ f) (z : ℂ) :
     AnalyticAt ℂ f z :=
   hf.differentiableOn.analyticAt univ_mem
 #align differentiable.analytic_at Differentiable.analyticAt
 
+/-- A complex differentiable function `f : ℂ → E` is continuously differentiable at every point. -/
+protected theorem _root_.Differentiable.contDiff {f : ℂ → E} (hf : Differentiable ℂ f) {n : ℕ∞} :
+    ContDiff ℂ n f :=
+  contDiff_iff_contDiffAt.mpr $ fun z ↦ (hf.analyticAt z).contDiffAt
+
 /-- When `f : ℂ → E` is differentiable, the `cauchyPowerSeries f z R` represents `f` as a power
 series centered at `z` in the entirety of `ℂ`, regardless of `R : ℝ≥0`, with  `0 < R`. -/
 protected theorem _root_.Differentiable.hasFPowerSeriesOnBall {f : ℂ → E} (h : Differentiable ℂ f)
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -189,7 +189,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
       neg_sub]
   set R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
   set t : Set (ℝ × ℝ) := e ⁻¹' s
-  rw [uIcc_comm z.im] at Hc Hi ; rw [min_comm z.im, max_comm z.im] at Hd
+  rw [uIcc_comm z.im] at Hc Hi; rw [min_comm z.im, max_comm z.im] at Hd
   have hR : e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R := rfl
   have htc : ContinuousOn F R := Hc.comp e.continuousOn hR.ge
   have htd :
chore: remove superfluous parentheses around integrals (#5591)
Diff
@@ -174,7 +174,7 @@ theorem integral_boundary_rect_of_hasFDerivAt_real_off_countable (f : ℂ → E)
     (Hi : IntegrableOn (fun z => I • f' z 1 - f' z I) ([[z.re, w.re]] ×ℂ [[z.im, w.im]])) :
     (∫ x : ℝ in z.re..w.re, f (x + z.im * I)) - (∫ x : ℝ in z.re..w.re, f (x + w.im * I)) +
       I • (∫ y : ℝ in z.im..w.im, f (re w + y * I)) -
-      I • (∫ y : ℝ in z.im..w.im, f (re z + y * I)) =
+      I • ∫ y : ℝ in z.im..w.im, f (re z + y * I) =
       ∫ x : ℝ in z.re..w.re, ∫ y : ℝ in z.im..w.im, I • f' (x + y * I) 1 - f' (x + y * I) I := by
   set e : (ℝ × ℝ) ≃L[ℝ] ℂ := equivRealProdClm.symm
   have he : ∀ x y : ℝ, ↑x + ↑y * I = e (x, y) := fun x y => (mk_eq_add_mul_I x y).symm
chore: tidy various files (#5458)
Diff
@@ -29,7 +29,7 @@ Banach space with second countable topology.
 In the following theorems, if the name ends with `off_countable`, then the actual theorem assumes
 differentiability at all but countably many points of the set mentioned below.
 
-* `complex.integral_boundary_rect_of_has_fderiv_within_at_real_off_countable`: If a function
+* `Complex.integral_boundary_rect_of_hasFDerivAt_real_off_countable`: If a function
   `f : ℂ → E` is continuous on a closed rectangle and *real* differentiable on its interior, then
   its integral over the boundary of this rectangle is equal to the integral of
   `I • f' (x + y * I) 1 - f' (x + y * I) I` over the rectangle, where `f' z w : E` is the derivative
@@ -72,7 +72,7 @@ differentiability at all but countably many points of the set mentioned below.
   on a neighborhood of a point, then it is analytic at this point. In particular, if `f : ℂ → E`
   is differentiable on the whole `ℂ`, then it is analytic at every point `z : ℂ`.
 
-* `differentiable.has_power_series_on_ball`: If `f : ℂ → E` is differentiable everywhere then the
+* `Differentiable.hasFPowerSeriesOnBall`: If `f : ℂ → E` is differentiable everywhere then the
   `cauchyPowerSeries f z R` is a formal power series representing `f` at `z` with infinite
   radius of convergence (this holds for any choice of `0 < R`).
 
chore: fix backtick in docs (#5077)

I wrote a script to find lines that contain an odd number of backticks

Diff
@@ -352,7 +352,7 @@ theorem circleIntegral_eq_of_differentiable_on_annulus_off_countable {c : ℂ} {
 /-- **Cauchy integral formula** for the value at the center of a disc. If `f` is continuous on a
 punctured closed disc of radius `R`, is differentiable at all but countably many points of the
 interior of this disc, and has a limit `y` at the center of the disc, then the integral
-$\oint_{‖z-c‖=R} \frac{f(z)}{z-c}\,dz$ is equal to $2πiy`. -/
+$\oint_{‖z-c‖=R} \frac{f(z)}{z-c}\,dz$ is equal to `2πiy`. -/
 theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of_tendsto {c : ℂ}
     {R : ℝ} (h0 : 0 < R) {f : ℂ → E} {y : E} {s : Set ℂ} (hs : s.Countable)
     (hc : ContinuousOn f (closedBall c R \ {c}))
@@ -400,7 +400,7 @@ theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable_of
 
 /-- **Cauchy integral formula** for the value at the center of a disc. If `f : ℂ → E` is continuous
 on a closed disc of radius `R` and is complex differentiable at all but countably many points of its
-interior, then the integral $\oint_{|z-c|=R} \frac{f(z)}{z-c}\,dz$ is equal to $2πiy`. -/
+interior, then the integral $\oint_{|z-c|=R} \frac{f(z)}{z-c}\,dz$ is equal to `2πiy`. -/
 theorem circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable {R : ℝ} (h0 : 0 < R)
     {f : ℂ → E} {c : ℂ} {s : Set ℂ} (hs : s.Countable) (hc : ContinuousOn f (closedBall c R))
     (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) :
@@ -620,4 +620,3 @@ protected theorem _root_.Differentiable.hasFPowerSeriesOnBall {f : ℂ → E} (h
 #align differentiable.has_fpower_series_on_ball Differentiable.hasFPowerSeriesOnBall
 
 end Complex
-
chore: convert lambda in docs to fun (#5045)

Found with git grep -n "λ [a-zA-Z_ ]*,"

Diff
@@ -302,7 +302,7 @@ theorem circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_c
     (hc : ContinuousOn f (closedBall c R \ ball c r))
     (hd : ∀ z ∈ (ball c R \ closedBall c r) \ s, DifferentiableAt ℂ f z) :
     (∮ z in C(c, R), (z - c)⁻¹ • f z) = ∮ z in C(c, r), (z - c)⁻¹ • f z := by
-  /- We apply the previous lemma to `λ z, f (c + exp z)` on the rectangle
+  /- We apply the previous lemma to `fun z ↦ f (c + exp z)` on the rectangle
     `[log r, log R] × [0, 2 * π]`. -/
   set A := closedBall c R \ ball c r
   obtain ⟨a, rfl⟩ : ∃ a, Real.exp a = r; exact ⟨Real.log r, Real.exp_log h0⟩
feat: port Analysis.Complex.CauchyIntegral (#4880)

Dependencies 12 + 1079

1080 files ported (98.9%)
487529 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