[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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 (↑w.re + ↑y * I)) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑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
[PROOFSTEP]
set e : (ℝ × ℝ) ≃L[ℝ] ℂ := equivRealProdClm.symm
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
⊢ (((∫ (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 (↑w.re + ↑y * I)) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑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
[PROOFSTEP]
have he : ∀ x y : ℝ, ↑x + ↑y * I = e (x, y) := fun x y => (mk_eq_add_mul_I x y).symm
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he : ∀ (x y : ℝ), ↑x + ↑y * I = ↑e (x, y)
⊢ (((∫ (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 (↑w.re + ↑y * I)) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑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
[PROOFSTEP]
have he₁ : e (1, 0) = 1 := rfl
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he : ∀ (x y : ℝ), ↑x + ↑y * I = ↑e (x, y)
he₁ : ↑e (1, 0) = 1
⊢ (((∫ (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 (↑w.re + ↑y * I)) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑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
[PROOFSTEP]
have he₂ : e (0, 1) = I := rfl
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he : ∀ (x y : ℝ), ↑x + ↑y * I = ↑e (x, y)
he₁ : ↑e (1, 0) = 1
he₂ : ↑e (0, 1) = 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 (↑w.re + ↑y * I)) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑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
[PROOFSTEP]
simp only [he] at *
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
set F : ℝ × ℝ → E := f ∘ e
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
set F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => (f' (e p)).comp (e : ℝ × ℝ →L[ℝ] ℂ)
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
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, ContinuousLinearMap.comp_apply,
    ContinuousLinearEquiv.coe_coe, he₁, he₂, neg_add_eq_sub, neg_sub]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
⊢ ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
[PROOFSTEP]
rintro ⟨x, y⟩
[GOAL]
case mk
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
x y : ℝ
⊢ ↑(-(I • F' (x, y))) (1, 0) + ↑(F' (x, y)) (0, 1) = -(I • ↑(f' (↑e (x, y))) 1 - ↑(f' (↑e (x, y))) I)
[PROOFSTEP]
simp only [ContinuousLinearMap.neg_apply, ContinuousLinearMap.smul_apply, ContinuousLinearMap.comp_apply,
  ContinuousLinearEquiv.coe_coe, he₁, he₂, neg_add_eq_sub, neg_sub]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
set R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
set t : Set (ℝ × ℝ) := e ⁻¹' s
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
t : Set (ℝ × ℝ) := ↑e ⁻¹' s
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
rw [uIcc_comm z.im] at Hc Hi
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
Hd :
  ∀ (x : ℂ), 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]] ×ℂ [[w.im, z.im]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
t : Set (ℝ × ℝ) := ↑e ⁻¹' s
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
rw [min_comm z.im, max_comm z.im] at Hd
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
Hd :
  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \ s → HasFDerivAt f (f' x) x
Hi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
t : Set (ℝ × ℝ) := ↑e ⁻¹' s
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
have hR : e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R := rfl
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
Hd :
  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \ s → HasFDerivAt f (f' x) x
Hi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
t : Set (ℝ × ℝ) := ↑e ⁻¹' s
hR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
have htc : ContinuousOn F R := Hc.comp e.continuousOn hR.ge
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
Hd :
  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \ s → HasFDerivAt f (f' x) x
Hi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
t : Set (ℝ × ℝ) := ↑e ⁻¹' s
hR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R
htc : ContinuousOn F R
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
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 :=
  fun p hp => (Hd (e p) hp).comp p e.hasFDerivAt
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
Hd :
  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \ s → HasFDerivAt f (f' x) x
Hi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
t : Set (ℝ × ℝ) := ↑e ⁻¹' s
hR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R
htc : ContinuousOn F R
htd :
  ∀ (p : ℝ × ℝ),
    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
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, y))) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, y)) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) 1 -
          ↑(f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, y))) I
[PROOFSTEP]
simp_rw [← intervalIntegral.integral_smul, intervalIntegral.integral_symm w.im z.im, ← intervalIntegral.integral_neg, ←
  hF']
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
Hd :
  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \ s → HasFDerivAt f (f' x) x
Hi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
t : Set (ℝ × ℝ) := ↑e ⁻¹' s
hR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R
htc : ContinuousOn F R
htd :
  ∀ (p : ℝ × ℝ),
    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
⊢ (((∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, z.im))) -
          ∫ (x : ℝ) in z.re..w.re, f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, w.im))) +
        ∫ (x : ℝ) in w.im..z.im, -(I • f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (w.re, x)))) -
      ∫ (x : ℝ) in w.im..z.im, -(I • f (↑(ContinuousLinearEquiv.symm equivRealProdClm) (z.re, x))) =
    ∫ (x : ℝ) in z.re..w.re,
      ∫ (x_1 : ℝ) in w.im..z.im,
        ↑(-(I •
                  ContinuousLinearMap.comp (f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, x_1)))
                    ↑(ContinuousLinearEquiv.symm equivRealProdClm)))
            (1, 0) +
          ↑(ContinuousLinearMap.comp (f' (↑(ContinuousLinearEquiv.symm equivRealProdClm) (x, x_1)))
                ↑(ContinuousLinearEquiv.symm equivRealProdClm))
            (0, 1)
[PROOFSTEP]
refine'
  (integral2_divergence_prod_of_hasFDerivWithinAt_off_countable (fun p => -(I • F p)) F (fun p => -(I • F' p)) F' z.re
      w.im w.re z.im t (hs.preimage e.injective) (htc.const_smul _).neg htc (fun p hp => ((htd p hp).const_smul I).neg)
      htd _).symm
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
Hd :
  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \ s → HasFDerivAt f (f' x) x
Hi : IntegrableOn (fun z => I • ↑(f' z) 1 - ↑(f' z) I) ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
t : Set (ℝ × ℝ) := ↑e ⁻¹' s
hR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R
htc : ContinuousOn F R
htd :
  ∀ (p : ℝ × ℝ),
    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
⊢ IntegrableOn (fun x => ↑((fun p => -(I • F' p)) x) (1, 0) + ↑(F' x) (0, 1)) ([[z.re, w.re]] ×ˢ [[w.im, z.im]])
[PROOFSTEP]
rw [← (volume_preserving_equiv_real_prod.symm _).integrableOn_comp_preimage (MeasurableEquiv.measurableEmbedding _)] at
  Hi
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
f' : ℂ → ℂ →L[ℝ] E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[w.im, z.im]])
Hd :
  ∀ (x : ℂ), x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min w.im z.im) (max w.im z.im) \ s → HasFDerivAt f (f' x) x
Hi :
  IntegrableOn ((fun z => I • ↑(f' z) 1 - ↑(f' z) I) ∘ ↑(MeasurableEquiv.symm measurableEquivRealProd))
    (↑(MeasurableEquiv.symm measurableEquivRealProd) ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]))
e : (ℝ × ℝ) ≃L[ℝ] ℂ := ContinuousLinearEquiv.symm equivRealProdClm
he₁ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (1, 0) = 1
he₂ : ↑(ContinuousLinearEquiv.symm equivRealProdClm) (0, 1) = I
he : ℝ → ℝ → True
F : ℝ × ℝ → E := f ∘ ↑e
F' : ℝ × ℝ → ℝ × ℝ →L[ℝ] E := fun p => ContinuousLinearMap.comp (f' (↑e p)) ↑e
hF' : ∀ (p : ℝ × ℝ), ↑(-(I • F' p)) (1, 0) + ↑(F' p) (0, 1) = -(I • ↑(f' (↑e p)) 1 - ↑(f' (↑e p)) I)
R : Set (ℝ × ℝ) := [[z.re, w.re]] ×ˢ [[w.im, z.im]]
t : Set (ℝ × ℝ) := ↑e ⁻¹' s
hR : ↑e ⁻¹' ([[z.re, w.re]] ×ℂ [[w.im, z.im]]) = R
htc : ContinuousOn F R
htd :
  ∀ (p : ℝ × ℝ),
    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
⊢ IntegrableOn (fun x => ↑((fun p => -(I • F' p)) x) (1, 0) + ↑(F' x) (0, 1)) ([[z.re, w.re]] ×ˢ [[w.im, z.im]])
[PROOFSTEP]
simpa only [hF'] using Hi.neg
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
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 : ℂ
hx : x ∈ Ioo (min z.re w.re) (max z.re w.re) ×ℂ Ioo (min z.im w.im) (max z.im w.im) \ ∅
⊢ [[z.re, w.re]] ×ℂ [[z.im, w.im]] ∈ 𝓝 x
[PROOFSTEP]
simpa only [← mem_interior_iff_mem_nhds, interior_reProdIm, uIcc, interior_Icc] using hx.1
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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 (↑w.re + ↑y * I)) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * I) =
    0
[PROOFSTEP]
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]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
z✝ w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z✝.re, w.re]] ×ℂ [[z✝.im, w.im]])
Hd :
  ∀ (x : ℂ),
    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
