import OAI.AlgebraicGeometry.Picard.PoincareBundle.Vertical.ProductParameters import OAI.AlgebraicGeometry.Picard.PoincareBundle.FiberBilinearComposition /-! # Parameter Recovery -/ namespace OAI.AlgebraicGeometry.Picard.PoincareBundle.Vertical.ParameterRecovery noncomputable section /-! # A global vertical product on the parameter scheme defines all actual fiber products -/ open _root_.CategoryTheory _root_.AlgebraicGeometry open _root_.CategoryTheory.MonoidalCategory _root_.CategoryTheory.CartesianMonoidalCategory open scoped _root_.CategoryTheory.MonObj universe u open OAI.AlgebraicGeometry.Picard.PoincareBundle.FiberwiseMultiplication OAI.AlgebraicGeometry.Picard.PoincareBundle.Line.Fibers OAI.AlgebraicGeometry.Picard.PoincareBundle.Vertical.ProductParameters variable {S : Scheme.{u}} {A X : Over S} /-- The genuine parameter point associated with two product inputs. -/ def parameter {T : Over S} (a b : T ⟶ A ⊗ X) : T ⟶ A ⊗ (X ⊗ X) := lift (a ≫ fst A X) (lift (a ≫ snd A X) (b ≫ snd A X)) /-- The parameter point recovers its first input. -/ theorem parameter_left {T : Over S} (a b : T ⟶ A ⊗ X) : parameter a b ≫ ProductParameters.inputLeft A X = a := by apply CartesianMonoidalCategory.hom_ext <;> simp [parameter, ProductParameters.inputLeft] /-- Equal fixed coordinates make the same parameter point recover its second input. -/ theorem parameter_right {T : Over S} (a b : T ⟶ A ⊗ X) (h : a ≫ fst A X = b ≫ fst A X) : parameter a b ≫ ProductParameters.inputRight A X = b := by apply CartesianMonoidalCategory.hom_ext <;> simp [parameter, ProductParameters.inputRight, h] /-- Parameter points commute with every change of test scheme. -/ theorem parameter_comp {T U : Over S} (t : U ⟶ T) (a b : T ⟶ A ⊗ X) : t ≫ parameter a b = parameter (t ≫ a) (t ≫ b) := by apply CartesianMonoidalCategory.hom_ext · simp [parameter, Category.assoc] · apply CartesianMonoidalCategory.hom_ext <;> simp [parameter, Category.assoc] variable [GrpObj X] /-- The actual product relation makes the output of the parameter point precisely the specified product. -/ theorem parameter_output {T : Over S} (a b c : T ⟶ A ⊗ X) (h : FiberwiseMultiplication.ProductRel (snd A X) (fst A X) a b c) : parameter a b ≫ ProductParameters.outputPoint A X = c := by apply CartesianMonoidalCategory.hom_ext · simpa [parameter, ProductParameters.outputPoint, Category.assoc] using h.2.2 · simpa [parameter, ProductParameters.outputPoint, Category.assoc, MonObj.comp_mul] using h.1 variable (L : Line.Bundles.LineBundle (A ⊗ X).left) (β : AbelianModuli.HilbertConstruction.Bilinear.Sheaves.SheafBilinearMap (Line.Fibers.fiber L (ProductParameters.inputLeft A X)) (Line.Fibers.fiber L (ProductParameters.inputRight A X)) (Line.Fibers.fiber L (ProductParameters.outputPoint A X))) /-- The actual fiber product associated with the single global product map. -/ def product {T : Over S} (a b c : T ⟶ A ⊗ X) (h : FiberwiseMultiplication.ProductRel (snd A X) (fst A X) a b c) : AbelianModuli.HilbertConstruction.Bilinear.Sheaves.SheafBilinearMap (Line.Fibers.fiber L a) (Line.Fibers.fiber L b) (Line.Fibers.fiber L c) := Line.Fibers.pullBilinear L (parameter a b) (ProductParameters.inputLeft A X) (ProductParameters.inputRight A X) (ProductParameters.outputPoint A X) a b c (parameter_left a b) (parameter_right a b h.2.1) (parameter_output a b c h) β /-- Invertibility of the genuine global product implies invertibility on every test-scheme fiber. -/ theorem product_isIso (hβ : IsIso (Bilinear.BilinearPullback.toHom β)) {T : Over S} (a b c : T ⟶ A ⊗ X) (h : FiberwiseMultiplication.ProductRel (snd A X) (fst A X) a b c) : IsIso (Bilinear.BilinearPullback.toHom (ParameterRecovery.product L β a b c h)) := by have hp : IsIso (Bilinear.BilinearPullback.toHom (Bilinear.BilinearPullback.pullback (parameter a b).left (Line.Fibers.fiber_isLine L (ProductParameters.inputLeft A X)) (Line.Fibers.fiber_isLine L (ProductParameters.inputRight A X)) β)) := by rw [Bilinear.BilinearPullback.toHom_pullback] unfold Bilinear.BilinearPullback.pulledHom infer_instance unfold ParameterRecovery.product Line.Fibers.pullBilinear rw [Bilinear.Transport.toHom_transport] infer_instance omit [GrpObj X] in /-- Equal parameter maps induce the same actual fiber product, with all composition proofs retained. -/ theorem pullBilinear_congr {T K : Over S} (p q : T ⟶ K) (hpq : p = q) (a b c : K ⟶ A ⊗ X) (a' b' c' : T ⟶ A ⊗ X) (ha : p ≫ a = a') (hb : p ≫ b = b') (hc : p ≫ c = c') (ha' : q ≫ a = a') (hb' : q ≫ b = b') (hc' : q ≫ c = c') (γ : AbelianModuli.HilbertConstruction.Bilinear.Sheaves.SheafBilinearMap (Line.Fibers.fiber L a) (Line.Fibers.fiber L b) (Line.Fibers.fiber L c)) : Line.Fibers.pullBilinear L p a b c a' b' c' ha hb hc γ = Line.Fibers.pullBilinear L q a b c a' b' c' ha' hb' hc' γ := by cases hpq rfl /-- The fiber products recovered from a global product commute with every test-scheme pullback. -/ theorem product_natural {T U : Over S} (t : U ⟶ T) (a b c : T ⟶ A ⊗ X) (h : FiberwiseMultiplication.ProductRel (snd A X) (fst A X) a b c) (a' b' c' : U ⟶ A ⊗ X) (h' : FiberwiseMultiplication.ProductRel (snd A X) (fst A X) a' b' c') (ha : t ≫ a = a') (hb : t ≫ b = b') (hc : t ≫ c = c') : Line.Fibers.pullBilinear L t a b c a' b' c' ha hb hc (ParameterRecovery.product L β a b c h) = ParameterRecovery.product L β a' b' c' h' := by have hp : t ≫ parameter a b = parameter a' b' := by rw [parameter_comp, ha, hb] unfold ParameterRecovery.product rw [FiberBilinearComposition.pullBilinear_comp (hx'' := (congrArg (fun v => v ≫ ProductParameters.inputLeft A X) hp).trans (parameter_left a' b')) (hy'' := (congrArg (fun v => v ≫ ProductParameters.inputRight A X) hp).trans (parameter_right a' b' h'.2.1)) (hz'' := (congrArg (fun v => v ≫ ProductParameters.outputPoint A X) hp).trans (parameter_output a' b' c' h'))] exact pullBilinear_congr L _ _ hp _ _ _ _ _ _ _ _ _ _ _ _ β /-- Applying universal recovery to an existing genuine multiplication recovers that multiplication exactly. -/ theorem product_global (D : FiberwiseMultiplication.Multiplication (snd A X) (fst A X) L) {T : Over S} (a b c : T ⟶ A ⊗ X) (h : FiberwiseMultiplication.ProductRel (snd A X) (fst A X) a b c) : ParameterRecovery.product L (ProductParameters.globalProduct A X L D) a b c h = D.product a b c h := D.product_natural (parameter a b) (ProductParameters.inputLeft A X) (ProductParameters.inputRight A X) (ProductParameters.outputPoint A X) (ProductParameters.productRelation A X) a b c h (parameter_left a b) (parameter_right a b h.2.1) (parameter_output a b c h) end end OAI.AlgebraicGeometry.Picard.PoincareBundle.Vertical.ParameterRecovery