(* 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.

Lemma rrefl r : eqrel r r.