Definition fibration_from_discrete_fibration C (D : discrete_fibration C) : cleaving D. Proof. intros c c' f d. use tpair. - exact (pr1 (iscontrpr1 (unique_lift f d))). - use tpair. + exact (pr2 (iscontrpr1 (unique_lift f d))). + intros c'' g db hh. set (ff := pr2 (iscontrpr1 (unique_lift f d)) ). cbn in ff. set (d' := pr1 (iscontrpr1 (unique_lift f d))) in *. set (ggff := pr2 (iscontrpr1 (unique_lift (g·f) d)) ). cbn in ggff. set (d'' := pr1 (iscontrpr1 (unique_lift (g·f) d))) in *. set (gg := pr2 (iscontrpr1 (unique_lift g d'))). cbn in gg. set (d3 := pr1 (iscontrpr1 (unique_lift g d'))) in *. assert (XR : ((d'',, ggff) : ∑ r, r -->[g·f] d) = (db,,hh)). { apply proofirrelevancecontr. apply (pr2 D). } assert (XR1 : ((d'',, ggff) : ∑ r, r -->[g·f] d) = (d3 ,,gg;;ff)). { apply proofirrelevancecontr. apply (pr2 D). } assert (XT := maponpaths pr1 XR). cbn in XT. assert (XT1 := maponpaths pr1 XR1). cbn in XT1. generalize XR. generalize XR1; clear XR1. destruct XT. generalize gg; clear gg. destruct XT1. intros gg XR1 XR0. apply iscontraprop1. * apply invproofirrelevance. intros x x'. apply subtypePath. { intro. apply homsets_disp. } apply disp_mor_unique_disc_fib. * exists gg. cbn. assert (XX := pair_inj (isaset_fiber_discrete_fibration _ _ ) XR1). assert (YY := pair_inj (isaset_fiber_discrete_fibration _ _ ) XR0). etrans. apply (!XX). apply YY. Defined.
Require Import UniMath.Foundations.Sets. Require Import UniMath.MoreFoundations.All. 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.Functors. Require Import UniMath.CategoryTheory.DisplayedCats.NaturalTransformations. Require Import UniMath.CategoryTheory.DisplayedCats.Fiber. Require Import UniMath.CategoryTheory.DisplayedCats.Isos. Require Import UniMath.CategoryTheory.DisplayedCats.Univalence. Require Import UniMath.CategoryTheory.DisplayedCats.Examples.Opposite. Section IsoCleavingFromOpcleaving. End IsoCleavingFromOpcleaving.