Skip to content

Commit 151dc54

Browse files
bump
1 parent 41e16d8 commit 151dc54

10 files changed

+45
-43
lines changed

FltRegular/NumberTheory/AuxLemmas.lean

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ lemma Ideal.comap_coe {R S F : Type*} [Semiring R] [Semiring S] [FunLike F R S]
1515
(f : F) (I : Ideal S) : I.comap (f : R →+* S) = I.comap f := rfl
1616

1717
-- Mathlib/RingTheory/IntegralClosure.lean
18-
lemma isIntegralClosure_self {R S : Type*} [CommRing R] [CommRing S] [Algebra R S]
19-
(hRS : Algebra.IsIntegral R S) : IsIntegralClosure S R S where
20-
algebraMap_injective' := Function.injective_id
21-
isIntegral_iff := fun {x} ↦ ⟨fun _ ↦ ⟨x, rfl⟩, fun _ ↦ hRS _⟩
18+
instance isIntegralClosure_self {R S : Type*} [CommRing R] [CommRing S] [Algebra R S]
19+
[Algebra.IsIntegral R S] : IsIntegralClosure S R S :=
20+
⟨Function.injective_id, fun {x} ↦ ⟨fun _ ↦ ⟨x, rfl⟩, fun _ ↦ Algebra.IsIntegral.isIntegral x⟩⟩
2221

