Definition sieve_to_subtype (f : sieve (C := po_category P) x) : downward_closed_subtype (subpreorder P (down_type P x)). Proof. use make_downward_closed_subtype. - intro y. apply (make_hProp (sieve_functor f (pr1carrier _ y) : hSet)). abstract apply isaprop_po_sieve_dom. - abstract ( intros y z; exact (# (sieve_functor f) (pr2 z) (pr2 y)) ). 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.