Section pushdown_automata.
Variable X P : Ensf.
Variable wd : Word.
Variable wa : Word.
Variable d : Ensf.
Definition eps := natural (sup X).
unfold eps in |- *.
apply sup_out.
Qed.
Definition Transition : Prop :=
forall x : Elt,
dans x d ->
exists2 w1 : Word,
inmonoid P w1 &
(exists2 y : Elt,
dans y (add eps X) &
(exists2 w2 : Word,
inmonoid P w2 & x = couple (word w1) (couple y (word w2)) :>Elt)).
Definition P_automata := inmonoid P wd /\ inmonoid P wa /\ Transition.
unfold P_automata in |- *.
intro temp; elim temp.
auto.
Qed.
unfold P_automata in |- *.
intro temp; elim temp; clear temp.
intros H temp; elim temp; clear temp.
auto.
Qed.
Definition Conf := (Word * Word)%type.
Inductive Derive_P_A : Conf -> Conf -> Prop :=
| Derive_cons :
forall (w w1 w2 u : Word) (x : Elt),
dans x X ->
dans (couple (word w1) (couple x (word w2))) d ->
Derive_P_A (pair (Append w1 w) (cons x u)) (pair (Append w2 w) u)
| Derive_eps :
forall w w1 w2 u : Word,
dans (couple (word w1) (couple eps (word w2))) d ->
Derive_P_A (pair (Append w1 w) u) (pair (Append w2 w) u).
Definition Derivestar_P_A := Rstar Conf Derive_P_A.
Definition LA (u : Word) :=
Derivestar_P_A (pair wd u) (pair wa nil) /\ inmonoid X u.

Lemma LA_langage : islanguage X LA.