Definition subtype_to_functor : (po_category P)^op ⟶ SET. Proof. use make_functor. - use make_functor_data. + intro y. apply (make_hSet (carrier_subtype_weq_contained_subtype _ f y)). abstract ( apply isasetaprop; apply propproperty ). + abstract ( intros y z Hzy Hyx; use tpair; [ exact (istrans_po P z y x Hzy (pr1carrier _ Hyx)) | exact (downward_closed_is_downward_closed _ f (make_carrier _ _ (pr2 Hyx)) (make_carrier _ (make_carrier _ z _) Hzy)) ] ). - abstract ( split; repeat intro; apply funextfun; intro; apply isaprop_total2 ). Defined.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.GrothendieckToposes.Sieves. Require Import UniMath.CategoryTheory.Categories.PreorderCategory.Core. Require Import UniMath.CategoryTheory.Core.Prelude. Require Import UniMath.CategoryTheory.Subobjects. Require Import UniMath.CategoryTheory.Monics. Require Import UniMath.CategoryTheory.opp_precat. Require Import UniMath.CategoryTheory.Categories.HSET.Core. Require Import UniMath.CategoryTheory.Categories.HSET.Univalence. Require Import UniMath.OrderTheory.Preorders. Require Import UniMath.CategoryTheory.yoneda. Require Import UniMath.CategoryTheory.Categories.HSET.MonoEpiIso. Require Import UniMath.CategoryTheory.slicecat.