-- Mathlib/Algebra/MonoidAlgebra/Defs.lean
theorem single_mul_apply_of_not_exists_mul [Mul G] (r : k) {g g' : G} (x : MonoidAlgebra k G)
    (h : ¬∃ d, g' = g * d) : (single g r * x) g' = 0

Proof state:
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (single g r * x) g' = 0

Tactic:
rw [mul_apply, Finsupp.sum_single_index]

Result:
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) = 0

k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then 0 * b₂ else 0) = 0

Proof state:
case h
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ ∀ x_1 ∈ x.support, (fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) x_1 (x x_1) = 0

Tactic:
simp_rw [ite_eq_right_iff]

Result:
case h
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ ∀ x_1 ∈ x.support, g * x_1 = g' → r * x x_1 = 0

Proof state:
case h
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g : G
x : MonoidAlgebra k G
g'' : G
_hg'' : g'' ∈ x.support
h : ¬∃ d, g * g'' = g * d
⊢ r * x g'' = 0

Tactic:
exfalso

Result:
case h
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g : G
x : MonoidAlgebra k G
g'' : G
_hg'' : g'' ∈ x.support
h : ¬∃ d, g * g'' = g * d
⊢ False

Proof state:
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then 0 * b₂ else 0) = 0

Tactic:
simp_rw [Finsupp.sum, zero_mul, ite_self, Finset.sum_const_zero]

Result:
no goals

Proof state:
case h
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g : G
x : MonoidAlgebra k G
g'' : G
_hg'' : g'' ∈ x.support
h : ¬∃ d, g * g'' = g * d
⊢ False

Tactic:
exact h ⟨_, rfl⟩

Result:
no goals

Proof state:
case h
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ ∀ x_1 ∈ x.support, g * x_1 = g' → r * x x_1 = 0

Tactic:
rintro g'' _hg'' rfl

Result:
case h
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g : G
x : MonoidAlgebra k G
g'' : G
_hg'' : g'' ∈ x.support
h : ¬∃ d, g * g'' = g * d
⊢ r * x g'' = 0

Proof state:
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) = 0

Tactic:
apply Finset.sum_eq_zero

Result:
case h
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ ∀ x_1 ∈ x.support, (fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) x_1 (x x_1) = 0

Proof state:
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) = 0

k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then 0 * b₂ else 0) = 0

Tactic:
swap

Result:
k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then 0 * b₂ else 0) = 0

k : Type u₁
G : Type u₂
inst✝¹ : Semiring k
inst✝ : Mul G
r : k
g g' : G
x : MonoidAlgebra k G
h : ¬∃ d, g' = g * d
⊢ (sum x fun a₂ b₂ => if g * a₂ = g' then r * b₂ else 0) = 0