Theorem: Real.abs_log_sub_add_sum_range_le
File: Mathlib/Analysis/SpecialFunctions/Log/Deriv.lean

tactic: let F : ℝ → ℝ := fun x => (∑ i ∈ range n, x ^ (i + 1) / (i + 1)) + log (1 - x)
state_before: x : ℝ
h : |x| < 1
n : ℕ
⊢ |∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)| ≤ |x| ^ (n + 1) / (1 - |x|)
state_after: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
⊢ |∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)| ≤ |x| ^ (n + 1) / (1 - |x|)

tactic: let F' : ℝ → ℝ := fun x ↦ -x ^ n / (1 - x)
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
⊢ |∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)| ≤ |x| ^ (n + 1) / (1 - |x|)
state_after: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
⊢ |∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)| ≤ |x| ^ (n + 1) / (1 - |x|)

tactic: have A : ∀ y ∈ Ioo (-1 : ℝ) 1, HasDerivAt F (F' y) y := fun y hy ↦ by
  have : HasDerivAt F ((∑ i ∈ range n, ↑(i + 1) * y ^ i / (↑i + 1)) + (-1) / (1 - y)) y :=
    .add (.sum fun i _ ↦ (hasDerivAt_pow (i + 1) y).div_const ((i : ℝ) + 1))
      (((hasDerivAt_id y).const_sub _).log <| sub_ne_zero.2 hy.2.ne')
  convert this using 1
  calc
    -y ^ n / (1 - y) = ∑ i ∈ Finset.range n, y ^ i + -1 / (1 - y) := by
      field_simp [geom_sum_eq hy.2.ne, sub_ne_zero.2 hy.2.ne, sub_ne_zero.2 hy.2.ne']
      ring
    _ = ∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y) := by
      congr with i
      rw [Nat.cast_succ, mul_div_cancel_left₀ _ (Nat.cast_add_one_pos i).ne']
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
⊢ |∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)| ≤ |x| ^ (n + 1) / (1 - |x|)
state_after: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
⊢ |∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)| ≤ |x| ^ (n + 1) / (1 - |x|)

tactic: have B : ∀ y ∈ Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|) := fun y hy ↦
  calc
    |F' y| = |y| ^ n / |1 - y| := by simp [F', abs_div]
    _ ≤ |x| ^ n / (1 - |x|) := by
      have : |y| ≤ |x| := abs_le.2 hy
      have : 1 - |x| ≤ |1 - y| := le_trans (by linarith [hy.2]) (le_abs_self _)
      gcongr
      exact sub_pos.2 h
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
⊢ |∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)| ≤ |x| ^ (n + 1) / (1 - |x|)
state_after: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
B : ∀ y ∈ Set.Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|)
⊢ |∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)| ≤ |x| ^ (n + 1) / (1 - |x|)

tactic: simpa [F, div_mul_eq_mul_div, pow_succ] using C
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
B : ∀ y ∈ Set.Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|)
C : ‖F x - F 0‖ ≤ |x| ^ n / (1 - |x|) * ‖x - 0‖
⊢ |∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)| ≤ |x| ^ (n + 1) / (1 - |x|)
state_after: no goals

