Skip to content

Commit

Permalink
chore(algebra/divisibility): golf (#16327)
Browse files Browse the repository at this point in the history
  • Loading branch information
negiizhao committed Aug 31, 2022
1 parent 5b7bc67 commit 371b414
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/algebra/divisibility.lean
Expand Up @@ -259,8 +259,7 @@ section comm_monoid
variables [comm_monoid α]

theorem is_unit_iff_dvd_one {x : α} : is_unit x ↔ x ∣ 1 :=
by rintro ⟨u, rfl⟩; exact ⟨_, u.mul_inv.symm⟩,
λ ⟨y, h⟩, ⟨⟨x, y, h.symm, by rw [h, mul_comm]⟩, rfl⟩⟩
⟨is_unit.dvd, λ ⟨y, h⟩, ⟨⟨x, y, h.symm, by rw [h, mul_comm]⟩, rfl⟩⟩

theorem is_unit_iff_forall_dvd {x : α} :
is_unit x ↔ ∀ y, x ∣ y :=
Expand Down

0 comments on commit 371b414

Please sign in to comment.