intros N_dans_X N_dans_V1 N_dans_V2 Re_1 Re_2 inter_X_V2_V1_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 V2).
red in |- *.
intuition.
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 V2).
red in |- *.
intuition.
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. intro dans_R1. absurd (inter (union X V2) V1 empty). red in |- *. unfold inter in |- *. (*Intuition.*) intro temp; elim temp; clear temp. intros inc_empt temp; elim temp; clear temp. intros incl_empty_V1 imp_dans_empty. apply dans_empty_imp_P with A. apply imp_dans_empty; prolog [ Regles_inv1 inmonoid_cons_inv2 ] 4. (*Intro temp;Elim temp;Clear temp. Intros incl_empty_X_V2 temp;Elim temp;Clear temp. Intros incl_empty_V1 imp. Apply dans_empty_imp_P with A. Apply imp. Apply inmonoid_cons_inv2 with v0;Assumption. Apply Regles_inv1 with X R1 (word u0); Assumption.*)
assumption.
trivial.
(****)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_R2_d :
forall u v : Word,
Regles X V2 R2 ->
Derive R2 u v -> inmonoid (union X V2) u -> inmonoid (union X V2) v.