File size: 9,365 Bytes
a72760f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.NumberTheory.PiExponent.Approximation.ModuleLinePowerLaws
import OAI.NumberTheory.PiExponent.Geometry.LineBundleGluingTransitions

namespace OAI

noncomputable section

namespace PiExponentSeshadri.LineBundleGluing
open AlgebraicGeometry CategoryTheory TopologicalSpace Opposite MonoidalCategory
open PiExponentSeshadri.Geometry PiExponentSeshadri.TensorPure
variable {X : Scheme} {ι : Type} {U : ι → X.Opens}

def Cocycle.one : Cocycle U where
  transition _ _ _ _ _ := 1
  restriction _ _ _ _ _ := by simp
  identity _ _ _ := rfl
  cocycle _ _ _ _ _ _ _ := one_mul _

def Cocycle.inverse (c : Cocycle U) : Cocycle U where
  transition i j W hi hj := (c.transition i j W hi hj)⁻¹
  restriction := by
    intro i j V W h hi hj
    have h' : restrictUnit h (c.transition i j _ hi hj) =
        c.transition i j _ (h.trans hi) (h.trans hj) := Units.ext (c.restriction i j h hi hj)
    exact congrArg Units.val ((map_inv (restrictUnit h) _).symm.trans (congrArg Inv.inv h'))
  identity i W hi := by rw [c.identity, inv_one]
  cocycle i j k W hi hj hk := by rw [← mul_inv, c.cocycle]

def inverseProduct (c : Cocycle U) (V : X.Opens)
    (s : sections c V) (t : sections c.inverse V) : sections (Cocycle.one (U := U)) V :=
  ⟨fun p => s.val p * t.val p, by
    constructor
    · intro i W W' hW hi h
      change X.presheaf.map (homOfLE h).op (_ * _) = _
      rw [map_mul, s.property.1 i W W' hW hi h, t.property.1 i W W' hW hi h]
    · intro i j W hW hi hj
      change s.val ⟨i,W,hW,hi⟩ * t.val ⟨i,W,hW,hi⟩ = 1 * _
      rw [s.property.2 i j W hW hi hj, t.property.2 i j W hW hi hj, one_mul]
      change (_ * _) * ((↑((c.transition i j W hi hj)⁻¹ : Γ(X,W)ˣ) : Γ(X,W)) * _) = _
      rw [mul_mul_mul_comm, Units.mul_inv, one_mul]⟩

def inverseProductMap (c : Cocycle U) :
    PresheafOfModulesOfCommRing.Monoidal.tensorObj (R := X.presheaf)
      (presheaf c) (presheaf c.inverse) ⟶ presheaf (Cocycle.one (U := U)) where
  app V := ModuleCat.MonoidalCategory.tensorLift (inverseProduct c V.unop)
    (by intros; apply Subtype.ext; funext p; exact add_mul _ _ _)
    (by intros; apply Subtype.ext; funext p; exact mul_assoc _ _ _)
    (by intros; apply Subtype.ext; funext p; exact mul_add _ _ _)
    (by intros; apply Subtype.ext; funext p; exact mul_left_comm _ _ _)
  naturality {V W} f := by
    apply ModuleCat.MonoidalCategory.tensor_ext
    intro s t
    rfl

def trivialCoefficientMap : (structureSheaf X).val ⟶ presheaf (Cocycle.one (U := U)) where
  app V := ModuleCat.ofHom (R := Γ(X, V.unop))
    (X := ModuleCat.of Γ(X, V.unop) Γ(X, V.unop))
    (Y := ModuleCat.of Γ(X, V.unop) (sections (Cocycle.one (U := U)) V.unop)) {
    toFun a := ⟨fun p => X.presheaf.map (homOfLE p.2.property.1).op a, by
      constructor
      · intro i W W' hW hi h
        change (X.presheaf.map _ ≫ X.presheaf.map _) a = _
        rw [← Functor.map_comp]
        rfl
      · intros; exact (one_mul _).symm⟩
    map_add' a b := by apply Subtype.ext; funext p; exact map_add _ _ _
    map_smul' a b := by apply Subtype.ext; funext p; exact map_mul _ _ _ }
  naturality {V W} f := by
    apply ModuleCat.hom_ext
    apply LinearMap.ext
    intro a
    apply Subtype.ext
    funext p
    change (X.presheaf.map _ ≫ X.presheaf.map _) a = _
    rw [← Functor.map_comp]
    rfl

lemma cocycleUnit_restrict_isIso (c : Cocycle U) (i : ι) :
    IsIso ((modulePresheafRestrict (U i).ι).map ((adj X).unit.app (presheaf c))) := by
  let R : PresheafOfModules X.ringCatSheaf.obj ⥤
      PresheafOfModules (U i).toScheme.ringCatSheaf.obj := modulePresheafRestrict (U i).ι
  have hη : IsIso ((adj (U i).toScheme).unit.app (R.obj (presheaf c))) :=
    sheafification_unit_isIso_of_iso _ (structureSheaf (U i).toScheme)
      (chartPresheafFrame c i)
  have hh : IsIso (R.map ((adj X).unit.app (presheaf c)) ≫
      ((moduleSheafificationRestrict (U i).ι).hom.app (presheaf c)).val) := by
    erw [sheafify_restrict_unit]
    exact hη
  let V : (U i).toScheme.Modules ⥤ PresheafOfModules (U i).toScheme.ringCatSheaf.obj :=
    SheafOfModules.forget (U i).toScheme.ringCatSheaf
  let hv : IsIso (C := PresheafOfModules (U i).toScheme.ringCatSheaf.obj)
      (((moduleSheafificationRestrict (U i).ι).hom.app (presheaf c)).val) :=
    (V.mapIso ((moduleSheafificationRestrict (U i).ι).app (presheaf c))).isIso_hom
  exact (@isIso_comp_right_iff (PresheafOfModules (U i).toScheme.ringCatSheaf.obj)
    _ _ _ _ _ _ hv).mp hh

lemma trivialCoefficientMap_frame (i : ι) :
    (modulePresheafRestrict (U i).ι).map (trivialCoefficientMap (U := U)) ≫
      (chartPresheafFrame (Cocycle.one (U := U)) i).hom =
    (Scheme.Modules.restrictUnitIso (U i).ι).hom.val := by
  ext V a
  change X.presheaf.map (homOfLE (show (U i).ι ''ᵁ V.unop ≤ (U i).ι ''ᵁ V.unop from le_rfl)).op a = _
  simp only [homOfLE_refl, op_id, CategoryTheory.Functor.map_id]
  change a = ((U i).ι.appIso V.unop).hom a
  simp only [Scheme.Opens.ι_appIso, Iso.refl_hom]
  rfl

lemma trivialCoefficientMap_restrict_isIso (i : ι) :
    IsIso ((modulePresheafRestrict (U i).ι).map (trivialCoefficientMap (U := U))) := by
  let V : (U i).toScheme.Modules ⥤ PresheafOfModules (U i).toScheme.ringCatSheaf.obj :=
    SheafOfModules.forget (U i).toScheme.ringCatSheaf
  have hv : IsIso (C := PresheafOfModules (U i).toScheme.ringCatSheaf.obj)
      ((Scheme.Modules.restrictUnitIso (U i).ι).hom.val) :=
    (V.mapIso (Scheme.Modules.restrictUnitIso (U i).ι)).isIso_hom
  have hh : IsIso ((modulePresheafRestrict (U i).ι).map (trivialCoefficientMap (U := U)) ≫
      (chartPresheafFrame (Cocycle.one (U := U)) i).hom) := by
    rw [trivialCoefficientMap_frame]
    exact hv
  let hc : IsIso (C := PresheafOfModules (U i).toScheme.ringCatSheaf.obj)
      (chartPresheafFrame (Cocycle.one (U := U)) i).hom :=
    (chartPresheafFrame (Cocycle.one (U := U)) i).isIso_hom
  exact (@isIso_comp_right_iff (PresheafOfModules (U i).toScheme.ringCatSheaf.obj)
    _ _ _ _ _ _ hc).mp hh

lemma inverseProductMap_frame (c : Cocycle U) (i : ι) :
    (modulePresheafRestrict (U i).ι).map (inverseProductMap c) ≫
      (chartPresheafFrame (Cocycle.one (U := U)) i).hom =
    (modulePresheafTensorRestrict (U i) (presheaf c) (presheaf c.inverse)).hom ≫
      PresheafOfModulesOfCommRing.Monoidal.tensorHom (R := (U i).toScheme.presheaf)
        (chartPresheafFrame c i).hom (chartPresheafFrame c.inverse i).hom ≫
      (by
        let : MonoidalCategory (PresheafOfModules (U i).toScheme.ringCatSheaf.obj) :=
          PresheafOfModulesOfCommRing.monoidalCategory (R := (U i).toScheme.presheaf)
        exact (λ_ (structureSheaf (U i).toScheme).val).hom) := by
  let : MonoidalCategory (PresheafOfModules (U i).toScheme.ringCatSheaf.obj) :=
    PresheafOfModulesOfCommRing.monoidalCategory (R := (U i).toScheme.presheaf)
  let l := (modulePresheafRestrict (U i).ι).map (inverseProductMap c) ≫
    (chartPresheafFrame (Cocycle.one (U := U)) i).hom
  let r := (modulePresheafTensorRestrict (U i) (presheaf c) (presheaf c.inverse)).hom ≫
    PresheafOfModulesOfCommRing.Monoidal.tensorHom (R := (U i).toScheme.presheaf)
      (chartPresheafFrame c i).hom (chartPresheafFrame c.inverse i).hom ≫
    (λ_ (structureSheaf (U i).toScheme).val).hom
  change l = r
  ext V : 1
  apply ModuleCat.hom_ext
  apply LinearMap.ext
  intro z
  induction z using TensorProduct.inductionOn with
  | tmul s t => rfl
  | add a b ha hb =>
      exact ((l.app V).hom.map_add a b).trans
        ((congrArg₂ (· + ·) ha hb).trans ((r.app V).hom.map_add a b).symm)

lemma inverseProductMap_restrict_isIso (c : Cocycle U) (i : ι) :
    IsIso ((modulePresheafRestrict (U i).ι).map (inverseProductMap c)) := by
  let : MonoidalCategory (PresheafOfModules (U i).toScheme.ringCatSheaf.obj) :=
    PresheafOfModulesOfCommRing.monoidalCategory (R := (U i).toScheme.presheaf)
  let e := modulePresheafTensorRestrict (U i) (presheaf c) (presheaf c.inverse) ≪≫
    tensorIso (chartPresheafFrame c i) (chartPresheafFrame c.inverse i) ≪≫
      λ_ (structureSheaf (U i).toScheme).val
  have hh : IsIso ((modulePresheafRestrict (U i).ι).map (inverseProductMap c) ≫
      (chartPresheafFrame (Cocycle.one (U := U)) i).hom) := by
    rw [inverseProductMap_frame]
    exact e.isIso_hom
  let hc : IsIso (C := PresheafOfModules (U i).toScheme.ringCatSheaf.obj)
      (chartPresheafFrame (Cocycle.one (U := U)) i).hom :=
    (chartPresheafFrame (Cocycle.one (U := U)) i).isIso_hom
  exact (@isIso_comp_right_iff (PresheafOfModules (U i).toScheme.ringCatSheaf.obj)
    _ _ _ _ _ _ hc).mp hh

lemma sheafification_isIso_of_chart {P Q : PresheafOfModules X.ringCatSheaf.obj}
    (f : P ⟶ Q) (hcover : ⊤ ≤ ⨆ i, U i)
    (hf : ∀ i, IsIso ((modulePresheafRestrict (U i).ι).map f)) :
    IsIso ((PresheafOfModules.sheafification (𝟙 X.ringCatSheaf.obj)).map f) := by
  apply PiExponent.NumericalAmpleness.isIso_of_locally_isIso
  intro x
  obtain ⟨i, hi⟩ := Opens.mem_iSup.mp (hcover (show x ∈ (⊤ : X.Opens) from trivial))
  refine ⟨U i, hi, ?_⟩
  apply (NatIso.isIso_map_iff (moduleSheafificationRestrict (U i).ι) f).mpr
  have := hf i
  change IsIso ((PresheafOfModules.sheafification (𝟙 (U i).toScheme.ringCatSheaf.obj)).map
    ((modulePresheafRestrict (U i).ι).map f))
  infer_instance

end PiExponentSeshadri.LineBundleGluing

end

end OAI