{X Y} (f : X -> Y) := forall (Z : HSet), forall g h : Z -> X, f o g = f o h -> g = h. Global Instance isinj_embedding {A B : Type} (m : A -> B) : IsEmbedding m -> IsInjective m. Proof. intros ise x y p. pose (ise (m y)). assert (q : (x;p) = (y;1) :> hfiber m (m y)) by apply path_ishprop. exact (ap pr1 q). Defined.
Require Import Basics. Require Import Types.Sigma Types.Paths Types.Unit Types.Arrow.