File size: 8,947 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.ArithmeticGeometry.Models.SpreadingOut.GenericSmoothness
import OAI.ArithmeticGeometry.Models.SpreadingOut.ClosedImmersion

/-! # Coefficient Smoothness -/

namespace OAI.ArithmeticGeometry.Models.SpreadingOut.CoefficientSmoothness.Construction

noncomputable section

/-! Smoothness of a proper generic fiber spreads after one more finite
enlargement of its coefficient ring. -/

open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry
open scoped _root_.NumberField

universe u

/-- Over an integral affine base, the proper image of the nonsmooth locus
can be removed by inverting one nonzero element. -/
theorem proper_smooth_generic_fiber_has_smooth_basicOpen
    (R K : Type u) [CommRing R] [IsDomain R] [Field K]
    [Algebra R K] [IsFractionRing R K]
    {X : Scheme.{u}} (f : X ⟶ Spec (.of R))
    [IsProper f] [LocallyOfFinitePresentation f]
    [Smooth (pullback.snd f (Spec.map (CommRingCat.ofHom (algebraMap R K))))] :
    ∃ (a : R), a ≠ 0 ∧
      Smooth (f ∣_ (PrimeSpectrum.basicOpen a : (Spec (.of R)).Opens)) := by
  let Z : Set (PrimeSpectrum R) := f '' (f.smoothLocus : Set X)ᶜ
  have hZ : IsClosed Z := f.isClosedMap _ f.smoothLocus.isOpen.isClosed_compl
  have hη : (⊥ : PrimeSpectrum R) ∉ Z := by
    rintro ⟨x, hx, heq⟩
    exact hx (GenericSmoothness.Construction.generic_point_mem_smoothLocus R K f x heq)
  obtain ⟨s, hs⟩ := (PrimeSpectrum.isClosed_iff_zeroLocus Z).mp hZ
  have ha : ∃ a ∈ s, a ≠ 0 := by
    by_contra! h
    apply hη
    rw [hs]
    intro a ha
    exact h a ha
  obtain ⟨a, has, ha⟩ := ha
  let U : (Spec (.of R)).Opens := PrimeSpectrum.basicOpen a
  have hpre : f ⁻¹ᵁ U ≤ f.smoothLocus := by
    intro x hx
    by_contra hn
    have hz : f x ∈ Z := ⟨x, hn, rfl⟩
    rw [hs] at hz
    exact hx (hz has)
  have hsm : Smooth ((f ⁻¹ᵁ U).ι ≫ f) := SmoothShrink.Construction.smooth_on_open_in_smoothLocus f _ hpre
  have hscomp : Smooth ((f ∣_ U) ≫ U.ι) := by
    rw [morphismRestrict_ι]
    exact hsm
  have hpb : IsPullback (𝟙 (f ⁻¹ᵁ U).toScheme) (f ∣_ U)
      ((f ∣_ U) ≫ U.ι) U.ι := IsPullback.of_horiz_isIso_mono ⟨by simp⟩
  exact ⟨a, ha, MorphismProperty.of_isPullback hpb hscomp⟩

/-- A pullback whose base lands in a smooth restriction is smooth. -/
theorem smooth_pullback_of_range_subset
    {X S T : Scheme.{u}} (f : X ⟶ S) (g : T ⟶ S)
    (U : S.Opens) [Smooth (f ∣_ U)]
    (hg : Set.range g ⊆ (U : Set S)) : Smooth (pullback.snd f g) := by
  let q := IsOpenImmersion.lift U.ι g (by simpa using hg)
  have hq : q ≫ U.ι = g := IsOpenImmersion.lift_fac _ _ _
  have hrange : Set.range (pullback.fst f g) ⊆ (f ⁻¹ᵁ U : Set X) := by
    rintro _ ⟨x, rfl⟩
    change f (pullback.fst f g x) ∈ U
    rw [← Scheme.Hom.comp_apply, pullback.condition, Scheme.Hom.comp_apply]
    exact hg (Set.mem_range_self _)
  let p := IsOpenImmersion.lift (f ⁻¹ᵁ U).ι (pullback.fst f g)
    (by simpa using hrange)
  have hp : p ≫ (f ⁻¹ᵁ U).ι = pullback.fst f g := IsOpenImmersion.lift_fac _ _ _
  have hcart : IsPullback p (pullback.snd f g) (f ∣_ U) q := by
    apply IsPullback.of_right ?_ ?_ (isPullback_morphismRestrict f U).flip
    · rw [hp, hq]
      exact IsPullback.of_hasPullback f g
    · apply (cancel_mono U.ι).mp
      rw [Category.assoc, morphismRestrict_ι, ← Category.assoc, hp,
        Category.assoc (pullback.snd f g) q U.ι, hq]
      exact pullback.condition
  exact MorphismProperty.of_isPullback hcart inferInstance

/-- Enlarging a coefficient set can make any nonzero old coefficient a unit. -/
theorem specMap_range_subset_basicOpen_of_unit
    {R A : Type u} [CommRing R] [CommRing A] (φ : R →+* A)
    (a : R) (ha : IsUnit (φ a)) :
    Set.range (Spec.map (CommRingCat.ofHom φ)) ⊆
      ((show (Spec (.of R)).Opens from PrimeSpectrum.basicOpen a) :
        Set (Spec (.of R))) := by
  rintro _ ⟨p, rfl⟩
  let q : PrimeSpectrum A := p
  exact q.asIdeal.notMem_of_isUnit ha

