Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(algebra/divisibility): is_refl and is_trans instances for divisibility #14240

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/algebra/divisibility.lean
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ local attribute [simp] mul_assoc mul_comm mul_left_comm

alias dvd_trans ← has_dvd.dvd.trans

instance : is_trans α (∣) := ⟨λ a b c, dvd_trans⟩

@[simp] theorem dvd_mul_right (a b : α) : a ∣ a * b := dvd.intro b rfl

theorem dvd_mul_of_dvd_left (h : a ∣ b) (c : α) : a ∣ b * c :=
Expand Down Expand Up @@ -89,13 +91,11 @@ section monoid

variables [monoid α]

@[refl, simp] theorem dvd_refl (a : α) : a ∣ a :=
dvd.intro 1 (mul_one _)

lemma dvd_rfl {a : α} : a ∣ a :=
dvd_refl a
vihdzp marked this conversation as resolved.
Show resolved Hide resolved
@[refl, simp] theorem dvd_refl (a : α) : a ∣ a := dvd.intro 1 (mul_one a)
theorem dvd_rfl : ∀ {a : α}, a ∣ a := dvd_refl
instance : is_refl α (∣) := ⟨dvd_refl⟩

theorem one_dvd (a : α) : 1 ∣ a := dvd.intro a (one_mul _)
theorem one_dvd (a : α) : 1 ∣ a := dvd.intro a (one_mul a)

end monoid

Expand Down