import Mathlib.AlgebraicGeometry.IdealSheaf.Functorial /-! # Global Ideal Pullback -/ namespace OAI.AlgebraicGeometry.Divisors.LineBundles.Open.GlobalIdealPullback.BundleCycles noncomputable section /-! # LineBundleCycles: actual open pullback of an ideal generated by global regular equations -/ open _root_.AlgebraicGeometry _root_.CategoryTheory theorem openInclusion_appTop {X : Scheme.{0}} {U V : X.Opens} (h : U ≤ V) : (X.homOfLE h).appTop = V.topIso.hom ≫ X.presheaf.map (homOfLE h).op ≫ U.topIso.inv := by rw [Scheme.homOfLE_appTop, Scheme.Opens.topIso_hom, Scheme.Opens.topIso_inv] exact (X.presheaf.map_comp (eqToHom V.ι_image_top.symm).op ((homOfLE h).op ≫ (eqToHom U.ι_image_top).op)).trans (congrArg (fun k => X.presheaf.map (eqToHom V.ι_image_top.symm).op ≫ k) (X.presheaf.map_comp (homOfLE h).op (eqToHom U.ι_image_top).op)) variable {X Y : Scheme.{0}} (i : X ⟶ Y) [IsOpenImmersion i] theorem openGlobalSection_naturality (U : X.Opens) : Y.presheaf.map (homOfLE (show i ''ᵁ U ≤ ⊤ from le_top)).op ≫ (i.appIso U).hom = i.appTop ≫ X.presheaf.map (homOfLE (show U ≤ ⊤ from le_top)).op := by rw [Scheme.Hom.appIso_hom', Scheme.Hom.map_appLE] rfl theorem commRingIso_comap_inv {R S : CommRingCat.{0}} (e : R ≅ S) (I : Ideal R) : I.comap e.inv.hom = I.map e.hom.hom := (Ideal.map_comap_of_equiv e.commRingCatIsoToRingEquiv).symm theorem openIdeal_comap_ofIdealTop (I : Ideal Γ(Y, ⊤)) : (Scheme.IdealSheafData.ofIdealTop I).comap i = Scheme.IdealSheafData.ofIdealTop (I.map i.appTop.hom) := by apply Scheme.IdealSheafData.ext funext U rw [Scheme.IdealSheafData.ideal_comap_of_isOpenImmersion, Scheme.IdealSheafData.ofIdealTop_ideal, Scheme.IdealSheafData.ofIdealTop_ideal] change (I.map (Y.presheaf.map (homOfLE (show i ''ᵁ U.val ≤ ⊤ from le_top)).op).hom).comap (i.appIso U.val).inv.hom = (I.map i.appTop.hom).map (X.presheaf.map (homOfLE (show U.val ≤ ⊤ from le_top)).op).hom rw [commRingIso_comap_inv, Ideal.map_map, Ideal.map_map] apply congrArg (Ideal.map · I) exact congrArg CommRingCat.Hom.hom (openGlobalSection_naturality i U) end end OAI.AlgebraicGeometry.Divisors.LineBundles.Open.GlobalIdealPullback.BundleCycles