(* A generic wrapper type *)

Structure wrapped T := Wrap {unwrap : T}.(* A generic wrapper type *)

Structure wrapped T := Wrap {unwrap : T}.(* A generic wrapper type *)

Structure wrapped T := Wrap {unwrap : T}.Canonical wrap T x := @Wrap T x.Variant simpl_fun := SimplFun of aT -> rT.Variant simpl_fun := SimplFun of aT -> rT.Definition fun_of_simpl f := fun x => let: SimplFun lam := f in lam x.(* For delta functions in eqtype.v. *)
Definition SimplFunDelta aT rT (f : aT -> aT -> rT) := [fun z => f z z].Definition eqfun (f g : B -> A) : Prop := forall x, f x = g x.Definition eqrel (r s : C -> B -> A) : Prop := forall x y, r x y = s x y.

(* Specifications: *)
Lemma frefl f : eqfun f f.
Lemma fsym f g : eqfun f g -> eqfun g f.
Lemma ftrans f g h : eqfun f g -> eqfun g h -> eqfun f h.
Lemma rrefl r : eqrel r r.