Theorem: PowerSeries.coeff_mul
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: symm
state_before: R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
⊢ ↑(coeff R n) (φ * ψ) = ∑ p in Finset.Nat.antidiagonal n, ↑(coeff R p.fst) φ * ↑(coeff R p.snd) ψ

tactic: apply Finset.sum_bij fun (p : ℕ × ℕ) _h => (single () p.1, single () p.2)
state_before: R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
⊢ ∑ p in Finset.Nat.antidiagonal n, ↑(coeff R p.fst) φ * ↑(coeff R p.snd) ψ = ↑(coeff R n) (φ * ψ)

tactic: rintro ⟨i, j⟩ hij
state_before: case hi
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
⊢ ∀ (a : ℕ × ℕ), a ∈ Finset.Nat.antidiagonal n → (single () a.fst, single () a.snd) ∈ Finsupp.antidiagonal (single () n)

tactic: rw [Finset.Nat.mem_antidiagonal] at hij
state_before: case hi.mk
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
i j : ℕ
hij : (i, j) ∈ Finset.Nat.antidiagonal n
⊢ (single () (i, j).fst, single () (i, j).snd) ∈ Finsupp.antidiagonal (single () n)

tactic: rw [Finsupp.mem_antidiagonal, ← Finsupp.single_add, hij]
state_before: case hi.mk
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
i j : ℕ
hij : (i, j).fst + (i, j).snd = n
⊢ (single () (i, j).fst, single () (i, j).snd) ∈ Finsupp.antidiagonal (single () n)

tactic: rintro ⟨i, j⟩ _hij
state_before: case h
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
⊢ ∀ (a : ℕ × ℕ),
    a ∈ Finset.Nat.antidiagonal n →
      ↑(coeff R a.fst) φ * ↑(coeff R a.snd) ψ =
        ↑(MvPowerSeries.coeff R (single () a.fst, single () a.snd).fst) φ *
          ↑(MvPowerSeries.coeff R (single () a.fst, single () a.snd).snd) ψ

tactic: rfl
state_before: case h.mk
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
i j : ℕ
_hij : (i, j) ∈ Finset.Nat.antidiagonal n
⊢ ↑(coeff R (i, j).fst) φ * ↑(coeff R (i, j).snd) ψ =
    ↑(MvPowerSeries.coeff R (single () (i, j).fst, single () (i, j).snd).fst) φ *
      ↑(MvPowerSeries.coeff R (single () (i, j).fst, single () (i, j).snd).snd) ψ

tactic: rintro ⟨i, j⟩ ⟨k, l⟩ _hij _hkl
state_before: case i_inj
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
⊢ ∀ (a₁ a₂ : ℕ × ℕ),
    a₁ ∈ Finset.Nat.antidiagonal n →
      a₂ ∈ Finset.Nat.antidiagonal n →
        (single () a₁.fst, single () a₁.snd) = (single () a₂.fst, single () a₂.snd) → a₁ = a₂

tactic: simpa only [Prod.mk.inj_iff, Finsupp.unique_single_eq_iff] using id
state_before: case i_inj.mk.mk
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
i j k l : ℕ
_hij : (i, j) ∈ Finset.Nat.antidiagonal n
_hkl : (k, l) ∈ Finset.Nat.antidiagonal n
⊢ (single () (i, j).fst, single () (i, j).snd) = (single () (k, l).fst, single () (k, l).snd) → (i, j) = (k, l)

tactic: rintro ⟨f, g⟩ hfg
state_before: case i_surj
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
⊢ ∀ (b : (Unit →₀ ℕ) × (Unit →₀ ℕ)),
    b ∈ Finsupp.antidiagonal (single () n) → ∃ a ha, b = (single () a.fst, single () a.snd)

tactic: refine' ⟨(f (), g ()), _, _⟩
state_before: case i_surj.mk
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
f g : Unit →₀ ℕ
hfg : (f, g) ∈ Finsupp.antidiagonal (single () n)
⊢ ∃ a ha, (f, g) = (single () a.fst, single () a.snd)

tactic: rw [Finsupp.mem_antidiagonal] at hfg
state_before: case i_surj.mk.refine'_1
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
f g : Unit →₀ ℕ
hfg : (f, g) ∈ Finsupp.antidiagonal (single () n)
⊢ (↑f (), ↑g ()) ∈ Finset.Nat.antidiagonal n

tactic: rw [Finset.Nat.mem_antidiagonal, ← Finsupp.add_apply, hfg, Finsupp.single_eq_same]
state_before: case i_surj.mk.refine'_1
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
f g : Unit →₀ ℕ
hfg : (f, g).fst + (f, g).snd = single () n
⊢ (↑f (), ↑g ()) ∈ Finset.Nat.antidiagonal n

tactic: rw [Prod.mk.inj_iff]
state_before: case i_surj.mk.refine'_2
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
f g : Unit →₀ ℕ
hfg : (f, g) ∈ Finsupp.antidiagonal (single () n)
⊢ (f, g) = (single () (↑f (), ↑g ()).fst, single () (↑f (), ↑g ()).snd)

tactic: dsimp
state_before: case i_surj.mk.refine'_2
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
f g : Unit →₀ ℕ
hfg : (f, g) ∈ Finsupp.antidiagonal (single () n)
⊢ f = single () (↑f (), ↑g ()).fst ∧ g = single () (↑f (), ↑g ()).snd

tactic: exact ⟨Finsupp.unique_single f, Finsupp.unique_single g⟩
state_before: case i_surj.mk.refine'_2
R : Type u_1
inst✝ : Semiring R
n : ℕ
φ ψ : PowerSeries R
f g : Unit →₀ ℕ
hfg : (f, g) ∈ Finsupp.antidiagonal (single () n)
⊢ f = single () (↑f ()) ∧ g = single () (↑g ())