66
66
lemma ne_one (hp : prime p) : p ≠ 1 :=
67
67
λ h, hp.2 .1 (h.symm ▸ is_unit_one)
68
68
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) :
70
70
p ∣ a ∨ p ∣ b :=
71
71
hp.2 .2 a b h
72
72
79
79
have := not_unit hp,
80
80
contradiction },
81
81
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,
83
83
{ assumption },
84
84
exact ih dvd_pow
85
85
end
@@ -97,7 +97,7 @@ lemma exists_mem_multiset_dvd_of_prime {s : multiset α} {p : α} (hp : prime p)
97
97
multiset.induction_on s (assume h, (hp.not_unit $ is_unit_of_dvd_one _ h).elim) $
98
98
assume a s ih h,
99
99
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
101
101
| or.inl h := ⟨a, multiset.mem_cons_self a s, h⟩
102
102
| or.inr h := let ⟨a, has, h⟩ := ih h in ⟨a, multiset.mem_cons_of_mem has, h⟩
103
103
end
166
166
lemma irreducible_of_prime [comm_cancel_monoid_with_zero α] {p : α} (hp : prime p) :
167
167
irreducible p :=
168
168
⟨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
170
170
(λ ⟨x, hx⟩, or.inr (is_unit_iff_dvd_one.2
171
171
⟨x, mul_right_cancel' (show a ≠ 0 , from λ h, by simp [*, prime] at *)
172
172
$ 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),
182
182
by simpa [mul_comm, pow_add, hx, hy, mul_assoc, mul_left_comm] using hz,
183
183
have hp0: p ^ (k + l) ≠ 0 , from pow_ne_zero _ hp.ne_zero,
184
184
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
186
186
(λ ⟨d, hd⟩, or.inl ⟨d, by simp [*, pow_succ, mul_comm, mul_left_comm, mul_assoc]⟩)
187
187
(λ ⟨d, hd⟩, or.inr ⟨d, by simp [*, pow_succ, mul_comm, mul_left_comm, mul_assoc]⟩)
188
188
@@ -283,7 +283,7 @@ lemma exists_associated_mem_of_dvd_prod [comm_cancel_monoid_with_zero α] {p :
283
283
multiset.induction_on s (by simp [mt is_unit_iff_dvd_one.2 hp.not_unit])
284
284
(λ a s ih hs hps, begin
285
285
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,
287
287
{ use [a, by simp],
288
288
cases h with u hu,
289
289
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) (
311
311
⟨(ne_zero_iff_of_associated h).1 hp.ne_zero,
312
312
let ⟨u, hu⟩ := h in
313
313
⟨λ ⟨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 }⟩⟩
315
315
316
316
lemma associated_of_irreducible_of_dvd [cancel_monoid_with_zero α] {p q : α}
317
317
(p_irr : irreducible p) (q_irr : irreducible q) (dvd : p ∣ q) : associated p q :=
0 commit comments