Section RelationProperties.
(** Caveat: reflexive should not be used to state lemmas, as auto and trivial will not expand the constant.                                               **)
Variable T : Type.
Variable R : rel T.
Definition total := forall x y, R x y || R y x.
Definition transitive := forall y x z, R x y -> R y z -> R x z.
Definition symmetric := forall x y, R x y = R y x.
Definition antisymmetric := forall x y, R x y && R y x -> x = y.
Definition pre_symmetric := forall x y, R x y -> R y x.

Lemma can_in_comp [A B C : Type] (D : {pred B}) (D' : {pred C})
[f : B -> A] [h : C -> B] [f' : A -> B] [h' : B -> C] :
{homo h : x / x \in D' >-> x \in D} ->
{in D, cancel f f'} -> {in D', cancel h h'} ->
{in D', cancel (f \o h) (h' \o f')}.