{X : Type} (P : X -> Type) : (forall x, merely (P x)) <-> IsSurjection (pr1 : {x : X & P x} -> X). Proof. refine (iff_compose _ (iff_forall_inO_mapinO_pr1 (Conn _) P)). apply iff_functor_forall; intro a. symmetry; apply (iff_contr_hprop (Tr (-1) (P a))). Defined.
Require Import Basics Types WildCat.Core WildCat.Universe HFiber. Require Import Modalities.Modality.