2322
-- Mathlib/NumberTheory/RamificationInertia.lean
2423
section RamificationInertia
@@ -101,12 +100,13 @@ lemma IsIntegral_of_isLocalization (R S Rₚ Sₚ) [CommRing R] [CommRing S] [Co
101100
(algebraMap R S) (Submonoid.le_comap_map M) := by
102101
apply IsLocalization.ringHom_ext M
103102
simp only [IsLocalization.map_comp, ← IsScalarTower.algebraMap_eq]
103+
constructor
104104
intros x
105105
obtain ⟨x, ⟨_, t, ht, rfl⟩, rfl⟩ := IsLocalization.mk'_surjective
106106
(Algebra.algebraMapSubmonoid S M) x
107107
rw [IsLocalization.mk'_eq_mul_mk'_one]
108108
apply RingHom.IsIntegralElem.mul
109-
· exact IsIntegral.tower_top (IsIntegral.map (IsScalarTower.toAlgHom R S Sₚ) (hRS x))
109+
· exact IsIntegral.tower_top (IsIntegral.map (IsScalarTower.toAlgHom R S Sₚ) (hRS.1 x))
110110
· show IsIntegral _ _
111111
convert isIntegral_algebraMap (x := IsLocalization.mk' Rₚ 1 ⟨t, ht⟩)
112112
rw [this, IsLocalization.map_mk', _root_.map_one]

FltRegular/NumberTheory/Different.lean

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@ lemma pow_sub_one_dvd_differentIdeal
9292
{p : Ideal A} [p.IsMaximal] (P : Ideal B) (e : ℕ) (hp : p ≠ ⊥)
9393
(hP : P ^ e ∣ p.map (algebraMap A B)) : P ^ (e - 1) ∣ differentIdeal A B := by
9494
have : IsIntegralClosure B A (FractionRing B) :=
95-
IsIntegralClosure.of_isIntegrallyClosed _ _ _ (Algebra.IsIntegral.of_finite (R := A) (B := B))
95+
IsIntegralClosure.of_isIntegrallyClosed _ _ _
9696
have : IsLocalization (algebraMapSubmonoid B A⁰) (FractionRing B) :=
9797
IsIntegralClosure.isLocalization _ (FractionRing A) _ _
98-
(isAlgebraic_of_isFractionRing _ _ (Algebra.IsIntegral.of_finite (R := A) (B := B)))
9998
have : FiniteDimensional (FractionRing A) (FractionRing B) :=
10099
Module.Finite_of_isLocalization A B _ _ A⁰
101100
by_cases he : e = 0

FltRegular/NumberTheory/GaloisPrime.lean

+13-11
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ def primesOverFinset [IsDedekindDomain S] (p : Ideal R) :
3535
variable {S}
3636

3737
lemma primesOver_bot [Nontrivial R] [IsDomain S] [NoZeroSMulDivisors R S]
38-
(hRS : Algebra.IsIntegral R S) :
38+
[Algebra.IsIntegral R S] :
3939
primesOver S (⊥ : Ideal R) = {⊥} := by
4040
ext p
4141
simp only [primesOver, Set.mem_setOf_eq, Set.mem_singleton_iff]
42-
refine ⟨fun H ↦ Ideal.eq_bot_of_comap_eq_bot hRS H.2, ?_⟩
42+
refine ⟨fun H ↦ Ideal.eq_bot_of_comap_eq_bot H.2, ?_⟩
4343
rintro rfl
4444
rw [← RingHom.ker_eq_comap_bot, ← RingHom.injective_iff_ker_eq_bot]
4545
exact ⟨Ideal.bot_prime, NoZeroSMulDivisors.algebraMap_injective _ _⟩
@@ -78,10 +78,10 @@ lemma primesOver_finite [Ring.DimensionLEOne R] [IsDedekindDomain S] [NoZeroSMul
7878
· rw [primesOver_eq_empty_of_not_isPrime S p h]
7979
exact Set.finite_empty
8080

81-
lemma primesOver_nonempty [IsDomain S] [NoZeroSMulDivisors R S] (hRS : Algebra.IsIntegral R S)
81+
lemma primesOver_nonempty [IsDomain S] [NoZeroSMulDivisors R S] [Algebra.IsIntegral R S]
8282
(p : Ideal R) [p.IsPrime] : (primesOver S p).Nonempty := by
8383
have := Ideal.bot_prime (α := S)
84-
obtain ⟨Q, _, hQ⟩ := Ideal.exists_ideal_over_prime_of_isIntegral hRS p ⊥
84+
obtain ⟨Q, _, hQ⟩ := Ideal.exists_ideal_over_prime_of_isIntegral p ⊥
8585
(by rw [Ideal.comap_bot_of_injective _
8686
(NoZeroSMulDivisors.algebraMap_injective R S)]; exact bot_le)
8787
exact ⟨Q, hQ⟩
@@ -164,7 +164,8 @@ instance [IsGalois K L] (p : Ideal R) :
164164
by_cases hp : p = ⊥
165165
· subst hp
166166
have : Subsingleton (primesOver S (⊥ : Ideal R)) := by
167-
rw [primesOver_bot (IsIntegralClosure.isIntegral_algebra R L)]; infer_instance
167+
have : Algebra.IsIntegral R S := (IsIntegralClosure.isIntegral_algebra R L)
168+
rw [primesOver_bot]; infer_instance
168169
exact ⟨1, Subsingleton.elim _ _⟩
169170
have hP := isMaximal_of_mem_primesOver hp P.prop
170171
-- Suppose the contrary that `σ • P ≠ Q` for all `σ`.
@@ -242,17 +243,17 @@ lemma Ideal.ramificationIdxIn_bot : (⊥ : Ideal R).ramificationIdxIn S = 0 := b
242243
· exact dif_neg h
243244

244245
lemma Ideal.inertiaDegIn_bot [Nontrivial R] [IsDomain S] [NoZeroSMulDivisors R S] [IsNoetherian R S]
245-
(hRS : Algebra.IsIntegral R S) [H : (⊥ : Ideal R).IsMaximal] :
246+
[Algebra.IsIntegral R S] [H : (⊥ : Ideal R).IsMaximal] :
246247
(⊥ : Ideal R).inertiaDegIn S = FiniteDimensional.finrank R S := by
247248
delta inertiaDegIn
248-
rw [primesOver_bot hRS]
249+
rw [primesOver_bot]
249250
have : ({⊥} : Set (Ideal S)).Nonempty := by simp
250251
rw [dif_pos this, this.choose_spec]
251252
have hR := not_imp_not.mp (Ring.ne_bot_of_isMaximal_of_not_isField H) rfl
252-
have hS := isField_of_isIntegral_of_isField' hRS hR
253+
have hS := isField_of_isIntegral_of_isField' (S := S) hR
253254
letI : Field R := hR.toField
254255
letI : Field S := hS.toField
255-
have : IsIntegralClosure S R S := isIntegralClosure_self hRS
256+
have : IsIntegralClosure S R S := isIntegralClosure_self
256257
rw [← Ideal.map_bot (f := algebraMap R S), ← finrank_quotient_map (R := R) (S := S) ⊥ R S]
257258
exact inertiaDeg_algebraMap _ _
258259

@@ -358,11 +359,12 @@ lemma prod_smul_primesOver [IsGalois K L] (p : Ideal R) (P : primesOver S p) [p.
358359
by_cases hp : p = ⊥
359360
· subst hp
360361
have := P.prop
361-
simp_rw [primesOver_bot (S := S) (IsIntegralClosure.isIntegral_algebra R L),
362+
have hRS : Algebra.IsIntegral R S := IsIntegralClosure.isIntegral_algebra R L
363+
simp_rw [primesOver_bot (S := S),
362364
Set.mem_singleton_iff] at this
363365
simp_rw [coe_smul_primesOver, this,
364366
Ideal.comap_bot_of_injective _ (galRestrict R K L S _).injective, Finset.prod_const,
365-
Ideal.map_bot, Ideal.inertiaDegIn_bot R S (IsIntegralClosure.isIntegral_algebra R L)]
367+
Ideal.map_bot, Ideal.inertiaDegIn_bot R S]
366368
refine (zero_pow ?_).trans (zero_pow ?_).symm
367369
· rw [Finset.card_univ, Ne, Fintype.card_eq_zero_iff]
368370
simp only [not_isEmpty_of_nonempty, not_false_eq_true]

FltRegular/NumberTheory/Hilbert90.lean

-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ lemma Hilbert90_integral (σ : L ≃ₐ[K] L) (hσ : ∀ x, x ∈ Subgroup.zpowe
147147
haveI := IsIntegralClosure.isFractionRing_of_finite_extension A K L B
148148
have : IsLocalization (Algebra.algebraMapSubmonoid B A⁰) L :=
149149
IsIntegralClosure.isLocalization A K L B
150-
(Algebra.isAlgebraic_iff_isIntegral.mpr <| Algebra.IsIntegral.of_finite (R := K) (B := L))
151150
obtain ⟨ε, hε⟩ := Hilbert90 hσ hη
152151
obtain ⟨x, y, rfl⟩ := IsLocalization.mk'_surjective (Algebra.algebraMapSubmonoid B A⁰) ε
153152
obtain ⟨t, ht, ht'⟩ := y.prop

FltRegular/NumberTheory/Hilbert92.lean

+7-4
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ lemma LinearIndependent.update' {ι} [DecidableEq ι] {R} [CommRing R] [Module R
114114
Finsupp.total_pi_single, smul_add, smul_sub, smul_zero] at hl'
115115
rw [smul_comm σ (l' i) g, hg, ← LinearMap.map_smul, ← LinearMap.map_smul, smul_smul,
116116
← Finsupp.total_single, ← (Finsupp.total ι G R f).map_sub, ← map_add] at hl'
117-
replace hl' : ∀ j, (σ * l' j - (fun₀ | i => σ * l' i) j) + l' i * l j = 0 :=
118-
fun j ↦ DFunLike.congr_fun (hf _ hl') j
117+
replace hl' : ∀ j, (σ * l' j - (fun₀ | i => σ * l' i) j) + l' i * l j = 0 := by
118+
intro j
119+
exact DFunLike.congr_fun (hf _ hl') j
119120
simp only [Finsupp.single_apply] at hl'
120121
have : l' i = 0 := hl _ (by simpa using hl' i)
121122
simp only [this, zero_mul, add_zero, mul_zero, ite_self, sub_zero] at hl'
@@ -243,8 +244,10 @@ attribute [local instance] IsCyclic.commGroup
243244
attribute [local instance 2000] inst_ringOfIntegersAlgebra Algebra.toSMul Algebra.toModule
244245

245246
instance : IsScalarTower (𝓞 k) (𝓞 K) K := IsScalarTower.of_algebraMap_eq (fun _ ↦ rfl)
246-
instance : IsIntegralClosure (𝓞 K) (𝓞 k) K := IsIntegralClosure.of_isIntegrallyClosed _ _ _
247-
(fun x ↦ IsIntegral.tower_top (IsIntegralClosure.isIntegral ℤ K x))
247+
248+
instance : IsIntegralClosure (𝓞 K) (𝓞 k) K := by
249+
have : Algebra.IsIntegral (𝓞 k) (𝓞 K) := ⟨fun _ ↦ .tower_top (IsIntegralClosure.isIntegral ℤ K _)⟩
250+
apply IsIntegralClosure.of_isIntegrallyClosed
248251

249252
lemma coe_galRestrictHom_apply (σ : K →ₐ[k] K) (x) :
250253
(galRestrictHom (𝓞 k) k K (𝓞 K) σ x : K) = σ x :=

FltRegular/NumberTheory/IdealNorm.lean

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ variable (R S K L) [CommRing R] [CommRing S] [Field K] [Field L]
3232
[IsIntegrallyClosed S] [IsSeparable (FractionRing R) (FractionRing S)]
3333

3434
instance : IsIntegralClosure S R (FractionRing S) :=
35-
IsIntegralClosure.of_isIntegrallyClosed _ _ _ (Algebra.IsIntegral.of_finite (R := R) (B := S))
35+
IsIntegralClosure.of_isIntegrallyClosed _ _ _
36+
3637
instance : IsLocalization (Algebra.algebraMapSubmonoid S R⁰) (FractionRing S) :=
3738
IsIntegralClosure.isLocalization _ (FractionRing R) _ _
38-
(isAlgebraic_of_isFractionRing _ _ (Algebra.IsIntegral.of_finite (R := R) (B := S)))
39+
3940
instance : FiniteDimensional (FractionRing R) (FractionRing S) :=
4041
Module.Finite_of_isLocalization R S _ _ R⁰
4142

@@ -144,7 +145,7 @@ theorem spanIntNorm_localization (I : Ideal S) (M : Submonoid R) (hM : M ≤ R
144145
letI := IsFractionRing.isFractionRing_of_isDomain_of_isLocalization
145146
(Algebra.algebraMapSubmonoid S M) Sₘ L
146147
haveI : IsIntegralClosure Sₘ Rₘ L :=
147-
IsIntegralClosure.of_isIntegrallyClosed _ _ _ (Algebra.IsIntegral.of_finite (R := Rₘ) (B := Sₘ))
148+
IsIntegralClosure.of_isIntegrallyClosed _ _ _
148149
rw [map_spanIntNorm]
149150
refine span_eq_span (Set.image_subset_iff.mpr ?_) (Set.image_subset_iff.mpr ?_)
150151
· rintro a' ha'
@@ -346,8 +347,7 @@ theorem spanIntNorm_map (I : Ideal R) :
346347
RingHom.comp_assoc, ← IsScalarTower.algebraMap_eq, IsScalarTower.algebraMap_eq R S Sₚ,
347348
IsLocalization.map_comp, RingHom.comp_id, ← RingHom.comp_assoc, IsLocalization.map_comp,
348349
RingHom.comp_id, ← IsScalarTower.algebraMap_eq, ← IsScalarTower.algebraMap_eq]
349-
haveI : IsIntegralClosure Sₚ Rₚ L :=
350-
IsIntegralClosure.of_isIntegrallyClosed _ _ _ (Algebra.IsIntegral.of_finite (R := Rₚ) (B := Sₚ))
350+
haveI : IsIntegralClosure Sₚ Rₚ L := IsIntegralClosure.of_isIntegrallyClosed _ _ _
351351
haveI : IsSeparable (FractionRing Rₚ) (FractionRing Sₚ) := by
352352
apply IsSeparable.of_equiv_equiv (FractionRing.algEquiv Rₚ (FractionRing R)).symm.toRingEquiv
353353
(FractionRing.algEquiv Sₚ (FractionRing S)).symm.toRingEquiv

FltRegular/NumberTheory/KummersLemma/Field.lean

+4-5
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ theorem aeval_poly {L : Type*} [Field L] [Algebra K L] (α : L)
129129

130130
def polyRoot {L : Type*} [Field L] [Algebra K L] (α : L)
131131
(e : α ^ (p : ℕ) = algebraMap K L u) (m : ℕ) : 𝓞 L :=
132-
⟨((1 : L) - ζ ^ m • α) / (algebraMap K L (ζ - 1)), isIntegral_trans
133-
(show Algebra.IsIntegral ℤ (𝓞 K) from IsIntegralClosure.isIntegral_algebra ℤ K) _
132+
⟨((1 : L) - ζ ^ m • α) / (algebraMap K L (ζ - 1)), isIntegral_trans _
134133
⟨poly hp hζ u hcong, monic_poly hp hζ u hcong, aeval_poly hp hζ u hcong α e m⟩⟩
135134

136135
theorem roots_poly {L : Type*} [Field L] [Algebra K L] (α : L)
@@ -191,8 +190,8 @@ lemma isIntegralClosure_of_isScalarTower (R A K L B) [CommRing R] [CommRing A] [
191190
algebraMap_injective' := IsIntegralClosure.algebraMap_injective B R L
192191
isIntegral_iff := fun {x} ↦ by
193192
refine Iff.trans ?_ (IsIntegralClosure.isIntegral_iff (R := R) (A := B) (B := L))
194-
exact ⟨isIntegral_trans (IsIntegralClosure.isIntegral_algebra R (A := A) K) x,
195-
IsIntegral.tower_top⟩
193+
have := (IsIntegralClosure.isIntegral_algebra R (A := A) K)
194+
exact ⟨isIntegral_trans x, IsIntegral.tower_top⟩
196195

197196
instance {K L} [Field K] [Field L] [Algebra K L] :
198197
IsIntegralClosure (𝓞 L) (𝓞 K) L := isIntegralClosure_of_isScalarTower ℤ _ K _ _
@@ -250,7 +249,7 @@ lemma separable_poly_aux {L : Type*} [Field L] [Algebra K L] (α : L)
250249
simp only [map_mul, map_sub, IsPrimitiveRoot.val_unit'_coe, map_one, map_pow, hcoe] at hv
251250
have hα : IsIntegral (𝓞 K) α := by
252251
apply IsIntegral.of_pow p.pos; rw [e]; exact isIntegral_algebraMap
253-
have : IsUnit (⟨α, isIntegral_trans (IsIntegralClosure.isIntegral_algebra ℤ K) _ hα⟩ : 𝓞 L) := by
252+
have : IsUnit (⟨α, isIntegral_trans _ hα⟩ : 𝓞 L) := by
254253
rw [← isUnit_pow_iff p.pos.ne.symm]
255254
convert (algebraMap (𝓞 K) (𝓞 L)).isUnit_map u.isUnit
256255
ext; simp only [SubmonoidClass.coe_pow, e]; rfl

FltRegular/NumberTheory/Unramified.lean

+6-6
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,11 @@ lemma comap_map_eq_of_isUnramified [IsGalois K L] [IsUnramified R S] (I : Ideal
6565
have := NoZeroSMulDivisors.iff_algebraMap_injective.mpr hRS
6666
by_cases hIbot : I = ⊥
6767
· rw [hIbot, Ideal.comap_bot_of_injective _ hRS, Ideal.map_bot]
68-
have hIbot' : I.comap (algebraMap R S) ≠ ⊥ := mt (Ideal.eq_bot_of_comap_eq_bot
69-
(IsIntegralClosure.isIntegral_algebra R L)) hIbot
68+
have h1 : Algebra.IsIntegral R S := IsIntegralClosure.isIntegral_algebra R L
69+
have hIbot' : I.comap (algebraMap R S) ≠ ⊥ := mt Ideal.eq_bot_of_comap_eq_bot hIbot
7070
have : ∀ p, (p.IsPrime ∧ I.comap (algebraMap R S) ≤ p) → ∃ P ≥ I, P ∈ primesOver S p := by
7171
intro p ⟨hp₁, hp₂⟩
72-
exact Ideal.exists_ideal_over_prime_of_isIntegral
73-
(IsIntegralClosure.isIntegral_algebra R L) _ _ hp₂
72+
exact Ideal.exists_ideal_over_prime_of_isIntegral _ _ hp₂
7473
choose 𝔓 h𝔓 h𝔓' using this
7574
suffices I = ∏ p in (factors (I.comap <| algebraMap R S)).toFinset,
7675
(p.map (algebraMap R S)) ^ (if h : _ then (factors I).count (𝔓 p h) else 0) by
@@ -156,11 +155,12 @@ lemma isUnramifiedAt_iff_SquareFree_minpoly [NoZeroSMulDivisors R S] [IsDedekind
156155
this hpbot hx hx').symm.injective
157156

158157
lemma isUnramifiedAt_iff_SquareFree_minpoly_powerBasis [NoZeroSMulDivisors R S] [IsDedekindDomain S]
159-
(hRS : Algebra.IsIntegral R S) (pb : PowerBasis R S)
158+
[Algebra.IsIntegral R S] (pb : PowerBasis R S)
160159
(p : Ideal R) [p.IsPrime] (hpbot : p ≠ ⊥) :
161160
IsUnramifiedAt S p ↔ Squarefree ((minpoly R pb.gen).map (Ideal.Quotient.mk p)) := by
162-
rw [isUnramifiedAt_iff_SquareFree_minpoly p hpbot pb.gen _ (hRS _)]
161+
rw [isUnramifiedAt_iff_SquareFree_minpoly p hpbot pb.gen _ _]
163162
rw [conductor_eq_top_of_powerBasis, Ideal.comap_top, top_sup_eq]
163+
exact PowerBasis.isIntegral_gen pb
164164

165165
open nonZeroDivisors Polynomial
166166

lake-manifest.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[{"url": "https://github.com/leanprover-community/batteries",
55
"type": "git",
66
"subDir": null,
7-
"rev": "14f258593e8c261d8834f13c6edc7b970c253ee8",
7+
"rev": "7b3c48b58fa0ae1c8f27889bdb086ea5e4b27b06",
88
"name": "batteries",
99
"manifestFile": "lake-manifest.json",
1010
"inputRev": "main",
@@ -22,7 +22,7 @@
2222
{"url": "https://github.com/leanprover-community/aesop",
2323
"type": "git",
2424
"subDir": null,
25-
"rev": "f617e0673845925e612b62141ff54c4b7980dc63",
25+
"rev": "e8c8a42642ceb5af33708b79ae8a3148b681c236",
2626
"name": "aesop",
2727
"manifestFile": "lake-manifest.json",
2828
"inputRev": "master",
@@ -58,7 +58,7 @@
5858
{"url": "https://github.com/leanprover-community/mathlib4.git",
5959
"type": "git",
6060
"subDir": null,
61-
"rev": "3b462daa45f893202693b13e3965a7b4e1e7b631",
61+
"rev": "5bf1683fbb7de26aee023022376acb23c740b3f5",
6262
"name": "mathlib",
6363
"manifestFile": "lake-manifest.json",
6464
"inputRev": null,

lean-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
leanprover/lean4:v4.8.0-rc1
1+
leanprover/lean4:v4.8.0-rc2

0 commit comments

Comments
 (0)