Lemma subtype_to_sieve_to_subtype (f : downward_closed_subtype (subpreorder P (down_type P x))) : sieve_to_subtype (subtype_to_sieve f) = f. Proof. use subtypePath. { intro. do 2 (apply impred_isaprop; intro). apply propproperty. } apply hsubtype_univalence. intro y. split. - intro H. refine (transportf _ _ (pr2 H)). apply propproperty. - intro H. exact (pr2 y ,, H). Qed.
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.