Theorem: UniqueProds.toIsLeftCancelMul
File: Mathlib/Algebra/Group/UniqueProds.lean

tactic: have := mem_insert_self b1 {b2}
state_before: G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b1 b2 : G
he : a * b1 = a * b2
⊢ b1 = b2
state_after: G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b1 b2 : G
he : a * b1 = a * b2
this : b1 ∈ {b1, b2}
⊢ b1 = b2

tactic: obtain ⟨a, ha, b, hb, hu⟩ := uniqueMul_of_nonempty ⟨a, mem_singleton_self a⟩ ⟨b1, this⟩
state_before: G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b1 b2 : G
he : a * b1 = a * b2
this : b1 ∈ {b1, b2}
⊢ b1 = b2
state_after: case intro.intro.intro.intro
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a✝ b1 b2 : G
he : a✝ * b1 = a✝ * b2
this : b1 ∈ {b1, b2}
a : G
ha : a ∈ {a✝}
b : G
hb : b ∈ {b1, b2}
hu : UniqueMul {a✝} {b1, b2} a b
⊢ b1 = b2

tactic: cases mem_singleton.mp ha
state_before: case intro.intro.intro.intro
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a✝ b1 b2 : G
he : a✝ * b1 = a✝ * b2
this : b1 ∈ {b1, b2}
a : G
ha : a ∈ {a✝}
b : G
hb : b ∈ {b1, b2}
hu : UniqueMul {a✝} {b1, b2} a b
⊢ b1 = b2
state_after: case intro.intro.intro.intro.refl
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b1 b2 : G
he : a * b1 = a * b2
this : b1 ∈ {b1, b2}
b : G
hb : b ∈ {b1, b2}
ha : a ∈ {a}
hu : UniqueMul {a} {b1, b2} a b
⊢ b1 = b2

tactic: simp_rw [mem_insert, mem_singleton] at hb
state_before: case intro.intro.intro.intro.refl
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b1 b2 : G
he : a * b1 = a * b2
this : b1 ∈ {b1, b2}
b : G
hb : b ∈ {b1, b2}
ha : a ∈ {a}
hu : UniqueMul {a} {b1, b2} a b
⊢ b1 = b2
state_after: case intro.intro.intro.intro.refl
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b1 b2 : G
he : a * b1 = a * b2
this : b1 ∈ {b1, b2}
b : G
ha : a ∈ {a}
hu : UniqueMul {a} {b1, b2} a b
hb : b = b1 ∨ b = b2
⊢ b1 = b2

tactic: obtain rfl | rfl := hb
state_before: case intro.intro.intro.intro.refl
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b1 b2 : G
he : a * b1 = a * b2
this : b1 ∈ {b1, b2}
b : G
ha : a ∈ {a}
hu : UniqueMul {a} {b1, b2} a b
hb : b = b1 ∨ b = b2
⊢ b1 = b2
state_after: case intro.intro.intro.intro.refl.inl
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b2 b : G
ha : a ∈ {a}
he : a * b = a * b2
this : b ∈ {b, b2}
hu : UniqueMul {a} {b, b2} a b
⊢ b = b2

case intro.intro.intro.intro.refl.inr
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b1 b : G
ha : a ∈ {a}
he : a * b1 = a * b
this : b1 ∈ {b1, b}
hu : UniqueMul {a} {b1, b} a b
⊢ b1 = b

tactic: exact (hu ha (mem_insert_of_mem <| mem_singleton_self b2) he.symm).2.symm
state_before: case intro.intro.intro.intro.refl.inl
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b2 b : G
ha : a ∈ {a}
he : a * b = a * b2
this : b ∈ {b, b2}
hu : UniqueMul {a} {b, b2} a b
⊢ b = b2
state_after: no goals

tactic: exact (hu ha this he).2
state_before: case intro.intro.intro.intro.refl.inr
G : Type u
H : Type v
inst✝² : Mul G
inst✝¹ : Mul H
inst✝ : UniqueProds G
a b1 b : G
ha : a ∈ {a}
he : a * b1 = a * b
this : b1 ∈ {b1, b}
hu : UniqueMul {a} {b1, b} a b
⊢ b1 = b
state_after: no goals