Theorem: Real.summable_one_div_nat_add_rpow
File: Mathlib/Analysis/PSeries.lean

tactic: suffices ∀ (b c : ℝ), Summable (fun n : ℕ ↦ 1 / |n + b| ^ s) →
    Summable (fun n : ℕ ↦ 1 / |n + c| ^ s) by
  simp_rw [← summable_one_div_nat_rpow, Iff.intro (this a 0) (this 0 a), add_zero, Nat.abs_cast]
state_before: a s : ℝ
⊢ (Summable fun n => 1 / |↑n + a| ^ s) ↔ 1 < s
state_after: a s : ℝ
⊢ ∀ (b c : ℝ), (Summable fun n => 1 / |↑n + b| ^ s) → Summable fun n => 1 / |↑n + c| ^ s

tactic: refine fun b c h ↦ summable_of_isBigO_nat h (isBigO_of_div_tendsto_nhds ?_ 1 ?_)
state_before: a s : ℝ
⊢ ∀ (b c : ℝ), (Summable fun n => 1 / |↑n + b| ^ s) → Summable fun n => 1 / |↑n + c| ^ s
state_after: case refine_1
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
⊢ ∀ᶠ (x : ℕ) in atTop, 1 / |↑x + b| ^ s = 0 → 1 / |↑x + c| ^ s = 0

case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
⊢ Tendsto ((fun n => 1 / |↑n + c| ^ s) / fun n => 1 / |↑n + b| ^ s) atTop (𝓝 1)

tactic: simp_rw [← summable_one_div_nat_rpow, Iff.intro (this a 0) (this 0 a), add_zero, Nat.abs_cast]
state_before: a s : ℝ
this : ∀ (b c : ℝ), (Summable fun n => 1 / |↑n + b| ^ s) → Summable fun n => 1 / |↑n + c| ^ s
⊢ (Summable fun n => 1 / |↑n + a| ^ s) ↔ 1 < s
state_after: no goals

tactic: filter_upwards [eventually_gt_atTop (Nat.ceil |b|)] with n hn hx
state_before: case refine_1
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
⊢ ∀ᶠ (x : ℕ) in atTop, 1 / |↑x + b| ^ s = 0 → 1 / |↑x + c| ^ s = 0
state_after: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
n : ℕ
hn : ⌈|b|⌉₊ < n
hx : 1 / |↑n + b| ^ s = 0
⊢ 1 / |↑n + c| ^ s = 0

tactic: have hna : 0 < n + b := by linarith [lt_of_abs_lt ((abs_neg b).symm ▸ Nat.lt_of_ceil_lt hn)]
state_before: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
n : ℕ
hn : ⌈|b|⌉₊ < n
hx : 1 / |↑n + b| ^ s = 0
⊢ 1 / |↑n + c| ^ s = 0
state_after: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
n : ℕ
hn : ⌈|b|⌉₊ < n
hx : 1 / |↑n + b| ^ s = 0
hna : 0 < ↑n + b
⊢ 1 / |↑n + c| ^ s = 0

tactic: exfalso
state_before: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
n : ℕ
hn : ⌈|b|⌉₊ < n
hx : 1 / |↑n + b| ^ s = 0
hna : 0 < ↑n + b
⊢ 1 / |↑n + c| ^ s = 0
state_after: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
n : ℕ
hn : ⌈|b|⌉₊ < n
hx : 1 / |↑n + b| ^ s = 0
hna : 0 < ↑n + b
⊢ False

tactic: revert hx
state_before: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
n : ℕ
hn : ⌈|b|⌉₊ < n
hx : 1 / |↑n + b| ^ s = 0
hna : 0 < ↑n + b
⊢ False
state_after: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
n : ℕ
hn : ⌈|b|⌉₊ < n
hna : 0 < ↑n + b
⊢ 1 / |↑n + b| ^ s = 0 → False

tactic: positivity
state_before: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
n : ℕ
hn : ⌈|b|⌉₊ < n
hna : 0 < ↑n + b
⊢ 1 / |↑n + b| ^ s = 0 → False
state_after: no goals

tactic: linarith [lt_of_abs_lt ((abs_neg b).symm ▸ Nat.lt_of_ceil_lt hn)]
state_before: a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
n : ℕ
hn : ⌈|b|⌉₊ < n
hx : 1 / |↑n + b| ^ s = 0
⊢ 0 < ↑n + b
state_after: no goals

tactic: simp_rw [Pi.div_def, div_div, mul_one_div, one_div_div]
state_before: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
⊢ Tendsto ((fun n => 1 / |↑n + c| ^ s) / fun n => 1 / |↑n + b| ^ s) atTop (𝓝 1)
state_after: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
⊢ Tendsto (fun i => |↑i + b| ^ s / |↑i + c| ^ s) atTop (𝓝 1)

tactic: refine (?_ : Tendsto (fun x : ℝ ↦ |x + b| ^ s / |x + c| ^ s) atTop (𝓝 1)).comp
  tendsto_natCast_atTop_atTop
