Section Relations.
(* Properties of a binary relation R on type A *)
Variable A : Set.
Variable R : A -> A -> Prop.
(* Definition of the reflexive-transitive closure R* of R *)
(* Smallest reflexive P containing R o P *)
Definition Rstar (x y : A) :=
forall P : A -> A -> Prop,
(forall u : A, P u u) ->
(forall u v w : A, R u v -> P v w -> P u w) -> P x y.
Proof
fun (x : A) (P : A -> A -> Prop) (h1 : forall u : A, P u u)
(h2 : forall u v w : A, R u v -> P v w -> P u w) =>
h1 x.
Proof
fun (x y z : A) (t1 : R x y) (t2 : Rstar y z) (P : A -> A -> Prop)
(h1 : forall u : A, P u u)
(h2 : forall u v w : A, R u v -> P v w -> P u w) =>
h2 x y z t1 (t2 P h1 h2).
(* We conclude with transitivity of Rstar : *)

Theorem Rstar_transitive :
forall x y z : A, Rstar x y -> Rstar y z -> Rstar x z.