import OAI.ArithmeticGeometry.Models.BaseChange /-! # Finite Equations -/ namespace OAI.ArithmeticGeometry.Models.FiniteEquations.Constructions.Foundations /-! Simultaneous preservation of finitely many generic equations. -/ open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry open scoped _root_.NumberField universe u v w variable {K : Type u} [Field K] {s t z : Finset K} theorem equation_survives_enlargement (hst : s โІ t) (htz : t โІ z) (Xโ‚€ Yโ‚€ : Over (CoefficientSystem.Constructions.Foundations.coefficientBase (๐“ž K) K s)) (a b : Xโ‚€ โŸถ Yโ‚€) (hab : pullback.fst Xโ‚€.hom (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K hst) โ‰ซ a.left = pullback.fst Xโ‚€.hom (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K hst) โ‰ซ b.left) : pullback.fst Xโ‚€.hom (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K (hst.trans htz)) โ‰ซ a.left = pullback.fst Xโ‚€.hom (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K (hst.trans htz)) โ‰ซ b.left := by let : Epi (BaseChange.Constructions.Foundations.coefficientBaseChangeTrans hst htz Xโ‚€).hom.left := by change Epi (BaseChange.Constructions.Foundations.coefficientBaseChangeTransSquare hst htz Xโ‚€).isoPullback.hom infer_instance apply (cancel_epi (BaseChange.Constructions.Foundations.coefficientBaseChangeTrans hst htz Xโ‚€).hom.left).mp erw [โ† Category.assoc, BaseChange.Constructions.Foundations.coefficientBaseChangeTrans_hom_fst, โ† Category.assoc, BaseChange.Constructions.Foundations.coefficientBaseChangeTrans_hom_fst, Category.assoc, Category.assoc, hab] theorem baseChange_map_eq_of_fst_eq (hst : s โІ t) (Xโ‚€ Yโ‚€ : Over (CoefficientSystem.Constructions.Foundations.coefficientBase (๐“ž K) K s)) (a b : Xโ‚€ โŸถ Yโ‚€) (hab : pullback.fst Xโ‚€.hom (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K hst) โ‰ซ a.left = pullback.fst Xโ‚€.hom (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K hst) โ‰ซ b.left) : (Over.pullback (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K hst)).map a = (Over.pullback (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K hst)).map b := by apply Over.OverMorphism.ext apply pullback.hom_ext ยท erw [pullback.lift_fst, pullback.lift_fst] exact hab ยท erw [pullback.lift_snd, pullback.lift_snd] /-- Finitely many equations holding on the generic fiber hold at one common stage. -/ theorem finite_equations_descend {I : Type v} {E : Type w} [Finite E] (src dst : E โ†’ I) (X : I โ†’ Over (Spec (CommRingCat.of K))) (Xโ‚€ : I โ†’ Over (CoefficientSystem.Constructions.Foundations.coefficientBase (๐“ž K) K s)) (hXโ‚€ : โˆ€ i, Scheme.Constructions.Foundations.FinitePresentationMorphism (Xโ‚€ i).hom) (p : โˆ€ i, (X i).left โŸถ (Xโ‚€ i).left) (hp : โˆ€ i, IsPullback (p i) (X i).hom (Xโ‚€ i).hom (CoefficientSystem.Constructions.Foundations.genericBaseMap (๐“ž K) K s)) (a b : โˆ€ e, Xโ‚€ (src e) โŸถ Xโ‚€ (dst e)) (hab : โˆ€ e, p (src e) โ‰ซ (a e).left = p (src e) โ‰ซ (b e).left) : โˆƒ (t : Finset K) (hst : s โІ t), โˆ€ e, (Over.pullback (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K hst)).map (a e) = (Over.pullback (CoefficientSystem.Constructions.Foundations.coefficientBaseMap (๐“ž K) K hst)).map (b e) := by classical let : Fintype E := Fintype.ofFinite E choose t ht heq using fun e โ†ฆ ModelMorphisms.Constructions.Foundations.equation_between_models_descends (Xโ‚€ (src e)) (Xโ‚€ (dst e)) (hXโ‚€ (src e)) (hXโ‚€ (dst e)) (p (src e)) (hp (src e)) (a e) (b e) (hab e) let z := s โˆช Finset.univ.biUnion t have htz (e : E) : t e โІ z := (Finset.subset_biUnion_of_mem t (Finset.mem_univ e)).trans Finset.subset_union_right refine โŸจz, Finset.subset_union_left, fun e โ†ฆ ?_โŸฉ apply baseChange_map_eq_of_fst_eq exact equation_survives_enlargement (ht e) (htz e) (Xโ‚€ (src e)) (Xโ‚€ (dst e)) (a e) (b e) (heq e) end OAI.ArithmeticGeometry.Models.FiniteEquations.Constructions.Foundations