import OAI.RepresentationTheory.Theta.Geometric.Projective.Charts import Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Functor import Mathlib.RingTheory.MvPolynomial.Ideal /-! # Map -/ namespace OAI.RepresentationTheory.Theta.Geometric.Projective.Map.RelativeProjective noncomputable section open _root_.CategoryTheory _root_.AlgebraicGeometry variable (R : Type) [CommRing R] abbrev projectiveSpace (n : ℕ) : Scheme := Proj (Charts.RelativeProjective.projectiveGrading R n) def projectiveSpaceToBase (n : ℕ) : projectiveSpace R n ⟶ Spec (.of R) := Proj.toSpecZero (Charts.RelativeProjective.projectiveGrading R n) ≫ Spec.map (CommRingCat.ofHom (Charts.RelativeProjective.degreeZeroConstants R n).toRingHom) theorem projectiveSpaceToBase_chart (n m : ℕ) (f : Charts.RelativeProjective.homogeneousCoordinateRing R n) (hf : f ∈ Charts.RelativeProjective.projectiveGrading R n m) (hm : 0 < m) : Proj.awayι (Charts.RelativeProjective.projectiveGrading R n) f hf hm ≫ projectiveSpaceToBase R n = Spec.map (CommRingCat.ofHom ((HomogeneousLocalization.fromZeroRingHom (Charts.RelativeProjective.projectiveGrading R n) (Submonoid.powers f)).comp (Charts.RelativeProjective.degreeZeroConstants R n).toRingHom)) := by change Proj.awayι _ f hf hm ≫ (Proj.toSpecZero _ ≫ Spec.map _) = _ rw [← Category.assoc, Proj.awayι_toSpecZero, ← Spec.map_comp] rfl /-- Every positive-degree homogeneous polynomial lies in the ideal of variables. -/ theorem positive_homogeneous_mem_coordinateIdeal (n d : ℕ) (hd : 0 < d) (f : Charts.RelativeProjective.homogeneousCoordinateRing R n) (hf : f ∈ Charts.RelativeProjective.projectiveGrading R n d) : f ∈ Ideal.span (Set.range (MvPolynomial.X : Fin (n + 1) → Charts.RelativeProjective.homogeneousCoordinateRing R n)) := by have hpow : f ∈ MvPolynomial.idealOfVars (Fin (n + 1)) R ^ 1 := by rw [MvPolynomial.mem_pow_idealOfVars_iff] intro m hm have hdeg : m.degree = d := by simpa only [Finsupp.degree_eq_weight_one, Pi.one_def] using hf (MvPolynomial.mem_support_iff.mp hm) simpa only [hdeg] using (Nat.succ_le_iff.mpr hd) simpa only [pow_one] using hpow /-- The irrelevant ideal in the standard polynomial grading is generated by the variables. -/ theorem projective_irrelevant_eq_coordinateIdeal (n : ℕ) : (HomogeneousIdeal.irrelevant (Charts.RelativeProjective.projectiveGrading R n)).toIdeal = Ideal.span (Set.range (MvPolynomial.X : Fin (n + 1) → Charts.RelativeProjective.homogeneousCoordinateRing R n)) := by apply le_antisymm · apply (HomogeneousIdeal.toIdeal_irrelevant_le (Charts.RelativeProjective.projectiveGrading R n)).mpr intro d hd f hf exact positive_homogeneous_mem_coordinateIdeal R n d hd f hf · rw [Ideal.span_le] rintro f ⟨i, rfl⟩ exact HomogeneousIdeal.mem_irrelevant_of_mem (Charts.RelativeProjective.projectiveGrading R n) (by decide : 0 < 1) (MvPolynomial.isHomogeneous_X R i) /-- The usual coordinate open `Xᵢ ≠ 0` inside the genuine projective scheme. -/ abbrev projectiveCoordinateOpen (n : ℕ) (i : Fin (n + 1)) : (projectiveSpace R n).Opens := Proj.basicOpen (Charts.RelativeProjective.projectiveGrading R n) (MvPolynomial.X i) @[simp] theorem mem_projectiveCoordinateOpen (n : ℕ) (i : Fin (n + 1)) (x : projectiveSpace R n) : x ∈ projectiveCoordinateOpen R n i ↔ MvPolynomial.X i ∉ x.asHomogeneousIdeal := Proj.mem_basicOpen (Charts.RelativeProjective.projectiveGrading R n) (MvPolynomial.X i) x /-- Coordinate opens cover the projective scheme. -/ theorem iSup_projectiveCoordinateOpen (n : ℕ) : (⨆ i, projectiveCoordinateOpen R n i) = ⊤ := by apply Proj.iSup_basicOpen_eq_top exact (projective_irrelevant_eq_coordinateIdeal R n).le /-- In particular, every scheme point belongs to at least one coordinate chart. -/ theorem exists_mem_projectiveCoordinateOpen (n : ℕ) (x : projectiveSpace R n) : ∃ i, x ∈ projectiveCoordinateOpen R n i := by apply TopologicalSpace.Opens.mem_iSup.mp rw [iSup_projectiveCoordinateOpen] trivial /-- The finite standard affine open cover, with chart rings the actual degree-zero localizations. -/ def projectiveCoordinateAffineCover (n : ℕ) : (projectiveSpace R n).AffineOpenCover := Proj.affineOpenCoverOfIrrelevantLESpan (Charts.RelativeProjective.projectiveGrading R n) (fun (i : Fin (n + 1)) => MvPolynomial.X i) (m := fun _ => 1) (fun i => MvPolynomial.isHomogeneous_X R i) (fun _ => by decide) (projective_irrelevant_eq_coordinateIdeal R n).le /-- Its indexing type has precisely the `n + 1` standard coordinates. -/ @[simp] theorem projectiveCoordinateAffineCover_index (n : ℕ) : (projectiveCoordinateAffineCover R n).I₀ = Fin (n + 1) := rfl /-- Each coordinate basic open is affine. -/ theorem projectiveCoordinateOpen_isAffine (n : ℕ) (i : Fin (n + 1)) : IsAffineOpen (projectiveCoordinateOpen R n i) := Proj.isAffineOpen_basicOpen (Charts.RelativeProjective.projectiveGrading R n) (MvPolynomial.X i) (MvPolynomial.isHomogeneous_X R i) (by decide : 0 < 1) variable {R} {S : Type} [CommRing S] def coordinateGradedMap (f : R →+* S) (n : ℕ) : Charts.RelativeProjective.projectiveGrading R n →+*ᵍ Charts.RelativeProjective.projectiveGrading S n where toRingHom := MvPolynomial.map f map_mem h := h.map f @[simp] theorem coordinateGradedMap_X (f : R →+* S) (n : ℕ) (i : Fin (n + 1)) : coordinateGradedMap f n (MvPolynomial.X i) = MvPolynomial.X i := MvPolynomial.map_X f i theorem irrelevant_le_coordinateMap (f : R →+* S) (n : ℕ) : HomogeneousIdeal.irrelevant (Charts.RelativeProjective.projectiveGrading S n) ≤ (HomogeneousIdeal.irrelevant (Charts.RelativeProjective.projectiveGrading R n)).map (coordinateGradedMap f n) := by apply toIdeal_le_toIdeal_iff.mp rw [projective_irrelevant_eq_coordinateIdeal] apply Ideal.span_le.mpr rintro _ ⟨i, rfl⟩ rw [← coordinateGradedMap_X f n i] apply Ideal.mem_map_of_mem exact HomogeneousIdeal.mem_irrelevant_of_mem (Charts.RelativeProjective.projectiveGrading R n) Nat.zero_lt_one (MvPolynomial.isHomogeneous_X R i) def coefficientMap (f : R →+* S) (n : ℕ) : projectiveSpace S n ⟶ projectiveSpace R n := Proj.map (coordinateGradedMap f n) (irrelevant_le_coordinateMap f n) @[simp] theorem coefficientMap_preimage (f : R →+* S) (n : ℕ) (i : Fin (n + 1)) : coefficientMap f n ⁻¹ᵁ projectiveCoordinateOpen R n i = projectiveCoordinateOpen S n i := by change Proj.basicOpen (Charts.RelativeProjective.projectiveGrading S n) (coordinateGradedMap f n (MvPolynomial.X i)) = _ rw [coordinateGradedMap_X] end end OAI.RepresentationTheory.Theta.Geometric.Projective.Map.RelativeProjective