Section SR_to_MPCP.
Local Definition string := string nat.
Variable R : stack nat.
Variables x0 y0 : string.
Notation "x ≻ y" := (rew R x y) (at level 70).
Notation "x ≻* y" := (rewt R x y) (at level 70).
Notation Sigma := (x0 ++ y0 ++ sym R).
Definition dollar := fresh Sigma.
Notation "$" := dollar.
Definition hash := fresh (dollar :: Sigma).
Notation "#" := hash.
Definition d := [$] / ($ :: x0 ++ [#]).
Definition e := (y0 ++ [#;$]) / [$].
Definition P := [d ; e] ++ R ++ [ ([#] / [#] )] ++ map (fun a => [a] / [a]) Sigma.

Lemma P_inv c :
c el P ->
c = d \/ c = e \/ c el R \/ c = ( [#] / [#] ) \/ exists a, a el Sigma /\ c = [a] / [a].