z : ℂ
⊢ I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) 1 =
    ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) I
[PROOFSTEP]
rw [(fderiv ℂ f _).coe_restrictScalars', ← (fderiv ℂ f _).map_smul, smul_eq_mul, mul_one]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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
this :
  ∀ (z : ℂ),
    I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) 1 =
      ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) 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 (↑w.re + ↑y * I)) -
      I • ∫ (y : ℝ) in z.im..w.im, f (↑z.re + ↑y * I) =
    0
[PROOFSTEP]
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
    ?_
[GOAL]
case refine_1
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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
this :
  ∀ (z : ℂ),
    I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) 1 =
      ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) I
⊢ IntegrableOn
    (fun z =>
      I • ↑((fun z => ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) z) 1 -
        ↑((fun z => ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) z) I)
    ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
[PROOFSTEP]
simp [this]
[GOAL]
case refine_2
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
z w : ℂ
s : Set ℂ
hs : Set.Countable s
Hc : ContinuousOn f ([[z.re, w.re]] ×ℂ [[z.im, w.im]])
Hd :
  ∀ (x : ℂ), 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
this :
  ∀ (z : ℂ),
    I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) 1 =
      ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f z)) I
⊢ ∫ (x : ℝ) in z.re..w.re,
      ∫ (y : ℝ) in z.im..w.im,
        I • ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f (↑x + ↑y * I))) 1 -
          ↑(ContinuousLinearMap.restrictScalars ℝ (fderiv ℂ f (↑x + ↑y * I))) I =
    0
