Theorem: Complex.norm_log_sub_logTaylor_le
File: Mathlib/Analysis/SpecialFunctions/Complex/LogBounds.lean

tactic: have help : IntervalIntegrable (fun t : ℝ ↦ t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1 :=
  IntervalIntegrable.mul_const (Continuous.intervalIntegrable (by fun_prop) 0 1) (1 - ‖z‖)⁻¹
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)

tactic: let f (z : ℂ) : ℂ := log (1 + z) - logTaylor (n + 1) z
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)

tactic: let f' (z : ℂ) : ℂ := (-z) ^ n * (1 + z)⁻¹
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)

tactic: have hderiv : ∀ t ∈ Set.Icc (0 : ℝ) 1, HasDerivAt f (f' (0 + t * z)) (0 + t * z) := by
  intro t ht
  rw [zero_add]
  exact hasDerivAt_log_sub_logTaylor n <|
    StarConvex.add_smul_mem starConvex_one_slitPlane (mem_slitPlane_of_norm_lt_one hz) ht.1 ht.2
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)

tactic: have hcont : ContinuousOn (fun t : ℝ ↦ f' (0 + t * z)) (Set.Icc 0 1) := by
  simp only [zero_add, zero_le_one, not_true_eq_false]
  exact (Continuous.continuousOn (by fun_prop)).mul <|
    continuousOn_one_add_mul_inv <| mem_slitPlane_of_norm_lt_one hz
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)

tactic: unfold_let f at H
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : f z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)

tactic: simp only [H, norm_mul]
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ‖log (1 + z) - logTaylor (n + 1) z‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ‖z‖ * ‖∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)

