roseking's picture
Add lean source and binary files (part 9)
7f5fab8 verified
Raw History Blame
8.85 kB
19
lemma integrallyClosed_of_affine_open_immersion
    {X : Scheme.{u}} (hNormal : ∀ x : X, IsIntegrallyClosed (X.presheaf.stalk x))
    (A : Type u) [CommRing A] [IsDomain A]
    (j : Spec (.of A) ⟶ X) [IsOpenImmersion j] : IsIntegrallyClosed A := by
proof · 8 lines
  apply IsIntegrallyClosed.of_localization_maximal
  intro p hp hpmax
  let x : Spec (.of A) := (⟨p, inferInstance⟩ : PrimeSpectrum A)
  let := hNormal (j x)
  have hs : IsIntegrallyClosed ((Spec (.of A)).presheaf.stalk x) :=
    IsIntegrallyClosed.of_equiv (asIso (j.stalkMap x)).commRingCatIsoToRingEquiv
  exact IsIntegrallyClosed.of_equiv (h := hs)
    (StructureSheaf.stalkIso A (⟨p, inferInstance⟩ : PrimeSpectrum A)).toRingEquiv.symm
32
lemma integrallyClosed_spec_stalk (A : Type u) [CommRing A] [IsDomain A]
    [IsIntegrallyClosed A] (x : Spec (.of A)) :
    IsIntegrallyClosed ((Spec (.of A)).presheaf.stalk x) := by
proof · 5 lines
  change PrimeSpectrum A at x
  let : IsIntegrallyClosed (Localization.AtPrime x.asIdeal) :=
    isIntegrallyClosed_of_isLocalization _ x.asIdeal.primeCompl
      x.asIdeal.primeCompl_le_nonZeroDivisors
  exact IsIntegrallyClosed.of_equiv (StructureSheaf.stalkIso A x).toRingEquiv
42
lemma scalarExtensionChart_range
    (K A L : Type u) [Field K] [CommRing A] [Field L]
    [Algebra K A] [Algebra K L]
    {X : Scheme.{u}} (f : X ⟶ Spec (.of K))
    (j : Spec (.of A) ⟶ X)
    (hj : Spec.map (CommRingCat.ofHom (algebraMap K A)) = j ≫ f) :
    Set.range (scalarExtensionChart K A L f j hj) =
      pullback.fst f (Spec.map (CommRingCat.ofHom (algebraMap K L))) ⁻¹' Set.range j := by
proof · 6 lines
  have hs : Set.range (pullbackSpecIso K A L).inv = Set.univ := by
    simp
  unfold scalarExtensionChart
  rw [Scheme.Hom.comp_base, TopCat.coe_comp, Set.range_comp, hs,
    Set.image_univ, AlgebraicGeometry.Scheme.Pullback.range_map]
  simp
59
lemma scalarExtensionChart_normal_stalk
    (K A L : Type u) [Field K] [CommRing A] [IsDomain A] [Field L]
    [Algebra K A] [Algebra K L] [IsGalois K L] [Module.Finite K L]
    {X : Scheme.{u}} (f : X ⟶ Spec (.of K)) [GeometricallyIntegral f]
    (hNormal : ∀ x : X, IsIntegrallyClosed (X.presheaf.stalk x))
    (j : Spec (.of A) ⟶ X) [IsOpenImmersion j]
    (hj : Spec.map (CommRingCat.ofHom (algebraMap K A)) = j ≫ f)
    (x : Spec (.of (A ⊗[K] L))) :
    IsIntegrallyClosed ((pullback f (Spec.map (CommRingCat.ofHom (algebraMap K L)))).presheaf.stalk
      (scalarExtensionChart K A L f j hj x)) := by
proof · 6 lines
  let := integrallyClosed_of_affine_open_immersion hNormal A j
  let := scalarExtensionChart_domain K A L f j hj
  let := tensor_isIntegrallyClosed_of_galois K A L (FractionRing A)
  let := integrallyClosed_spec_stalk (A ⊗[K] L) x
  exact IsIntegrallyClosed.of_equiv
    (asIso ((scalarExtensionChart K A L f j hj).stalkMap x)).commRingCatIsoToRingEquiv.symm
