import OAI.AlgebraicGeometry.Resolution.Blowups.PolynomialTranslation import Mathlib.RingTheory.Unramified.LocalRing import Mathlib.RingTheory.Etale.Basic /-! # Local Coordinates -/ namespace OAI.AlgebraicGeometry.Resolution.Blowups.Etale.LocalCoordinates.Construction noncomputable section /-! Generators of the maximal ideal at a point of an étale polynomial neighborhood. -/ open _root_.MvPolynomial variable {σ R : Type*} [CommRing R] /-- The polynomial point ideal is generated by the centered coordinates. -/ theorem polynomialPointIdeal_eq_span_coordinates (x : σ → R) : PolynomialTranslation.Construction.polynomialPointIdeal x = Ideal.span (Set.range (fun i => X i - C (x i))) := by have he : (PolynomialTranslation.Construction.polynomialTranslate (-x)).toRingHom.comp (PolynomialTranslation.Construction.polynomialTranslate x).toRingHom = RingHom.id (MvPolynomial σ R) := by change ((PolynomialTranslation.Construction.polynomialTranslate (-x)).comp (PolynomialTranslation.Construction.polynomialTranslate x)).toRingHom = _ rw [PolynomialTranslation.Construction.polynomialTranslate_add, neg_add_cancel, PolynomialTranslation.Construction.polynomialTranslate_zero] rfl have h := congrArg (fun I : Ideal (MvPolynomial σ R) => I.map (PolynomialTranslation.Construction.polynomialTranslate (-x)).toRingHom) (PolynomialTranslation.Construction.polynomialPointIdeal_map_translate x) rw [Ideal.map_map, he, Ideal.map_id] at h rw [h, Ideal.map_span, ← Set.range_comp] apply congrArg (fun f : σ → MvPolynomial σ R => Ideal.span (Set.range f)) funext i simp [sub_eq_add_neg] variable {K S : Type*} [Field K] [CommRing S] [Algebra (MvPolynomial σ K) S] [Algebra.Etale (MvPolynomial σ K) S] /-- Unramifiedness makes the polynomial point ideal generate the maximal ideal in the actual local ring of any point above it. -/ theorem etale_local_maximalIdeal_eq_map_point (x : σ → K) (q : Ideal S) [q.IsPrime] [q.LiesOver (PolynomialTranslation.Construction.polynomialPointIdeal x)] : (PolynomialTranslation.Construction.polynomialPointIdeal x).map (algebraMap (MvPolynomial σ K) (Localization.AtPrime q)) = IsLocalRing.maximalIdeal (Localization.AtPrime q) := by let : (PolynomialTranslation.Construction.polynomialPointIdeal x).IsPrime := RingHom.ker_isPrime (eval x) let : Algebra (Localization.AtPrime (PolynomialTranslation.Construction.polynomialPointIdeal x)) (Localization.AtPrime q) := Localization.AtPrime.algebraOfLiesOver (PolynomialTranslation.Construction.polynomialPointIdeal x) q let : IsScalarTower (MvPolynomial σ K) (Localization.AtPrime (PolynomialTranslation.Construction.polynomialPointIdeal x)) (Localization.AtPrime q) := inferInstance exact ((Algebra.isUnramifiedAt_iff_map_eq (MvPolynomial σ K) (PolynomialTranslation.Construction.polynomialPointIdeal x) q).mp inferInstance).2 /-- Centered polynomial coordinates generate the actual local maximal ideal after an étale ambient map. -/ theorem etale_local_maximalIdeal_eq_span_coordinates (x : σ → K) (q : Ideal S) [q.IsPrime] [q.LiesOver (PolynomialTranslation.Construction.polynomialPointIdeal x)] : IsLocalRing.maximalIdeal (Localization.AtPrime q) = Ideal.span (Set.range (fun i => algebraMap (MvPolynomial σ K) (Localization.AtPrime q) (X i - C (x i)))) := by rw [← etale_local_maximalIdeal_eq_map_point x q, polynomialPointIdeal_eq_span_coordinates, Ideal.map_span, ← Set.range_comp] rfl end end OAI.AlgebraicGeometry.Resolution.Blowups.Etale.LocalCoordinates.Construction