Theorem: HahnSeries.SummableFamily.hsum_smul
File: Mathlib/RingTheory/HahnSeries.lean

tactic: ext g
state_before: Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
⊢ hsum (x • s) = x * hsum s

tactic: simp only [mul_coeff, hsum_coeff, smul_apply]
state_before: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
⊢ coeff (hsum (x • s)) g = coeff (x * hsum s) g

tactic: refine'
  (Eq.trans (finsum_congr fun a => _)
        (finsum_sum_comm (addAntidiagonal x.isPwo_support s.isPwo_iUnion_support g)
          (fun i ij => x.coeff (Prod.fst ij) * (s i).coeff ij.snd) _)).trans
    _
state_before: case coeff.h
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
⊢ (∑ᶠ (i : α),
      ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (toFun s i))) g,
        coeff x ij.fst * coeff (toFun s i) ij.snd) =
    ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (hsum s))) g,
      coeff x x_1.fst * ∑ᶠ (i : α), coeff (toFun s i) x_1.snd

tactic: refine' sum_subset (addAntidiagonal_mono_right
  (Set.subset_iUnion (fun j => support (toFun s j)) a)) _
state_before: case coeff.h.refine'_1
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
a : α
⊢ ∑ ij in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (toFun s a))) g,
      coeff x ij.fst * coeff (toFun s a) ij.snd =
    ∑ b in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g,
      coeff x b.fst * coeff (toFun s a) b.snd

tactic: rintro ⟨i, j⟩ hU ha
state_before: case coeff.h.refine'_1
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
a : α
⊢ ∀ (x_1 : Γ × Γ),
    x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g →
      ¬x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (toFun s a))) g →
        coeff x x_1.fst * coeff (toFun s a) x_1.snd = 0

tactic: rw [mem_addAntidiagonal] at *
state_before: case coeff.h.refine'_1.mk
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
a : α
i j : Γ
hU : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g
ha : ¬(i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (toFun s a))) g
⊢ coeff x (i, j).fst * coeff (toFun s a) (i, j).snd = 0

tactic: rw [Classical.not_not.1 fun con => ha ⟨hU.1, con, hU.2.2⟩, MulZeroClass.mul_zero]
state_before: case coeff.h.refine'_1.mk
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
a : α
i j : Γ
hU : (i, j).fst ∈ support x ∧ ((i, j).snd ∈ ⋃ (a : α), support (toFun s a)) ∧ (i, j).fst + (i, j).snd = g
ha : ¬((i, j).fst ∈ support x ∧ (i, j).snd ∈ support (toFun s a) ∧ (i, j).fst + (i, j).snd = g)
⊢ coeff x (i, j).fst * coeff (toFun s a) (i, j).snd = 0

tactic: rintro ⟨i, j⟩ _
state_before: case coeff.h.refine'_2
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
⊢ ∀ (b : Γ × Γ),
    b ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g →
      Set.Finite (Function.support fun a => (fun i ij => coeff x ij.fst * coeff (toFun s i) ij.snd) a b)

tactic: refine' (s.finite_co_support j).subset _
state_before: case coeff.h.refine'_2.mk
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g i j : Γ
a✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g
⊢ Set.Finite (Function.support fun a => (fun i ij => coeff x ij.fst * coeff (toFun s i) ij.snd) a (i, j))

tactic: simp_rw [Function.support_subset_iff', Function.mem_support, Classical.not_not]
state_before: case coeff.h.refine'_2.mk
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g i j : Γ
a✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g
⊢ (Function.support fun a => (fun i ij => coeff x ij.fst * coeff (toFun s i) ij.snd) a (i, j)) ⊆
    Function.support fun a => coeff (toFun s a) j

tactic: intro a ha
state_before: case coeff.h.refine'_2.mk
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g i j : Γ
a✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g
⊢ ∀ (x_1 : α), coeff (toFun s x_1) j = 0 → coeff x i * coeff (toFun s x_1) j = 0

tactic: rw [ha, MulZeroClass.mul_zero]
state_before: case coeff.h.refine'_2.mk
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g i j : Γ
a✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g
a : α
ha : coeff (toFun s a) j = 0
⊢ coeff x i * coeff (toFun s a) j = 0

tactic: refine' (sum_congr rfl _).trans (sum_subset (addAntidiagonal_mono_right _) _).symm
state_before: case coeff.h.refine'_3
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
⊢ (∑ b in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g,
      ∑ᶠ (a : α), coeff x b.fst * coeff (toFun s a) b.snd) =
    ∑ x_1 in addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (hsum s))) g,
      coeff x x_1.fst * ∑ᶠ (i : α), coeff (toFun s i) x_1.snd