def reciprocalCoefficientSet
    {K : Type u} [Field K] (s : Finset K) (a : CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) : Finset K := by
  classical
  exact insert (a.val⁻¹) s

theorem subset_reciprocalCoefficientSet
    {K : Type u} [Field K] (s : Finset K) (a : CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) :
    s ⊆ reciprocalCoefficientSet s a := by
  classical
  exact Finset.subset_insert _ _

def reciprocalCoefficientHom
    {K : Type u} [Field K] (s : Finset K) (a : CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) :
    CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s →ₐ[𝓞 K]
      CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K (reciprocalCoefficientSet s a) :=
  Subalgebra.inclusion (Algebra.adjoin_mono
    (Finset.coe_subset.mpr (subset_reciprocalCoefficientSet s a)))

theorem subalgebra_unit_of_inverse_mem
    {R K : Type u} [CommRing R] [Field K] [Algebra R K]
    (A : Subalgebra R K) (a : A) (ha : a.val ≠ 0) (h : a.val⁻¹ ∈ A) : IsUnit a := by
  refine ⟨⟨a, ⟨a.val⁻¹, h⟩, ?_, ?_⟩, rfl⟩
  · apply Subtype.ext
    exact mul_inv_cancel₀ ha
  · apply Subtype.ext
    exact inv_mul_cancel₀ ha

theorem reciprocalCoefficientHom_coe
    {K : Type u} [Field K] (s : Finset K)
    (a b : CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) :
    (reciprocalCoefficientHom s a b).val = b.val :=
  Subalgebra.coe_inclusion _ b

theorem inverse_mem_reciprocalCoefficientRing
    {K : Type u} [Field K] (s : Finset K) (a : CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) :
    a.val⁻¹ ∈ CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K (reciprocalCoefficientSet s a) := by
  classical
  exact Algebra.subset_adjoin (Finset.mem_insert_self _ _)

theorem reciprocalCoefficientHom_isUnit
    {K : Type u} [Field K] (s : Finset K)
    (a : CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) (ha : a ≠ 0) :
    IsUnit (reciprocalCoefficientHom s a a) := by
  classical
  apply subalgebra_unit_of_inverse_mem
  · rw [reciprocalCoefficientHom_coe]
    exact fun h ↦ ha (Subtype.ext h)
  · rw [reciprocalCoefficientHom_coe]
    exact inverse_mem_reciprocalCoefficientRing s a

theorem reciprocalCoefficientBaseMap_eq
    {K : Type u} [Field K] (s : Finset K) (a : CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) :
    CoefficientSystem.Constructions.Foundations.coefficientBaseMap (𝓞 K) K (subset_reciprocalCoefficientSet s a) =
      Spec.map (CommRingCat.ofHom (reciprocalCoefficientHom s a).toRingHom) := rfl

theorem coefficient_base_eventually_in_basicOpen
    {K : Type u} [Field K] [NumberField K] (s : Finset K)
    (a : CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) (ha : a ≠ 0) :
    ∃ (t : Finset K) (h : s ⊆ t),
      Set.range (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (𝓞 K) K h) ⊆
        ((show (CoefficientSystem.Constructions.Foundations.coefficientBase (𝓞 K) K s).Opens from PrimeSpectrum.basicOpen a) :
          Set (CoefficientSystem.Constructions.Foundations.coefficientBase (𝓞 K) K s)) := by
  refine ⟨reciprocalCoefficientSet s a, subset_reciprocalCoefficientSet s a, ?_⟩
  rw [reciprocalCoefficientBaseMap_eq]
  exact specMap_range_subset_basicOpen_of_unit (reciprocalCoefficientHom s a).toRingHom
    a (reciprocalCoefficientHom_isUnit s a ha)

theorem proper_coefficient_model_eventually_smooth
    {K : Type u} [Field K] [NumberField K] {s : Finset K}
    (M : Over (CoefficientSystem.Constructions.Foundations.coefficientBase (𝓞 K) K s)) [IsProper M.hom]
    [Smooth ((Over.pullback (CoefficientSystem.Constructions.Foundations.genericBaseMap (𝓞 K) K s)).obj M).hom] :
    ∃ (t : Finset K) (h : s ⊆ t),
      Smooth ((Over.pullback (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (𝓞 K) K h)).obj M).hom := by
  have := ModelFiniteness.Constructions.Foundations.coefficientBase_locallyNoetherian K s
  have : Smooth (pullback.snd M.hom
      (Spec.map (CommRingCat.ofHom (algebraMap (CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) K)))) :=
    ‹Smooth ((Over.pullback (CoefficientSystem.Constructions.Foundations.genericBaseMap (𝓞 K) K s)).obj M).hom›
  obtain ⟨a, ha, hsm⟩ := proper_smooth_generic_fiber_has_smooth_basicOpen
    (CoefficientSystem.Constructions.Foundations.coefficientRing (𝓞 K) K s) K M.hom
  obtain ⟨t, h, ht⟩ := coefficient_base_eventually_in_basicOpen s a ha
  have := hsm
  exact ⟨t, h, smooth_pullback_of_range_subset M.hom
    (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (𝓞 K) K h) (PrimeSpectrum.basicOpen a) ht⟩

end

end OAI.ArithmeticGeometry.Models.SpreadingOut.CoefficientSmoothness.Construction