File size: 9,041 Bytes
7f5fab8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
import Mathlib
import OAI.AlgebraicGeometry.SectionFields.NormalDivisors
import OAI.AlgebraicGeometry.SectionFields.TensorAlgebra

namespace OAI

/-! Constants and function fields under geometric integrality and open charts. -/

noncomputable section
open AlgebraicGeometry CategoryTheory CategoryTheory.Limits TopologicalSpace Order Polynomial
open scoped TensorProduct WithZero
universe u

namespace RelativeDenominators

 

theorem global_constants_surjective_of_geometricallyIntegral
    (K : Type u) [Field K] {X : Scheme.{u}}
    (f : X ⟶ Spec (.of K)) [UniversallyClosed f] [GeometricallyIntegral f] :
    Function.Surjective (((Scheme.ΓSpecIso (.of K)).inv ≫ f.appTop).hom) := by
  let : IsIntegral X := GeometricallyIntegral.isIntegral_of_subsingleton f
  let : CompactSpace X := (quasiCompact_iff_compactSpace f).mp inferInstance
  let A := Γ(X, ⊤)
  let : Field A := (isField_of_universallyClosed K f).toField
  let F : CommRingCat.of K ⟶ A := (Scheme.ΓSpecIso (.of K)).inv ≫ f.appTop
  let : Algebra K A := F.hom.toAlgebra
  have hintegral : F.hom.IsIntegral := by
    apply RingHom.isIntegral_respectsIso.2
      (e := (Scheme.ΓSpecIso (.of K)).symm.commRingCatIsoToRingEquiv)
    exact isIntegral_appTop_of_universallyClosed f
  let : Algebra.IsIntegral K A := ⟨hintegral⟩
  let g : Spec A ⟶ Spec (.of K) := Spec.map F
  have hfactor : X.toSpecΓ ≫ g = f := by
    dsimp [g, F]
    rw [Spec.map_comp, ← Category.assoc, ← Scheme.toSpecΓ_naturality]
    rw [Category.assoc, ← Scheme.isoSpec_Spec_inv]
    simp
  let P := pullback g g
  let q : pullback X.toSpecΓ (pullback.fst g g) ⟶ P :=
    pullback.snd X.toSpecΓ (pullback.fst g g)
  let e : pullback X.toSpecΓ (pullback.fst g g) ≅ pullback f g :=
    pullbackRightPullbackFstIso g g X.toSpecΓ ≪≫ pullback.congrHom hfactor rfl
  let : IsIntegral (pullback X.toSpecΓ (pullback.fst g g)) :=
    IsIntegral.of_isIso e.inv
  let : IsSchemeTheoreticallyDominant X.toSpecΓ :=
    IsSchemeTheoreticallyDominant.of_isDominant _
  let : IsReduced P := IsSchemeTheoreticallyDominant.isReduced q
  have hP : IsIrreducible (Set.univ : Set P) := by
    have h := (IrreducibleSpace.isIrreducible_univ (pullback X.toSpecΓ (pullback.fst g g) : Scheme)).image
      q q.continuous.continuousOn
    simpa only [Set.image_univ, q.denseRange.closure_range] using h.closure
  let : IrreducibleSpace P := (irreducibleSpace_def P).mpr hP
  let : IsIntegral P := isIntegral_of_irreducibleSpace_of_isReduced P
  let : IsIntegral (Spec (.of (A ⊗[K] A))) :=
    IsIntegral.of_isIso (pullbackSpecIso K A A).hom
  let : IsDomain (A ⊗[K] A) := (affine_isIntegral_iff (.of (A ⊗[K] A))).mp inferInstance
  exact algebraMap_surjective_of_isAlgebraic_tensorSelf_domain K A

 

noncomputable def constantToFunctionField
    (K : Type u) [Field K] {X : Scheme.{u}} [IsIntegral X]
    (f : X ⟶ Spec (.of K)) : K →+* X.functionField :=
  (X.germToFunctionField ⊤).hom.comp
    (((Scheme.ΓSpecIso (.of K)).inv ≫ f.appTop).hom)

 