tactic: rintro ⟨i, j⟩ _
state_before: case coeff.h.refine'_3.refine'_1
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
⊢ ∀ (x_1 : Γ × Γ),
    x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g →
      (∑ᶠ (a : α), coeff x x_1.fst * coeff (toFun s a) x_1.snd) =
        coeff x x_1.fst * ∑ᶠ (i : α), coeff (toFun s i) x_1.snd

tactic: rw [mul_finsum]
state_before: case coeff.h.refine'_3.refine'_1.mk
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g i j : Γ
a✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g
⊢ (∑ᶠ (a : α), coeff x (i, j).fst * coeff (toFun s a) (i, j).snd) =
    coeff x (i, j).fst * ∑ᶠ (i_1 : α), coeff (toFun s i_1) (i, j).snd

tactic: apply s.finite_co_support
state_before: case coeff.h.refine'_3.refine'_1.mk.h
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g i j : Γ
a✝ : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g
⊢ Set.Finite (Function.support fun i_1 => coeff (toFun s i_1) (i, j).snd)

tactic: intro x hx
state_before: case coeff.h.refine'_3.refine'_2
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
⊢ support (hsum s) ⊆ ⋃ (a : α), support (toFun s a)

tactic: simp only [Set.mem_iUnion, Ne.def, mem_support]
state_before: case coeff.h.refine'_3.refine'_2
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x✝ : HahnSeries Γ R
s : SummableFamily Γ R α
g x : Γ
hx : x ∈ support (hsum s)
⊢ x ∈ ⋃ (a : α), support (toFun s a)

tactic: contrapose! hx
state_before: case coeff.h.refine'_3.refine'_2
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x✝ : HahnSeries Γ R
s : SummableFamily Γ R α
g x : Γ
hx : x ∈ support (hsum s)
⊢ ∃ i, ¬coeff (toFun s i) x = 0

tactic: simp [hx]
state_before: case coeff.h.refine'_3.refine'_2
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x✝ : HahnSeries Γ R
s : SummableFamily Γ R α
g x : Γ
hx : ∀ (i : α), coeff (toFun s i) x = 0
⊢ ¬x ∈ support (hsum s)

tactic: rintro ⟨i, j⟩ hU ha
state_before: case coeff.h.refine'_3.refine'_3
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g : Γ
⊢ ∀ (x_1 : Γ × Γ),
    x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g →
      ¬x_1 ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (hsum s))) g →
        (coeff x x_1.fst * ∑ᶠ (i : α), coeff (toFun s i) x_1.snd) = 0

tactic: rw [mem_addAntidiagonal] at *
state_before: case coeff.h.refine'_3.refine'_3.mk
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g i j : Γ
hU : (i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (⋃ (a : α), support (toFun s a))) g
ha : ¬(i, j) ∈ addAntidiagonal (_ : Set.IsPwo (support x)) (_ : Set.IsPwo (support (hsum s))) g
⊢ (coeff x (i, j).fst * ∑ᶠ (i_1 : α), coeff (toFun s i_1) (i, j).snd) = 0

tactic: rw [← hsum_coeff, Classical.not_not.1 fun con => ha ⟨hU.1, con, hU.2.2⟩,
  MulZeroClass.mul_zero]
state_before: case coeff.h.refine'_3.refine'_3.mk
Γ : Type u_1
R : Type u_2
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : Semiring R
α : Type u_3
x : HahnSeries Γ R
s : SummableFamily Γ R α
g i j : Γ
hU : (i, j).fst ∈ support x ∧ ((i, j).snd ∈ ⋃ (a : α), support (toFun s a)) ∧ (i, j).fst + (i, j).snd = g
ha : ¬((i, j).fst ∈ support x ∧ (i, j).snd ∈ support (hsum s) ∧ (i, j).fst + (i, j).snd = g)
⊢ (coeff x (i, j).fst * ∑ᶠ (i_1 : α), coeff (toFun s i_1) (i, j).snd) = 0