import Mathlib.AlgebraicGeometry.Morphisms.Proper /-! # Proper Product -/ namespace OAI.AlgebraicGeometry.Quotients.FiniteDescent.ProperProduct.Construction.FiniteProperProduct noncomputable section /-! Finite products of proper schemes over a fixed base, with explicit projections and the map determined by a family of component maps. -/ open _root_.CategoryTheory _root_.AlgebraicGeometry _root_.CategoryTheory.Limits universe u variable {S : Scheme.{u}} def product : {n : โ„•} โ†’ (Fin n โ†’ Over S) โ†’ Over S | 0, _ => Over.mk (๐Ÿ™ S) | _ + 1, P => Over.mk (pullback.fst (P 0).hom (product (fun i => P i.succ)).hom โ‰ซ (P 0).hom) def first {n : โ„•} (P : Fin (n + 1) โ†’ Over S) : FiniteProperProduct.product P โŸถ P 0 := Over.homMk (pullback.fst _ _) def rest {n : โ„•} (P : Fin (n + 1) โ†’ Over S) : FiniteProperProduct.product P โŸถ FiniteProperProduct.product (fun i => P i.succ) := Over.homMk (pullback.snd _ _) (pullback.condition.symm) def projection : {n : โ„•} โ†’ (P : Fin n โ†’ Over S) โ†’ (i : Fin n) โ†’ (FiniteProperProduct.product P โŸถ P i) | 0, _, i => Fin.elim0 i | _ + 1, P, i => Fin.cases (first P) (fun k => rest P โ‰ซ projection (fun i => P i.succ) k) i def lift {T : Over S} : {n : โ„•} โ†’ (P : Fin n โ†’ Over S) โ†’ (โˆ€ i, T โŸถ P i) โ†’ (T โŸถ FiniteProperProduct.product P) | 0, _, _ => Over.homMk T.hom (Category.comp_id _) | _ + 1, P, a => Over.homMk (pullback.lift (a 0).left (lift (fun i => P i.succ) (fun i => a i.succ)).left ((Over.w (a 0)).trans (Over.w _).symm)) (by change _ โ‰ซ pullback.fst _ _ โ‰ซ (P 0).hom = T.hom rw [pullback.lift_fst_assoc] exact Over.w (a 0)) theorem lift_first {T : Over S} {n : โ„•} (P : Fin (n + 1) โ†’ Over S) (a : โˆ€ i, T โŸถ P i) : FiniteProperProduct.lift P a โ‰ซ first P = a 0 := by ext1 exact pullback.lift_fst _ _ _ theorem lift_rest {T : Over S} {n : โ„•} (P : Fin (n + 1) โ†’ Over S) (a : โˆ€ i, T โŸถ P i) : FiniteProperProduct.lift P a โ‰ซ rest P = FiniteProperProduct.lift (fun i => P i.succ) (fun i => a i.succ) := by ext1 exact pullback.lift_snd _ _ _ theorem lift_projection {T : Over S} {n : โ„•} (P : Fin n โ†’ Over S) (a : โˆ€ i, T โŸถ P i) (i : Fin n) : FiniteProperProduct.lift P a โ‰ซ FiniteProperProduct.projection P i = a i := by induction n with | zero => exact Fin.elim0 i | succ n ih => refine Fin.cases ?_ (fun k => ?_) i ยท exact lift_first P a ยท change FiniteProperProduct.lift P a โ‰ซ rest P โ‰ซ FiniteProperProduct.projection (fun i => P i.succ) k = a k.succ rw [โ† Category.assoc, lift_rest] exact ih _ _ _ theorem proper {n : โ„•} (P : Fin n โ†’ Over S) (hP : โˆ€ i, IsProper (P i).hom) : IsProper (FiniteProperProduct.product P).hom := by induction n with | zero => exact inferInstanceAs (IsProper (๐Ÿ™ S)) | succ n ih => have := hP 0 have := ih (fun i => P i.succ) (fun i => hP i.succ) change IsProper (pullback.fst (P 0).hom (FiniteProperProduct.product (fun i => P i.succ)).hom โ‰ซ (P 0).hom) infer_instance end end OAI.AlgebraicGeometry.Quotients.FiniteDescent.ProperProduct.Construction.FiniteProperProduct