theorem rational_function_constant_of_divisor_zero
    (K : Type u) [Field K] {X : Scheme.{u}} [IsIntegral X] [IsNoetherian X]
    (f : X ⟶ Spec (.of K)) [UniversallyClosed f] [GeometricallyIntegral f]
    (hNormal : ∀ x : X, IsIntegrallyClosed (X.presheaf.stalk x))
    (u : X.functionFieldˣ) (hdiv : principalDivisor X u = 0) :
    ∃ c : Kˣ, constantToFunctionField K f (c : K) = (u : X.functionField) := by
  obtain ⟨s, hs⟩ := rational_function_eq_global_unit_of_divisor_zero X hNormal u hdiv
  obtain ⟨c, hc⟩ := global_constants_surjective_of_geometricallyIntegral K f (s : Γ(X, ⊤))
  have hc0 : c ≠ 0 := by
    intro h
    apply Units.ne_zero s
    rw [← hc, h, map_zero]
  refine ⟨Units.mk0 c hc0, ?_⟩
  change X.germToFunctionField ⊤
    (((Scheme.ΓSpecIso (.of K)).inv ≫ f.appTop) c) = (u : X.functionField)
  rw [hc]
  exact hs

 

theorem functionFieldPullback_bijective_of_open
    {X Y : Scheme} [IsIntegral X] [IsIntegral Y]
    (j : Y ⟶ X) [IsOpenImmersion j] [IsDominant j] :
    Function.Bijective (functionFieldPullback j) := by
  let e := X.presheaf.stalkCongr
    (Inseparable.of_eq (genericPoint_eq_of_dominant j))
  have he : X.presheaf.stalkSpecializes
      (specializes_of_eq (genericPoint_eq_of_dominant j)) = e.inv := rfl
  have : IsIso (X.presheaf.stalkSpecializes
      (specializes_of_eq (genericPoint_eq_of_dominant j))) := by rw [he]; infer_instance
  exact ConcreteCategory.bijective_of_isIso
    (X.presheaf.stalkSpecializes
      (specializes_of_eq (genericPoint_eq_of_dominant j)) ≫ j.stalkMap (genericPoint Y))

noncomputable def functionFieldOpenEquiv
    {X Y : Scheme} [IsIntegral X] [IsIntegral Y]
    (j : Y ⟶ X) [IsOpenImmersion j] [IsDominant j] :
    X.functionField ≃+* Y.functionField :=
  RingEquiv.ofBijective (functionFieldPullback j) (functionFieldPullback_bijective_of_open j)

 

noncomputable def chartFunctionFieldEquiv
    (A M : Type u) [CommRing A] [IsDomain A] [Field M]
    [Algebra A M] [IsFractionRing A M]
    {X : Scheme.{u}} [IsIntegral X]
    (j : Spec (.of A) ⟶ X) [IsOpenImmersion j] [IsDominant j] :
    M ≃+* X.functionField := by
  letI : Algebra A (Spec (.of A)).functionField :=
    AlgebraicGeometry.instAlgebraCarrierFunctionFieldSpec (.of A)
  letI : IsFractionRing A (Spec (.of A)).functionField :=
    functionField_isFractionRing_of_affine (.of A)
  exact (IsLocalization.algEquiv (nonZeroDivisors A) M
    (Spec (.of A)).functionField).toRingEquiv.trans (functionFieldOpenEquiv j).symm

lemma chartFunctionFieldEquiv_algebraMap
    (A M : Type u) [CommRing A] [IsDomain A] [Field M]
    [Algebra A M] [IsFractionRing A M]
    {X : Scheme.{u}} [IsIntegral X]
    (j : Spec (.of A) ⟶ X) [IsOpenImmersion j] [IsDominant j] (a : A) :
    functionFieldPullback j (chartFunctionFieldEquiv A M j (algebraMap A M a)) =
      @algebraMap A (Spec (.of A)).functionField _ _
        (AlgebraicGeometry.instAlgebraCarrierFunctionFieldSpec (.of A)) a := by
  let : Algebra A (Spec (.of A)).functionField :=
    AlgebraicGeometry.instAlgebraCarrierFunctionFieldSpec (.of A)
  let : IsFractionRing A (Spec (.of A)).functionField :=
    functionField_isFractionRing_of_affine (.of A)
  change (functionFieldOpenEquiv j)
    ((functionFieldOpenEquiv j).symm
      ((IsLocalization.algEquiv (nonZeroDivisors A) M
        (Spec (.of A)).functionField) (algebraMap A M a))) = _
  rw [RingEquiv.apply_symm_apply, AlgEquiv.commutes]

