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

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

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 (support x)) (_ : Set.IsPwo {b}) (a + b),
      coeff x x_1.fst * coeff (↑(single b) r) x_1.snd =
    coeff x a * r

tactic: trans ∑ ij : Γ × Γ in {(a, b)}, x.coeff ij.fst * (single b r).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 (support x)) (_ : Set.IsPwo {b}) (a + b),
      coeff x x_1.fst * coeff (↑(single b) r) x_1.snd =
    coeff x a * r

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

tactic: simp only [hx, MulZeroClass.zero_mul]
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 (support x)) (_ : Set.IsPwo {b}) (a + b),
      coeff x x_1.fst * coeff (↑(single b) r) x_1.snd =
    coeff x a * r

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 (support x)) (_ : Set.IsPwo {b}) (a + b),
      coeff x x_1.fst * coeff (↑(single b) r) 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 (support x)) (_ : Set.IsPwo {b}) (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 (support x)) (_ : Set.IsPwo {b}) (a + b) ↔ (a1, a2) ∈ ∅

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

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 : a1 ∈ support x
h1 : a1 + a2 = a + a2
⊢ 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 : Γ
hx : coeff x a1 = 0
a2 : Γ
h2 : a1 ∈ support x
h1 : a1 + a2 = a + a2
⊢ 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 (support x)) (_ : Set.IsPwo {b}) (a + b),
      coeff x x_1.fst * coeff (↑(single b) r) x_1.snd =
    ∑ ij in {(a, b)}, coeff x ij.fst * coeff (↑(single b) r) 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 (support x)) (_ : Set.IsPwo {b}) (a + b) = {(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_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 (support x)) (_ : Set.IsPwo {b}) (a + b) ↔ (a1, a2) ∈ {(a, b)}

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

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

tactic: refine' ⟨add_right_cancel h1, rfl⟩
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✝ : a1 ∈ support x
h1 : a1 + a2 = a + a2
⊢ a1 = a ∧ a2 = a2

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

tactic: simp [hx]
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 a1 = 0
⊢ a1 ∈ support x ∧ a2 = a2 ∧ a1 + a2 = a1 + a2

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 {(a, b)}, coeff x ij.fst * coeff (↑(single b) r) ij.snd = coeff x a * r