[PROOFSTEP]
simp [this]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
r R : ℝ
h0 : 0 < r
hle : r ≤ R
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ ball c r)
hd : ∀ (z : ℂ), 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
[PROOFSTEP]
set A := closedBall c R \ ball c r
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
r R : ℝ
h0 : 0 < r
hle : r ≤ R
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hd : ∀ (z : ℂ), z ∈ (ball c R \ closedBall c r) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c R \ ball c r
hc : ContinuousOn f A
⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z
[PROOFSTEP]
obtain ⟨a, rfl⟩ : ∃ a, Real.exp a = r
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
r R : ℝ
h0 : 0 < r
hle : r ≤ R
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hd : ∀ (z : ℂ), z ∈ (ball c R \ closedBall c r) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c R \ ball c r
hc : ContinuousOn f A
⊢ ∃ a, Real.exp a = r
case intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
hle : Real.exp a ≤ R
hd : ∀ (z : ℂ), z ∈ (ball c R \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c R \ ball c (Real.exp a)
hc : ContinuousOn f A
⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z
[PROOFSTEP]
exact ⟨Real.log r, Real.exp_log h0⟩
[GOAL]
case intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
hle : Real.exp a ≤ R
hd : ∀ (z : ℂ), z ∈ (ball c R \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c R \ ball c (Real.exp a)
hc : ContinuousOn f A
⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z
[PROOFSTEP]
obtain ⟨b, rfl⟩ : ∃ b, Real.exp b = R
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
hle : Real.exp a ≤ R
hd : ∀ (z : ℂ), z ∈ (ball c R \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c R \ ball c (Real.exp a)
hc : ContinuousOn f A
⊢ ∃ b, Real.exp b = R
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : Real.exp a ≤ Real.exp b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
⊢ (∮ (z : ℂ) in C(c, Real.exp b), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z
[PROOFSTEP]
exact ⟨Real.log R, Real.exp_log (h0.trans_le hle)⟩
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : Real.exp a ≤ Real.exp b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
⊢ (∮ (z : ℂ) in C(c, Real.exp b), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z
[PROOFSTEP]
rw [Real.exp_le_exp] at hle
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
⊢ (∮ (z : ℂ) in C(c, Real.exp b), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z
[PROOFSTEP]
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'), circleMap_sub_center, deriv_circleMap]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
this :
  ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
⊢ (∮ (z : ℂ) in C(c, Real.exp b), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, Real.exp a), (z - c)⁻¹ • f z
[PROOFSTEP]
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'), circleMap_sub_center, deriv_circleMap]
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
[PROOFSTEP]
set R := [[a, b]] ×ℂ [[0, 2 * π]]
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
[PROOFSTEP]
set g : ℂ → ℂ := (· + ·) c ∘ exp
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
[PROOFSTEP]
have hdg : Differentiable ℂ g := differentiable_exp.const_add _
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
[PROOFSTEP]
replace hs : (g ⁻¹' s).Countable := (hs.preimage (add_right_injective c)).preimage_cexp
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
[PROOFSTEP]
have h_maps : MapsTo g R A := by rintro z ⟨h, -⟩; simpa [dist_eq, abs_exp, hle] using h.symm
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
⊢ MapsTo g R A
[PROOFSTEP]
rintro z ⟨h, -⟩
[GOAL]
case intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
z : ℂ
h : z ∈ re ⁻¹' [[a, b]]
⊢ g z ∈ A
[PROOFSTEP]
simpa [dist_eq, abs_exp, hle] using h.symm
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
h_maps : MapsTo g R A
⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
[PROOFSTEP]
replace hc : ContinuousOn (f ∘ g) R
[GOAL]
case hc
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
hc : ContinuousOn f A
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
h_maps : MapsTo g R A
⊢ ContinuousOn (f ∘ g) R
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
h_maps : MapsTo g R A
hc : ContinuousOn (f ∘ g) R
⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
[PROOFSTEP]
exact hc.comp hdg.continuous.continuousOn h_maps
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
h_maps : MapsTo g R A
hc : ContinuousOn (f ∘ g) R
⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
[PROOFSTEP]
replace hd :
  ∀ z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \ g ⁻¹' s, DifferentiableAt ℂ (f ∘ g) z
[GOAL]
case hd
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
h_maps : MapsTo g R A
hc : ContinuousOn (f ∘ g) R
⊢ ∀ (z : ℂ), z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \ g ⁻¹' s → DifferentiableAt ℂ (f ∘ g) z
[PROOFSTEP]
refine' fun z hz => (hd (g z) ⟨_, hz.2⟩).comp z (hdg _)
[GOAL]
case hd
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
hd : ∀ (z : ℂ), z ∈ (ball c (Real.exp b) \ closedBall c (Real.exp a)) \ s → DifferentiableAt ℂ f z
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
h_maps : MapsTo g R A
hc : ContinuousOn (f ∘ g) R
z : ℂ
hz : z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \ g ⁻¹' s
⊢ g z ∈ ball c (Real.exp b) \ closedBall c (Real.exp a)
[PROOFSTEP]
simpa [dist_eq, abs_exp, hle, and_comm] using hz.1.1
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
f : ℂ → E
s : Set ℂ
a : ℝ
h0 : 0 < Real.exp a
b : ℝ
hle : a ≤ b
A : Set ℂ := closedBall c (Real.exp b) \ ball c (Real.exp a)
R : Set ℂ := [[a, b]] ×ℂ [[0, 2 * π]]
g : ℂ → ℂ := (fun x x_1 => x + x_1) c ∘ exp
hdg : Differentiable ℂ g
hs : Set.Countable (g ⁻¹' s)
h_maps : MapsTo g R A
hc : ContinuousOn (f ∘ g) R
hd :
  ∀ (z : ℂ), z ∈ Ioo (min a b) (max a b) ×ℂ Ioo (min 0 (2 * π)) (max 0 (2 * π)) \ g ⁻¹' s → DifferentiableAt ℂ (f ∘ g) z
⊢ ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp b) θ) =
    ∫ (θ : ℝ) in 0 ..2 * π, I • f (circleMap c (Real.exp a) θ)
[PROOFSTEP]
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
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), 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
[PROOFSTEP]
rw [← sub_eq_zero, ← norm_le_zero_iff]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), 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‖ ≤ 0
[PROOFSTEP]
refine' le_of_forall_le_of_dense fun ε ε0 => _
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε
[PROOFSTEP]
obtain ⟨δ, δ0, hδ⟩ : ∃ δ > (0 : ℝ), ∀ z ∈ closedBall c δ \ { c }, dist (f z) y < ε / (2 * π)
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
⊢ ∃ δ, δ > 0 ∧ ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε
[PROOFSTEP]
exact ((nhdsWithin_hasBasis nhds_basis_closedBall _).tendsto_iff nhds_basis_ball).1 hy _ (div_pos ε0 Real.two_pi_pos)
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε
[PROOFSTEP]
obtain ⟨r, hr0, hrδ, hrR⟩ : ∃ r, 0 < r ∧ r ≤ δ ∧ r ≤ R := ⟨min δ R, lt_min δ0 h0, min_le_left _ _, min_le_right _ _⟩
[GOAL]
case intro.intro.intro.intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε
[PROOFSTEP]
have hsub : closedBall c R \ ball c r ⊆ closedBall c R \ { c } :=
  diff_subset_diff_right (singleton_subset_iff.2 <| mem_ball_self hr0)
[GOAL]
case intro.intro.intro.intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε
[PROOFSTEP]
have hsub' : ball c R \ closedBall c r ⊆ ball c R \ { c } :=
  diff_subset_diff_right (singleton_subset_iff.2 <| mem_closedBall_self hr0.le)
[GOAL]
case intro.intro.intro.intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε
[PROOFSTEP]
have hzne : ∀ z ∈ sphere c r, z ≠ c := fun z hz => ne_of_mem_of_not_mem hz fun h => hr0.ne' <| dist_self c ▸ Eq.symm h
[GOAL]
case intro.intro.intro.intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ ≤ ε
[PROOFSTEP]
calc
  ‖(∮ z in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ =
      ‖(∮ z in C(c, r), (z - c)⁻¹ • f z) - ∮ z in C(c, r), (z - c)⁻¹ • y‖ :=
    by
    congr 2
    ·
      exact
        circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable hr0 hrR hs (hc.mono hsub)
          fun z hz => hd z ⟨hsub' hz.1, hz.2⟩
    · simp [hr0.ne']
  _ = ‖∮ z in C(c, r), (z - c)⁻¹ • (f z - y)‖ := by
    simp only [smul_sub]
    have hc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r) :=
      (continuousOn_id.sub continuousOn_const).inv₀ fun z hz => sub_ne_zero.2 <| hzne _ hz
    rw [circleIntegral.integral_sub] <;> refine' (hc'.smul _).circleIntegrable hr0.le
    · exact hc.mono <| subset_inter (sphere_subset_closedBall.trans <| closedBall_subset_closedBall hrR) hzne
    · exact continuousOn_const
  _ ≤ 2 * π * r * (r⁻¹ * (ε / (2 * π))) :=
    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 [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
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
⊢ ‖(∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) - (2 * ↑π * I) • y‖ =
    ‖(∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z) - ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y‖
[PROOFSTEP]
congr 2
[GOAL]
case e_a.e_a
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
⊢ (∮ (z : ℂ) in C(c, R), (z - c)⁻¹ • f z) = ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z
[PROOFSTEP]
exact
  circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable hr0 hrR hs (hc.mono hsub) fun z hz =>
    hd z ⟨hsub' hz.1, hz.2⟩
[GOAL]
case e_a.e_a
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
⊢ (2 * ↑π * I) • y = ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y
[PROOFSTEP]
simp [hr0.ne']
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
⊢ ‖(∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z) - ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y‖ =
    ‖∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • (f z - y)‖
[PROOFSTEP]
simp only [smul_sub]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
⊢ ‖(∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z) - ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y‖ =
    ‖∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z - (z - c)⁻¹ • y‖
[PROOFSTEP]
have hc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r) :=
  (continuousOn_id.sub continuousOn_const).inv₀ fun z hz => sub_ne_zero.2 <| hzne _ hz
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
hc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)
⊢ ‖(∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z) - ∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • y‖ =
    ‖∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • f z - (z - c)⁻¹ • y‖
[PROOFSTEP]
rw [circleIntegral.integral_sub]
[GOAL]
case hf
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
hc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)
⊢ CircleIntegrable (fun z => (z - c)⁻¹ • f z) c r
[PROOFSTEP]
refine' (hc'.smul _).circleIntegrable hr0.le
[GOAL]
case hg
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
hc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)
⊢ CircleIntegrable (fun z => (z - c)⁻¹ • y) c r
[PROOFSTEP]
refine' (hc'.smul _).circleIntegrable hr0.le
[GOAL]
case hf
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
hc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)
⊢ ContinuousOn (fun x => f x) (sphere c r)
[PROOFSTEP]
exact hc.mono <| subset_inter (sphere_subset_closedBall.trans <| closedBall_subset_closedBall hrR) hzne
[GOAL]
case hg
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
hc' : ContinuousOn (fun z => (z - c)⁻¹) (sphere c r)
⊢ ContinuousOn (fun x => y) (sphere c r)
[PROOFSTEP]
exact continuousOn_const
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
⊢ ‖∮ (z : ℂ) in C(c, r), (z - c)⁻¹ • (f z - y)‖ ≤ 2 * π * r * (r⁻¹ * (ε / (2 * π)))
[PROOFSTEP]
refine' circleIntegral.norm_integral_le_of_norm_le_const hr0.le fun z hz => _
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
z : ℂ
hz : z ∈ sphere c r
⊢ ‖(z - c)⁻¹ • (f z - y)‖ ≤ r⁻¹ * (ε / (2 * π))
[PROOFSTEP]
specialize hzne z hz
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
z : ℂ
hz : z ∈ sphere c r
hzne : z ≠ c
⊢ ‖(z - c)⁻¹ • (f z - y)‖ ≤ r⁻¹ * (ε / (2 * π))
[PROOFSTEP]
rw [mem_sphere, dist_eq_norm] at hz
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
z : ℂ
hz : ‖z - c‖ = r
hzne : z ≠ c
⊢ ‖(z - c)⁻¹ • (f z - y)‖ ≤ r⁻¹ * (ε / (2 * π))
[PROOFSTEP]
rw [norm_smul, norm_inv, hz, ← dist_eq_norm]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
z : ℂ
hz : ‖z - c‖ = r
hzne : z ≠ c
⊢ r⁻¹ * dist (f z) y ≤ r⁻¹ * (ε / (2 * π))
[PROOFSTEP]
refine' mul_le_mul_of_nonneg_left (hδ _ ⟨_, hzne⟩).le (inv_nonneg.2 hr0.le)
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
z : ℂ
hz : ‖z - c‖ = r
hzne : z ≠ c
⊢ z ∈ closedBall c δ
[PROOFSTEP]
rwa [mem_closedBall_iff_norm, hz]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
⊢ 2 * π * r * (r⁻¹ * (ε / (2 * π))) = ε
[PROOFSTEP]
field_simp [hr0.ne', Real.two_pi_pos.ne']
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c : ℂ
R : ℝ
h0 : 0 < R
f : ℂ → E
y : E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R \ {c})
hd : ∀ (z : ℂ), z ∈ (ball c R \ {c}) \ s → DifferentiableAt ℂ f z
hy : Tendsto f (𝓝[{c}ᶜ] c) (𝓝 y)
ε : ℝ
ε0 : 0 < ε
δ : ℝ
δ0 : δ > 0
hδ : ∀ (z : ℂ), z ∈ closedBall c δ \ {c} → dist (f z) y < ε / (2 * π)
r : ℝ
hr0 : 0 < r
hrδ : r ≤ δ
hrR : r ≤ R
hsub : closedBall c R \ ball c r ⊆ closedBall c R \ {c}
hsub' : ball c R \ closedBall c r ⊆ ball c R \ {c}
hzne : ∀ (z : ℂ), z ∈ sphere c r → z ≠ c
⊢ 2 * π * r * ε = ε * (r * (2 * π))
[PROOFSTEP]
ac_rfl
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
h0 : 0 ≤ R
f : ℂ → E
c : ℂ
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (z : ℂ), z ∈ ball c R \ s → DifferentiableAt ℂ f z
⊢ (∮ (z : ℂ) in C(c, R), f z) = 0
[PROOFSTEP]
rcases h0.eq_or_lt with (rfl | h0)
[GOAL]
case inl
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
f : ℂ → E
c : ℂ
s : Set ℂ
hs : Set.Countable s
h0 : 0 ≤ 0
hc : ContinuousOn f (closedBall c 0)
hd : ∀ (z : ℂ), z ∈ ball c 0 \ s → DifferentiableAt ℂ f z
⊢ (∮ (z : ℂ) in C(c, 0), f z) = 0
[PROOFSTEP]
apply circleIntegral.integral_radius_zero
[GOAL]
case inr
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
h0✝ : 0 ≤ R
f : ℂ → E
c : ℂ
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (z : ℂ), z ∈ ball c R \ s → DifferentiableAt ℂ f z
h0 : 0 < R
⊢ (∮ (z : ℂ) in C(c, R), f z) = 0
[PROOFSTEP]
calc
  (∮ 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 :=
    (circleIntegral_sub_center_inv_smul_of_differentiable_on_off_countable h0 hs
      ((continuousOn_id.sub continuousOn_const).smul hc) fun z hz => (differentiableAt_id.sub_const _).smul (hd z hz))
  _ = 0 := by rw [sub_self, zero_smul, smul_zero]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
h0✝ : 0 ≤ R
f : ℂ → E
c : ℂ
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (z : ℂ), z ∈ ball c R \ s → DifferentiableAt ℂ f z
h0 : 0 < R
⊢ (2 * ↑π * I) • (c - c) • f c = 0
[PROOFSTEP]
rw [sub_self, zero_smul, smul_zero]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
have hR : 0 < R := dist_nonneg.trans_lt hw.1
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
set F : ℂ → E := dslope f w
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
have hws : (insert w s).Countable := hs.insert w
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
hws : Set.Countable (insert w s)
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
have hcF : ContinuousOn F (closedBall c R) := (continuousOn_dslope <| closedBall_mem_nhds_of_mem hw.1).2 ⟨hc, hd _ hw⟩
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
hws : Set.Countable (insert w s)
hcF : ContinuousOn F (closedBall c R)
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
have hdF : ∀ z ∈ ball (c : ℂ) R \ insert w s, DifferentiableAt ℂ F z := fun z hz =>
  (differentiableAt_dslope_of_ne (ne_of_mem_of_not_mem (mem_insert _ _) hz.2).symm).2
    (hd _ (diff_subset_diff_right (subset_insert _ _) hz))
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
hws : Set.Countable (insert w s)
hcF : ContinuousOn F (closedBall c R)
hdF : ∀ (z : ℂ), z ∈ ball c R \ insert w s → DifferentiableAt ℂ F z
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
have HI := circleIntegral_eq_zero_of_differentiable_on_off_countable hR.le hws hcF hdF
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
hws : Set.Countable (insert w s)
hcF : ContinuousOn F (closedBall c R)
hdF : ∀ (z : ℂ), z ∈ ball c R \ insert w s → DifferentiableAt ℂ F z
HI : (∮ (z : ℂ) in C(c, R), F z) = 0
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
have hne : ∀ z ∈ sphere c R, z ≠ w := fun z hz => ne_of_mem_of_not_mem hz (ne_of_lt hw.1)
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
hws : Set.Countable (insert w s)
hcF : ContinuousOn F (closedBall c R)
hdF : ∀ (z : ℂ), z ∈ ball c R \ insert w s → DifferentiableAt ℂ F z
HI : (∮ (z : ℂ) in C(c, R), F z) = 0
hne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
have hFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R) := fun z hz ↦
  calc
    F z = (z - w)⁻¹ • (f z - f w) := update_noteq (hne z hz) _ _
    _ = (z - w)⁻¹ • f z - (z - w)⁻¹ • f w := smul_sub _ _ _
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
hws : Set.Countable (insert w s)
hcF : ContinuousOn F (closedBall c R)
hdF : ∀ (z : ℂ), z ∈ ball c R \ insert w s → DifferentiableAt ℂ F z
HI : (∮ (z : ℂ) in C(c, R), F z) = 0
hne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w
hFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R)
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
have hc' : ContinuousOn (fun z => (z - w)⁻¹) (sphere c R) :=
  (continuousOn_id.sub continuousOn_const).inv₀ fun z hz => sub_ne_zero.2 <| hne z hz
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
hws : Set.Countable (insert w s)
hcF : ContinuousOn F (closedBall c R)
hdF : ∀ (z : ℂ), z ∈ ball c R \ insert w s → DifferentiableAt ℂ F z
HI : (∮ (z : ℂ) in C(c, R), F z) = 0
hne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w
hFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R)
hc' : ContinuousOn (fun z => (z - w)⁻¹) (sphere c R)
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
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]
[GOAL]
case hf
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
hws : Set.Countable (insert w s)
hcF : ContinuousOn F (closedBall c R)
hdF : ∀ (z : ℂ), z ∈ ball c R \ insert w s → DifferentiableAt ℂ F z
HI : (∮ (z : ℂ) in C(c, R), F z) = 0
hne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w
hFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R)
hc' : ContinuousOn (fun z => (z - w)⁻¹) (sphere c R)
⊢ CircleIntegrable (fun z => (z - w)⁻¹ • f z) c R
case hg
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R \ s
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
F : ℂ → E := dslope f w
hws : Set.Countable (insert w s)
hcF : ContinuousOn F (closedBall c R)
hdF : ∀ (z : ℂ), z ∈ ball c R \ insert w s → DifferentiableAt ℂ F z
HI : (∮ (z : ℂ) in C(c, R), F z) = 0
hne : ∀ (z : ℂ), z ∈ sphere c R → z ≠ w
hFeq : EqOn F (fun z => (z - w)⁻¹ • f z - (z - w)⁻¹ • f w) (sphere c R)
hc' : ContinuousOn (fun z => (z - w)⁻¹) (sphere c R)
⊢ CircleIntegrable (fun z => (z - w)⁻¹ • f w) c R
[PROOFSTEP]
exacts [(hc'.smul (hc.mono sphere_subset_closedBall)).circleIntegrable hR.le,
  (hc'.smul continuousOn_const).circleIntegrable hR.le]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = f w
[PROOFSTEP]
have hR : 0 < R := dist_nonneg.trans_lt hw
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = f w
[PROOFSTEP]
suffices w ∈ closure (ball c R \ s) by
  lift R to ℝ≥0 using hR.le
  have A : ContinuousAt (fun w => (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) w :=
    by
    have := hasFPowerSeriesOn_cauchy_integral ((hc.mono sphere_subset_closedBall).circleIntegrable R.coe_nonneg) hR
    refine' this.continuousOn.continuousAt (EMetric.isOpen_ball.mem_nhds _)
    rwa [Metric.emetric_ball_nnreal]
  have B : ContinuousAt f w := hc.continuousAt (closedBall_mem_nhds_of_mem hw)
  refine' tendsto_nhds_unique_of_frequently_eq A B ((mem_closure_iff_frequently.1 this).mono _)
  intro z hz
  rw [circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux hs hz hc hd, inv_smul_smul₀]
  simp [Real.pi_ne_zero, I_ne_zero]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
this : w ∈ closure (ball c R \ s)
⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = f w
[PROOFSTEP]
lift R to ℝ≥0 using hR.le
[GOAL]
case intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
R : ℝ≥0
hw : w ∈ ball c ↑R
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (x : ℂ), x ∈ ball c ↑R \ s → DifferentiableAt ℂ f x
hR : 0 < ↑R
this : w ∈ closure (ball c ↑R \ s)
⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) = f w
[PROOFSTEP]
have A : ContinuousAt (fun w => (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - w)⁻¹ • f z) w :=
  by
  have := hasFPowerSeriesOn_cauchy_integral ((hc.mono sphere_subset_closedBall).circleIntegrable R.coe_nonneg) hR
  refine' this.continuousOn.continuousAt (EMetric.isOpen_ball.mem_nhds _)
  rwa [Metric.emetric_ball_nnreal]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
R : ℝ≥0
hw : w ∈ ball c ↑R
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (x : ℂ), x ∈ ball c ↑R \ s → DifferentiableAt ℂ f x
hR : 0 < ↑R
this : w ∈ closure (ball c ↑R \ s)
⊢ ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w
[PROOFSTEP]
have := hasFPowerSeriesOn_cauchy_integral ((hc.mono sphere_subset_closedBall).circleIntegrable R.coe_nonneg) hR
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
R : ℝ≥0
hw : w ∈ ball c ↑R
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (x : ℂ), x ∈ ball c ↑R \ s → DifferentiableAt ℂ f x
hR : 0 < ↑R
this✝ : w ∈ closure (ball c ↑R \ s)
this :
  HasFPowerSeriesOnBall (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) (cauchyPowerSeries f c ↑R) c
    ↑R
⊢ ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w
[PROOFSTEP]
refine' this.continuousOn.continuousAt (EMetric.isOpen_ball.mem_nhds _)
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
R : ℝ≥0
hw : w ∈ ball c ↑R
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (x : ℂ), x ∈ ball c ↑R \ s → DifferentiableAt ℂ f x
hR : 0 < ↑R
this✝ : w ∈ closure (ball c ↑R \ s)
this :
  HasFPowerSeriesOnBall (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) (cauchyPowerSeries f c ↑R) c
    ↑R
⊢ w ∈ EMetric.ball c ↑R
[PROOFSTEP]
rwa [Metric.emetric_ball_nnreal]
[GOAL]
case intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
R : ℝ≥0
hw : w ∈ ball c ↑R
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (x : ℂ), x ∈ ball c ↑R \ s → DifferentiableAt ℂ f x
hR : 0 < ↑R
this : w ∈ closure (ball c ↑R \ s)
A : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w
⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) = f w
[PROOFSTEP]
have B : ContinuousAt f w := hc.continuousAt (closedBall_mem_nhds_of_mem hw)
[GOAL]
case intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
R : ℝ≥0
hw : w ∈ ball c ↑R
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (x : ℂ), x ∈ ball c ↑R \ s → DifferentiableAt ℂ f x
hR : 0 < ↑R
this : w ∈ closure (ball c ↑R \ s)
A : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w
B : ContinuousAt f w
⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) = f w
[PROOFSTEP]
refine' tendsto_nhds_unique_of_frequently_eq A B ((mem_closure_iff_frequently.1 this).mono _)
[GOAL]
case intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
R : ℝ≥0
hw : w ∈ ball c ↑R
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (x : ℂ), x ∈ ball c ↑R \ s → DifferentiableAt ℂ f x
hR : 0 < ↑R
this : w ∈ closure (ball c ↑R \ s)
A : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w
B : ContinuousAt f w
⊢ ∀ (x : ℂ), x ∈ ball c ↑R \ s → ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - x)⁻¹ • f z) = f x
[PROOFSTEP]
intro z hz
[GOAL]
case intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
R : ℝ≥0
hw : w ∈ ball c ↑R
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (x : ℂ), x ∈ ball c ↑R \ s → DifferentiableAt ℂ f x
hR : 0 < ↑R
this : w ∈ closure (ball c ↑R \ s)
A : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w
B : ContinuousAt f w
z : ℂ
hz : z ∈ ball c ↑R \ s
⊢ ((2 * ↑π * I)⁻¹ • ∮ (z_1 : ℂ) in C(c, ↑R), (z_1 - z)⁻¹ • f z_1) = f z
[PROOFSTEP]
rw [circleIntegral_sub_inv_smul_of_differentiable_on_off_countable_aux hs hz hc hd, inv_smul_smul₀]
[GOAL]
case intro.hc
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
R : ℝ≥0
hw : w ∈ ball c ↑R
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (x : ℂ), x ∈ ball c ↑R \ s → DifferentiableAt ℂ f x
hR : 0 < ↑R
this : w ∈ closure (ball c ↑R \ s)
A : ContinuousAt (fun w => (2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - w)⁻¹ • f z) w
B : ContinuousAt f w
z : ℂ
hz : z ∈ ball c ↑R \ s
⊢ 2 * ↑π * I ≠ 0
[PROOFSTEP]
simp [Real.pi_ne_zero, I_ne_zero]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
⊢ w ∈ closure (ball c R \ s)
[PROOFSTEP]
refine'
  mem_closure_iff_nhds.2 fun t ht =>
    _
      -- TODO: generalize to any vector space over `ℝ`
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
t : Set ℂ
ht : t ∈ 𝓝 w
⊢ Set.Nonempty (t ∩ (ball c R \ s))
[PROOFSTEP]
set g : ℝ → ℂ := fun x => w + ofReal x
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
t : Set ℂ
ht : t ∈ 𝓝 w
g : ℝ → ℂ := fun x => w + ↑ofReal x
⊢ Set.Nonempty (t ∩ (ball c R \ s))
[PROOFSTEP]
have : Tendsto g (𝓝 0) (𝓝 w) := (continuous_const.add continuous_ofReal).tendsto' 0 w (add_zero _)
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
t : Set ℂ
ht : t ∈ 𝓝 w
g : ℝ → ℂ := fun x => w + ↑ofReal x
this : Tendsto g (𝓝 0) (𝓝 w)
⊢ Set.Nonempty (t ∩ (ball c R \ s))
[PROOFSTEP]
rcases mem_nhds_iff_exists_Ioo_subset.1 (this <| inter_mem ht <| isOpen_ball.mem_nhds hw) with ⟨l, u, hlu₀, hlu_sub⟩
[GOAL]
case intro.intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
t : Set ℂ
ht : t ∈ 𝓝 w
g : ℝ → ℂ := fun x => w + ↑ofReal x
this : Tendsto g (𝓝 0) (𝓝 w)
l u : ℝ
hlu₀ : 0 ∈ Ioo l u
hlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)
⊢ Set.Nonempty (t ∩ (ball c R \ s))
[PROOFSTEP]
obtain ⟨x, hx⟩ : (Ioo l u \ g ⁻¹' s).Nonempty :=
  by
  refine' nonempty_diff.2 fun hsub => _
  have : (Ioo l u).Countable := (hs.preimage ((add_right_injective w).comp ofReal_injective)).mono hsub
  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
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
t : Set ℂ
ht : t ∈ 𝓝 w
g : ℝ → ℂ := fun x => w + ↑ofReal x
this : Tendsto g (𝓝 0) (𝓝 w)
l u : ℝ
hlu₀ : 0 ∈ Ioo l u
hlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)
⊢ Set.Nonempty (Ioo l u \ g ⁻¹' s)
[PROOFSTEP]
refine' nonempty_diff.2 fun hsub => _
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
t : Set ℂ
ht : t ∈ 𝓝 w
g : ℝ → ℂ := fun x => w + ↑ofReal x
this : Tendsto g (𝓝 0) (𝓝 w)
l u : ℝ
hlu₀ : 0 ∈ Ioo l u
hlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)
hsub : Ioo l u ⊆ g ⁻¹' s
⊢ False
[PROOFSTEP]
have : (Ioo l u).Countable := (hs.preimage ((add_right_injective w).comp ofReal_injective)).mono hsub
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
t : Set ℂ
ht : t ∈ 𝓝 w
g : ℝ → ℂ := fun x => w + ↑ofReal x
this✝ : Tendsto g (𝓝 0) (𝓝 w)
l u : ℝ
hlu₀ : 0 ∈ Ioo l u
hlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)
hsub : Ioo l u ⊆ g ⁻¹' s
this : Set.Countable (Ioo l u)
⊢ False
[PROOFSTEP]
rw [← Cardinal.le_aleph0_iff_set_countable, Cardinal.mk_Ioo_real (hlu₀.1.trans hlu₀.2)] at this
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
t : Set ℂ
ht : t ∈ 𝓝 w
g : ℝ → ℂ := fun x => w + ↑ofReal x
this✝ : Tendsto g (𝓝 0) (𝓝 w)
l u : ℝ
hlu₀ : 0 ∈ Ioo l u
hlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)
hsub : Ioo l u ⊆ g ⁻¹' s
this : Cardinal.continuum ≤ Cardinal.aleph0
⊢ False
[PROOFSTEP]
exact this.not_lt Cardinal.aleph0_lt_continuum
[GOAL]
case intro.intro.intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
hR : 0 < R
t : Set ℂ
ht : t ∈ 𝓝 w
g : ℝ → ℂ := fun x => w + ↑ofReal x
this : Tendsto g (𝓝 0) (𝓝 w)
l u : ℝ
hlu₀ : 0 ∈ Ioo l u
hlu_sub : Ioo l u ⊆ g ⁻¹' (t ∩ ball c R)
x : ℝ
hx : x ∈ Ioo l u \ g ⁻¹' s
⊢ Set.Nonempty (t ∩ (ball c R \ s))
[PROOFSTEP]
exact ⟨g x, (hlu_sub hx.1).1, (hlu_sub hx.1).2, hx.2⟩
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
⊢ (∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = (2 * ↑π * I) • f w
[PROOFSTEP]
rw [← two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd, smul_inv_smul₀]
[GOAL]
case hc
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
hc : ContinuousOn f (closedBall c R)
hd : ∀ (x : ℂ), x ∈ ball c R \ s → DifferentiableAt ℂ f x
⊢ 2 * ↑π * I ≠ 0
[PROOFSTEP]
simp [Real.pi_ne_zero, I_ne_zero]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
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
[PROOFSTEP]
have hR : 0 < R := not_le.mp (ball_eq_empty.not.mp (Set.nonempty_of_mem hw).ne_empty)
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
hf : DiffContOnCl ℂ f (ball c R)
hw : w ∈ ball c R
hR : 0 < R
⊢ ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, R), (z - w)⁻¹ • f z) = f w
[PROOFSTEP]
refine' two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable countable_empty hw _ _
[GOAL]
case refine'_1
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
hf : DiffContOnCl ℂ f (ball c R)
hw : w ∈ ball c R
hR : 0 < R
⊢ ContinuousOn (fun z => f z) (closedBall c R)
[PROOFSTEP]
simpa only [closure_ball c hR.ne.symm] using hf.continuousOn
[GOAL]
case refine'_2
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
f : ℂ → E
hf : DiffContOnCl ℂ f (ball c R)
hw : w ∈ ball c R
hR : 0 < R
⊢ ∀ (x : ℂ), x ∈ ball c R \ ∅ → DifferentiableAt ℂ (fun z => f z) x
[PROOFSTEP]
simpa only [diff_empty] using fun z hz => hf.differentiableAt isOpen_ball hz
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ
c w : ℂ
s : Set ℂ
hs : Set.Countable s
hw : w ∈ ball c R
f : ℂ → ℂ
hc : ContinuousOn f (closedBall c R)
hd : ∀ (z : ℂ), z ∈ ball c R \ s → DifferentiableAt ℂ f z
⊢ (∮ (z : ℂ) in C(c, R), f z / (z - w)) = 2 * ↑π * I * f w
[PROOFSTEP]
simpa only [smul_eq_mul, div_eq_inv_mul] using
  circleIntegral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ≥0
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (z : ℂ), z ∈ ball c ↑R \ s → DifferentiableAt ℂ f z
hR : 0 < R
w : ℂ
hw : w ∈ EMetric.ball 0 ↑R
⊢ HasSum (fun n => ↑(cauchyPowerSeries f c (↑R) n) fun x => w) (f (c + w))
[PROOFSTEP]
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
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ≥0
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (z : ℂ), z ∈ ball c ↑R \ s → DifferentiableAt ℂ f z
hR : 0 < R
w : ℂ
hw : w ∈ EMetric.ball 0 ↑R
⊢ c + w ∈ ball c ↑R
[PROOFSTEP]
simpa only [add_mem_ball_iff_norm, ← coe_nnnorm, mem_emetric_ball_zero_iff, NNReal.coe_lt_coe, ENNReal.coe_lt_coe] using
  hw
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ≥0
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (z : ℂ), z ∈ ball c ↑R \ s → DifferentiableAt ℂ f z
hR : 0 < R
w : ℂ
hw : w ∈ EMetric.ball 0 ↑R
hw' : c + w ∈ ball c ↑R
⊢ HasSum (fun n => ↑(cauchyPowerSeries f c (↑R) n) fun x => w) (f (c + w))
[PROOFSTEP]
rw [← two_pi_I_inv_smul_circleIntegral_sub_inv_smul_of_differentiable_on_off_countable hs hw' hc hd]
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
R : ℝ≥0
c : ℂ
f : ℂ → E
s : Set ℂ
hs : Set.Countable s
hc : ContinuousOn f (closedBall c ↑R)
hd : ∀ (z : ℂ), z ∈ ball c ↑R \ s → DifferentiableAt ℂ f z
hR : 0 < R
w : ℂ
hw : w ∈ EMetric.ball 0 ↑R
hw' : c + w ∈ ball c ↑R
⊢ HasSum (fun n => ↑(cauchyPowerSeries f c (↑R) n) fun x => w)
    ((2 * ↑π * I)⁻¹ • ∮ (z : ℂ) in C(c, ↑R), (z - (c + w))⁻¹ • f z)
[PROOFSTEP]
exact (hasFPowerSeriesOn_cauchy_integral ((hc.mono sphere_subset_closedBall).circleIntegrable R.2) hR).hasSum hw
[GOAL]
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
s : Set ℂ
f : ℂ → E
z : ℂ
hd : DifferentiableOn ℂ f s
hz : s ∈ 𝓝 z
⊢ AnalyticAt ℂ f z
[PROOFSTEP]
rcases nhds_basis_closedBall.mem_iff.1 hz with ⟨R, hR0, hRs⟩
[GOAL]
case intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
s : Set ℂ
f : ℂ → E
z : ℂ
hd : DifferentiableOn ℂ f s
hz : s ∈ 𝓝 z
R : ℝ
hR0 : 0 < R
hRs : closedBall z R ⊆ s
⊢ AnalyticAt ℂ f z
[PROOFSTEP]
lift R to ℝ≥0 using hR0.le
[GOAL]
case intro.intro.intro
E : Type u
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℂ E
inst✝ : CompleteSpace E
s : Set ℂ
f : ℂ → E
z : ℂ
hd : DifferentiableOn ℂ f s
hz : s ∈ 𝓝 z
R : ℝ≥0
hR0 : 0 < ↑R
hRs : closedBall z ↑R ⊆ s
⊢ AnalyticAt ℂ f z
[PROOFSTEP]
exact ((hd.mono hRs).hasFPowerSeriesOnBall hR0).analyticAt