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 in_on2P : {in D1 &, {on D2 &, allQ2 f}} <->
{in [pred x in D1 | f x \in D2] &, allQ2 f}.