Theorem: HahnSeries.toMvPowerSeries_symm_apply_coeff
File: Mathlib/RingTheory/HahnSeries/PowerSeries.lean

Proof steps:
state_before: Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f : HahnSeries (σ →₀ ℕ) R
⊢ (fun f => { coeff := f, isPWO_support' := ⋯ }) ((fun f => f.coeff) f) = f
state_after: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f : HahnSeries (σ →₀ ℕ) R
x✝ : σ →₀ ℕ
⊢ ((fun f => { coeff := f, isPWO_support' := ⋯ }) ((fun f => f.coeff) f)).coeff x✝ = f.coeff x✝
tactic: ext
state_before: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f : HahnSeries (σ →₀ ℕ) R
x✝ : σ →₀ ℕ
⊢ ((fun f => { coeff := f, isPWO_support' := ⋯ }) ((fun f => f.coeff) f)).coeff x✝ = f.coeff x✝
state_after: no goals
tactic: simp
state_before: Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f : MvPowerSeries σ R
⊢ (fun f => f.coeff) ((fun f => { coeff := f, isPWO_support' := ⋯ }) f) = f
state_after: case h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f : MvPowerSeries σ R
n✝ : σ →₀ ℕ
⊢ (MvPowerSeries.coeff R n✝) ((fun f => f.coeff) ((fun f => { coeff := f, isPWO_support' := ⋯ }) f)) =
    (MvPowerSeries.coeff R n✝) f
tactic: ext
state_before: case h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f : MvPowerSeries σ R
n✝ : σ →₀ ℕ
⊢ (MvPowerSeries.coeff R n✝) ((fun f => f.coeff) ((fun f => { coeff := f, isPWO_support' := ⋯ }) f)) =
    (MvPowerSeries.coeff R n✝) f
state_after: no goals
tactic: simp
state_before: Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f g : HahnSeries (σ →₀ ℕ) R
⊢ { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
          right_inv := ⋯ }.toFun
      (f + g) =
    { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        f +
      { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        g
state_after: case h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f g : HahnSeries (σ →₀ ℕ) R
n✝ : σ →₀ ℕ
⊢ (MvPowerSeries.coeff R n✝)
      ({ toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        (f + g)) =
    (MvPowerSeries.coeff R n✝)
      ({ toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
              right_inv := ⋯ }.toFun
          f +
        { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
              right_inv := ⋯ }.toFun
          g)
tactic: ext
state_before: case h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f g : HahnSeries (σ →₀ ℕ) R
n✝ : σ →₀ ℕ
⊢ (MvPowerSeries.coeff R n✝)
      ({ toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        (f + g)) =
    (MvPowerSeries.coeff R n✝)
      ({ toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
              right_inv := ⋯ }.toFun
          f +
        { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
              right_inv := ⋯ }.toFun
          g)
state_after: no goals
tactic: simp
state_before: Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f g : HahnSeries (σ →₀ ℕ) R
⊢ { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
          right_inv := ⋯ }.toFun
      (f * g) =
    { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        f *
      { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        g
state_after: case h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f g : HahnSeries (σ →₀ ℕ) R
n : σ →₀ ℕ
⊢ (MvPowerSeries.coeff R n)
      ({ toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        (f * g)) =
    (MvPowerSeries.coeff R n)
      ({ toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
              right_inv := ⋯ }.toFun
          f *
        { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
              right_inv := ⋯ }.toFun
          g)
tactic: ext n
state_before: case h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f g : HahnSeries (σ →₀ ℕ) R
n : σ →₀ ℕ
⊢ (MvPowerSeries.coeff R n)
      ({ toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
            right_inv := ⋯ }.toFun
        (f * g)) =
    (MvPowerSeries.coeff R n)
      ({ toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
              right_inv := ⋯ }.toFun
          f *
        { toFun := fun f => f.coeff, invFun := fun f => { coeff := f, isPWO_support' := ⋯ }, left_inv := ⋯,
              right_inv := ⋯ }.toFun
          g)
state_after: case h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f g : HahnSeries (σ →₀ ℕ) R
n : σ →₀ ℕ
⊢ (MvPowerSeries.coeff R n) (f * g).coeff =
    ∑ p ∈ antidiagonal n, (MvPowerSeries.coeff R p.1) f.coeff * (MvPowerSeries.coeff R p.2) g.coeff
tactic: simp only [MvPowerSeries.coeff_mul]
state_before: case h
Γ : Type u_1
R : Type u_2
inst✝² : Semiring R
inst✝¹ : StrictOrderedSemiring Γ
σ : Type u_3
inst✝ : Finite σ
f g : HahnSeries (σ →₀ ℕ) R
n : σ →₀ ℕ
⊢ (MvPowerSeries.coeff R n) (f * g).coeff =
    ∑ p ∈ antidiagonal n, (MvPowerSeries.coeff R p.1) f.coeff * (MvPowerSeries.coeff R p.2) g.coeff
state_after: no goals
tactic: classical
      change (f * g).coeff n = _
      simp_rw [mul_coeff]
      refine (sum_filter_ne_zero _).symm.trans <| (sum_congr ?_ fun _ _ ↦ rfl).trans <|
        sum_filter_ne_zero _
      ext m
      simp only [and_congr_left_iff, mem_addAntidiagonal, mem_filter, mem_support,
        Finset.mem_antidiagonal]
      rintro h
      rw [and_iff_right (left_ne_zero_of_mul h), and_iff_right (right_ne_zero_of_mul h)]