Skip to content

Commit 280b4e3

Browse files
committed
feat(RingTheory): etale local structure of quasi-finite algebras (leanprover-community#35036)
1 parent a5ff9c0 commit 280b4e3

7 files changed

Lines changed: 343 additions & 79 deletions

File tree

Mathlib/RingTheory/Etale/Basic.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ theorem of_isLocalizationAway (r : R) [IsLocalization.Away r A] : Etale R A wher
242242
formallyEtale := Algebra.FormallyEtale.of_isLocalization (Submonoid.powers r)
243243
finitePresentation := IsLocalization.Away.finitePresentation r
244244

245+
instance (s : A) [Algebra.Etale R A] : Algebra.Etale R (Localization.Away s) where
246+
245247
@[deprecated (since := "2025-11-03")] alias of_isLocalization_Away := of_isLocalizationAway
246248

247249
end Etale

Mathlib/RingTheory/Etale/QuasiFinite.lean

Lines changed: 298 additions & 77 deletions
Large diffs are not rendered by default.

Mathlib/RingTheory/Ideal/Over.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ theorem ne_bot_of_liesOver_of_ne_bot (hp : p ≠ ⊥) (P : Ideal B) [P.LiesOver
250250

251251
end CommRing
252252

253+
instance {K A : Type*} [Field K] [Semiring A] [Algebra K A] (P : Ideal A) [P.IsPrime] :
254+
P.LiesOver (⊥ : Ideal K) :=
255+
⟨((IsSimpleOrder.eq_bot_or_eq_top _).resolve_right Ideal.IsPrime.ne_top').symm⟩
253256
namespace Quotient
254257

255258
variable (R : Type*) [CommSemiring R] {A B C : Type*} [CommRing A] [CommRing B] [CommRing C]

Mathlib/RingTheory/Ideal/Prime.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ theorem isPrime_iff {I : Ideal α} : IsPrime I ↔ I ≠ ⊤ ∧ ∀ {x y : α},
4848
theorem IsPrime.ne_top {I : Ideal α} (hI : I.IsPrime) : I ≠ ⊤ :=
4949
hI.1
5050

51+
lemma notMem_of_isUnit (I : Ideal α) [I.IsPrime] {x : α} (hx : IsUnit x) : x ∉ I :=
52+
fun h ↦ ‹I.IsPrime›.ne_top (eq_top_of_isUnit_mem _ h hx)
53+
5154
theorem IsPrime.one_notMem {I : Ideal α} (hI : I.IsPrime) : 1 ∉ I :=
52-
mt (eq_top_iff_one I).2 hI.1
55+
notMem_of_isUnit _ isUnit_one
5356

5457
theorem one_notMem (I : Ideal α) [hI : I.IsPrime] : 1 ∉ I :=
5558
hI.one_notMem

Mathlib/RingTheory/LocalRing/ResidueField/Fiber.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ and the actual set-theoretic fiber of `PrimeSpectrum S → PrimeSpectrum R` at `
6363
abbrev Ideal.Fiber (p : Ideal R) [p.IsPrime] (S : Type*) [CommRing S] [Algebra R S] : Type _ :=
6464
p.ResidueField ⊗[R] S
6565

66+
instance (p : Ideal R) [p.IsPrime] (q : Ideal (p.Fiber S)) [q.IsPrime] : q.LiesOver p :=
67+
.trans _ (⊥ : Ideal p.ResidueField) _
68+
6669
lemma Ideal.Fiber.exists_smul_eq_one_tmul (x : p.Fiber S) : ∃ r ∉ p, ∃ s, r • x = 1 ⊗ₜ[R] s := by
6770
obtain ⟨r, hr, s, e⟩ := Ideal.ResidueField.exists_smul_eq_tmul_one _
6871
(Algebra.TensorProduct.comm _ _ _ x)

Mathlib/RingTheory/LocalRing/ResidueField/Ideal.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ noncomputable instance : Algebra (R ⧸ I) I.ResidueField :=
8989
instance (I : Ideal A) [I.IsPrime] : IsScalarTower R (A ⧸ I) I.ResidueField :=
9090
.of_algebraMap_eq' rfl
9191

92+
instance (I : Ideal R) [I.IsPrime] : (⊥ : Ideal I.ResidueField).LiesOver I :=
93+
⟨I.ker_algebraMap_residueField.symm⟩
94+
9295
@[simp]
9396
lemma Ideal.algebraMap_quotient_residueField_mk (x) :
9497
algebraMap (R ⧸ I) I.ResidueField (Ideal.Quotient.mk _ x) =

Mathlib/RingTheory/Localization/Away/Basic.lean

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,20 @@ end AtUnits
366366

367367
section Prod
368368

369-
lemma away_of_isIdempotentElem_of_mul {R S} [CommSemiring R] [CommSemiring S] [Algebra R S]
369+
lemma Away.algebraMap_surjective_of_isIdempotentElem
370+
(e : R) (he : IsIdempotentElem e) [IsLocalization.Away e S] :
371+
Function.Surjective (algebraMap R S) := by
372+
intro x
373+
obtain ⟨x, ⟨_, n, rfl⟩, rfl⟩ := IsLocalization.exists_mk'_eq (.powers e) x
374+
suffices ∃ a k, e ^ k * (a * e ^ n) = e ^ k * x by
375+
simpa [IsLocalization.eq_mk'_iff_mul_eq, ← map_pow, ← map_mul,
376+
IsLocalization.eq_iff_exists (.powers e), Submonoid.mem_powers_iff]
377+
refine ⟨x, 1, ?_⟩
378+
trans e ^ (n + 1) * x
379+
· ring
380+
· rw [he.pow_succ_eq]; ring
381+
382+
lemma away_of_isIdempotentElem_of_mul
370383
{e : R} (he : IsIdempotentElem e)
371384
(H : ∀ x y, algebraMap R S x = algebraMap R S y ↔ e * x = e * y)
372385
(H' : Function.Surjective (algebraMap R S)) :
@@ -502,6 +515,22 @@ lemma awayMap_bijective_of_dvd {R : Type*} [CommRing R] (f : R →+* S)
502515
Function.Bijective (awayMap f b) :=
503516
⟨awayMap_injective_of_dvd f h H.1, awayMap_surjective_of_dvd f h H.2
504517

518+
omit [Algebra R S] in
519+
lemma awayMap_awayMap_surjective (f : R →+* S) (a b : R)
520+
(H : Function.Surjective (awayMap f (a * b))) :
521+
Function.Surjective (awayMap (awayMap f a) (algebraMap _ _ b)) := by
522+
rw [awayMap_surjective_iff] at H ⊢
523+
suffices ∀ (s : S) (n : ℕ), ∃ c l m k, f (a ^ (k + n) * c) =
524+
f (a ^ (k + l) * b ^ m) * s by
525+
simpa [Function.Surjective, (IsLocalization.mk'_surjective (.powers (f a))).forall, ← map_pow,
526+
(IsLocalization.mk'_surjective (.powers a)).exists, Submonoid.mem_powers_iff, pow_add,
527+
Localization.awayMap, IsLocalization.Away.map, IsLocalization.map_mk', ← mul_assoc,
528+
IsLocalization.mk'_eq_iff_eq, ← map_mul, IsLocalization.eq_iff_exists (.powers (f a)),
529+
IsLocalization.mul_mk'_eq_mk'_of_mul]
530+
intro s n
531+
obtain ⟨c, m, e⟩ := H s
532+
exact ⟨c, n + m, m, 0, by simp [e, pow_add]; ring⟩
533+
505534
variable {A : Type*} [CommSemiring A] [Algebra R A]
506535
variable {B : Type*} [CommSemiring B] [Algebra R B]
507536

0 commit comments

Comments
 (0)