Definition postcomp_w_cart_refl_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' ;; ff) -> is_cartesian ff'). Proof. intros cartff cartff'ff. unfold is_cartesian. intros c''' g' d''' gg. apply iscontraprop1. - apply invproofirrelevance. unfold isProofIrrelevant. intros (gg0, commbig0) (gg1, commbig1). apply subtypePairEquality. + intro ggtemp. apply homsets_disp. + apply (cartesian_factorisation_unique cartff'ff). eapply pathscomp0. 2: { apply pathsinv0. apply assoc_disp. } * eapply pathscomp0. -- apply assoc_disp. -- apply maponpaths. eapply maponpaths_2. exact (commbig0 @ ! commbig1). - use tpair. + apply (cartesian_factorisation cartff'ff). apply (transportb _ (assoc _ _ _)). exact (gg ;; ff). + apply (cartesian_factorisation_unique cartff). eapply pathscomp0. 2: { apply transportfbinv. } * eapply pathscomp0. -- apply assoc_disp_var. -- apply maponpaths. apply cartesian_factorisation_commutes. 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.