intros N_dans_X N_dans_V1 N_dans_V2 Re_1 Re_2 inter_X_V1_V2_empty u v
Der_Ru_u.
elim Der_Ru_u.
intros u0 v0 A dans_couple_Ru inmon_cons_A_v0.
apply Derive1.
cut
(couple S (word (cons S1 nil)) = couple A (word u0) :>Elt \/
dans (couple A (word u0))
(add (couple S (word (cons S2 nil))) (union R1 R2))). (**)
intro temp; elim temp; clear temp.
intro egal_S.
absurd (dans S X \/ dans S V1).
red in |- *.
intro temp; elim temp; clear temp.
exact N_dans_X.
exact N_dans_V1.
apply dans_union.
replace S with A.
prolog [ inmonoid_cons_inv2 ] 2.
(*Apply inmonoid_cons_inv2 with v0;Assumption.*)
injection egal_S; auto.
intro dans_couple_add.
cut
(couple S (word (cons S2 nil)) = couple A (word u0) :>Elt \/
dans (couple A (word u0)) (union R1 R2)). (***)
intro temp; elim temp; clear temp.
intro egal_S.
absurd (dans S X \/ dans S V1).
red in |- *.
intro temp; elim temp; auto.
apply dans_union.
replace S with A.
prolog [ inmonoid_cons_inv2 ] 2.
(*Apply inmonoid_cons_inv2 with v0;Assumption.*)
injection egal_S; auto.
intro dans_couple_union.
cut (dans (couple A (word u0)) R1 \/ dans (couple A (word u0)) R2). (****)
(*Intuition.*)intro temp; elim temp; clear temp. auto. intro dans_R2. absurd (inter (union X V1) V2 empty). red in |- *. unfold inter in |- *. (*Intuition.*)intro temp; elim temp; clear temp. intros HH temp; elim temp; clear temp; intros HHH HHHH. (*Intros.*)
prolog [ Regles_inv1 inmonoid_cons_inv2 dans_empty_imp_P ] 4.
(*Intro temp;Elim temp;Clear temp. Intros incl_empty_X_V1 temp;Elim temp;Clear temp. Intros incl_empty_V2 imp.  Apply dans_empty_imp_P with A. Apply imp. Apply inmonoid_cons_inv2 with v0;Assumption. Apply Regles_inv1 with X R2 (word u0); Assumption.*)
assumption.
(****)auto.  (***)auto.  (**)auto.  prolog [ inmonoid_cons_inv Derive2 ] 10. (*Intros u0 v0 x Der_Ru imp inmon_cons_x_u0. Apply Derive2. Apply imp. Apply inmonoid_cons_inv with x. Assumption.*)
Qed.

(* Specifications: *)
Lemma inmon_Der_imp_inmon_R1_d :
forall u v : Word,
Regles X V1 R1 ->
Derive R1 u v -> inmonoid (union X V1) u -> inmonoid (union X V1) v.