Variable A : Prop .
Variable R : A->A->Prop.
Definition Rstar:A->A->Prop :=
[x,y:A](P0:A->A->Prop)
((u:A)(P0 u u))
->((u:A)(v:A)(w:A)(R u v)->(P0 v w)->(P0 u w))->(P0 x y).
Definition Rstar':A->A->Prop :=
[x,y:A](P:A->A->Prop)
(P x x)->((u:A)(R x u)->(Rstar u y)->(P x y))->(P x y).
Definition coherence: A->A->Prop :=
[x:A][y:A](P:Prop)((z:A)(Rstar x z)->(Rstar y z)->P)->P.
(* Les 2 hypotheses du Lemme de Newman *)

(* Specifications: *)
Axiom Hyp1:(x:A)(P:A->Prop)((y:A)((z:A)(R y z)->(P z))->(P y))->(P x).
Axiom Hyp2:(x:A)(y:A)(z:A)(R x y)->(R x z)->(coherence y z).
(* Verification du lemme *)
Lemma Rstar_reflexive: (x:A)(Rstar x x).
Proof [x:A][P0:A->A->Prop]
[H:(u:A)(P0 u u)][_:(u:A)(v:A)(w:A)(R u v)->(P0 v w)->(P0 u w)](H x).
Lemma Rstar_R: (x:A)(y:A)(z:A)(R x y)->(Rstar y z)->(Rstar x z).
Proof [x,y,z:A][t1:(R x y)] [t2:(P0:A->A->Prop)
((u:A)(P0 u u))
->((u:A)(v:A)(w:A)(R u v)->(P0 v w)->(P0 u w))->(P0 y z)]
[P:A->A->Prop][h1:(u:A)(P u u)]
[h2:(u:A)(v:A)(w:A)(R u v)->(P v w)->(P u w)]
(h2 x y z t1 (t2 [a,a0:A](P a a0) h1 h2)).
Lemma Rstar_transitive: (x:A)(y:A)(z:A)(Rstar x y)->(Rstar y z)->(Rstar x z).
Proof [x,y,z:A][h:(P0:A->A->Prop)
((u:A)(P0 u u))
->((u:A)(v:A)(w:A)(R u v)->(P0 v w)->(P0 u w))->(P0 x y)]
(h [a,a0:A](Rstar a0 z)->(Rstar a z) [u:A][H:(Rstar u z)]H
[u,v,w:A][t1:(R u v)][t2:(Rstar w z)->(Rstar v z)]
[t3:(Rstar w z)](Rstar_R u v z t1 (t2 t3))).
Lemma Rstar'_reflexive: (x:A)(Rstar' x x).
Proof [x:A][P:A->A->Prop][H:(P x x)][_:(u:A)(R x u)->(Rstar u x)->(P x x)]H.
Lemma Rstar'_R: (x:A)(y:A)(z:A)(R x z)->(Rstar z y)->(Rstar' x y).
Proof [x,y,z:A][t1:(R x z)][t2:(Rstar z y)][P:A->A->Prop]
[_:(P x x)][h2:(u:A)(R x u)->(Rstar u y)->(P x y)](h2 z t1 t2).
Lemma Rstar'_Rstar:  (x:A)(y:A)(Rstar' x y)->(Rstar x y).
Proof [x,y:A][h:(P:A->A->Prop)
(P x x)->((u:A)(R x u)->(Rstar u y)->(P x y))->(P x y)]
(h [a,a0:A](Rstar a a0) (Rstar_reflexive x) [u:A](Rstar_R x u y)).
Lemma Rstar_Rstar':  (x:A)(y:A)(Rstar x y)->(Rstar' x y).
Proof [x,y:A][h:(P0:A->A->Prop)
((u:A)(P0 u u))
->((u:A)(v:A)(w:A)(R u v)->(P0 v w)->(P0 u w))->(P0 x y)]
(h Rstar' [u:A](Rstar'_reflexive u)
[u,v,w:A][h1:(R u v)]
[h2:(Rstar' v w)](Rstar'_R u w v h1 (Rstar'_Rstar v w h2))).
Lemma coherence_intro : (x:A)(y:A)(z:A)(Rstar x z)->(Rstar y z)
->(coherence x y).