import OAI.AlgebraicGeometry.Resolution.Blowups.IdealSheaf.AffinePullback /-! # Principal Ideal Sheaf -/ namespace OAI.AlgebraicGeometry.Resolution.Blowups.Locally.PrincipalIdealSheaf.Construction noncomputable section /-! Local principality of actual native ideal sheaves and its stability under products and pullback. -/ open _root_.CategoryTheory _root_.AlgebraicGeometry universe u /-- At every point the actual affine ideal is generated by one section. -/ def LocallyPrincipalIdealSheaf {X : Scheme.{u}} (I : X.IdealSheafData) : Prop := ∀ x : X, ∃ (U : X.affineOpens), x ∈ U.1 ∧ ∃ r : Γ(X, U), I.ideal U = Ideal.span {r} theorem principal_idealSheaf_restrict {X : Scheme.{u}} (I : X.IdealSheafData) {U V : X.affineOpens} (hVU : V ≤ U) (r : Γ(X, U)) (hr : I.ideal U = Ideal.span {r}) : I.ideal V = Ideal.span {(X.presheaf.map (homOfLE hVU).op).hom r} := by rw [← I.map_ideal hVU, hr, Ideal.map_span, Set.image_singleton] namespace LocallyPrincipalIdealSheaf theorem top (X : Scheme.{u}) : LocallyPrincipalIdealSheaf (⊤ : X.IdealSheafData) := by intro x obtain ⟨_, ⟨U, hU, rfl⟩, hx, _⟩ := X.isBasis_affineOpens.exists_subset_of_mem_open (Set.mem_univ x) isOpen_univ exact ⟨⟨U, hU⟩, hx, 1, Ideal.span_singleton_one.symm⟩ theorem mul {X : Scheme.{u}} {I J : X.IdealSheafData} (hI : LocallyPrincipalIdealSheaf I) (hJ : LocallyPrincipalIdealSheaf J) : LocallyPrincipalIdealSheaf (I * J) := by intro x obtain ⟨U, hxU, r, hr⟩ := hI x obtain ⟨V, hxV, s, hs⟩ := hJ x obtain ⟨_, ⟨W, hW, rfl⟩, hxW, hWU⟩ := X.isBasis_affineOpens.exists_subset_of_mem_open (show x ∈ (U.1 ⊓ V.1 : X.Opens) from ⟨hxU, hxV⟩) (U.1 ⊓ V.1).isOpen let A : X.affineOpens := ⟨W, hW⟩ have hAU : A ≤ U := fun y hy => (hWU hy).1 have hAV : A ≤ V := fun y hy => (hWU hy).2 let r' := (X.presheaf.map (homOfLE hAU).op).hom r let s' := (X.presheaf.map (homOfLE hAV).op).hom s refine ⟨A, hxW, r' * s', ?_⟩ change I.ideal A * J.ideal A = _ rw [principal_idealSheaf_restrict I hAU r hr, principal_idealSheaf_restrict J hAV s hs, Ideal.span_singleton_mul_span_singleton] theorem pow {X : Scheme.{u}} {I : X.IdealSheafData} (hI : LocallyPrincipalIdealSheaf I) (n : ℕ) : LocallyPrincipalIdealSheaf (I ^ n) := by induction n with | zero => simpa only [pow_zero, Scheme.IdealSheafData.one_eq_top] using top X | succ n ih => rw [pow_succ]; exact ih.mul hI theorem comap {X Y : Scheme.{u}} {I : X.IdealSheafData} (hI : LocallyPrincipalIdealSheaf I) (f : Y ⟶ X) : LocallyPrincipalIdealSheaf (I.comap f) := by intro y obtain ⟨U, hyU, r, hr⟩ := hI (f y) obtain ⟨_, ⟨V, hV, rfl⟩, hyV, hVU⟩ := Y.isBasis_affineOpens.exists_subset_of_mem_open hyU (f ⁻¹ᵁ U.1).isOpen let A : Y.affineOpens := ⟨V, hV⟩ have hAU : A.1 ≤ f ⁻¹ᵁ U.1 := hVU refine ⟨A, hyV, (f.appLE U.1 A.1 hAU).hom r, ?_⟩ rw [IdealSheaf.AffinePullback.Construction.idealSheaf_comap_ideal_of_le I f U A hAU, hr, Ideal.map_span, Set.image_singleton] end LocallyPrincipalIdealSheaf end end OAI.AlgebraicGeometry.Resolution.Blowups.Locally.PrincipalIdealSheaf.Construction