(* A homotopy proposition is a type that has at most one element.
   Its unique inhabitant, when it exists, is to be interpreted as the
   proof of the homotopy proposition.
   Homotopy propositions are therefore an alternative to the sort Prop,
   to select which types represent mathematical propositions. *)
Definition IsHProp (P : Type) : Prop
  := forall p q : P, p = q.(* A homotopy set is a type such as each equality type x = y is a
   homotopy proposition. For example, any type which equality is
   decidable in sort Prop is a homotopy set, as shown in file
   Stdlib.Logic.Eqdep_dec.v. *)
Definition IsHSet (X : Type) : Prop
  := forall (x y : X) (p q : x = y), p = q.Definition IsHOneType (X : Type) : Prop
  := forall (x y : X) (p q : x = y) (r s : p = q), r = s.

Lemma impl_hprop : forall P Q : Prop, IsHProp Q -> IsHProp (P -> Q).