unfold Derivegstar in |- *.
intros x y Der_star.
unfold Rstar in Der_star.
pattern x, y in |- *.
apply Der_star.
intros; exists v.
assumption.
apply Rstar_reflexive.
intros u v w Der_u_v Hyp u0 v0 App_eg inmon_u0.
elimtype
(ex2 (fun w1 : Word => Append u0 w1 = v)
(fun w1 : Word => Deriveg X R v0 w1)).
intros w0 App_eg_u0_w0 Deriveg_v0_x0.
elimtype
(ex2 (fun w1 : Word => Append u0 w1 = w)
(fun w1 : Word => Rstar Word (Deriveg X R) w0 w1)).
intros w1 App_eg_u0_w1_w Rstar_Der.
exists w1.
assumption.
apply Rstar_R with w0.
assumption.
assumption.
apply Hyp; assumption.
apply Deriveg_imp_Deriveg_App with u; assumption.
Qed.
Inductive Derive_P_A_2 : Conf -> Conf -> Prop :=
| Derive_X :
forall (w u : Word) (x : Elt),
dans x X -> Derive_P_A_2 (cons x w, cons x u) (w, u)
| Derive_V :
forall (v w u : Word) (x : Elt),
dans (couple x (word u)) R ->
Derive_P_A_2 (cons x w, v) (Append u w, v).
Definition Derive_P_A_2_nind (x y : Conf) :=
ex2 (fun a : Elt => dans a X)
(fun a : Elt => fst x = cons a (fst y) /\ snd x = cons a (snd y)) \/
(exists a : Elt,
ex2 (fun w : Word => cons a w = fst x)
(fun w : Word =>
ex2 (fun u : Word => dans (couple a (word u)) R)
(fun u : Word => Append u w = fst y))).

(* Specifications: *)
Lemma Derive_P_A_2_inv :
forall x y : Conf, Derive_P_A_2 x y -> Derive_P_A_2_nind x y.