Timings for Colimit_Prod.v
Require Import Diagrams.Diagram.
Require Import Colimits.Colimit.
Require Import Colimits.Colimit_Sigma.
Require Import Diagrams.Graph.
(** * Colimit of product by a constant type *)
(** Given a diagram [D], one of his colimits [Q] and a type [A], one can consider the diagram of the products of the types of [D] and [A]. Then, a colimit of such a diagram is [A * Q]. *)
(** This is the constant case of the file [Colimit_Sigma] and we reuse its results. *)
Context `{Funext} {G : Graph} (D : Diagram G) (A : Type).
Definition prod_diagram : Diagram G.
exact (fun i => A * (D i)).
exact (fst x, D _f f (snd x)).
Definition diagram_equiv_prod_sigma
: sigma_diagram (fun _ : A => D) ~d~ prod_diagram.
srapply Build_DiagramMap; cbn.
intro i; apply equiv_sigma_prod0.
Lemma iscolimit_prod {Q : Type} (HQ : IsColimit D Q)
: IsColimit prod_diagram (A * Q).
eapply iscolimit_postcompose_equiv.
eapply iscolimit_precompose_equiv.
symmetry; exact diagram_equiv_prod_sigma.
by apply iscolimit_sigma.