Skip to content

Commit

Permalink
chore(algebra/group/basic): Add eq_one_iff_eq_one_of_mul_eq_one (#5169)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-wieser committed Dec 1, 2020
1 parent 24596ca commit 2a68477
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/algebra/group/basic.lean
Expand Up @@ -62,6 +62,10 @@ lemma ite_mul_one {P : Prop} [decidable P] {a b : M} :
ite P (a * b) 1 = ite P a 1 * ite P b 1 :=
by { by_cases h : P; simp [h], }

@[to_additive]
lemma eq_one_iff_eq_one_of_mul_eq_one {a b : M} (h : a * b = 1) : a = 1 ↔ b = 1 :=
by split; { rintro rfl, simpa using h }

end monoid

section comm_semigroup
Expand Down

0 comments on commit 2a68477

Please sign in to comment.