File size: 2,758 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
import OAI.AlgebraicGeometry.PELModuli.IntegralModel.Coefficient.Models

/-! # Coefficient Models -/

namespace OAI.AlgebraicGeometry.PELModuli.IntegralModel.Affine.CoefficientModels.Coefficients

noncomputable section

/-! Finite coefficient models of affine schemes retain actual affineness
of the model, in addition to their generic comparison. -/

open _root_.CategoryTheory _root_.AlgebraicGeometry

variable {R K : Type} [CommRing R] [Field K] [Algebra R K]

theorem affine_has_affine_coefficient_model
    (A : Type) [CommRing A] [Algebra K A] [Algebra.FinitePresentation K A] :
    ∃ M : Coefficient.Models.Coefficients.CoefficientModel R K (ArithmeticGeometry.Models.Scheme.Constructions.Foundations.affineOver K A), IsAffine M.model.left := by
  classical
  let P := Algebra.Presentation.ofFinitePresentation K A
  let s : Finset K := P.finite_coeffs.toFinset
  let L := ArithmeticGeometry.Models.CoefficientSystem.Constructions.Foundations.coefficientRing R K s
  let : P.HasCoeffs L := ⟨fun c hc => ⟨⟨c, Algebra.subset_adjoin (by simpa [s] using hc)⟩, rfl⟩⟩
  let A₀ := P.ModelOfHasCoeffs L
  refine ⟨{
    coefficients := s
    model := ArithmeticGeometry.Models.Scheme.Constructions.Foundations.affineOver L A₀
    finitePresentation := ArithmeticGeometry.Models.Scheme.Constructions.Foundations.affineOver_finitePresentation L A₀
    genericIso := ArithmeticGeometry.Models.Scheme.Constructions.Foundations.baseChangeAffineIso L K A₀ ≪≫ ArithmeticGeometry.Models.Scheme.Constructions.Foundations.affineOverIso (P.tensorModelOfHasCoeffsEquiv L)
  }, ?_⟩
  exact inferInstanceAs (IsAffine (Spec (.of A₀)))

theorem isAffine_has_affine_coefficient_model
    (X : Over (Spec (.of K))) [IsAffine X.left]
    (hX : ArithmeticGeometry.Models.Scheme.Constructions.Foundations.FinitePresentationMorphism X.hom) :
    ∃ M : Coefficient.Models.Coefficients.CoefficientModel R K X, IsAffine M.model.left := by
  have : LocallyOfFinitePresentation X.hom := hX.1
  obtain ⟨φ, hφ⟩ := Spec.map_surjective (X.left.isoSpec.inv ≫ X.hom)
  let A := Γ(X.left, ⊤)
  let : Algebra K A := φ.hom.toAlgebra
  have hφFP : LocallyOfFinitePresentation (Spec.map φ) := by
    rw [hφ]
    infer_instance
  have : Algebra.FinitePresentation K A := (LocallyOfFinitePresentation.SpecMap_iff φ).mp hφFP
  obtain ⟨M, hM⟩ := affine_has_affine_coefficient_model (R := R) (K := K) A
  let e : X ≅ ArithmeticGeometry.Models.Scheme.Constructions.Foundations.affineOver K A := Over.isoMk X.left.isoSpec (by
    change X.left.isoSpec.hom ≫ Spec.map φ = X.hom
    rw [hφ, Iso.hom_inv_id_assoc])
  exact ⟨M.transport e.symm, hM⟩

end

end OAI.AlgebraicGeometry.PELModuli.IntegralModel.Affine.CoefficientModels.Coefficients