Theorem: LSeriesSummable.congr'
File: Mathlib/NumberTheory/LSeries/Basic.lean

tactic: rw [← Nat.cofinite_eq_atTop] at h
state_before: f g : ℕ → ℂ
s : ℂ
h : f =ᶠ[atTop] g
hf : LSeriesSummable f s
⊢ LSeriesSummable g s
state_after: f g : ℕ → ℂ
s : ℂ
h : f =ᶠ[cofinite] g
hf : LSeriesSummable f s
⊢ LSeriesSummable g s

tactic: refine (summable_norm_iff.mpr hf).of_norm_bounded_eventually _ ?_
state_before: f g : ℕ → ℂ
s : ℂ
h : f =ᶠ[cofinite] g
hf : LSeriesSummable f s
⊢ LSeriesSummable g s
state_after: f g : ℕ → ℂ
s : ℂ
h : f =ᶠ[cofinite] g
hf : LSeriesSummable f s
⊢ ∀ᶠ (i : ℕ) in cofinite, ‖term g s i‖ ≤ ‖term f s i‖

tactic: have : term f s =ᶠ[cofinite] term g s := by
  rw [eventuallyEq_iff_exists_mem] at h ⊢
  obtain ⟨S, hS, hS'⟩ := h
  refine ⟨S \ {0}, diff_mem hS <| (Set.finite_singleton 0).compl_mem_cofinite, fun n hn ↦ ?_⟩
  simp only [Set.mem_diff, Set.mem_singleton_iff] at hn
  simp only [term_of_ne_zero hn.2, hS' hn.1]
state_before: f g : ℕ → ℂ
s : ℂ
h : f =ᶠ[cofinite] g
hf : LSeriesSummable f s
⊢ ∀ᶠ (i : ℕ) in cofinite, ‖term g s i‖ ≤ ‖term f s i‖
state_after: f g : ℕ → ℂ
s : ℂ
h : f =ᶠ[cofinite] g
hf : LSeriesSummable f s
this : term f s =ᶠ[cofinite] term g s
⊢ ∀ᶠ (i : ℕ) in cofinite, ‖term g s i‖ ≤ ‖term f s i‖

tactic: exact Eventually.mono this.symm fun n hn ↦ by simp only [hn, le_rfl]
state_before: f g : ℕ → ℂ
s : ℂ
h : f =ᶠ[cofinite] g
hf : LSeriesSummable f s
this : term f s =ᶠ[cofinite] term g s
⊢ ∀ᶠ (i : ℕ) in cofinite, ‖term g s i‖ ≤ ‖term f s i‖
state_after: no goals

tactic: rw [eventuallyEq_iff_exists_mem] at h ⊢
state_before: f g : ℕ → ℂ
s : ℂ
h : f =ᶠ[cofinite] g
hf : LSeriesSummable f s
⊢ term f s =ᶠ[cofinite] term g s
state_after: f g : ℕ → ℂ
s : ℂ
h : ∃ s ∈ cofinite, Set.EqOn f g s
hf : LSeriesSummable f s
⊢ ∃ s_1 ∈ cofinite, Set.EqOn (term f s) (term g s) s_1

tactic: obtain ⟨S, hS, hS'⟩ := h
state_before: f g : ℕ → ℂ
s : ℂ
h : ∃ s ∈ cofinite, Set.EqOn f g s
hf : LSeriesSummable f s
⊢ ∃ s_1 ∈ cofinite, Set.EqOn (term f s) (term g s) s_1
state_after: case intro.intro
f g : ℕ → ℂ
s : ℂ
hf : LSeriesSummable f s
S : Set ℕ
hS : S ∈ cofinite
hS' : Set.EqOn f g S
⊢ ∃ s_1 ∈ cofinite, Set.EqOn (term f s) (term g s) s_1

tactic: refine ⟨S \ {0}, diff_mem hS <| (Set.finite_singleton 0).compl_mem_cofinite, fun n hn ↦ ?_⟩
state_before: case intro.intro
f g : ℕ → ℂ
s : ℂ
hf : LSeriesSummable f s
S : Set ℕ
hS : S ∈ cofinite
hS' : Set.EqOn f g S
⊢ ∃ s_1 ∈ cofinite, Set.EqOn (term f s) (term g s) s_1
state_after: case intro.intro
f g : ℕ → ℂ
s : ℂ
hf : LSeriesSummable f s
S : Set ℕ
hS : S ∈ cofinite
hS' : Set.EqOn f g S
n : ℕ
hn : n ∈ S \ {0}
⊢ term f s n = term g s n

tactic: simp only [Set.mem_diff, Set.mem_singleton_iff] at hn
state_before: case intro.intro
f g : ℕ → ℂ
s : ℂ
hf : LSeriesSummable f s
S : Set ℕ
hS : S ∈ cofinite
hS' : Set.EqOn f g S
n : ℕ
hn : n ∈ S \ {0}
⊢ term f s n = term g s n
state_after: case intro.intro
f g : ℕ → ℂ
s : ℂ
hf : LSeriesSummable f s
S : Set ℕ
hS : S ∈ cofinite
hS' : Set.EqOn f g S
n : ℕ
hn : n ∈ S ∧ ¬n = 0
⊢ term f s n = term g s n

tactic: simp only [term_of_ne_zero hn.2, hS' hn.1]
state_before: case intro.intro
f g : ℕ → ℂ
s : ℂ
hf : LSeriesSummable f s
S : Set ℕ
hS : S ∈ cofinite
hS' : Set.EqOn f g S
n : ℕ
hn : n ∈ S ∧ ¬n = 0
⊢ term f s n = term g s n
state_after: no goals

tactic: simp only [hn, le_rfl]
state_before: f g : ℕ → ℂ
s : ℂ
h : f =ᶠ[cofinite] g
hf : LSeriesSummable f s
this : term f s =ᶠ[cofinite] term g s
n : ℕ
hn : term g s n = term f s n
⊢ ‖term g s n‖ ≤ ‖term f s n‖
state_after: no goals