Definition postcomp_w_cart_pres_cart {C : category} {D : disp_cat C} {c c' c'' : C} {f : c' --> c} {f' : c'' --> c'} {d : D c} {d' : D c'} {d'' : D c''} (ff : d' -->[f] d) (ff' : d'' -->[f'] d') : is_cartesian ff -> (is_cartesian ff' -> is_cartesian (ff' ;; ff)). Proof. intros cartff cartff'. unfold is_cartesian. intros c''' g' d''' hh. apply iscontraprop1. - apply invproofirrelevance. unfold isProofIrrelevant. intros (gg0, commbig0) (gg1, commgg1). apply subtypePairEquality. + intro gg. apply homsets_disp. + apply (cartesian_factorisation_unique cartff'). apply (cartesian_factorisation_unique cartff). eapply pathscomp0. * apply assoc_disp_var. * eapply pathscomp0. -- apply maponpaths. apply (pathscomp0 commbig0). apply pathsinv0. exact commgg1. -- apply pathsinv0. apply assoc_disp_var. - use tpair. + apply (cartesian_factorisation cartff'). apply (cartesian_factorisation cartff). apply (transportb _ (! assoc _ _ _)). exact hh. + eapply pathscomp0. * apply assoc_disp. * eapply pathscomp0. --apply maponpaths. eapply pathscomp0. ++ eapply maponpaths_2. apply cartesian_factorisation_commutes. ++ apply cartesian_factorisation_commutes'. -- apply transportfbinv. Defined.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.Foundations.Sets. Require Import UniMath.MoreFoundations.PartA. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Core.Univalence. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Categories.HSET.Core. Require Import UniMath.CategoryTheory.Categories.HSET.MonoEpiIso. Require Import UniMath.CategoryTheory.Categories.HSET.Univalence. Require Import UniMath.CategoryTheory.Limits.Pullbacks. Require Import UniMath.CategoryTheory.Adjunctions.Core. Require Import UniMath.CategoryTheory.Equivalences.Core. Require Import UniMath.CategoryTheory.FunctorCategory. Require Import UniMath.CategoryTheory.opp_precat. Require Import UniMath.CategoryTheory.Presheaf. Require Import UniMath.CategoryTheory.DisplayedCats.Core. Require Import UniMath.CategoryTheory.DisplayedCats.Constructions. Require Import UniMath.CategoryTheory.DisplayedCats.Fibrations. Require Import UniMath.CategoryTheory.DisplayedCats.MoreFibrations.Prefibrations.