78
theorem galois_baseChange_normal
    (K L : Type u) [Field K] [Field L] [Algebra K L] [IsGalois K L]
    [Module.Finite K L] {X : Scheme.{u}} [IsIntegral X]
    (f : X ⟶ Spec (.of K)) [GeometricallyIntegral f]
    (hNormal : ∀ x : X, IsIntegrallyClosed (X.presheaf.stalk x))
    (y : (pullback f (Spec.map (CommRingCat.ofHom (algebraMap K L))) : Scheme)) :
    IsIntegrallyClosed ((pullback f
      (Spec.map (CommRingCat.ofHom (algebraMap K L)))).presheaf.stalk y) := by
proof · 21 lines
  let z := pullback.fst f (Spec.map (CommRingCat.ofHom (algebraMap K L))) y
  let i := X.affineOpenCover.idx z
  let A := X.affineOpenCover.X i
  let j : Spec A ⟶ X := X.affineOpenCover.f i
  let : IsOpenImmersion j := X.affineOpenCover.map_prop i
  have hc : z ∈ Set.range j := X.affineOpenCover.covers z
  let : Nonempty (Spec A) := ⟨hc.choose⟩
  let : IsIntegral (Spec A) := isIntegral_of_isOpenImmersion j
  have hA : IsDomain A := (affine_isIntegral_iff A).mp inferInstance
  let := hA
  let b : CommRingCat.of K ⟶ A := (Spec.map_surjective (j ≫ f)).choose
  let : Algebra K A := b.hom.toAlgebra
  have hj : Spec.map (CommRingCat.ofHom (algebraMap K A)) = j ≫ f :=
    (Spec.map_surjective (j ≫ f)).choose_spec
  have hy : y ∈ Set.range (scalarExtensionChart K A L f j hj) := by
    rw [scalarExtensionChart_range]
    exact hc
  obtain ⟨x, hx⟩ := hy
  have hn := @scalarExtensionChart_normal_stalk K A L _ A.commRing hA _ _ _ _ _
    X f _ hNormal j _ hj x
  exact hx ▸ hn
115
noncomputable def fieldAffineChartRing (X : Scheme.{u}) [IsIntegral X] : CommRingCat.{u} :=
body · 1 line
  X.affineOpenCover.X (X.affineOpenCover.idx (genericPoint X))
118
noncomputable def fieldAffineChartMap (X : Scheme.{u}) [IsIntegral X] :
    Spec (fieldAffineChartRing X) ⟶ X :=
body · 1 line
  X.affineOpenCover.f (X.affineOpenCover.idx (genericPoint X))
122
instance (X : Scheme.{u}) [IsIntegral X] : IsOpenImmersion (fieldAffineChartMap X) := by
body · 1 line
  exact X.affineOpenCover.map_prop _
125
instance (X : Scheme.{u}) [IsIntegral X] : Nonempty (Spec (fieldAffineChartRing X)) := by
body · 2 lines
  obtain ⟨x, _⟩ := X.affineOpenCover.covers (genericPoint X)
  exact ⟨x⟩
129
instance fieldAffineChartRing_isDomain (X : Scheme.{u}) [IsIntegral X] : IsDomain (fieldAffineChartRing X) := by
body · 2 lines
  apply (affine_isIntegral_iff _).mp
  exact isIntegral_of_isOpenImmersion (fieldAffineChartMap X)
133
instance (X : Scheme.{u}) [IsIntegral X] : IsDominant (fieldAffineChartMap X) :=
body · 1 line
  isDominant_of_openIntegral _
136
noncomputable def fieldAffineChartHom (K : Type u) [Field K]
    {X : Scheme.{u}} [IsIntegral X] (f : X ⟶ Spec (.of K)) :
    CommRingCat.of K ⟶ fieldAffineChartRing X :=
