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

tactic: rw [Summable.hasSum_iff_tendsto_nat]
state_before: x : ℝ
h : |x| < 1
⊢ HasSum (fun n => x ^ (n + 1) / (↑n + 1)) (-log (1 - x))
state_after: x : ℝ
h : |x| < 1
⊢ Tendsto (fun n => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1)) atTop (𝓝 (-log (1 - x)))

x : ℝ
h : |x| < 1
⊢ Summable fun n => x ^ (n + 1) / (↑n + 1)

tactic: refine .of_norm_bounded _ (summable_geometric_of_lt_one (abs_nonneg _) h) fun i => ?_
state_before: x : ℝ
h : |x| < 1
⊢ Summable fun n => x ^ (n + 1) / (↑n + 1)
state_after: x : ℝ
h : |x| < 1
i : ℕ
⊢ ‖x ^ (i + 1) / (↑i + 1)‖ ≤ |x| ^ i

tactic: calc
  ‖x ^ (i + 1) / (i + 1)‖ = |x| ^ (i + 1) / (i + 1) := by
    have : (0 : ℝ) ≤ i + 1 := le_of_lt (Nat.cast_add_one_pos i)
    rw [norm_eq_abs, abs_div, ← pow_abs, abs_of_nonneg this]
  _ ≤ |x| ^ (i + 1) / (0 + 1) := by
    gcongr
    exact i.cast_nonneg
  _ ≤ |x| ^ i := by
    simpa [pow_succ] using mul_le_of_le_one_right (pow_nonneg (abs_nonneg x) i) (le_of_lt h)
state_before: x : ℝ
h : |x| < 1
i : ℕ
⊢ ‖x ^ (i + 1) / (↑i + 1)‖ ≤ |x| ^ i
state_after: no goals

tactic: rw [tendsto_iff_norm_sub_tendsto_zero]
state_before: x : ℝ
h : |x| < 1
⊢ Tendsto (fun n => ∑ i ∈ Finset.range n, x ^ (i + 1) / (↑i + 1)) atTop (𝓝 (-log (1 - x)))
state_after: x : ℝ
h : |x| < 1
⊢ Tendsto (fun e => ‖∑ i ∈ Finset.range e, x ^ (i + 1) / (↑i + 1) - -log (1 - x)‖) atTop (𝓝 0)

tactic: simp only [norm_eq_abs, sub_neg_eq_add]
state_before: x : ℝ
h : |x| < 1
⊢ Tendsto (fun e => ‖∑ i ∈ Finset.range e, x ^ (i + 1) / (↑i + 1) - -log (1 - x)‖) atTop (𝓝 0)
state_after: x : ℝ
h : |x| < 1
⊢ Tendsto (fun e => |∑ i ∈ Finset.range e, x ^ (i + 1) / (↑i + 1) + log (1 - x)|) atTop (𝓝 0)

tactic: refine squeeze_zero (fun n => abs_nonneg _) (abs_log_sub_add_sum_range_le h) ?_
state_before: x : ℝ
h : |x| < 1
⊢ Tendsto (fun e => |∑ i ∈ Finset.range e, x ^ (i + 1) / (↑i + 1) + log (1 - x)|) atTop (𝓝 0)
state_after: x : ℝ
h : |x| < 1
⊢ Tendsto (fun t => |x| ^ (t + 1) / (1 - |x|)) atTop (𝓝 0)

tactic: suffices Tendsto (fun t : ℕ => |x| ^ (t + 1) / (1 - |x|)) atTop (𝓝 (|x| * 0 / (1 - |x|))) by
  simpa
state_before: x : ℝ
h : |x| < 1
⊢ Tendsto (fun t => |x| ^ (t + 1) / (1 - |x|)) atTop (𝓝 0)
state_after: x : ℝ
h : |x| < 1
⊢ Tendsto (fun t => |x| ^ (t + 1) / (1 - |x|)) atTop (𝓝 (|x| * 0 / (1 - |x|)))

tactic: simp only [pow_succ']
state_before: x : ℝ
h : |x| < 1
⊢ Tendsto (fun t => |x| ^ (t + 1) / (1 - |x|)) atTop (𝓝 (|x| * 0 / (1 - |x|)))
state_after: x : ℝ
h : |x| < 1
⊢ Tendsto (fun t => |x| * |x| ^ t / (1 - |x|)) atTop (𝓝 (|x| * 0 / (1 - |x|)))

tactic: refine (tendsto_const_nhds.mul ?_).div_const _
state_before: x : ℝ
h : |x| < 1
⊢ Tendsto (fun t => |x| * |x| ^ t / (1 - |x|)) atTop (𝓝 (|x| * 0 / (1 - |x|)))
state_after: x : ℝ
h : |x| < 1
⊢ Tendsto (HPow.hPow |x|) atTop (𝓝 0)

tactic: exact tendsto_pow_atTop_nhds_zero_of_lt_one (abs_nonneg _) h
state_before: x : ℝ
h : |x| < 1
⊢ Tendsto (HPow.hPow |x|) atTop (𝓝 0)
state_after: no goals

tactic: simpa
state_before: x : ℝ
h : |x| < 1
this : Tendsto (fun t => |x| ^ (t + 1) / (1 - |x|)) atTop (𝓝 (|x| * 0 / (1 - |x|)))
⊢ Tendsto (fun t => |x| ^ (t + 1) / (1 - |x|)) atTop (𝓝 0)
state_after: no goals

tactic: have : (0 : ℝ) ≤ i + 1 := le_of_lt (Nat.cast_add_one_pos i)
state_before: x : ℝ
h : |x| < 1
i : ℕ
⊢ ‖x ^ (i + 1) / (↑i + 1)‖ = |x| ^ (i + 1) / (↑i + 1)
state_after: x : ℝ
h : |x| < 1
i : ℕ
this : 0 ≤ ↑i + 1
⊢ ‖x ^ (i + 1) / (↑i + 1)‖ = |x| ^ (i + 1) / (↑i + 1)

tactic: rw [norm_eq_abs, abs_div, ← pow_abs, abs_of_nonneg this]
state_before: x : ℝ
h : |x| < 1
i : ℕ
this : 0 ≤ ↑i + 1
⊢ ‖x ^ (i + 1) / (↑i + 1)‖ = |x| ^ (i + 1) / (↑i + 1)
state_after: no goals

tactic: gcongr
state_before: x : ℝ
h : |x| < 1
i : ℕ
⊢ |x| ^ (i + 1) / (↑i + 1) ≤ |x| ^ (i + 1) / (0 + 1)
state_after: case h.bc
x : ℝ
h : |x| < 1
i : ℕ
⊢ 0 ≤ ↑i

tactic: exact i.cast_nonneg
state_before: case h.bc
x : ℝ
h : |x| < 1
i : ℕ
⊢ 0 ≤ ↑i
state_after: no goals

tactic: simpa [pow_succ] using mul_le_of_le_one_right (pow_nonneg (abs_nonneg x) i) (le_of_lt h)
state_before: x : ℝ
h : |x| < 1
i : ℕ
⊢ |x| ^ (i + 1) / (0 + 1) ≤ |x| ^ i
state_after: no goals