Stafford38/Geometry/ResidueBasisLocalization.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Mathlib.RingTheory.FiniteStability
3 public import Mathlib.RingTheory.Localization.BaseChange
4 public import Mathlib.RingTheory.Localization.FractionRing
5 public import Mathlib.RingTheory.Algebraic.Basic
6 
7 @[expose] public section
8 
9 noncomputable section
10 set_option autoImplicit false
11 
12 open scoped TensorProduct
13 
14 namespace Stafford38.Geometry.ResidueBasisLocalization
15 
16 /-- Inverting a coefficient domain inside a finite-type algebra is a base change to its
17 fraction field, hence remains finite type over that field. -/
18 theorem finiteType_fractionField_localization
19     {k R A : Type*} [Field k] [CommRing R] [IsDomain R] [CommRing A]
20     [Algebra k R] [Algebra k A] [Algebra R A] [IsScalarTower k R A]
21     [Algebra.FiniteType k A] :
22     Algebra.FiniteType (FractionRing R)
23       (Localization (Algebra.algebraMapSubmonoid A (nonZeroDivisors R))) := by
24   letI : Algebra.FiniteType R A :=
25     Algebra.FiniteType.of_restrictScalars_finiteType (R := k) (S := R) (A := A)
26   let e : (FractionRing R ⊗[R] A) ≃ₐ[FractionRing R]
27       Localization (Algebra.algebraMapSubmonoid A (nonZeroDivisors R)) :=
28     Localization.tensorRightAlgEquiv (nonZeroDivisors R) A
29   exact Algebra.FiniteType.equiv
30     (inferInstance : Algebra.FiniteType (FractionRing R) (FractionRing R ⊗[R] A)) e
31 
32 /-- The localized coefficient field remains embedded when the original coefficient domain
33 embeds in the finite-type domain. -/
34 theorem fractionField_localization_isDomain
35     {k R A : Type*} [Field k] [CommRing R] [IsDomain R] [CommRing A] [IsDomain A]
36     [Algebra k R] [Algebra k A] [Algebra R A] [IsScalarTower k R A]
37     (hinj : Function.Injective (algebraMap R A)) :
38     IsDomain (Localization (Algebra.algebraMapSubmonoid A (nonZeroDivisors R))) := by
39   have hM : Algebra.algebraMapSubmonoid A (nonZeroDivisors R) ≤ nonZeroDivisors A := by
40     change (nonZeroDivisors R).map (algebraMap R A) ≤ nonZeroDivisors A
41     rw [Submonoid.map_le_iff_le_comap]
42     intro r hr
43     apply mem_nonZeroDivisors_of_ne_zero
44     intro hzero
45     apply (mem_nonZeroDivisors_iff_ne_zero.mp hr)
46     exact hinj (by simpa using hzero)
47   exact IsLocalization.isDomain_of_le_nonZeroDivisors
48     (R := A) (S := Localization (Algebra.algebraMapSubmonoid A (nonZeroDivisors R))) hM
49 
50 /-- A prime ideal which is the kernel of a map to a field algebraic over the ground field is
51 maximal. This is the center-maximality step after the residue transcendence basis is inverted. -/
52 theorem ker_isMaximal_of_algebraic_residue
53     {E A K : Type*} [Field E] [CommRing A] [Field K]
54     [Algebra E A] [Algebra E K] [Algebra.IsAlgebraic E K]
55     (f : A →ₐ[E] K) : (RingHom.ker (f : A →+* K)).IsMaximal := by
56   let p : Ideal A := RingHom.ker (f : A →+* K)
57   have hzero : ∀ a : A, a ∈ p → f a = 0 := fun _ ha => RingHom.mem_ker.mp ha
58   let g : (A ⧸ p) →ₐ[E] K := Ideal.Quotient.liftₐ p f hzero
59   have hginj : Function.Injective (g : (A ⧸ p) →+* K) := by
60     apply RingHom.lift_injective_of_ker_le_ideal p hzero
61     exact le_rfl
62   let e : (A ⧸ p) ≃ₐ[E] g.range := AlgEquiv.ofInjective g hginj
63   have hrange : IsField g.range := Subalgebra.isField_of_algebraic (A := g.range)
64   exact Ideal.Quotient.maximal_of_isField p (e.toMulEquiv.isField hrange)
65 
66 #print axioms finiteType_fractionField_localization
67 #print axioms fractionField_localization_isDomain
68 #print axioms ker_isMaximal_of_algebraic_residue
69 
70 end Stafford38.Geometry.ResidueBasisLocalization
71