@@ -673,6 +673,13 @@ theorem ideal.prime_iff_is_prime {P : ideal A} (hP : P ≠ ⊥) :
673
673
prime P ↔ is_prime P :=
674
674
⟨ideal.is_prime_of_prime, ideal.prime_of_is_prime hP⟩
675
675
676
+ /-- In a Dedekind domain, the the prime ideals are the zero ideal together with the prime elements
677
+ of the monoid with zero `ideal A`. -/
678
+ theorem ideal.is_prime_iff_bot_or_prime {P : ideal A} :
679
+ is_prime P ↔ P = ⊥ ∨ prime P :=
680
+ ⟨λ hp, (eq_or_ne P ⊥).imp_right $ λ hp0, (ideal.prime_of_is_prime hp0 hp),
681
+ λ hp, hp.elim (λ h, h.symm ▸ ideal.bot_prime) ideal.is_prime_of_prime⟩
682
+
676
683
lemma ideal.strict_anti_pow (I : ideal A) (hI0 : I ≠ ⊥) (hI1 : I ≠ ⊤) :
677
684
strict_anti ((^) I : ℕ → ideal A) :=
678
685
strict_anti_nat_of_succ_lt $ λ e, ideal.dvd_not_unit_iff_lt.mp
@@ -899,10 +906,11 @@ section
899
906
900
907
open_locale classical
901
908
902
- lemma ideal.count_normalized_factors_eq {p x : ideal R} (hp0 : p ≠ ⊥) [hp : p.is_prime] {n : ℕ}
909
+ lemma ideal.count_normalized_factors_eq {p x : ideal R} [hp : p.is_prime] {n : ℕ}
903
910
(hle : x ≤ p^n) (hlt : ¬ (x ≤ p^(n+1 ))) :
904
911
(normalized_factors x).count p = n :=
905
- count_normalized_factors_eq ((ideal.prime_iff_is_prime hp0).mpr hp).irreducible
912
+ count_normalized_factors_eq'
913
+ ((ideal.is_prime_iff_bot_or_prime.mp hp).imp_right prime.irreducible)
906
914
(by { haveI : unique (ideal R)ˣ := ideal.unique_units, apply normalize_eq })
907
915
(by convert ideal.dvd_iff_le.mpr hle) (by convert mt ideal.le_of_dvd hlt)
908
916
/- Warning: even though a pure term-mode proof typechecks (the `by convert` can simply be
0 commit comments