Theorem: EulerProduct.norm_tsum_factoredNumbers_sub_tsum_lt
File: Mathlib/NumberTheory/EulerProduct/Basic.lean

tactic: obtain ⟨N, hN⟩ :=
  summable_iff_nat_tsum_vanishing.mp hsum (Metric.ball 0 ε) <| Metric.ball_mem_nhds 0 εpos
state_before: R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
⊢ ∃ N, ∀ (s : Finset ℕ), N.primesBelow ≤ s → ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε
state_after: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N : ℕ
hN : ∀ t ⊆ {n | N ≤ n}, ∑' (n : ↑t), f ↑n ∈ Metric.ball 0 ε
⊢ ∃ N, ∀ (s : Finset ℕ), N.primesBelow ≤ s → ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε

tactic: simp_rw [mem_ball_zero_iff] at hN
state_before: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N : ℕ
hN : ∀ t ⊆ {n | N ≤ n}, ∑' (n : ↑t), f ↑n ∈ Metric.ball 0 ε
⊢ ∃ N, ∀ (s : Finset ℕ), N.primesBelow ≤ s → ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε
state_after: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N : ℕ
hN : ∀ t ⊆ {n | N ≤ n}, ‖∑' (n : ↑t), f ↑n‖ < ε
⊢ ∃ N, ∀ (s : Finset ℕ), N.primesBelow ≤ s → ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε

tactic: refine ⟨N, fun s hs ↦ ?_⟩
state_before: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N : ℕ
hN : ∀ t ⊆ {n | N ≤ n}, ‖∑' (n : ↑t), f ↑n‖ < ε
⊢ ∃ N, ∀ (s : Finset ℕ), N.primesBelow ≤ s → ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε
state_after: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N : ℕ
hN : ∀ t ⊆ {n | N ≤ n}, ‖∑' (n : ↑t), f ↑n‖ < ε
s : Finset ℕ
hs : N.primesBelow ≤ s
⊢ ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε

tactic: have := hN _ <| factoredNumbers_compl hs
state_before: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N : ℕ
hN : ∀ t ⊆ {n | N ≤ n}, ‖∑' (n : ↑t), f ↑n‖ < ε
s : Finset ℕ
hs : N.primesBelow ≤ s
⊢ ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε
state_after: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N : ℕ
hN : ∀ t ⊆ {n | N ≤ n}, ‖∑' (n : ↑t), f ↑n‖ < ε
s : Finset ℕ
hs : N.primesBelow ≤ s
this : ‖∑' (n : ↑((factoredNumbers s)ᶜ \ {0})), f ↑n‖ < ε
⊢ ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε

tactic: rwa [← tsum_subtype_add_tsum_subtype_compl hsum (factoredNumbers s),
  add_sub_cancel_left, tsum_eq_tsum_diff_singleton (factoredNumbers s)ᶜ hf₀]
state_before: case intro
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : Summable f
hf₀ : f 0 = 0
ε : ℝ
εpos : 0 < ε
N : ℕ
hN : ∀ t ⊆ {n | N ≤ n}, ‖∑' (n : ↑t), f ↑n‖ < ε
s : Finset ℕ
hs : N.primesBelow ≤ s
this : ‖∑' (n : ↑((factoredNumbers s)ᶜ \ {0})), f ↑n‖ < ε
⊢ ‖∑' (m : ℕ), f m - ∑' (m : ↑(factoredNumbers s)), f ↑m‖ < ε
state_after: no goals