Theorem: HahnSeries.mul_single_coeff_add
File: Mathlib/RingTheory/HahnSeries/Multiplication.lean

tactic: by_cases hr : r = 0
state_before: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
⊢ (x * (single b) r).coeff (a + b) = x.coeff a * r
state_after: case pos
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : r = 0
⊢ (x * (single b) r).coeff (a + b) = x.coeff a * r

case neg
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
⊢ (x * (single b) r).coeff (a + b) = x.coeff a * r

tactic: simp only [hr, smul_coeff, mul_coeff, support_single_of_ne, Ne, not_false_iff, smul_eq_mul]
state_before: case neg
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
⊢ (x * (single b) r).coeff (a + b) = x.coeff a * r
state_after: case neg
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 = x.coeff a * r

tactic: by_cases hx : x.coeff a = 0
state_before: case neg
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 = x.coeff a * r
state_after: case pos
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 = x.coeff a * r

case neg
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 = x.coeff a * r

tactic: trans ∑ ij ∈ {(a, b)}, x.coeff ij.fst * (single b r).coeff ij.snd
state_before: case neg
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 = x.coeff a * r
state_after: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 =
    ∑ ij ∈ {(a, b)}, x.coeff ij.1 * ((single b) r).coeff ij.2

Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
⊢ ∑ ij ∈ {(a, b)}, x.coeff ij.1 * ((single b) r).coeff ij.2 = x.coeff a * r

tactic: simp [hr, mul_coeff]
state_before: case pos
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : r = 0
⊢ (x * (single b) r).coeff (a + b) = x.coeff a * r
state_after: no goals

tactic: simp only [hx, zero_mul]
state_before: case pos
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 = x.coeff a * r
state_after: case pos
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 = 0

tactic: rw [sum_congr _ fun _ _ => rfl, sum_empty]
state_before: case pos
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 = 0
state_after: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
⊢ addAntidiagonal ⋯ ⋯ (a + b) = ∅

tactic: ext ⟨a1, a2⟩
state_before: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
⊢ addAntidiagonal ⋯ ⋯ (a + b) = ∅
state_after: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
a1 a2 : Γ
⊢ (a1, a2) ∈ addAntidiagonal ⋯ ⋯ (a + b) ↔ (a1, a2) ∈ ∅

tactic: simp only [not_mem_empty, not_and, Set.mem_singleton_iff, Classical.not_not,
  mem_addAntidiagonal, Set.mem_setOf_eq, iff_false_iff]
state_before: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
a1 a2 : Γ
⊢ (a1, a2) ∈ addAntidiagonal ⋯ ⋯ (a + b) ↔ (a1, a2) ∈ ∅
state_after: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
a1 a2 : Γ
⊢ a1 ∈ x.support → a2 = b → ¬a1 + a2 = a + b

tactic: rintro h2 rfl h1
state_before: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : x.coeff a = 0
a1 a2 : Γ
⊢ a1 ∈ x.support → a2 = b → ¬a1 + a2 = a + b
state_after: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a : Γ
hr : ¬r = 0
hx : x.coeff a = 0
a1 a2 : Γ
h2 : a1 ∈ x.support
h1 : a1 + a2 = a + a2
⊢ False

tactic: rw [← add_right_cancel h1] at hx
state_before: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a : Γ
hr : ¬r = 0
hx : x.coeff a = 0
a1 a2 : Γ
h2 : a1 ∈ x.support
h1 : a1 + a2 = a + a2
⊢ False
state_after: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a : Γ
hr : ¬r = 0
a1 : Γ
hx : x.coeff a1 = 0
a2 : Γ
h2 : a1 ∈ x.support
h1 : a1 + a2 = a + a2
⊢ False

tactic: exact h2 hx
state_before: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a : Γ
hr : ¬r = 0
a1 : Γ
hx : x.coeff a1 = 0
a2 : Γ
h2 : a1 ∈ x.support
h1 : a1 + a2 = a + a2
⊢ False
state_after: no goals

tactic: apply sum_congr _ fun _ _ => rfl
state_before: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
⊢ ∑ x_1 ∈ addAntidiagonal ⋯ ⋯ (a + b), x.coeff x_1.1 * ((single b) r).coeff x_1.2 =
    ∑ ij ∈ {(a, b)}, x.coeff ij.1 * ((single b) r).coeff ij.2
state_after: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
⊢ addAntidiagonal ⋯ ⋯ (a + b) = {(a, b)}

tactic: ext ⟨a1, a2⟩
state_before: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
⊢ addAntidiagonal ⋯ ⋯ (a + b) = {(a, b)}
state_after: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
⊢ (a1, a2) ∈ addAntidiagonal ⋯ ⋯ (a + b) ↔ (a1, a2) ∈ {(a, b)}

tactic: simp only [Set.mem_singleton_iff, Prod.mk.inj_iff, mem_addAntidiagonal, mem_singleton,
  Set.mem_setOf_eq]
state_before: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
⊢ (a1, a2) ∈ addAntidiagonal ⋯ ⋯ (a + b) ↔ (a1, a2) ∈ {(a, b)}
state_after: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
⊢ a1 ∈ x.support ∧ a2 = b ∧ a1 + a2 = a + b ↔ a1 = a ∧ a2 = b

tactic: constructor
state_before: case a.mk
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
⊢ a1 ∈ x.support ∧ a2 = b ∧ a1 + a2 = a + b ↔ a1 = a ∧ a2 = b
state_after: case a.mk.mp
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
⊢ a1 ∈ x.support ∧ a2 = b ∧ a1 + a2 = a + b → a1 = a ∧ a2 = b

case a.mk.mpr
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
⊢ a1 = a ∧ a2 = b → a1 ∈ x.support ∧ a2 = b ∧ a1 + a2 = a + b

tactic: rintro ⟨_, rfl, h1⟩
state_before: case a.mk.mp
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
⊢ a1 ∈ x.support ∧ a2 = b ∧ a1 + a2 = a + b → a1 = a ∧ a2 = b
state_after: case a.mk.mp.intro.intro
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
left✝ : a1 ∈ x.support
h1 : a1 + a2 = a + a2
⊢ a1 = a ∧ a2 = a2

tactic: exact ⟨add_right_cancel h1, rfl⟩
state_before: case a.mk.mp.intro.intro
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
left✝ : a1 ∈ x.support
h1 : a1 + a2 = a + a2
⊢ a1 = a ∧ a2 = a2
state_after: no goals

tactic: rintro ⟨rfl, rfl⟩
state_before: case a.mk.mpr
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
a1 a2 : Γ
⊢ a1 = a ∧ a2 = b → a1 ∈ x.support ∧ a2 = b ∧ a1 + a2 = a + b
state_after: case a.mk.mpr.intro
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
hr : ¬r = 0
a1 a2 : Γ
hx : ¬x.coeff a1 = 0
⊢ a1 ∈ x.support ∧ a2 = a2 ∧ a1 + a2 = a1 + a2

tactic: simp [hx]
state_before: case a.mk.mpr.intro
Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
hr : ¬r = 0
a1 a2 : Γ
hx : ¬x.coeff a1 = 0
⊢ a1 ∈ x.support ∧ a2 = a2 ∧ a1 + a2 = a1 + a2
state_after: no goals

tactic: simp
state_before: Γ : Type u_1
Γ' : Type u_2
R : Type u_3
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬x.coeff a = 0
⊢ ∑ ij ∈ {(a, b)}, x.coeff ij.1 * ((single b) r).coeff ij.2 = x.coeff a * r
state_after: no goals