Stafford38/Geometry/IntegralClosureCenterDVR.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.ProjectiveChartNormalizationCenter
3 public import Stafford38.Geometry.NormalizationHeightOne
4 public import Stafford38.Geometry.ProjectiveDVRCenter
5 public import Mathlib.RingTheory.Localization.LocalizationLocalization
6 public import Mathlib.RingTheory.Localization.FractionRing
7 public import Mathlib.RingTheory.DiscreteValuationRing.Basic
8 
9 @[expose] public section
10 
11 set_option autoImplicit false
12 set_option linter.style.haveILetI false
13 
14 noncomputable section
15 
16 namespace Stafford38.Geometry.IntegralClosureCenterDVR
17 
18 universe u
19 
20 variable {K : Type u} [Field K]
21 
22 local instance subringAlgebra (A : Subring K) : Algebra A K := A.subtype.toAlgebra
23 
24 /-- Passing from a domain to its integral closure in the same fraction-field
25 model does not change the fraction field. -/
26 theorem integralClosure_isFractionRing
27     (R : Subring K)
28     [IsFractionRing R K] :
29     IsFractionRing (integralClosure R K).toSubring K := by
30   let B := (integralClosure R K).toSubring
31   have hRB : R ≤ B := by
32     intro r hr
33     change IsIntegral R (algebraMap R K ⟨r, hr⟩)
34     exact isIntegral_algebraMap
35   let f : R →+* B := Subring.inclusion hRB
36   have hcomp : B.subtype.comp f = R.subtype := by
37     ext r
38     rfl
39   letI : FaithfulSMul B K :=
40     (faithfulSMul_iff_algebraMap_injective B K).mpr Subtype.val_injective
41   apply IsFractionRing.of_field B K
42   intro z
43   obtain ⟨a, b, hb, hz⟩ := IsFractionRing.div_surjective R z
44   refine ⟨f a, f b, ?_⟩
45   calc
46     z = algebraMap R K a / algebraMap R K b := hz.symm
47     _ = algebraMap B K (f a) / algebraMap B K (f b) := by
48       change R.subtype a / R.subtype b = B.subtype (f a) / B.subtype (f b)
49       simpa only [RingHom.comp_apply] using
50         congrArg (fun g : R →+* K => g a / g b) hcomp.symm
51 
52 /-- Once the center of a valuation ring on a noetherian normal affine
53 normalization has height one, its local ring is the same valuation ring.
54 This is the local-algebra endpoint only; the height-one premise is supplied
55 by the residue-basis localization argument. -/
56 theorem localNormalizationCenter_eq_valuationSubring
57     (R : Subring K) (V : ValuationSubring K)
58     (hRV : R ≤ V.toSubring)
59     [IsNoetherianRing (integralClosure R K).toSubring]
60     [IsIntegrallyClosed (integralClosure R K).toSubring]
61     [IsFractionRing (integralClosure R K).toSubring K]
62     [hCenterPrime : (Stafford38.Geometry.ProjectiveChartNormalizationCenter.integralClosureCenter
63       R V hRV).IsPrime]
64     (hh : (Stafford38.Geometry.ProjectiveChartNormalizationCenter.integralClosureCenter
65       R V hRV).height = 1) :
66     (@LocalSubring.ofPrime K _ (integralClosure R K).toSubring
67       (Stafford38.Geometry.ProjectiveChartNormalizationCenter.integralClosureCenter
68         R V hRV) hCenterPrime).toSubring = V.toSubring := by
69   let B : Subring K := (integralClosure R K).toSubring
70   letI : IsNoetherianRing B := inferInstance
71   letI : IsIntegrallyClosed B := inferInstance
72   letI : IsFractionRing B K := inferInstance
73   let p : Ideal B := Stafford38.Geometry.ProjectiveChartNormalizationCenter.integralClosureCenter
74     R V hRV
75   letI : p.IsPrime := hCenterPrime
76   have hlocDVR : IsDiscreteValuationRing (Localization.AtPrime p) :=
77     Stafford38.Geometry.NormalizationHeightOne.isDiscreteValuationRing_localization_of_height_eq_one
78       p hh
79   letI : IsDiscreteValuationRing (Localization.AtPrime p) := hlocDVR
80   let hle : B ≤ (LocalSubring.ofPrime B p).toSubring :=
81     LocalSubring.le_ofPrime B p
82   letI : Algebra B (LocalSubring.ofPrime B p).toSubring :=
83     (Subring.inclusion hle).toAlgebra
84   let e := LocalSubring.ofPrimeEquiv B p
85   letI : IsDiscreteValuationRing (LocalSubring.ofPrime B p).toSubring :=
86     IsDiscreteValuationRing.RingEquivClass.isDiscreteValuationRing e.toRingEquiv
87   let S : Subring K := (@LocalSubring.ofPrime K _ B p hCenterPrime).toSubring
88   letI : Algebra B S := (Subring.inclusion hle).toAlgebra
89   letI : IsScalarTower B S K := IsScalarTower.of_algebraMap_eq fun _ => rfl
90   letI : IsLocalization.AtPrime S p := inferInstance
91   letI : IsFractionRing S K :=
92     IsFractionRing.isFractionRing_of_isDomain_of_isLocalization p.primeCompl S K
93   have hdom :=
94     Stafford38.Geometry.ProjectiveChartNormalizationCenter.localRing_at_integralClosureCenter_le_valuationSubring
95       R V hRV hCenterPrime
96   have hfr : IsFractionRing S K := inferInstance
97   exact @Stafford38.Geometry.ProjectiveDVRCenter.dvr_eq_of_dominated_by_valuationSubring
98     K inferInstance S inferInstance hfr V hdom
99 
100 #print axioms localNormalizationCenter_eq_valuationSubring
101 #print axioms integralClosure_isFractionRing
102 
103 end Stafford38.Geometry.IntegralClosureCenterDVR
104