tactic: simp_rw [neg_pow (_ * z) n, mul_assoc, intervalIntegral.integral_const_mul, mul_pow,
  mul_comm _ (z ^ n), mul_assoc, intervalIntegral.integral_const_mul, norm_mul, norm_pow,
  norm_neg, norm_one, one_pow, one_mul, ← mul_assoc, ← pow_succ', mul_div_assoc]
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ‖z‖ * ‖∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹‖ ≤ ‖z‖ ^ (n + 1) * (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ‖z‖ ^ (n + 1) * ‖∫ (x : ℝ) in 0 ..1, ↑x ^ n * (1 + ↑x * z)⁻¹‖ ≤ ‖z‖ ^ (n + 1) * ((1 - ‖z‖)⁻¹ / (↑n + 1))

tactic: refine mul_le_mul_of_nonneg_left ?_ (pow_nonneg (norm_nonneg z) (n + 1))
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ‖z‖ ^ (n + 1) * ‖∫ (x : ℝ) in 0 ..1, ↑x ^ n * (1 + ↑x * z)⁻¹‖ ≤ ‖z‖ ^ (n + 1) * ((1 - ‖z‖)⁻¹ / (↑n + 1))
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ‖∫ (x : ℝ) in 0 ..1, ↑x ^ n * (1 + ↑x * z)⁻¹‖ ≤ (1 - ‖z‖)⁻¹ / (↑n + 1)

tactic: calc ‖∫ t in (0 : ℝ)..1, (t : ℂ) ^ n * (1 + t * z)⁻¹‖
  _ ≤ ∫ t in (0 : ℝ)..1, ‖(t : ℂ) ^ n * (1 + t * z)⁻¹‖ :=
      intervalIntegral.norm_integral_le_integral_norm zero_le_one
  _ = ∫ t in (0 : ℝ)..1, t ^ n * ‖(1 + t * z)⁻¹‖ := by
      refine intervalIntegral.integral_congr <| fun t ht ↦ ?_
      rw [Set.uIcc_of_le zero_le_one, Set.mem_Icc] at ht
      simp_rw [norm_mul, norm_pow, norm_eq_abs, abs_of_nonneg ht.1]
  _ ≤ ∫ t in (0 : ℝ)..1, t ^ n * (1 - ‖z‖)⁻¹ :=
      intervalIntegral.integral_mono_on zero_le_one
        (integrable_pow_mul_norm_one_add_mul_inv n hz) help <|
        fun t ht ↦ mul_le_mul_of_nonneg_left (norm_one_add_mul_inv_le ht hz)
                     (pow_nonneg ((Set.mem_Icc.mp ht).1) _)
  _ = (1 - ‖z‖)⁻¹ / (n + 1) := by
      rw [intervalIntegral.integral_mul_const, mul_comm, integral_pow]
      field_simp
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ‖∫ (x : ℝ) in 0 ..1, ↑x ^ n * (1 + ↑x * z)⁻¹‖ ≤ (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: no goals

tactic: fun_prop
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
⊢ Continuous fun t => t ^ n
state_after: no goals

tactic: intro t ht
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
⊢ ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
t : ℝ
ht : t ∈ Set.Icc 0 1
⊢ HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)

tactic: rw [zero_add]
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
t : ℝ
ht : t ∈ Set.Icc 0 1
⊢ HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
t : ℝ
ht : t ∈ Set.Icc 0 1
⊢ HasDerivAt f (f' (↑t * z)) (↑t * z)

tactic: exact hasDerivAt_log_sub_logTaylor n <|
  StarConvex.add_smul_mem starConvex_one_slitPlane (mem_slitPlane_of_norm_lt_one hz) ht.1 ht.2
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
t : ℝ
ht : t ∈ Set.Icc 0 1
⊢ HasDerivAt f (f' (↑t * z)) (↑t * z)
state_after: no goals

tactic: simp only [zero_add, zero_le_one, not_true_eq_false]
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
⊢ ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
⊢ ContinuousOn (fun t => f' (↑t * z)) (Set.Icc 0 1)

tactic: exact (Continuous.continuousOn (by fun_prop)).mul <|
  continuousOn_one_add_mul_inv <| mem_slitPlane_of_norm_lt_one hz
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
⊢ ContinuousOn (fun t => f' (↑t * z)) (Set.Icc 0 1)
state_after: no goals

tactic: fun_prop
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
⊢ Continuous fun t => (-(↑t * z)) ^ n
state_after: no goals

tactic: convert (integral_unitInterval_deriv_eq_sub hcont hderiv).symm using 1
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
⊢ f z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
state_after: case h.e'_2
n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
⊢ f z = f (0 + z) - f 0

case h.e'_3
n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
⊢ z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹ = z • ∫ (t : ℝ) in 0 ..1, f' (0 + t • z)

tactic: simp only [f, zero_add, add_zero, log_one, logTaylor_at_zero, sub_self, sub_zero]
state_before: case h.e'_2
n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
⊢ f z = f (0 + z) - f 0
state_after: no goals

tactic: simp only [add_zero, log_one, logTaylor_at_zero, sub_self, real_smul, zero_add, smul_eq_mul]
state_before: case h.e'_3
n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
⊢ z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹ = z • ∫ (t : ℝ) in 0 ..1, f' (0 + t • z)
state_after: no goals

tactic: refine intervalIntegral.integral_congr <| fun t ht ↦ ?_
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ∫ (t : ℝ) in 0 ..1, ‖↑t ^ n * (1 + ↑t * z)⁻¹‖ = ∫ (t : ℝ) in 0 ..1, t ^ n * ‖(1 + ↑t * z)⁻¹‖
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
t : ℝ
ht : t ∈ Set.uIcc 0 1
⊢ ‖↑t ^ n * (1 + ↑t * z)⁻¹‖ = t ^ n * ‖(1 + ↑t * z)⁻¹‖

tactic: rw [Set.uIcc_of_le zero_le_one, Set.mem_Icc] at ht
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
t : ℝ
ht : t ∈ Set.uIcc 0 1
⊢ ‖↑t ^ n * (1 + ↑t * z)⁻¹‖ = t ^ n * ‖(1 + ↑t * z)⁻¹‖
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
t : ℝ
ht : 0 ≤ t ∧ t ≤ 1
⊢ ‖↑t ^ n * (1 + ↑t * z)⁻¹‖ = t ^ n * ‖(1 + ↑t * z)⁻¹‖

tactic: simp_rw [norm_mul, norm_pow, norm_eq_abs, abs_of_nonneg ht.1]
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
t : ℝ
ht : 0 ≤ t ∧ t ≤ 1
⊢ ‖↑t ^ n * (1 + ↑t * z)⁻¹‖ = t ^ n * ‖(1 + ↑t * z)⁻¹‖
state_after: no goals

tactic: rw [intervalIntegral.integral_mul_const, mul_comm, integral_pow]
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ ∫ (t : ℝ) in 0 ..1, t ^ n * (1 - ‖z‖)⁻¹ = (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ (1 - ‖z‖)⁻¹ * ((1 ^ (n + 1) - 0 ^ (n + 1)) / (↑n + 1)) = (1 - ‖z‖)⁻¹ / (↑n + 1)

tactic: field_simp
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
help : IntervalIntegrable (fun t => t ^ n * (1 - ‖z‖)⁻¹) MeasureTheory.volume 0 1
f : ℂ → ℂ := fun z => log (1 + z) - logTaylor (n + 1) z
f' : ℂ → ℂ := fun z => (-z) ^ n * (1 + z)⁻¹
hderiv : ∀ t ∈ Set.Icc 0 1, HasDerivAt f (f' (0 + ↑t * z)) (0 + ↑t * z)
hcont : ContinuousOn (fun t => f' (0 + ↑t * z)) (Set.Icc 0 1)
H : (fun z => log (1 + z) - logTaylor (n + 1) z) z = z * ∫ (t : ℝ) in 0 ..1, (-(↑t * z)) ^ n * (1 + ↑t * z)⁻¹
⊢ (1 - ‖z‖)⁻¹ * ((1 ^ (n + 1) - 0 ^ (n + 1)) / (↑n + 1)) = (1 - ‖z‖)⁻¹ / (↑n + 1)
state_after: no goals