state_before: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
⊢ Tendsto (fun i => |↑i + b| ^ s / |↑i + c| ^ s) atTop (𝓝 1)
state_after: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
⊢ Tendsto (fun x => |x + b| ^ s / |x + c| ^ s) atTop (𝓝 1)

tactic: have : Tendsto (fun x : ℝ ↦ 1 + (b - c) / x) atTop (𝓝 1) := by
  simpa using tendsto_const_nhds.add ((tendsto_const_nhds (X := ℝ)).div_atTop tendsto_id)
state_before: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
⊢ Tendsto (fun x => |x + b| ^ s / |x + c| ^ s) atTop (𝓝 1)
state_after: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
⊢ Tendsto (fun x => |x + b| ^ s / |x + c| ^ s) atTop (𝓝 1)

tactic: have : Tendsto (fun x ↦ (x + b) / (x + c)) atTop (𝓝 1) := by
  refine (this.comp (tendsto_id.atTop_add (tendsto_const_nhds (x := c)))).congr' ?_
  filter_upwards [eventually_gt_atTop (-c)] with x hx
  field_simp [(by linarith : 0 < x + c).ne']
state_before: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
⊢ Tendsto (fun x => |x + b| ^ s / |x + c| ^ s) atTop (𝓝 1)
state_after: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this✝ : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
this : Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
⊢ Tendsto (fun x => |x + b| ^ s / |x + c| ^ s) atTop (𝓝 1)

tactic: apply (one_rpow s ▸ (continuousAt_rpow_const _ s (by simp)).tendsto.comp this).congr'
state_before: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this✝ : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
this : Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
⊢ Tendsto (fun x => |x + b| ^ s / |x + c| ^ s) atTop (𝓝 1)
state_after: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this✝ : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
this : Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
⊢ ((fun x => x ^ s) ∘ fun x => (x + b) / (x + c)) =ᶠ[atTop] fun x => |x + b| ^ s / |x + c| ^ s

tactic: filter_upwards [eventually_gt_atTop (-b), eventually_gt_atTop (-c)] with x hb hc
state_before: case refine_2
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this✝ : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
this : Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
⊢ ((fun x => x ^ s) ∘ fun x => (x + b) / (x + c)) =ᶠ[atTop] fun x => |x + b| ^ s / |x + c| ^ s
state_after: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this✝ : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
this : Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
x : ℝ
hb : -b < x
hc : -c < x
⊢ ((fun x => x ^ s) ∘ fun x => (x + b) / (x + c)) x = |x + b| ^ s / |x + c| ^ s

tactic: rw [neg_lt_iff_pos_add] at hb hc
state_before: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this✝ : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
this : Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
x : ℝ
hb : -b < x
hc : -c < x
⊢ ((fun x => x ^ s) ∘ fun x => (x + b) / (x + c)) x = |x + b| ^ s / |x + c| ^ s
state_after: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this✝ : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
this : Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
x : ℝ
hb : 0 < x + b
hc : 0 < x + c
⊢ ((fun x => x ^ s) ∘ fun x => (x + b) / (x + c)) x = |x + b| ^ s / |x + c| ^ s

tactic: rw [Function.comp_apply, div_rpow hb.le hc.le, abs_of_pos hb, abs_of_pos hc]
state_before: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this✝ : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
this : Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
x : ℝ
hb : 0 < x + b
hc : 0 < x + c
⊢ ((fun x => x ^ s) ∘ fun x => (x + b) / (x + c)) x = |x + b| ^ s / |x + c| ^ s
state_after: no goals

tactic: simpa using tendsto_const_nhds.add ((tendsto_const_nhds (X := ℝ)).div_atTop tendsto_id)
state_before: a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
⊢ Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
state_after: no goals

tactic: refine (this.comp (tendsto_id.atTop_add (tendsto_const_nhds (x := c)))).congr' ?_
state_before: a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
⊢ Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
state_after: a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
⊢ ((fun x => 1 + (b - c) / x) ∘ fun x => id x + c) =ᶠ[atTop] fun x => (x + b) / (x + c)

tactic: filter_upwards [eventually_gt_atTop (-c)] with x hx
state_before: a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
⊢ ((fun x => 1 + (b - c) / x) ∘ fun x => id x + c) =ᶠ[atTop] fun x => (x + b) / (x + c)
state_after: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
x : ℝ
hx : -c < x
⊢ ((fun x => 1 + (b - c) / x) ∘ fun x => id x + c) x = (x + b) / (x + c)

tactic: field_simp [(by linarith : 0 < x + c).ne']
state_before: case h
a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
x : ℝ
hx : -c < x
⊢ ((fun x => 1 + (b - c) / x) ∘ fun x => id x + c) x = (x + b) / (x + c)
state_after: no goals

tactic: linarith
state_before: a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
x : ℝ
hx : -c < x
⊢ 0 < x + c
state_after: no goals

tactic: simp
state_before: a s b c : ℝ
h : Summable fun n => 1 / |↑n + b| ^ s
this✝ : Tendsto (fun x => 1 + (b - c) / x) atTop (𝓝 1)
this : Tendsto (fun x => (x + b) / (x + c)) atTop (𝓝 1)
⊢ 1 ≠ 0 ∨ 0 ≤ s
state_after: no goals