Skip to content

Commit

Permalink
feat(algebra/group_with_zero/basic): mul_{left,right}_eq_self₀ (#11069)
Browse files Browse the repository at this point in the history
Defined on `cancel_monoid_with_zero`,
copying the name and proofs from `{left,right)_cancel_monoid`s,
  • Loading branch information
pechersky committed Dec 27, 2021
1 parent b28734c commit 002b8d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/algebra/group_with_zero/basic.lean
Expand Up @@ -445,6 +445,14 @@ by by_cases hc : c = 0; [simp [hc], simp [mul_left_inj', hc]]
@[simp] lemma mul_eq_mul_left_iff : a * b = a * c ↔ b = c ∨ a = 0 :=
by by_cases ha : a = 0; [simp [ha], simp [mul_right_inj', ha]]

lemma mul_right_eq_self₀ : a * b = a ↔ b = 1 ∨ a = 0 :=
calc a * b = a ↔ a * b = a * 1 : by rw mul_one
... ↔ b = 1 ∨ a = 0 : mul_eq_mul_left_iff

lemma mul_left_eq_self₀ : a * b = b ↔ a = 1 ∨ b = 0 :=
calc a * b = b ↔ a * b = 1 * b : by rw one_mul
... ↔ a = 1 ∨ b = 0 : mul_eq_mul_right_iff

/-- Pullback a `monoid_with_zero` class along an injective function.
See note [reducible non-instances]. -/
@[reducible]
Expand Down

0 comments on commit 002b8d9

Please sign in to comment.