Theorem: HahnSeries.single_mul_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 : Γ
⊢ ((single b) r * x).coeff (a + b) = r * x.coeff a
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
⊢ ((single b) r * x).coeff (a + b) = r * x.coeff a

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
⊢ ((single b) r * x).coeff (a + b) = r * x.coeff a

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
⊢ ((single b) r * x).coeff (a + b) = r * x.coeff a
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), ((single b) r).coeff x_1.1 * x.coeff x_1.2 = r * x.coeff a

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), ((single b) r).coeff x_1.1 * x.coeff x_1.2 = r * x.coeff a
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), ((single b) r).coeff x_1.1 * x.coeff x_1.2 = r * x.coeff a

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), ((single b) r).coeff x_1.1 * x.coeff x_1.2 = r * x.coeff a

tactic: trans ∑ ij ∈ {(b, a)}, (single b r).coeff ij.fst * x.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), ((single b) r).coeff x_1.1 * x.coeff x_1.2 = r * x.coeff a
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), ((single b) r).coeff x_1.1 * x.coeff x_1.2 =
    ∑ ij ∈ {(b, a)}, ((single b) r).coeff ij.1 * x.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 ∈ {(b, a)}, ((single b) r).coeff ij.1 * x.coeff ij.2 = r * x.coeff a

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
⊢ ((single b) r * x).coeff (a + b) = r * x.coeff a
state_after: no goals

tactic: simp only [hx, mul_zero]
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), ((single b) r).coeff x_1.1 * x.coeff x_1.2 = r * x.coeff a
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), ((single b) r).coeff x_1.1 * x.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), ((single b) r).coeff x_1.1 * x.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 = b → a2 ∈ x.support → ¬a1 + a2 = a + b

tactic: rintro rfl h2 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 = b → a2 ∈ x.support → ¬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 : a2 ∈ x.support
h1 : a1 + a2 = a + a1
⊢ False

tactic: rw [add_comm] at 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 : Γ
hr : ¬r = 0
hx : x.coeff a = 0
a1 a2 : Γ
h2 : a2 ∈ x.support
h1 : a1 + a2 = a + a1
⊢ 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
hx : x.coeff a = 0
a1 a2 : Γ
h2 : a2 ∈ x.support
h1 : a2 + a1 = a + a1
⊢ 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 : a2 ∈ x.support
h1 : a2 + a1 = a + a1
⊢ 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 a2 : Γ
hx : x.coeff a2 = 0
h2 : a2 ∈ x.support
h1 : a2 + a1 = a + a1
⊢ 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 a2 : Γ
hx : x.coeff a2 = 0
h2 : a2 ∈ x.support
h1 : a2 + a1 = a + a1
⊢ 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), ((single b) r).coeff x_1.1 * x.coeff x_1.2 =
    ∑ ij ∈ {(b, a)}, ((single b) r).coeff ij.1 * x.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) = {(b, a)}

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) = {(b, a)}
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) ∈ {(b, a)}

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) ∈ {(b, a)}
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 = b ∧ a2 ∈ x.support ∧ a1 + a2 = a + b ↔ a1 = b ∧ a2 = a

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 = b ∧ a2 ∈ x.support ∧ a1 + a2 = a + b ↔ a1 = b ∧ a2 = a
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 = b ∧ a2 ∈ x.support ∧ a1 + a2 = a + b → a1 = b ∧ a2 = a

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 = b ∧ a2 = a → a1 = b ∧ a2 ∈ x.support ∧ 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 = b ∧ a2 ∈ x.support ∧ a1 + a2 = a + b → a1 = b ∧ a2 = a
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✝ : a2 ∈ x.support
h1 : a1 + a2 = a + a1
⊢ a1 = a1 ∧ a2 = a

tactic: rw [add_comm] at h1
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✝ : a2 ∈ x.support
h1 : a1 + a2 = a + a1
⊢ a1 = a1 ∧ a2 = a
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✝ : a2 ∈ x.support
h1 : a2 + a1 = a + a1
⊢ a1 = a1 ∧ a2 = a

tactic: exact ⟨rfl, add_right_cancel h1⟩
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✝ : a2 ∈ x.support
h1 : a2 + a1 = a + a1
⊢ a1 = a1 ∧ a2 = a
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 = b ∧ a2 = a → a1 = b ∧ a2 ∈ x.support ∧ 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 a2 = 0
⊢ a1 = a1 ∧ a2 ∈ x.support ∧ a1 + a2 = a2 + a1

tactic: exact ⟨rfl, by simp [hx], add_comm _ _⟩
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 a2 = 0
⊢ a1 = a1 ∧ a2 ∈ x.support ∧ a1 + a2 = a2 + a1
state_after: no goals

tactic: simp [hx]
state_before: Γ : 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 a2 = 0
⊢ a2 ∈ x.support
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 ∈ {(b, a)}, ((single b) r).coeff ij.1 * x.coeff ij.2 = r * x.coeff a
state_after: no goals