File size: 6,419 Bytes
b797a5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
import Mathlib.RingTheory.Flat.FaithfullyFlat.Algebra
import Mathlib.RingTheory.Regular.Flat
import OAI.NumberTheory.PiExponent.LocalAlgebra.ConeEquationLength

namespace OAI

noncomputable section

attribute [local instance] Localization.AtPrime.algebraOfLiesOver

namespace PiExponentSiegel.W17.ConeLocalLength

open RingTheory.Sequence

section Units

variable {R τ M : Type*} [CommRing R] [AddCommGroup M] [Module R M]

theorem ofList_map_mul_units (xs : List τ) (a u : τ → R) (hu : ∀ x, IsUnit (u x)) :
    Ideal.ofList (xs.map (fun x => a x * u x)) = Ideal.ofList (xs.map a) := by
  apply le_antisymm
  · apply Ideal.span_le.mpr
    intro r hr
    obtain ⟨x, hx, rfl⟩ := List.mem_map.mp hr
    exact Ideal.mul_mem_right _ _ (Ideal.subset_span (List.mem_map.mpr ⟨x, hx, rfl⟩))
  · apply Ideal.span_le.mpr
    intro r hr
    obtain ⟨x, hx, rfl⟩ := List.mem_map.mp hr
    apply (Ideal.mul_unit_mem_iff_mem _ (hu x)).mp
    exact Ideal.subset_span (List.mem_map.mpr ⟨x, hx, rfl⟩)

