Theorem: Complex.exp_bound'
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
⊢ abs (cexp x - ∑ m ∈ range n, x ^ m / ↑m.factorial) ≤ abs x ^ n / ↑n.factorial * 2
state_after: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
⊢ (cauSeqAbs (exp' x + -const (⇑abs) (∑ m ∈ range n, x ^ m / ↑m.factorial))).lim ≤ abs x ^ n / ↑n.factorial * 2
tactic: rw [← lim_const (abv := Complex.abs) (∑ m ∈ range n, _),
    exp, sub_eq_add_neg, ← lim_neg, lim_add, ← lim_abs]
state_before: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
⊢ (cauSeqAbs (exp' x + -const (⇑abs) (∑ m ∈ range n, x ^ m / ↑m.factorial))).lim ≤ abs x ^ n / ↑n.factorial * 2
state_after: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj : j ≥ n
⊢ ↑(cauSeqAbs (exp' x + -const (⇑abs) (∑ m ∈ range n, x ^ m / ↑m.factorial))) j ≤
    ↑(const _root_.abs (abs x ^ n / ↑n.factorial * 2)) j
tactic: refine lim_le (CauSeq.le_of_exists ⟨n, fun j hj => ?_⟩)
state_before: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj : j ≥ n
⊢ ↑(cauSeqAbs (exp' x + -const (⇑abs) (∑ m ∈ range n, x ^ m / ↑m.factorial))) j ≤
    ↑(const _root_.abs (abs x ^ n / ↑n.factorial * 2)) j
state_after: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj : j ≥ n
⊢ ↑(cauSeqAbs (exp' x - const (⇑abs) (∑ m ∈ range n, x ^ m / ↑m.factorial))) j ≤
    ↑(const _root_.abs (abs x ^ n / ↑n.factorial * 2)) j
tactic: simp_rw [← sub_eq_add_neg]
state_before: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj : j ≥ n
⊢ ↑(cauSeqAbs (exp' x - const (⇑abs) (∑ m ∈ range n, x ^ m / ↑m.factorial))) j ≤
    ↑(const _root_.abs (abs x ^ n / ↑n.factorial * 2)) j
state_after: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj : j ≥ n
⊢ abs (∑ m ∈ range j, x ^ m / ↑m.factorial - ∑ m ∈ range n, x ^ m / ↑m.factorial) ≤ abs x ^ n / ↑n.factorial * 2
tactic: show abs ((∑ m ∈ range j, x ^ m / m.factorial) - ∑ m ∈ range n, x ^ m / m.factorial) ≤
    abs x ^ n / n.factorial * 2
state_before: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj : j ≥ n
⊢ abs (∑ m ∈ range j, x ^ m / ↑m.factorial - ∑ m ∈ range n, x ^ m / ↑m.factorial) ≤ abs x ^ n / ↑n.factorial * 2
state_after: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj : j ≥ n
k : ℕ := j - n
⊢ abs (∑ m ∈ range j, x ^ m / ↑m.factorial - ∑ m ∈ range n, x ^ m / ↑m.factorial) ≤ abs x ^ n / ↑n.factorial * 2
tactic: let k := j - n
state_before: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj : j ≥ n
k : ℕ := j - n
⊢ abs (∑ m ∈ range j, x ^ m / ↑m.factorial - ∑ m ∈ range n, x ^ m / ↑m.factorial) ≤ abs x ^ n / ↑n.factorial * 2
state_after: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj✝ : j ≥ n
k : ℕ := j - n
hj : j = n + k
⊢ abs (∑ m ∈ range j, x ^ m / ↑m.factorial - ∑ m ∈ range n, x ^ m / ↑m.factorial) ≤ abs x ^ n / ↑n.factorial * 2
tactic: have hj : j = n + k := (add_tsub_cancel_of_le hj).symm
state_before: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj✝ : j ≥ n
k : ℕ := j - n
hj : j = n + k
⊢ abs (∑ m ∈ range j, x ^ m / ↑m.factorial - ∑ m ∈ range n, x ^ m / ↑m.factorial) ≤ abs x ^ n / ↑n.factorial * 2
state_after: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj✝ : j ≥ n
k : ℕ := j - n
hj : j = n + k
⊢ abs (∑ k ∈ range k, x ^ (n + k) / ↑(n + k).factorial) ≤ abs x ^ n / ↑n.factorial * 2
tactic: rw [hj, sum_range_add_sub_sum_range]
state_before: x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj✝ : j ≥ n
k : ℕ := j - n
hj : j = n + k
⊢ abs (∑ k ∈ range k, x ^ (n + k) / ↑(n + k).factorial) ≤ abs x ^ n / ↑n.factorial * 2
state_after: case calc_1
x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj✝ : j ≥ n
k : ℕ := j - n
hj : j = n + k
⊢ ∑ i ∈ range k, abs x ^ (n + i) / ↑(n + i).factorial ≤ ∑ i ∈ range k, abs x ^ (n + i) / (↑n.factorial * ↑n.succ ^ i)

case calc_2
x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj✝ : j ≥ n
k : ℕ := j - n
hj : j = n + k
⊢ ∑ i ∈ range k, abs x ^ (n + i) / (↑n.factorial * ↑n.succ ^ i) =
    ∑ i ∈ range k, abs x ^ n / ↑n.factorial * (abs x ^ i / ↑n.succ ^ i)

case calc_3
x : ℂ
n : ℕ
hx : abs x / ↑n.succ ≤ 1 / 2
j : ℕ
hj✝ : j ≥ n
k : ℕ := j - n
hj : j = n + k
⊢ ∑ i ∈ range k, abs x ^ n / ↑n.factorial * (abs x ^ i / ↑n.succ ^ i) ≤ abs x ^ n / ↑n.factorial * 2
tactic: calc
    abs (∑ i ∈ range k, x ^ (n + i) / ((n + i).factorial : ℂ)) ≤
        ∑ i ∈ range k, abs (x ^ (n + i) / ((n + i).factorial : ℂ)) :=
      IsAbsoluteValue.abv_sum _ _ _
    _ ≤ ∑ i ∈ range k, abs x ^ (n + i) / (n + i).factorial := by
      simp [Complex.abs_natCast, map_div₀, abv_pow abs]
    _ ≤ ∑ i ∈ range k, abs x ^ (n + i) / ((n.factorial : ℝ) * (n.succ : ℝ) ^ i) := ?_
    _ = ∑ i ∈ range k, abs x ^ n / n.factorial * (abs x ^ i / (n.succ : ℝ) ^ i) := ?_
    _ ≤ abs x ^ n / ↑n.factorial * 2 := ?_