tactic: have : HasDerivAt F ((∑ i ∈ range n, ↑(i + 1) * y ^ i / (↑i + 1)) + (-1) / (1 - y)) y :=
  .add (.sum fun i _ ↦ (hasDerivAt_pow (i + 1) y).div_const ((i : ℝ) + 1))
    (((hasDerivAt_id y).const_sub _).log <| sub_ne_zero.2 hy.2.ne')
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
⊢ HasDerivAt F (F' y) y
state_after: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
⊢ HasDerivAt F (F' y) y

tactic: convert this using 1
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
⊢ HasDerivAt F (F' y) y
state_after: case h.e'_7
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
⊢ F' y = ∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)

tactic: calc
  -y ^ n / (1 - y) = ∑ i ∈ Finset.range n, y ^ i + -1 / (1 - y) := by
    field_simp [geom_sum_eq hy.2.ne, sub_ne_zero.2 hy.2.ne, sub_ne_zero.2 hy.2.ne']
    ring
  _ = ∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y) := by
    congr with i
    rw [Nat.cast_succ, mul_div_cancel_left₀ _ (Nat.cast_add_one_pos i).ne']
state_before: case h.e'_7
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
⊢ F' y = ∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)
state_after: no goals

tactic: field_simp [geom_sum_eq hy.2.ne, sub_ne_zero.2 hy.2.ne, sub_ne_zero.2 hy.2.ne']
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
⊢ -y ^ n / (1 - y) = ∑ i ∈ Finset.range n, y ^ i + -1 / (1 - y)
state_after: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
⊢ -(y ^ n * ((y - 1) * (1 - y))) = ((y ^ n - 1) * (1 - y) + (1 - y)) * (1 - y)

tactic: ring
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
⊢ -(y ^ n * ((y - 1) * (1 - y))) = ((y ^ n - 1) * (1 - y) + (1 - y)) * (1 - y)
state_after: no goals

tactic: congr with i
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
⊢ ∑ i ∈ Finset.range n, y ^ i + -1 / (1 - y) = ∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)
state_after: case e_a.e_f.h
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
i : ℕ
⊢ y ^ i = ↑(i + 1) * y ^ i / (↑i + 1)

tactic: rw [Nat.cast_succ, mul_div_cancel_left₀ _ (Nat.cast_add_one_pos i).ne']
state_before: case e_a.e_f.h
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
y : ℝ
hy : y ∈ Set.Ioo (-1) 1
this : HasDerivAt F (∑ i ∈ Finset.range n, ↑(i + 1) * y ^ i / (↑i + 1) + -1 / (1 - y)) y
i : ℕ
⊢ y ^ i = ↑(i + 1) * y ^ i / (↑i + 1)
state_after: no goals

tactic: simp [F', abs_div]
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
⊢ |F' y| = |y| ^ n / |1 - y|
state_after: no goals

tactic: have : |y| ≤ |x| := abs_le.2 hy
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
⊢ |y| ^ n / |1 - y| ≤ |x| ^ n / (1 - |x|)
state_after: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
this : |y| ≤ |x|
⊢ |y| ^ n / |1 - y| ≤ |x| ^ n / (1 - |x|)

tactic: have : 1 - |x| ≤ |1 - y| := le_trans (by linarith [hy.2]) (le_abs_self _)
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
this : |y| ≤ |x|
⊢ |y| ^ n / |1 - y| ≤ |x| ^ n / (1 - |x|)
state_after: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
this✝ : |y| ≤ |x|
this : 1 - |x| ≤ |1 - y|
⊢ |y| ^ n / |1 - y| ≤ |x| ^ n / (1 - |x|)

tactic: gcongr
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
this✝ : |y| ≤ |x|
this : 1 - |x| ≤ |1 - y|
⊢ |y| ^ n / |1 - y| ≤ |x| ^ n / (1 - |x|)
state_after: case hd
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
this✝ : |y| ≤ |x|
this : 1 - |x| ≤ |1 - y|
⊢ 0 < 1 - |x|

tactic: exact sub_pos.2 h
state_before: case hd
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
this✝ : |y| ≤ |x|
this : 1 - |x| ≤ |1 - y|
⊢ 0 < 1 - |x|
state_after: no goals

tactic: linarith [hy.2]
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
this : |y| ≤ |x|
⊢ 1 - |x| ≤ 1 - y
state_after: no goals

tactic: refine Convex.norm_image_sub_le_of_norm_hasDerivWithin_le
  (fun y hy ↦ (A _ ?_).hasDerivWithinAt) B (convex_Icc _ _) ?_ ?_
state_before: x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
B : ∀ y ∈ Set.Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|)
⊢ ‖F x - F 0‖ ≤ |x| ^ n / (1 - |x|) * ‖x - 0‖
state_after: case refine_1
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
B : ∀ y ∈ Set.Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|)
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
⊢ y ∈ Set.Ioo (-1) 1

case refine_2
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
B : ∀ y ∈ Set.Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|)
⊢ 0 ∈ Set.Icc (-|x|) |x|

case refine_3
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
B : ∀ y ∈ Set.Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|)
⊢ x ∈ Set.Icc (-|x|) |x|

tactic: exact Icc_subset_Ioo (neg_lt_neg h) h hy
state_before: case refine_1
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
B : ∀ y ∈ Set.Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|)
y : ℝ
hy : y ∈ Set.Icc (-|x|) |x|
⊢ y ∈ Set.Ioo (-1) 1
state_after: no goals

tactic: simp
state_before: case refine_2
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
B : ∀ y ∈ Set.Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|)
⊢ 0 ∈ Set.Icc (-|x|) |x|
state_after: no goals

tactic: simp [le_abs_self x, neg_le.mp (neg_le_abs x)]
state_before: case refine_3
x : ℝ
h : |x| < 1
n : ℕ
F : ℝ → ℝ := fun x => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1) + log (1 - x)
F' : ℝ → ℝ := fun x => -x ^ n / (1 - x)
A : ∀ y ∈ Set.Ioo (-1) 1, HasDerivAt F (F' y) y
B : ∀ y ∈ Set.Icc (-|x|) |x|, |F' y| ≤ |x| ^ n / (1 - |x|)
⊢ x ∈ Set.Icc (-|x|) |x|
state_after: no goals