body · 1 line
  (Spec.map_surjective (fieldAffineChartMap X ≫ f)).choose
141
lemma fieldAffineChartHom_spec (K : Type u) [Field K]
    {X : Scheme.{u}} [IsIntegral X] (f : X ⟶ Spec (.of K)) :
    Spec.map (fieldAffineChartHom K f) = fieldAffineChartMap X ≫ f :=
proof · 1 line
  (Spec.map_surjective (fieldAffineChartMap X ≫ f)).choose_spec
146
@[instance_reducible] noncomputable def fieldAffineChartAlgebra (K : Type u) [Field K]
    {X : Scheme.{u}} [IsIntegral X] (f : X ⟶ Spec (.of K)) :
    Algebra K (fieldAffineChartRing X) :=
body · 1 line
  (fieldAffineChartHom K f).hom.toAlgebra
151
lemma fieldAffineChart_algebraMap_spec (K : Type u) [Field K]
    {X : Scheme.{u}} [IsIntegral X] (f : X ⟶ Spec (.of K)) :
    letI := fieldAffineChartAlgebra K f
proof · 3 lines
    Spec.map (CommRingCat.ofHom (algebraMap K (fieldAffineChartRing X))) =
      fieldAffineChartMap X ≫ f :=
  fieldAffineChartHom_spec K f
159
@[instance_reducible] noncomputable def schemeBaseChangeGaloisAction
    (K L : Type u) [Field K] [Field L] [Algebra K L] [Module.Finite K L]
    {X : Scheme.{u}} [IsIntegral X]
    (f : X ⟶ Spec (.of K)) [GeometricallyIntegral f] :
    MulSemiringAction (Gal(L/K))
      (pullback f (Spec.map (CommRingCat.ofHom (algebraMap K L)))).functionField := by
body · 4 lines
  letI := fieldAffineChartAlgebra K f
  exact scalarExtensionGaloisAction K (fieldAffineChartRing X) L
    (FractionRing (fieldAffineChartRing X)) f (fieldAffineChartMap X)
      (fieldAffineChart_algebraMap_spec K f)
172
theorem same_divisor_descends_from_galois_extension
    (K L : Type u) [Field K] [Field L] [Algebra K L] [IsGalois K L]
    [Module.Finite K L] {X : Scheme.{u}} [IsIntegral X]
    (f : X ⟶ Spec (.of K)) [GeometricallyIntegral f] [IsProper f]
    (hNormal : ∀ x : X, IsIntegrallyClosed (X.presheaf.stalk x))
    (u : (pullback f (Spec.map (CommRingCat.ofHom (algebraMap K L)))).functionFieldˣ)
    (hdiv : letI := schemeBaseChangeGaloisAction K L f
      letI : IsNoetherian (pullback f
        (Spec.map (CommRingCat.ofHom (algebraMap K L)))) := {}
      ∀ σ : Gal(L/K), principalDivisor _ (σ • u) = principalDivisor _ u) :
    letI : IsNoetherian (pullback f
      (Spec.map (CommRingCat.ofHom (algebraMap K L)))) := {}
proof · 11 lines
    ∃ v : X.functionFieldˣ,
      principalDivisor _ (Units.map (functionFieldPullback (pullback.fst f
        (Spec.map (CommRingCat.ofHom (algebraMap K L))))).toMonoidHom v) =
          principalDivisor _ u := by
  let := fieldAffineChartAlgebra K f
  let := fieldAffineChartRing_isDomain X
  have hmain := @same_divisor_descends_from_galois_baseChange K (fieldAffineChartRing X) L
    (FractionRing (fieldAffineChartRing X)) _ _ (fieldAffineChartRing_isDomain X)
    _ _ _ _ _ _ _ _ _ _ X _ f _ _ (fieldAffineChartMap X) _ _
      (fieldAffineChart_algebraMap_spec K f) (galois_baseChange_normal K L f hNormal) u
  exact hmain hdiv