This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a
1 module 2 public import Mathlib.RingTheory.SimpleRing.Principal 3 public import Stafford38.Geometry.ActualChartRelativeDegree 4 public import Stafford38.Geometry.ActualSelectedResidueBasis 5 public import Stafford38.Geometry.ActualChartCenterNonzero 6 public import Stafford38.Geometry.ActualChartCenterContraction 7 public import Stafford38.Geometry.ActualChartCenterHeight 8 public import Stafford38.Geometry.ActualResidueCenterHeight 9 public import Stafford38.Geometry.ActualChartResidueMapCoherence 10 public import Stafford38.Geometry.ActualNormalizationCenterResidueKernel 11 public import Stafford38.Geometry.ProjectiveChartNormalizationCenter 12 public import Stafford38.Geometry.ProjectiveChartNormalizationFinite 13 public import Stafford38.Geometry.IntegralClosureCenterDVR 14 public import Stafford38.Geometry.FiniteTypeCurveHeight 15 public import Stafford38.Geometry.SelectedResidueNormalizationLocalization 16 public import Stafford38.Geometry.FieldEquivFiniteType 17 public import Stafford38.Geometry.MvPolynomialFractionFieldTranscendenceBasis 18 public import Stafford38.Geometry.DVRUniformizerNumerator 19 public import Mathlib.RingTheory.IntegralClosure.IntegrallyClosed 20 public import Mathlib.RingTheory.Localization.FractionRing 21 22 @[expose] public section 23 24 set_option autoImplicit false 25 set_option maxHeartbeats 4000000 26 set_option synthInstance.maxHeartbeats 600000 27 set_option linter.style.haveILetI false 28 29 noncomputable section 30 31 namespace Stafford38.Geometry.ActualChartNormalizationCenter 32 33 open IsLocalRing 34 open Stafford38.Geometry.AsymptoticDivisorExistence 35 open Stafford38.Geometry.AsymptoticChartArcAdapter 36 open Stafford38.Geometry.ComponentProjectiveClosure 37 open Stafford38.Geometry.ComponentProjectiveChartKernel 38 open Stafford38.Geometry.ComponentFunctionFieldBoundary 39 open Stafford38.Geometry.ChartGenericPointFractionRing 40 open Stafford38.Geometry.GeneralDivisorialVisibleFrame 41 open Stafford38.Geometry.ProjectiveChartNormalizationCenter 42 open Stafford38.Geometry.RelativeCoefficientDVR 43 open Stafford38.Geometry.RelativeRetainedBoundaryPlace 44 open Stafford38.Geometry.RetainedGroundMapIdentification 45 open Stafford38.Geometry.SameWitnessTranscendenceDegreeBound 46 open Stafford38.Geometry.MvPolynomialFractionFieldTranscendenceBasis 47 48 universe u 49 50 /-- The canonical ring equivalence from a subalgebra carrier to its underlying 51 subring of the ambient field. -/ 52 def subalgebraToSubringRingEquiv 53 {R K : Type u} [CommRing R] [Field K] [Algebra R K] 54 (S : Subalgebra R K) : S ≃+* S.toSubring where 55 toFun x := ⟨x.1, by simpa using x.2⟩ 56 invFun x := ⟨x.1, by simpa using x.2⟩ 57 left_inv x := by apply Subtype.ext; rfl 58 right_inv x := by apply Subtype.ext; rfl 59 map_mul' x y := by apply Subtype.ext; rfl 60 map_add' x y := by apply Subtype.ext; rfl 61 62 /-- The same retained valuation has a height-one center after inverting any 63 specified finite residue-coordinate transcendence basis. The chosen basis and 64 coordinate representatives are inputs, so downstream constructions can use 65 the exact same data. No projective-scheme identification is asserted here. -/ 66 theorem actual_chart_normalization_center_height_one_of_selected_basis 67 {k : Type u} [Field k] [CharZero k] 68 {m : ℕ} (hm : 0 < m) 69 (P : PrimeSpectrum (MvPolynomial (Fin m) k)) 70 (w : GeneralDivisorialVisibleFrameWitness hm P) : 71 let C := w.column 72 let W := C.W 73 let F := ComponentFractionField P 74 letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra 75 let U := W.place.valuation 76 let V := U.toSubring 77 letI : IsDiscreteValuationRing V := W.place.isDiscrete 78 letI : IsLocalRing V := W.place.isDiscrete.toIsLocalRing 79 letI : Algebra W.coefficientField V := 80 (relativeCoefficientMap W.coefficientField W.place).toAlgebra 81 letI : Algebra k V := C.groundCoeff.toAlgebra 82 let κ := ResidueField V 83 let retained : Algebra k κ := retainedResidueGroundAlgebra P ⟨0, hm⟩ W 84 letI : Algebra k κ := retained 85 let e := chartAffineCoordinateEquiv C.chart 86 let Q : Subalgebra k F := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e)) 87 let hQV : Q.toSubring ≤ V := by 88 intro z hz 89 have hz' : z ∈ Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e)) := by 90 simpa [Q] using hz 91 exact Stafford38.Geometry.ActualChartValuationImage.chartGenericPointSubalgebra_le_valuationSubring 92 hm P w z hz' 93 ∀ (t : Set κ), t.Finite → 94 IsTranscendenceBasis k ((↑) : t → κ) → 95 ∀ (index : t → Fin m), Function.Injective index → 96 (∀ z : t, residue V (C.q (e (index z)).1) = (z : κ)) → 97 (ProjectiveChartNormalizationCenter.integralClosureCenter Q.toSubring U hQV).height = 1 := by 98 dsimp only 99 classical 100 let C := w.column 101 let W := C.W 102 let F := ComponentFractionField P 103 letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra 104 let U := W.place.valuation 105 let V := U.toSubring 106 letI : IsDiscreteValuationRing V := W.place.isDiscrete 107 letI : IsLocalRing V := W.place.isDiscrete.toIsLocalRing 108 letI : Algebra W.coefficientField V := 109 (relativeCoefficientMap W.coefficientField W.place).toAlgebra 110 letI : Algebra k V := C.groundCoeff.toAlgebra 111 letI : Algebra V F := V.subtype.toAlgebra 112 letI : IsScalarTower k V F := C.groundTower 113 let κ := ResidueField V 114 let retained : Algebra k κ := retainedResidueGroundAlgebra P ⟨0, hm⟩ W 115 letI : Algebra k κ := retained 116 have hretainedMap : @algebraMap k κ _ _ retained = 117 (residue V).comp C.groundCoeff := by 118 simpa [C, W, V, κ, C.groundCoeff_eq_retained] using w.retainedGroundMap 119 letI : IsScalarTower k V κ := IsScalarTower.of_algebraMap_eq fun c => by 120 have h := RingHom.congr_fun hretainedMap c 121 change algebraMap k κ c = residue V (C.groundCoeff c) 122 exact h 123 intro t htFinite htBasis index hindex hres 124 letI : Fintype t := htFinite.fintype 125 let e := chartAffineCoordinateEquiv C.chart 126 let Q : Subalgebra k F := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e)) 127 have hQV : Q.toSubring ≤ V := by 128 intro z hz 129 exact Stafford38.Geometry.ActualChartValuationImage.chartGenericPointSubalgebra_le_valuationSubring 130 hm P w z hz 131 have hground : ∀ c : k, (algebraMap k V c : F) = algebraMap k F c := by 132 intro c 133 exact DFunLike.congr_fun C.groundCoeff_commutes c 134 let x : t → Q := fun z => 135 ⟨chartGenericPoint P C.chart e (index z), 136 Algebra.subset_adjoin (R := k) (A := F) (Set.mem_range_self (index z))⟩ 137 have hx : ∀ z : t, residue V ⟨(x z : F), hQV (x z).property⟩ = (z : κ) := by 138 intro z 139 have hnorm := chartGenericPoint_eq_normalized_lift 140 (P := P) (V := V) C.chart e C.q C.scale C.chart_one C.q_commonScale 141 have hxV : (⟨(x z : F), hQV (x z).property⟩ : V) = C.q (e (index z)).1 := by 142 apply Subtype.ext 143 change chartGenericPoint P C.chart e (index z) = (C.q (e (index z)).1 : F) 144 exact congrFun hnorm (index z) 145 rw [hxV] 146 exact hres z 147 have hbound : Algebra.trdeg k F ≤ Algebra.trdeg k κ + 1 := 148 component_trdeg_le_residue_trdeg_add_one_of_witness hm P w 149 obtain ⟨eA, fA, iA, g, fEV, fEF, hg, hgenA, hfA, hgvar, 150 hresE, hfE, hiA, hgen, htrdeg⟩ := 151 Stafford38.Geometry.ActualChartRelativeDegree.same_witness_component_trdeg_one_from_basis 152 hm P w t htFinite htBasis index hres 153 let E := FractionRing (MvPolynomial t k) 154 let P0 := MvPolynomial t k 155 let R0 : Subalgebra k Q := Algebra.adjoin k (Set.range x) 156 let B := integralClosure Q.toSubring F 157 letI : Field E := FractionRing.field P0 158 letI : Algebra E κ := g.toRingHom.toAlgebra 159 letI : IsScalarTower k E κ := IsScalarTower.of_algebraMap_eq fun c => 160 (g.commutes c).symm 161 have hvars : IsTranscendenceBasis k (fun z : t => 162 algebraMap E κ (algebraMap P0 E (MvPolynomial.X z))) := by 163 change IsTranscendenceBasis k 164 (fun z : t => g (algebraMap P0 E (MvPolynomial.X z))) 165 have hfun : (fun z : t => g (algebraMap P0 E (MvPolynomial.X z))) = 166 ((↑) : t → κ) := by 167 funext z 168 exact hgvar z 169 rw [hfun] 170 exact htBasis 171 have hκalg : Algebra.IsAlgebraic E κ := 172 isAlgebraic_fractionRing_of_variable_images_isTranscendenceBasis hvars 173 letI : Algebra E F := fEF.toRingHom.toAlgebra 174 obtain ⟨j, fB, fLoc, hjF, hfBF, hLoc, hcomp⟩ := 175 Stafford38.Geometry.SelectedResidueCoefficientLocalization.exists_chart_normalization_localization_map 176 Q U hground hQV htBasis x hx 177 have hchartPoint : componentProjectivePoint P C.chart ≠ 0 := by 178 intro hz 179 have hq := C.q_commonScale C.chart 180 change (C.q C.chart : F) = C.scale * componentProjectivePoint P C.chart at hq 181 have hq1 : (C.q C.chart : F) = 1 := congrArg Subtype.val C.chart_one 182 rw [hz, mul_zero, hq1] at hq 183 exact one_ne_zero hq 184 letI : Algebra Q.toSubring F := Q.toSubring.subtype.toAlgebra 185 have hQfrac : IsFractionRing Q.toSubring F := 186 by 187 let hQ : IsFractionRing Q F := 188 chartGenericPointSubalgebra_isFractionRing P C.chart e hchartPoint 189 letI : IsFractionRing Q F := hQ 190 letI : FaithfulSMul Q.toSubring F := 191 (faithfulSMul_iff_algebraMap_injective Q.toSubring F).mpr Subtype.val_injective 192 apply IsFractionRing.of_field Q.toSubring F 193 intro z 194 obtain ⟨a, b, hb, hz⟩ := IsFractionRing.div_surjective Q z 195 let eqv := subalgebraToSubringRingEquiv Q 196 refine ⟨eqv a, eqv b, ?_⟩ 197 change z = (eqv a : F) / (eqv b : F) 198 calc 199 z = (a : F) / (b : F) := hz.symm 200 _ = (eqv a : F) / (eqv b : F) := by rfl 201 letI : IsFractionRing Q.toSubring F := hQfrac 202 letI : Algebra k Q.toSubring := Q.algebra 203 letI : IsScalarTower k Q.toSubring F := IsScalarTower.of_algebraMap_eq fun _ => rfl 204 have hQfinite : Algebra.FiniteType k Q.toSubring := by 205 change Algebra.FiniteType k Q 206 exact chartGenericPointSubalgebra_finiteType P C.chart e 207 letI : Algebra k B := Algebra.compHom B (algebraMap k Q.toSubring) 208 letI : IsScalarTower k Q.toSubring B := IsScalarTower.of_algebraMap_eq fun _ => rfl 209 have hBfinite : Algebra.FiniteType k B := 210 Stafford38.Geometry.ProjectiveChartNormalizationFinite.integralClosure_finiteType_over_base 211 k Q.toSubring F 212 have hBfracSubring : IsFractionRing B.toSubring F := 213 Stafford38.Geometry.IntegralClosureCenterDVR.integralClosure_isFractionRing Q.toSubring 214 letI : IsFractionRing B.toSubring F := hBfracSubring 215 letI : FaithfulSMul B F := 216 (faithfulSMul_iff_algebraMap_injective B F).mpr Subtype.val_injective 217 have hBfrac : IsFractionRing B F := by 218 apply IsFractionRing.of_field B F 219 intro z 220 obtain ⟨a, b, hb, hz⟩ := IsFractionRing.div_surjective B.toSubring z 221 let e := subalgebraToSubringRingEquiv B 222 refine ⟨e.symm a, e.symm b, ?_⟩ 223 change z = (e.symm a : F) / (e.symm b : F) 224 calc 225 z = (a : F) / (b : F) := hz.symm 226 _ = (e.symm a : F) / (e.symm b : F) := by rfl 227 letI : IsFractionRing B F := hBfrac 228 letI : Algebra R0 B := j.toAlgebra 229 let L := Localization (Algebra.algebraMapSubmonoid B (nonZeroDivisors R0)) 230 letI : Algebra B L := inferInstance 231 letI : SMul R0 F := (inferInstance : Algebra R0 F).toSMul 232 letI : SMul B F := (inferInstance : Algebra B F).toSMul 233 letI : SMul k R0 := (inferInstance : Algebra k R0).toSMul 234 letI : SMul R0 B := (inferInstance : Algebra R0 B).toSMul 235 letI : SMul k B := (inferInstance : Algebra k B).toSMul 236 have hRF : algebraMap R0 F = (algebraMap B F).comp (algebraMap R0 B) := by 237 ext a 238 change (a : F) = (j a : F) 239 exact (hjF a).symm 240 letI : IsScalarTower R0 B F := IsScalarTower.of_algebraMap_eq' hRF 241 have hJMap (a : R0) : algebraMap R0 B a = j a := by 242 rfl 243 have hKB : algebraMap k B = (algebraMap R0 B).comp (algebraMap k R0) := by 244 ext c 245 change (algebraMap k B c : F) = 246 (algebraMap R0 B (algebraMap k R0 c) : F) 247 change (algebraMap k B c : F) = (j (algebraMap k R0 c) : F) 248 rw [hjF] 249 rfl 250 letI : IsScalarTower k R0 B := IsScalarTower.of_algebraMap_eq' hKB 251 have hinj : Function.Injective (algebraMap R0 B) := by 252 intro a b hab 253 apply Subtype.ext 254 apply Subtype.val_injective 255 have hab' : j a = j b := by rw [← hJMap a, ← hJMap b]; exact hab 256 calc 257 ((a : Q) : F) = ((j a : B) : F) := (hjF a).symm 258 _ = ((j b : B) : F) := congrArg (fun z : B => (z : F)) hab' 259 _ = ((b : Q) : F) := hjF b 260 obtain ⟨fEL, hELgen, hELfinite, hELdomain, hFdata⟩ := 261 Stafford38.Geometry.FieldEquivFiniteType.exists_finiteType_domain_fractionField_localization 262 (k := k) (P := P0) (R := R0) (B := B) (F := F) eA hinj 263 obtain ⟨fF, hFextend, hFfrac⟩ := hFdata 264 letI : Algebra E L := fEL.toRingHom.toAlgebra 265 letI : Algebra L F := fF.toAlgebra 266 have hEFgen : ∀ p : P0, 267 fF (fEL (algebraMap P0 E p)) = fEF (algebraMap P0 E p) := by 268 intro p 269 calc 270 fF (fEL (algebraMap P0 E p)) = 271 fF (algebraMap B L (algebraMap R0 B (eA p))) := 272 congrArg fF (hELgen p) 273 _ = algebraMap B F (algebraMap R0 B (eA p)) := hFextend _ 274 _ = (j (eA p) : F) := by 275 exact congrArg (fun b : B => (b : F)) (hJMap (eA p)) 276 _ = (((eA p : R0) : Q) : F) := hjF (eA p) 277 _ = fEF (algebraMap P0 E p) := (hgen p).symm 278 obtain ⟨hEFmap, hEFLtower⟩ := 279 Stafford38.Geometry.FieldEquivFiniteType.fractionField_map_coherence 280 fEL fF fEF hEFgen 281 letI : IsScalarTower E L F := hEFLtower 282 let rhoL : L →+* κ := (residue V).comp fLoc 283 let qV : Q →ₐ[k] V := 284 Stafford38.Geometry.SelectedResidueCoefficientLocalization.chartAlgebraToValuation 285 Q U hground hQV 286 have hAchart : fA.comp eA.toAlgHom = 287 qV.comp ((Subalgebra.val R0).comp eA.toAlgHom) := by 288 apply MvPolynomial.algHom_ext 289 intro z 290 change fA (eA (MvPolynomial.X z)) = qV ((eA (MvPolynomial.X z) : R0) : Q) 291 calc 292 fA (eA (MvPolynomial.X z)) = 293 (⟨(x z : F), hQV (x z).property⟩ : V) := hfA z 294 _ = qV (x z) := by 295 apply Subtype.ext 296 rfl 297 _ = qV ((eA (MvPolynomial.X z) : R0) : Q) := 298 congrArg qV (hgenA z).symm 299 have hELgen' : ∀ p : P0, 300 fEL (algebraMap P0 E p) = algebraMap B L (j (eA p)) := by 301 intro p 302 calc 303 fEL (algebraMap P0 E p) = 304 algebraMap B L (algebraMap R0 B (eA p)) := hELgen p 305 _ = algebraMap B L (j (eA p)) := 306 congrArg (algebraMap B L) (hJMap (eA p)) 307 have hRhoE : rhoL.comp fEL.toRingHom = g.toRingHom := 308 Stafford38.Geometry.ActualChartResidueMapCoherence.residue_map_coherence 309 eA iA fEV fA g fEL (algebraMap B L) fLoc fB j (Subalgebra.val R0) qV 310 (residue V) rhoL hELgen' hLoc rfl hcomp hAchart hfE 311 (fun p => hiA p) hresE 312 let rhoE : L →ₐ[E] κ := { 313 toRingHom := rhoL 314 commutes' := by 315 intro z 316 change rhoL (algebraMap E L z) = algebraMap E κ z 317 change rhoL (fEL z) = g z 318 exact RingHom.congr_fun hRhoE z 319 } 320 letI : Algebra.IsAlgebraic E κ := hκalg 321 have hrestrict : rhoL.comp (algebraMap B L) = 322 (residue V).comp fB := by 323 ext b 324 change residue V (fLoc (algebraMap B L b)) = residue V (fB b) 325 exact congrArg (residue V) (RingHom.congr_fun hLoc b) 326 let eB := subalgebraToSubringRingEquiv B 327 let center := integralClosureCenter Q.toSubring U hQV 328 have hcenterKernel : RingHom.ker ((residue V).comp fB) = 329 center.comap eB.toRingHom := by 330 exact Stafford38.Geometry.ActualNormalizationCenterResidueKernel.residue_kernel_eq_canonical_center_comap 331 Q.toSubring U hQV eB fB (by intro b; rfl) hfBF 332 have hcenter0 : center ≠ ⊥ := 333 Stafford38.Geometry.ActualChartCenterNonzero.actual_chart_normalization_center_ne_bot hm P w 334 letI : IsDomain L := hELdomain 335 letI : Algebra.FiniteType E L := hELfinite 336 letI : IsFractionRing L F := hFfrac 337 exact Stafford38.Geometry.ActualResidueCenterHeight.height_one_of_localized_algebraic_residue 338 (E := E) (B := B) (A := L) (F := F) (κ := κ) (C := B.toSubring) 339 (S := Algebra.algebraMapSubmonoid B (nonZeroDivisors R0)) 340 (rhoA := rhoL) (rhoE := rhoE) (hρ := rfl) 341 (rhoB := (residue V).comp fB) hrestrict eB center hcenterKernel hcenter0 htrdeg 342 343 /-- The original entry point selects a residue basis once, then delegates to 344 the explicit-data theorem so other consumers can use the same selectors. -/ 345 theorem actual_chart_normalization_center_height_one_of_basis 346 {k : Type u} [Field k] [CharZero k] 347 {m : ℕ} (hm : 0 < m) 348 (P : PrimeSpectrum (MvPolynomial (Fin m) k)) 349 (w : GeneralDivisorialVisibleFrameWitness hm P) : 350 let C := w.column 351 let W := C.W 352 let F := ComponentFractionField P 353 letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra 354 let U := W.place.valuation 355 let V := U.toSubring 356 letI : Algebra k V := C.groundCoeff.toAlgebra 357 let e := chartAffineCoordinateEquiv C.chart 358 let Q : Subalgebra k F := Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e)) 359 let hQV : Q.toSubring ≤ V := by 360 intro z hz 361 have hz' : z ∈ Algebra.adjoin k (Set.range (chartGenericPoint P C.chart e)) := by 362 simpa [Q] using hz 363 exact Stafford38.Geometry.ActualChartValuationImage.chartGenericPointSubalgebra_le_valuationSubring 364 hm P w z hz' 365 (ProjectiveChartNormalizationCenter.integralClosureCenter Q.toSubring U hQV).height = 1 := by 366 classical 367 let C := w.column 368 let W := C.W 369 let F := ComponentFractionField P 370 letI : Algebra (CoordinateZeroLocalRing W.coefficientField) F := W.ambientAlgebra 371 let U := W.place.valuation 372 let V := U.toSubring 373 letI : IsDiscreteValuationRing V := W.place.isDiscrete 374 letI : IsLocalRing V := W.place.isDiscrete.toIsLocalRing 375 letI : Algebra W.coefficientField V := 376 (relativeCoefficientMap W.coefficientField W.place).toAlgebra 377 letI : Algebra k V := C.groundCoeff.toAlgebra 378 let κ := ResidueField V 379 let retained : Algebra k κ := retainedResidueGroundAlgebra P ⟨0, hm⟩ W 380 letI : Algebra k κ := retained 381 have hretainedMap : @algebraMap k κ _ _ retained = 382 (residue V).comp C.groundCoeff := by 383 simpa [C, W, V, κ, C.groundCoeff_eq_retained] using w.retainedGroundMap 384 letI : IsScalarTower k V κ := IsScalarTower.of_algebraMap_eq fun c => by 385 have h := RingHom.congr_fun hretainedMap c 386 change algebraMap k κ c = residue V (C.groundCoeff c) 387 exact h 388 obtain ⟨t, htFinite, htBasis, index, hindex, hres⟩ := 389 Stafford38.Geometry.ActualSelectedResidueBasis.exists_actual_selected_residue_basis 390 hm P w 391 exact actual_chart_normalization_center_height_one_of_selected_basis 392 hm P w t htFinite htBasis index hindex hres 393 394 end Stafford38.Geometry.ActualChartNormalizationCenter 395