Skip to content

Commit

Permalink
chore(algebra/group/basic): add ite_one_mul and ite_zero_add (#9227)
Browse files Browse the repository at this point in the history
We already had the versions with the arguments in the other order.

Follows on from #3217
  • Loading branch information
eric-wieser committed Sep 17, 2021
1 parent 18d031d commit 5b75f5a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/algebra/group/basic.lean
Expand Up @@ -71,6 +71,11 @@ 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 ite_one_mul {P : Prop} [decidable P] {a b : M} :
ite P 1 (a * b) = ite P 1 a * ite P 1 b :=
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 }
Expand Down

0 comments on commit 5b75f5a

Please sign in to comment.