Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 77033a0

Browse files
committed
chore(algebra/associated): rename div_or_div to dvd_or_dvd (#8589)
1 parent 65e2411 commit 77033a0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/algebra/associated.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ hp.2.1
6666
lemma ne_one (hp : prime p) : p ≠ 1 :=
6767
λ h, hp.2.1 (h.symm ▸ is_unit_one)
6868

69-
lemma div_or_div (hp : prime p) {a b : α} (h : p ∣ a * b) :
69+
lemma dvd_or_dvd (hp : prime p) {a b : α} (h : p ∣ a * b) :
7070
p ∣ a ∨ p ∣ b :=
7171
hp.2.2 a b h
7272

@@ -79,7 +79,7 @@ begin
7979
have := not_unit hp,
8080
contradiction },
8181
rw pow_succ at h,
82-
cases div_or_div hp h with dvd_a dvd_pow,
82+
cases dvd_or_dvd hp h with dvd_a dvd_pow,
8383
{ assumption },
8484
exact ih dvd_pow
8585
end
@@ -97,7 +97,7 @@ lemma exists_mem_multiset_dvd_of_prime {s : multiset α} {p : α} (hp : prime p)
9797
multiset.induction_on s (assume h, (hp.not_unit $ is_unit_of_dvd_one _ h).elim) $
9898
assume a s ih h,
9999
have p ∣ a * s.prod, by simpa using h,
100-
match hp.div_or_div this with
100+
match hp.dvd_or_dvd this with
101101
| or.inl h := ⟨a, multiset.mem_cons_self a s, h⟩
102102
| or.inr h := let ⟨a, has, h⟩ := ih h in ⟨a, multiset.mem_cons_of_mem has, h⟩
103103
end
@@ -166,7 +166,7 @@ end
166166
lemma irreducible_of_prime [comm_cancel_monoid_with_zero α] {p : α} (hp : prime p) :
167167
irreducible p :=
168168
⟨hp.not_unit, λ a b hab,
169-
(show a * b ∣ a ∨ a * b ∣ b, from hab ▸ hp.div_or_div (hab ▸ (dvd_refl _))).elim
169+
(show a * b ∣ a ∨ a * b ∣ b, from hab ▸ hp.dvd_or_dvd (hab ▸ (dvd_refl _))).elim
170170
(λ ⟨x, hx⟩, or.inr (is_unit_iff_dvd_one.2
171171
⟨x, mul_right_cancel' (show a ≠ 0, from λ h, by simp [*, prime] at *)
172172
$ by conv {to_lhs, rw hx}; simp [mul_comm, mul_assoc, mul_left_comm]⟩))
@@ -182,7 +182,7 @@ have h : p ^ (k + l) * (x * y) = p ^ (k + l) * (p * z),
182182
by simpa [mul_comm, pow_add, hx, hy, mul_assoc, mul_left_comm] using hz,
183183
have hp0: p ^ (k + l) ≠ 0, from pow_ne_zero _ hp.ne_zero,
184184
have hpd : p ∣ x * y, from ⟨z, by rwa [mul_right_inj' hp0] at h⟩,
185-
(hp.div_or_div hpd).elim
185+
(hp.dvd_or_dvd hpd).elim
186186
(λ ⟨d, hd⟩, or.inl ⟨d, by simp [*, pow_succ, mul_comm, mul_left_comm, mul_assoc]⟩)
187187
(λ ⟨d, hd⟩, or.inr ⟨d, by simp [*, pow_succ, mul_comm, mul_left_comm, mul_assoc]⟩)
188188

@@ -283,7 +283,7 @@ lemma exists_associated_mem_of_dvd_prod [comm_cancel_monoid_with_zero α] {p :
283283
multiset.induction_on s (by simp [mt is_unit_iff_dvd_one.2 hp.not_unit])
284284
(λ a s ih hs hps, begin
285285
rw [multiset.prod_cons] at hps,
286-
cases hp.div_or_div hps with h h,
286+
cases hp.dvd_or_dvd hps with h h,
287287
{ use [a, by simp],
288288
cases h with u hu,
289289
cases ((irreducible_of_prime (hs a (multiset.mem_cons.2
@@ -311,7 +311,7 @@ lemma prime_of_associated [comm_monoid_with_zero α] {p q : α} (h : p ~ᵤ q) (
311311
⟨(ne_zero_iff_of_associated h).1 hp.ne_zero,
312312
let ⟨u, hu⟩ := h in
313313
⟨λ ⟨v, hv⟩, hp.not_unit ⟨v * u⁻¹, by simp [hv, hu.symm]⟩,
314-
hu ▸ by { simp [units.mul_right_dvd], intros a b, exact hp.div_or_div }⟩⟩
314+
hu ▸ by { simp [units.mul_right_dvd], intros a b, exact hp.dvd_or_dvd }⟩⟩
315315

316316
lemma associated_of_irreducible_of_dvd [cancel_monoid_with_zero α] {p q : α}
317317
(p_irr : irreducible p) (q_irr : irreducible q) (dvd : p ∣ q) : associated p q :=

src/ring_theory/prime.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ begin
3636
have hit : i ∉ t, from λ hit, his (htus ▸ mem_union_left _ hit),
3737
have hiu : i ∉ u, from λ hiu, his (htus ▸ mem_union_right _ hiu),
3838
obtain ⟨d, rfl⟩ | ⟨d, rfl⟩ : p i ∣ b ∨ p i ∣ c,
39-
from hpi.div_or_div ⟨a, by rw [← hbc, mul_comm]⟩,
39+
from hpi.dvd_or_dvd ⟨a, by rw [← hbc, mul_comm]⟩,
4040
{ rw [mul_assoc, mul_comm a, mul_right_inj' hpi.ne_zero] at hbc,
4141
exact ⟨insert i t, u, d, c, by rw [insert_union, htus],
4242
disjoint_insert_left.2 ⟨hiu, htu⟩,

0 commit comments

Comments
 (0)