Theorem: LSeries.term_convolution'
File: Mathlib/NumberTheory/LSeries/Convolution.lean

tactic: ext n
state_before: f g : ℕ → ℂ
s : ℂ
⊢ term (f ⍟ g) s = fun n => ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {n})), term f s (↑b).1 * term g s (↑b).2
state_after: case h
f g : ℕ → ℂ
s : ℂ
n : ℕ
⊢ term (f ⍟ g) s n = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {n})), term f s (↑b).1 * term g s (↑b).2

tactic: rcases eq_or_ne n 0 with rfl | hn
state_before: case h
f g : ℕ → ℂ
s : ℂ
n : ℕ
⊢ term (f ⍟ g) s n = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {n})), term f s (↑b).1 * term g s (↑b).2
state_after: case h.inl
f g : ℕ → ℂ
s : ℂ
⊢ term (f ⍟ g) s 0 = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑b).1 * term g s (↑b).2

case h.inr
f g : ℕ → ℂ
s : ℂ
n : ℕ
hn : n ≠ 0
⊢ term (f ⍟ g) s n = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {n})), term f s (↑b).1 * term g s (↑b).2

tactic: rw [show (fun p : ℕ × ℕ ↦ p.1 * p.2) ⁻¹' {n} = n.divisorsAntidiagonal by ext; simp [hn],
  Finset.tsum_subtype' n.divisorsAntidiagonal fun p ↦ term f s p.1 * term g s p.2,
  term_convolution f g s n]
state_before: case h.inr
f g : ℕ → ℂ
s : ℂ
n : ℕ
hn : n ≠ 0
⊢ term (f ⍟ g) s n = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {n})), term f s (↑b).1 * term g s (↑b).2
state_after: no goals

tactic: refine (term_zero ..).trans ?_
state_before: case h.inl
f g : ℕ → ℂ
s : ℂ
⊢ term (f ⍟ g) s 0 = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑b).1 * term g s (↑b).2
state_after: case h.inl
f g : ℕ → ℂ
s : ℂ
⊢ 0 = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑b).1 * term g s (↑b).2

tactic: have hS : (fun p ↦ p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0} := by
  ext
  simp only [mem_preimage, mem_singleton_iff, Nat.mul_eq_zero, mem_union, mem_prod, mem_univ,
    and_true, true_and]
state_before: case h.inl
f g : ℕ → ℂ
s : ℂ
⊢ 0 = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑b).1 * term g s (↑b).2
state_after: case h.inl
f g : ℕ → ℂ
s : ℂ
hS : (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0}
⊢ 0 = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑b).1 * term g s (↑b).2

tactic: have : ∀ p : (fun p : ℕ × ℕ ↦ p.1 * p.2) ⁻¹' {0}, term f s p.val.1 * term g s p.val.2 = 0 := by
  rintro ⟨⟨p₁, p₂⟩, hp⟩
  rcases hS ▸ hp with ⟨rfl, -⟩ | ⟨-, rfl⟩ <;> simp only [term_zero, zero_mul, mul_zero]
state_before: case h.inl
f g : ℕ → ℂ
s : ℂ
hS : (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0}
⊢ 0 = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑b).1 * term g s (↑b).2
state_after: case h.inl
f g : ℕ → ℂ
s : ℂ
hS : (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0}
this : ∀ (p : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑p).1 * term g s (↑p).2 = 0
⊢ 0 = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑b).1 * term g s (↑b).2

tactic: simp only [this, tsum_zero]
state_before: case h.inl
f g : ℕ → ℂ
s : ℂ
hS : (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0}
this : ∀ (p : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑p).1 * term g s (↑p).2 = 0
⊢ 0 = ∑' (b : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑b).1 * term g s (↑b).2
state_after: no goals

tactic: ext
state_before: f g : ℕ → ℂ
s : ℂ
⊢ (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0}
state_after: case h
f g : ℕ → ℂ
s : ℂ
x✝ : ℕ × ℕ
⊢ x✝ ∈ (fun p => p.1 * p.2) ⁻¹' {0} ↔ x✝ ∈ {0} ×ˢ univ ∪ univ ×ˢ {0}

tactic: simp only [mem_preimage, mem_singleton_iff, Nat.mul_eq_zero, mem_union, mem_prod, mem_univ,
  and_true, true_and]
state_before: case h
f g : ℕ → ℂ
s : ℂ
x✝ : ℕ × ℕ
⊢ x✝ ∈ (fun p => p.1 * p.2) ⁻¹' {0} ↔ x✝ ∈ {0} ×ˢ univ ∪ univ ×ˢ {0}
state_after: no goals

tactic: rintro ⟨⟨p₁, p₂⟩, hp⟩
state_before: f g : ℕ → ℂ
s : ℂ
hS : (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0}
⊢ ∀ (p : ↑((fun p => p.1 * p.2) ⁻¹' {0})), term f s (↑p).1 * term g s (↑p).2 = 0
state_after: case mk.mk
f g : ℕ → ℂ
s : ℂ
hS : (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0}
p₁ p₂ : ℕ
hp : (p₁, p₂) ∈ (fun p => p.1 * p.2) ⁻¹' {0}
⊢ term f s (↑⟨(p₁, p₂), hp⟩).1 * term g s (↑⟨(p₁, p₂), hp⟩).2 = 0

tactic: rcases hS ▸ hp with ⟨rfl, -⟩ | ⟨-, rfl⟩ <;> simp only [term_zero, zero_mul, mul_zero]
state_before: case mk.mk
f g : ℕ → ℂ
s : ℂ
hS : (fun p => p.1 * p.2) ⁻¹' {0} = {0} ×ˢ univ ∪ univ ×ˢ {0}
p₁ p₂ : ℕ
hp : (p₁, p₂) ∈ (fun p => p.1 * p.2) ⁻¹' {0}
⊢ term f s (↑⟨(p₁, p₂), hp⟩).1 * term g s (↑⟨(p₁, p₂), hp⟩).2 = 0
state_after: no goals

tactic: ext
state_before: f g : ℕ → ℂ
s : ℂ
n : ℕ
hn : n ≠ 0
⊢ (fun p => p.1 * p.2) ⁻¹' {n} = ↑n.divisorsAntidiagonal
state_after: case h
f g : ℕ → ℂ
s : ℂ
n : ℕ
hn : n ≠ 0
x✝ : ℕ × ℕ
⊢ x✝ ∈ (fun p => p.1 * p.2) ⁻¹' {n} ↔ x✝ ∈ ↑n.divisorsAntidiagonal

tactic: simp [hn]
state_before: case h
f g : ℕ → ℂ
s : ℂ
n : ℕ
hn : n ≠ 0
x✝ : ℕ × ℕ
⊢ x✝ ∈ (fun p => p.1 * p.2) ⁻¹' {n} ↔ x✝ ∈ ↑n.divisorsAntidiagonal
state_after: no goals