import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Polynomial.ProductGerms import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Affine.ClosedStalkKernel import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Stalk.KernelSquare /-! # Section Kernel -/ namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Polynomial.SectionKernel noncomputable section /-! The actual scalar section of an affine-line product has native stalk kernel generated by its intrinsic parameter minus that scalar. -/ set_option backward.isDefEq.respectTransparency false set_option backward.isDefEq.respectTransparency.types false open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry open scoped _root_.Polynomial open OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Polynomial.ProductChart OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Polynomial.ProductChart.Section variable {k : Type} [Field k] {Z : Scheme} (f : Z ⟶ Spec (.of k)) (a : k) instance closed : IsClosedImmersion (ProductChart.Section.sectionMap f a) := by let : IsSeparated (ProductChart.source f) := inferInstanceAs (IsSeparated (pullback.snd (ProductChart.base (k := k)) f)) let : IsClosedImmersion (ProductChart.Section.sectionMap f a ≫ ProductChart.source f) := by rw [ProductChart.Section.section_source] infer_instance exact IsClosedImmersion.of_comp _ (ProductChart.source f) theorem kernel (z : Z) : RingHom.ker ((ProductChart.Section.sectionMap f a).stalkMap z).hom = Ideal.span {Affine.ParameterFiber.germ k (ProductChart.parameter f) (ProductChart.Section.sectionMap f a z) a} := by obtain ⟨U, hU, hz, _⟩ := exists_isAffineOpen_mem_and_subset (TopologicalSpace.Opens.mem_top z) obtain ⟨q, rfl⟩ := (hU.range_fromSpec.symm ▸ hz : z ∈ Set.range hU.fromSpec) let := Foundations.Scheme.SpecScalarTransport.specSectionScalarAlgebra f U let b := algebraMap k Γ(Z, U) a let l := Spec.map (CommRingCat.ofHom (Polynomial.evalRingHom b)) apply Stalk.KernelSquare.principal_at_image (ProductChart.chart f U hU) (ProductChart.Section.sectionMap f a) hU.fromSpec l (ProductChart.Section.chart_section f U hU a) q (fun x => Affine.ParameterFiber.germ k (ProductChart.parameter f) x a) have he : RingHom.ker (l.stalkMap q).hom = Ideal.span {StructureSheaf.toStalk Γ(Z, U)[X] (l q) (Polynomial.X - Polynomial.C b)} := by rw [Affine.ClosedStalkKernel.kernel (Polynomial.evalRingHom b) (fun c => ⟨Polynomial.C c, Polynomial.eval_C⟩) q, Polynomial.ker_evalRingHom, Ideal.map_span, Set.image_singleton] rfl exact he.trans (congrArg (fun r => Ideal.span {r}) (ProductGerms.chart f U hU (l q) a).symm) def quotientEquiv (z : Z) : ((ProductChart.space f).presheaf.stalk (ProductChart.Section.sectionMap f a z) ⧸ Ideal.span {Affine.ParameterFiber.germ k (ProductChart.parameter f) (ProductChart.Section.sectionMap f a z) a}) ≃+* Z.presheaf.stalk z := (Ideal.quotEquivOfEq (kernel f a z).symm).trans (RingHom.quotientKerEquivOfSurjective ((ProductChart.Section.sectionMap f a).stalkMap_surjective z)) theorem quotientEquiv_mk (z : Z) (r : (ProductChart.space f).presheaf.stalk (ProductChart.Section.sectionMap f a z)) : quotientEquiv f a z (Ideal.Quotient.mk _ r) = (ProductChart.Section.sectionMap f a).stalkMap z r := by simp only [quotientEquiv, RingEquiv.trans_apply, Ideal.quotEquivOfEq_mk, RingHom.quotientKerEquivOfSurjective_apply_mk] end end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Polynomial.SectionKernel