lemma functionFieldPullback_comp
    {X Y Z : Scheme} [IsIntegral X] [IsIntegral Y] [IsIntegral Z]
    (f : X ⟶ Y) (g : Y ⟶ Z) [IsDominant f] [IsDominant g] :
    functionFieldPullback (f ≫ g) = (functionFieldPullback f).comp (functionFieldPullback g) := by
  change (Z.presheaf.stalkSpecializes _ ≫ (f ≫ g).stalkMap _).hom =
    ((Z.presheaf.stalkSpecializes _ ≫ g.stalkMap _) ≫
      (Y.presheaf.stalkSpecializes _ ≫ f.stalkMap _)).hom
  congr 1
  rw [Scheme.Hom.stalkMap_comp, Category.assoc, ← Category.assoc (g.stalkMap _),    ← g.stalkSpecializes_stalkMap]
  simp only [← Category.assoc, TopCat.Presheaf.stalkSpecializes_comp]
  simp only [Category.assoc]
  rfl

lemma functionFieldPullback_constant
    (K : Type u) [Field K] {X Y : Scheme.{u}} [IsIntegral X] [IsIntegral Y]
    (f : X ⟶ Spec (.of K)) (j : Y ⟶ X) [IsDominant j] (c : K) :
    functionFieldPullback j (constantToFunctionField K f c) =
      constantToFunctionField K (j ≫ f) c := by
  unfold constantToFunctionField
  simp only [RingHom.comp_apply]
  rw [functionFieldPullback_germ]
  change Y.germToFunctionField ⊤ (j.appTop (((Scheme.ΓSpecIso (.of K)).inv ≫ f.appTop) c)) = _
  rw [Scheme.Hom.comp_appTop]
  rfl

lemma constantToFunctionField_spec
    (K A : Type u) [Field K] [CommRing A] [IsDomain A] [Algebra K A] (c : K) :
    constantToFunctionField K (Spec.map (CommRingCat.ofHom (algebraMap K A))) c =
      @algebraMap A (Spec (.of A)).functionField _ _
        (AlgebraicGeometry.instAlgebraCarrierFunctionFieldSpec (.of A))
          (algebraMap K A c) := by
  unfold constantToFunctionField
  rw [← Scheme.ΓSpecIso_inv_naturality]
  rfl

lemma functionFieldPullback_spec_algebraMap
    (A B : Type u) [CommRing A] [IsDomain A] [CommRing B] [IsDomain B]
    (h : A →+* B) [IsDominant (Spec.map (CommRingCat.ofHom h))] (a : A) :
    functionFieldPullback (Spec.map (CommRingCat.ofHom h))
      (@algebraMap A (Spec (.of A)).functionField _ _
        (AlgebraicGeometry.instAlgebraCarrierFunctionFieldSpec (.of A)) a) =
        @algebraMap B (Spec (.of B)).functionField _ _
        (AlgebraicGeometry.instAlgebraCarrierFunctionFieldSpec (.of B)) (h a) := by
  change functionFieldPullback (Spec.map (CommRingCat.ofHom h))
    ((Spec (.of A)).germToFunctionField ⊤ ((Scheme.ΓSpecIso (.of A)).inv a)) = _
  rw [functionFieldPullback_germ]
  change (Spec (.of B)).germToFunctionField ⊤
    (((Scheme.ΓSpecIso (.of A)).inv ≫ (Spec.map (CommRingCat.ofHom h)).appTop) a) = _
  rw [← Scheme.ΓSpecIso_inv_naturality]
  rfl

end RelativeDenominators
end

end OAI