Theorem: HahnSeries.single_mul_coeff_add
File: Mathlib/RingTheory/HahnSeries.lean

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

tactic: simp only [hr, smul_coeff, mul_coeff, support_single_of_ne, Ne.def, not_false_iff, smul_eq_mul]
state_before: case neg
Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
⊢ coeff (↑(single b) r * x) (a + b) = r * coeff x a

tactic: by_cases hx : x.coeff a = 0
state_before: case neg
Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),
      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =
    r * coeff x a

tactic: trans ∑ ij : Γ × Γ in {(b, a)}, (single b r).coeff ij.fst * x.coeff ij.snd
state_before: case neg
Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬coeff x a = 0
⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),
      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =
    r * coeff x a

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

tactic: simp only [hx, MulZeroClass.mul_zero]
state_before: case pos
Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : coeff x a = 0
⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),
      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =
    r * coeff x a

tactic: rw [sum_congr _ fun _ _ => rfl, sum_empty]
state_before: case pos
Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : coeff x a = 0
⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),
      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =
    0

tactic: ext ⟨a1, a2⟩
state_before: Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : coeff x a = 0
⊢ addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b) = ∅

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_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : coeff x a = 0
a1 a2 : Γ
⊢ (a1, a2) ∈ addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b) ↔ (a1, a2) ∈ ∅

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

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

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

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

tactic: apply sum_congr _ fun _ _ => rfl
state_before: Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬coeff x a = 0
⊢ ∑ x_1 in addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b),
      coeff (↑(single b) r) x_1.fst * coeff x x_1.snd =
    ∑ ij in {(b, a)}, coeff (↑(single b) r) ij.fst * coeff x ij.snd

tactic: ext ⟨a1, a2⟩
state_before: Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬coeff x a = 0
⊢ addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b) = {(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_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬coeff x a = 0
a1 a2 : Γ
⊢ (a1, a2) ∈ addAntidiagonal (_ : Set.IsPwo {b}) (_ : Set.IsPwo (support x)) (a + b) ↔ (a1, a2) ∈ {(b, a)}

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

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

tactic: rw [add_comm] at h1
state_before: case a.mk.mp.intro.intro
Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a : Γ
hr : ¬r = 0
hx : ¬coeff x a = 0
a1 a2 : Γ
left✝ : a2 ∈ support x
h1 : a1 + a2 = a + a1
⊢ a1 = a1 ∧ a2 = a

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

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

tactic: exact ⟨rfl, by simp [hx], add_comm _ _⟩
state_before: case a.mk.mpr.intro
Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
hr : ¬r = 0
a1 a2 : Γ
hx : ¬coeff x a2 = 0
⊢ a1 = a1 ∧ a2 ∈ support x ∧ a1 + a2 = a2 + a1

tactic: simp [hx]
state_before: Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
hr : ¬r = 0
a1 a2 : Γ
hx : ¬coeff x a2 = 0
⊢ a2 ∈ support x

tactic: simp
state_before: Γ : Type u_2
R : Type u_1
inst✝¹ : OrderedCancelAddCommMonoid Γ
inst✝ : NonUnitalNonAssocSemiring R
r : R
x : HahnSeries Γ R
a b : Γ
hr : ¬r = 0
hx : ¬coeff x a = 0
⊢ ∑ ij in {(b, a)}, coeff (↑(single b) r) ij.fst * coeff x ij.snd = r * coeff x a