Stafford38/Geometry/CenterNumeratorFromHeight.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Geometry.ActualCenterParameterTransport
3 public import Stafford38.Geometry.ActualDivisorUniformizerNumerator
4 public import Mathlib.RingTheory.LocalRing.RingHom.Basic
5 
6 @[expose] public section
7 
8 set_option autoImplicit false
9 set_option maxHeartbeats 4000000
10 set_option synthInstance.maxHeartbeats 600000
11 set_option linter.style.haveILetI false
12 
13 noncomputable section
14 
15 namespace Stafford38.Geometry.ActualSameWitnessDivisorNumerator
16 
17 open IsLocalRing
18 
19 universe u v
20 
21 /-- Transport an already identified local normalization across the canonical
22 subalgebra/subring carrier equivalence, then extract its one numerator and
23 transport both retained order factorizations. -/
24 theorem exists_numerator_across_carrier_equiv
25     {K : Type u} [Field K]
26     {B : Type v} [CommRing B] [IsDomain B]
27     {S : Type v} [CommRing S]
28     {V : Type v} [CommRing V]
29     (coB : B →+* K) (coS : S →+* K) (coV : V →+* K)
30     (eB : B ≃+* S) (P : Ideal S) [P.IsPrime]
31     (PB : Ideal B) (hPB : PB = P.comap eB.toRingHom) [PB.IsPrime]
32     (eC : Localization.AtPrime P ≃+* V)
33     (heC : ∀ c : S,
34       coV (eC (algebraMap S (Localization.AtPrime P) c)) = coS c)
35     (heB : ∀ b : B, coS (eB b) = coB b)
36     [IsDomain V] [hDVR : IsDiscreteValuationRing V]
37     (π : V) (hπ : Irreducible π)
38     (q₀ q₁ : B) (n₀ n₁ : ℕ) (v₀ v₁ : V)
39     (h₀ : eC (algebraMap S (Localization.AtPrime P) (eB q₀)) = π ^ n₀ * v₀)
40     (h₁ : eC (algebraMap S (Localization.AtPrime P) (eB q₁)) = π ^ n₁ * v₁)
41     (hv₀ : IsUnit v₀) (hv₁ : IsUnit v₁) :
42     ∃ (e : Localization.AtPrime PB ≃+* V) (s : B)
43       (den : PB.primeCompl) (u₀ u₁ : Localization.AtPrime PB),
44       (∀ b : B, coV (e (algebraMap B _ b)) = coB b) ∧
45       s ≠ 0 ∧ s ∈ PB ∧
46       IsLocalization.mk' _ s den = e.symm π ∧
47       Ideal.span {algebraMap B (Localization.AtPrime PB) s} =
48         maximalIdeal (Localization.AtPrime PB) ∧
49       IsUnit u₀ ∧ IsUnit u₁ ∧
50       algebraMap B _ q₀ = (algebraMap B _ s) ^ n₀ * u₀ ∧
51       algebraMap B _ q₁ = (algebraMap B _ s) ^ n₁ * u₁ := by
52   classical
53   let eLoc := ActualCenterParameterTransport.atPrimeEquiv eB PB P hPB
54   let e : Localization.AtPrime PB ≃+* V := eLoc.trans eC
55   have heLocalF : ∀ b : B, coV (e (algebraMap B _ b)) = coB b := by
56     intro b
57     change coV (eC (eLoc (algebraMap B _ b))) = coB b
58     have hmap := ActualCenterParameterTransport.atPrimeEquiv_algebraMap
59       eB PB P hPB b
60     have hmap' : eLoc (algebraMap B _ b) = algebraMap S _ (eB b) := by
61       simpa [eLoc] using hmap
62     rw [hmap']
63     exact (heC (eB b)).trans (heB b)
64   have hmap₀ : eLoc (algebraMap B _ q₀) = algebraMap S _ (eB q₀) := by
65     simpa [eLoc] using
66       ActualCenterParameterTransport.atPrimeEquiv_algebraMap eB PB P hPB q₀
67   have hmap₁ : eLoc (algebraMap B _ q₁) = algebraMap S _ (eB q₁) := by
68     simpa [eLoc] using
69       ActualCenterParameterTransport.atPrimeEquiv_algebraMap eB PB P hPB q₁
70   have hq₀ : e (algebraMap B _ q₀) = π ^ n₀ * v₀ := by
71     change eC (eLoc (algebraMap B _ q₀)) = _
72     rw [hmap₀]
73     exact h₀
74   have hq₁ : e (algebraMap B _ q₁) = π ^ n₁ * v₁ := by
75     change eC (eLoc (algebraMap B _ q₁)) = _
76     rw [hmap₁]
77     exact h₁
78   letI : IsPrincipalIdealRing (Localization.AtPrime PB) :=
79     IsPrincipalIdealRing.of_surjective e.symm.toRingHom e.symm.surjective
80   letI : IsLocalRing (Localization.AtPrime PB) :=
81     IsLocalRing.of_surjective' e.symm.toRingHom e.symm.surjective
82   letI : IsDiscreteValuationRing (Localization.AtPrime PB) := by
83     refine IsDiscreteValuationRing.mk ?_
84     intro hbot
85     have hmax := IsLocalRing.map_maximalIdeal_of_surjective e.toRingHom e.surjective
86     have hVbot : maximalIdeal V = ⊥ := by
87       rw [← hmax, hbot, Ideal.map_bot]
88     exact IsDiscreteValuationRing.not_a_field V hVbot
89   obtain ⟨s, den, u₀, u₁, hs0, hsP, hmk, hspan, hu₀, hu₁, hfactor₀, hfactor₁⟩ :=
90     Stafford38.Geometry.ActualDivisorUniformizerNumerator.exists_numerator_with_two_unit_power_factorizations_and_span
91       PB e π hπ q₀ q₁ n₀ n₁ v₀ v₁ hq₀ hq₁ hv₀ hv₁
92   exact ⟨e, s, den, u₀, u₁, heLocalF, hs0, hsP, hmk, hspan,
93     hu₀, hu₁, hfactor₀, hfactor₁⟩
94 
95 end Stafford38.Geometry.ActualSameWitnessDivisorNumerator
96