Skip to content

Commit 5151ec1

Browse files
committed
feat(RingTheory/Ideal/Operations): drop IsDedekindDomain assumptions of some lemmas and move them to Ideal/Operations.lean (#17460)
Drop `[IsDedekindDomain R]` assumptions of some lemmas about ideal pow le a prime ideal and move them to `RingTheory/Ideal/Operations.lean`. Also add a lemma about product of elements in a prime ideal. Co-authored-by: Hu Yongle <2065545849@qq.com> Co-authored-by: Yongle Hu <2065545849@qq.com>
1 parent 4d57c2c commit 5151ec1

File tree

2 files changed

+34
-33
lines changed

2 files changed

+34
-33
lines changed

Mathlib/RingTheory/DedekindDomain/Ideal.lean

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,26 +1191,6 @@ theorem Ideal.le_mul_of_no_prime_factors {I J K : Ideal R}
11911191
(UniqueFactorizationMonoid.dvd_of_dvd_mul_right_of_no_prime_factors (b := K) hJ0 ?_ hJ)
11921192
exact fun hPJ hPK => mt Ideal.isPrime_of_prime (coprime _ hPJ hPK)
11931193

1194-
theorem Ideal.le_of_pow_le_prime {I P : Ideal R} [hP : P.IsPrime] {n : ℕ} (h : I ^ n ≤ P) :
1195-
I ≤ P := by
1196-
by_cases hP0 : P = ⊥
1197-
· simp only [hP0, le_bot_iff] at h ⊢
1198-
exact pow_eq_zero h
1199-
rw [← Ideal.dvd_iff_le] at h ⊢
1200-
exact ((Ideal.prime_iff_isPrime hP0).mpr hP).dvd_of_dvd_pow h
1201-
1202-
theorem Ideal.pow_le_prime_iff {I P : Ideal R} [_hP : P.IsPrime] {n : ℕ} (hn : n ≠ 0) :
1203-
I ^ n ≤ P ↔ I ≤ P :=
1204-
⟨Ideal.le_of_pow_le_prime, fun h => _root_.trans (Ideal.pow_le_self hn) h⟩
1205-
1206-
theorem Ideal.prod_le_prime {ι : Type*} {s : Finset ι} {f : ι → Ideal R} {P : Ideal R}
1207-
[hP : P.IsPrime] : ∏ i ∈ s, f i ≤ P ↔ ∃ i ∈ s, f i ≤ P := by
1208-
by_cases hP0 : P = ⊥
1209-
· simp only [hP0, le_bot_iff]
1210-
rw [← Ideal.zero_eq_bot, Finset.prod_eq_zero_iff]
1211-
simp only [← Ideal.dvd_iff_le]
1212-
exact ((Ideal.prime_iff_isPrime hP0).mpr hP).dvd_finset_prod_iff _
1213-
12141194
/-- The intersection of distinct prime powers in a Dedekind domain is the product of these
12151195
prime powers. -/
12161196
theorem IsDedekindDomain.inf_prime_pow_eq_prod {ι : Type*} (s : Finset ι) (f : ι → Ideal R)
@@ -1228,15 +1208,13 @@ theorem IsDedekindDomain.inf_prime_pow_eq_prod {ι : Type*} (s : Finset ι) (f :
12281208
rw [Finset.inf_insert, Finset.prod_insert ha, ih]
12291209
refine le_antisymm (Ideal.le_mul_of_no_prime_factors ?_ inf_le_left inf_le_right) Ideal.mul_le_inf
12301210
intro P hPa hPs hPp
1231-
obtain ⟨b, hb, hPb⟩ := Ideal.prod_le_prime.mp hPs
1211+
obtain ⟨b, hb, hPb⟩ := hPp.prod_le.mp hPs
12321212
haveI := Ideal.isPrime_of_prime (prime a (Finset.mem_insert_self a s))
12331213
haveI := Ideal.isPrime_of_prime (prime b (Finset.mem_insert_of_mem hb))
12341214
refine coprime a (Finset.mem_insert_self a s) b (Finset.mem_insert_of_mem hb) ?_ ?_
12351215
· exact (ne_of_mem_of_not_mem hb ha).symm
1236-
· refine ((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp
1237-
(Ideal.le_of_pow_le_prime hPa)).trans
1238-
((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp
1239-
(Ideal.le_of_pow_le_prime hPb)).symm
1216+
· refine ((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp (hPp.le_of_pow_le hPa)).trans
1217+
((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp (hPp.le_of_pow_le hPb)).symm
12401218
· exact (prime a (Finset.mem_insert_self a s)).ne_zero
12411219
· exact (prime b (Finset.mem_insert_of_mem hb)).ne_zero
12421220

@@ -1251,17 +1229,13 @@ noncomputable def IsDedekindDomain.quotientEquivPiOfProdEq {ι : Type*} [Fintype
12511229
simp only [← prod_eq, Finset.inf_eq_iInf, Finset.mem_univ, ciInf_pos,
12521230
← IsDedekindDomain.inf_prime_pow_eq_prod _ _ _ (fun i _ => prime i)
12531231
(coprime.set_pairwise _)])).trans <|
1254-
Ideal.quotientInfRingEquivPiQuotient _ fun i j hij => Ideal.coprime_of_no_prime_ge (by
1232+
Ideal.quotientInfRingEquivPiQuotient _ fun i j hij => Ideal.coprime_of_no_prime_ge <| by
12551233
intro P hPi hPj hPp
12561234
haveI := Ideal.isPrime_of_prime (prime i)
12571235
haveI := Ideal.isPrime_of_prime (prime j)
1258-
refine coprime hij ?_
1259-
refine ((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp
1260-
(Ideal.le_of_pow_le_prime hPi)).trans
1261-
((Ring.DimensionLeOne.prime_le_prime_iff_eq ?_).mp
1262-
(Ideal.le_of_pow_le_prime hPj)).symm
1263-
· exact (prime i).ne_zero
1264-
· exact (prime j).ne_zero)
1236+
exact coprime hij <| ((Ring.DimensionLeOne.prime_le_prime_iff_eq (prime i).ne_zero).mp
1237+
(hPp.le_of_pow_le hPi)).trans <| Eq.symm <|
1238+
(Ring.DimensionLeOne.prime_le_prime_iff_eq (prime j).ne_zero).mp (hPp.le_of_pow_le hPj)
12651239

12661240
open scoped Classical
12671241

Mathlib/RingTheory/Ideal/Operations.lean

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,10 +980,37 @@ theorem IsPrime.multiset_prod_mem_iff_exists_mem {I : Ideal R} (hI : I.IsPrime)
980980
s.prod ∈ I ↔ ∃ p ∈ s, p ∈ I := by
981981
simpa [span_singleton_le_iff_mem] using (hI.multiset_prod_map_le (span {·}))
982982

983+
theorem IsPrime.pow_le_iff {I P : Ideal R} [hP : P.IsPrime] {n : ℕ} (hn : n ≠ 0) :
984+
I ^ n ≤ P ↔ I ≤ P := by
985+
have h : (Multiset.replicate n I).prod ≤ P ↔ _ := hP.multiset_prod_le
986+
simp_rw [Multiset.prod_replicate, Multiset.mem_replicate, ne_eq, hn, not_false_eq_true,
987+
true_and, exists_eq_left] at h
988+
exact h
989+
990+
@[deprecated (since := "2024-10-06")] alias pow_le_prime_iff := IsPrime.pow_le_iff
991+
992+
theorem IsPrime.le_of_pow_le {I P : Ideal R} [hP : P.IsPrime] {n : ℕ} (h : I ^ n ≤ P) :
993+
I ≤ P := by
994+
by_cases hn : n = 0
995+
· rw [hn, pow_zero, one_eq_top] at h
996+
exact fun ⦃_⦄ _ ↦ h Submodule.mem_top
997+
· exact (pow_le_iff hn).mp h
998+
999+
@[deprecated (since := "2024-10-06")] alias le_of_pow_le_prime := IsPrime.le_of_pow_le
1000+
9831001
theorem IsPrime.prod_le {s : Finset ι} {f : ι → Ideal R} {P : Ideal R} (hp : IsPrime P) :
9841002
s.prod f ≤ P ↔ ∃ i ∈ s, f i ≤ P :=
9851003
hp.multiset_prod_map_le f
9861004

1005+
@[deprecated (since := "2024-10-06")] alias prod_le_prime := IsPrime.prod_le
1006+
1007+
/-- The product of a finite number of elements in the commutative semiring `R` lies in the
1008+
prime ideal `p` if and only if at least one of those elements is in `p`. -/
1009+
theorem IsPrime.prod_mem_iff {s : Finset ι} {x : ι → R} {p : Ideal R} [hp : p.IsPrime] :
1010+
∏ i in s, x i ∈ p ↔ ∃ i ∈ s, x i ∈ p := by
1011+
simp_rw [← span_singleton_le_iff_mem, ← prod_span_singleton]
1012+
exact hp.prod_le
1013+
9871014
theorem IsPrime.prod_mem_iff_exists_mem {I : Ideal R} (hI : I.IsPrime) (s : Finset R) :
9881015
s.prod (fun x ↦ x) ∈ I ↔ ∃ p ∈ s, p ∈ I := by
9891016
rw [Finset.prod_eq_multiset_prod, Multiset.map_id']

0 commit comments

Comments
 (0)