theorem isRegular_map_mul_units (xs : List τ) (a u : τ → R) (hu : ∀ x, IsUnit (u x))
    (hreg : IsRegular M (xs.map a)) :
    IsRegular M (xs.map (fun x => a x * u x)) := by
  refine ⟨⟨?_⟩, ?_⟩
  · intro i hi
    have hi' : i < xs.length := by simpa only [List.length_map] using hi
    have ha := hreg.regular_mod_prev i (by simpa only [List.length_map] using hi')
    simp only [List.getElem_map] at ha ⊢
    have hI : Ideal.ofList ((xs.map (fun x => a x * u x)).take i) =
        Ideal.ofList ((xs.map a).take i) := by
      simp only [← List.map_take]
      exact ofList_map_mul_units (xs.take i) a u hu
    have hN : (Ideal.ofList ((xs.map (fun x => a x * u x)).take i) •
        (⊤ : Submodule R M)) = Ideal.ofList ((xs.map a).take i) • ⊤ :=
      congrArg (fun J : Ideal R => J • (⊤ : Submodule R M)) hI
    exact Eq.mp (congrArg (fun N : Submodule R M =>
      IsSMulRegular (M ⧸ N) (a xs[i] * u xs[i])) hN.symm)
      (ha.mul ((hu xs[i]).isSMulRegular _))
  · rw [ofList_map_mul_units xs a u hu]
    exact hreg.top_ne_smul

end Units

variable (k σ : Type*) [CommRing k]
variable (P : Ideal (AffineRing k σ)) [P.IsPrime]

def coneLocalCoordinate : Localization.AtPrime (conePrime k σ P) :=
  algebraMap (ConeRing k σ) (Localization.AtPrime (conePrime k σ P)) (MvPolynomial.X none)

theorem coneLocalCoordinate_isUnit : IsUnit (coneLocalCoordinate k σ P) :=
  IsLocalization.map_units (Localization.AtPrime (conePrime k σ P))
    (⟨MvPolynomial.X none, homogenizing_coordinate_not_mem_conePrime k σ P⟩ :
      (conePrime k σ P).primeCompl)

theorem homogenized_local_eq_affine_mul_coordinate (f : AffineRing k σ) :
    algebraMap (ConeRing k σ) (Localization.AtPrime (conePrime k σ P))
      (PiExponentJets.W22.homogenize f) =
    affineLocalToConeLocal k σ P (algebraMap (AffineRing k σ) (Localization.AtPrime P) f) *
      coneLocalCoordinate k σ P ^ f.totalDegree := by
  let e := conePrimeLocalizationEquiv k σ P
  have ha : e (affineLocalToConeLocal k σ P
      (algebraMap (AffineRing k σ) (Localization.AtPrime P) f)) =
      algebraMap (LaurentChart k σ)
        (Localization.AtPrime (laurentPrime (AffineRing k σ) P)) (LaurentPolynomial.C f) := by
    change e (e.symm (algebraMap (Localization.AtPrime P)
      (Localization.AtPrime (laurentPrime (AffineRing k σ) P))
        (algebraMap (AffineRing k σ) (Localization.AtPrime P) f))) = _
    rw [e.apply_symm_apply]
    exact (IsScalarTower.algebraMap_apply (AffineRing k σ) (Localization.AtPrime P)
      (Localization.AtPrime (laurentPrime (AffineRing k σ) P)) f).symm.trans
        (IsScalarTower.algebraMap_apply (AffineRing k σ) (LaurentChart k σ)
          (Localization.AtPrime (laurentPrime (AffineRing k σ) P)) f)
  apply e.injective
  rw [e.map_mul, e.map_pow, ha]
  change conePrimeLocalizationEquiv k σ P
    (algebraMap (ConeRing k σ) (Localization.AtPrime (conePrime k σ P))
      (PiExponentJets.W22.homogenize f)) =
    algebraMap (LaurentChart k σ)
      (Localization.AtPrime (laurentPrime (AffineRing k σ) P)) (LaurentPolynomial.C f) *
    conePrimeLocalizationEquiv k σ P
      (algebraMap (ConeRing k σ) (Localization.AtPrime (conePrime k σ P))
        (MvPolynomial.X none)) ^ f.totalDegree
  rw [conePrimeLocalizationEquiv_algebraMap, conePrimeLocalizationEquiv_algebraMap,
    coneToLaurent_homogenize, coneToLaurent_X_none, map_mul, map_pow]

theorem affineLocalToConeLocal_faithfullyFlat :
    letI := affineLocalConeAlgebra k σ P
    Module.FaithfullyFlat (Localization.AtPrime P)
      (Localization.AtPrime (conePrime k σ P)) := by
  let := affineLocalConeAlgebra k σ P
  let := affineLocalToConeLocal_flat k σ P
  let : IsLocalHom (algebraMap (Localization.AtPrime P)
      (Localization.AtPrime (conePrime k σ P))) :=
    ((IsLocalRing.local_hom_TFAE _).out 1 3).mpr
      (affineLocalToConeLocal_map_maximalIdeal k σ P).le
  exact Module.FaithfullyFlat.of_flat_of_isLocalHom

theorem homogenized_list_regular_at_cone (fs : List (AffineRing k σ))
    (hreg : IsRegular (Localization.AtPrime P)
      (fs.map (algebraMap (AffineRing k σ) (Localization.AtPrime P)))) :
    IsRegular (Localization.AtPrime (conePrime k σ P))
      ((fs.map PiExponentJets.W22.homogenize).map
        (algebraMap (ConeRing k σ) (Localization.AtPrime (conePrime k σ P)))) := by
  let := affineLocalConeAlgebra k σ P
  let := affineLocalToConeLocal_faithfullyFlat k σ P
  have hbase : IsRegular (Localization.AtPrime (conePrime k σ P))
      (fs.map (fun f => affineLocalToConeLocal k σ P
        (algebraMap (AffineRing k σ) (Localization.AtPrime P) f))) := by
    have hb := hreg.of_faithfullyFlat (S := Localization.AtPrime (conePrime k σ P))
    change IsRegular (Localization.AtPrime (conePrime k σ P))
      ((fs.map (algebraMap (AffineRing k σ) (Localization.AtPrime P))).map
        (affineLocalToConeLocal k σ P)) at hb
    simpa only [List.map_map, Function.comp_def] using hb
  have hscaled := isRegular_map_mul_units fs
    (fun f => affineLocalToConeLocal k σ P
      (algebraMap (AffineRing k σ) (Localization.AtPrime P) f))
    (fun f => coneLocalCoordinate k σ P ^ f.totalDegree)
    (fun f => (coneLocalCoordinate_isUnit k σ P).pow f.totalDegree) hbase
  simpa only [List.map_map, Function.comp_def,
    homogenized_local_eq_affine_mul_coordinate] using hscaled

end PiExponentSiegel.W17.ConeLocalLength

end

end OAI