File size: 4,560 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
import Mathlib
import OAI.NumberTheory.PiExponent.Geometry.IntegralCurveExistence

namespace OAI

namespace PiExponent.CurveCycle
noncomputable section
open AlgebraicGeometry CategoryTheory TopologicalSpace Topology

theorem generic_stalk_isArtinian {X : Scheme.{0}} [IsLocallyNoetherian X]
    (x : X) (hx : closure {x} ∈ irreducibleComponents X) :
    IsArtinianRing (X.presheaf.stalk x) := by
  wlog hX : ∃ R : CommRingCat, X = Spec R
  · obtain ⟨i,x,rfl⟩ := X.affineCover.exists_eq x
    let hNoeth : IsLocallyNoetherian (X.affineCover.X i) :=
      LocallyOfFiniteType.isLocallyNoetherian (X.affineCover.f i)
    have hloc := this x (by
      rw [(X.affineCover.f i).isOpenEmbedding.closure_eq_preimage_closure_image,
        Set.image_singleton]
      exact preimage_mem_irreducibleComponents hx (X.affineCover.f i).isOpenEmbedding
        ⟨X.affineCover.f i x, subset_closure rfl, _, rfl⟩) ⟨_,rfl⟩
    let := hloc
    exact (asIso ((X.affineCover.f i).stalkMap x)).commRingCatIsoToRingEquiv.symm.isArtinianRing
  obtain ⟨R,rfl⟩ := hX
  let : IsNoetherianRing ((Spec R).presheaf.stalk x) := inferInstance
  change PrimeSpectrum R at x
  change closure {x} ∈ irreducibleComponents (PrimeSpectrum R) at hx
  have hp : x.asIdeal ∈ minimalPrimes R := by
    rwa [← PrimeSpectrum.vanishingIdeal_singleton,
      PrimeSpectrum.vanishingIdeal_mem_minimalPrimes]
  let : Ring.KrullDimLE 0 ((Spec R).presheaf.stalk x) := by
    exact Ring.KrullDimLE.of_isLocalization x.asIdeal hp ((Spec.structureSheaf R).presheaf.stalk x)
  exact IsNoetherianRing.isArtinianRing_of_krullDimLE_zero

def componentMultiplicity (X : Scheme.{0}) (C : irreducibleComponents X) : ℕ :=
  (Module.length (X.presheaf.stalk (genericPoints.ofComponent C).val)
    (X.presheaf.stalk (genericPoints.ofComponent C).val)).toNat

theorem componentMultiplicity_pos {X : Scheme.{0}} [IsLocallyNoetherian X]
    (C : irreducibleComponents X) : 0 < componentMultiplicity X C := by
  let x := (genericPoints.ofComponent C).val
  let : IsArtinianRing (X.presheaf.stalk x) :=
    generic_stalk_isArtinian x (genericPoints.ofComponent C).property
  exact ENat.toNat_pos (ne_of_gt Module.length_pos) Module.length_ne_top

def reducedComponent (X : Scheme.{0}) (C : irreducibleComponents X) : Scheme :=
  (Scheme.IdealSheafData.vanishingIdeal
    (⟨C.val,isClosed_of_mem_irreducibleComponents C.val C.property⟩ : Closeds X)).subscheme

def reducedComponentι (X : Scheme.{0}) (C : irreducibleComponents X) :
    reducedComponent X C ⟶ X :=
  (Scheme.IdealSheafData.vanishingIdeal
    (⟨C.val,isClosed_of_mem_irreducibleComponents C.val C.property⟩ : Closeds X)).subschemeι

instance reducedComponent_closed (X : Scheme.{0}) (C : irreducibleComponents X) :
    IsClosedImmersion (reducedComponentι X C) := by
  let I : X.IdealSheafData := Scheme.IdealSheafData.vanishingIdeal
    (⟨C.val,isClosed_of_mem_irreducibleComponents C.val C.property⟩ : Closeds X)
  change IsClosedImmersion I.subschemeι
  infer_instance

instance reducedComponent_integral (X : Scheme.{0}) (C : irreducibleComponents X) :
    IsIntegral (reducedComponent X C) := by
  let Z : Closeds X := ⟨C.val,isClosed_of_mem_irreducibleComponents C.val C.property⟩
  let I := Scheme.IdealSheafData.vanishingIdeal Z
  have hI : (I.support : Set X) = C.val := by
    simp only [I,Scheme.IdealSheafData.coe_support_vanishingIdeal]
    rfl
  let : IsReduced I.subscheme := NumericalAmpleness.isReduced_vanishingIdeal_subscheme Z
  let : IrreducibleSpace I.subscheme := by
    change IrreducibleSpace (I.support : Set X)
    rw [hI]
    exact Subtype.irreducibleSpace C.property.1
  change IsIntegral I.subscheme
  exact isIntegral_of_irreducibleSpace_of_isReduced _

def componentCurve {X : Scheme.{0}} (C : irreducibleComponents X)
    (hdim : topologicalKrullDim (C.val : Set X) = 1) :
    NumericalAmpleness.IntegralCurve X := by
  refine {
    scheme := reducedComponent X C
    embedding := reducedComponentι X C
    closedImmersion := inferInstance
    integral := inferInstance
    dimension := ?_ }
  change topologicalKrullDim
    ((Scheme.IdealSheafData.vanishingIdeal
      (⟨C.val,isClosed_of_mem_irreducibleComponents C.val C.property⟩ : Closeds X)).support : Set X) = 1
  have he : ((Scheme.IdealSheafData.vanishingIdeal
      (⟨C.val,isClosed_of_mem_irreducibleComponents C.val C.property⟩ : Closeds X)).support : Set X) = C.val := by
    simp only [Scheme.IdealSheafData.coe_support_vanishingIdeal]
    rfl
  rw [he]
  exact hdim

end
end PiExponent.CurveCycle

end OAI