Section MPCP_PCP.
Variable R : SRS.
Variable x0 y0 : string.
Definition Sigma := sym (x0/y0 :: R).
Definition R_Sigma : sym R <<= Sigma.

(* Specifications: *)
Lemma P_inv_top x y a :
a el Sigma ->
~(a :: x,y) el P.
Lemma tau1_inv (a : nat) B z :
tau1 B = a :: z ->
exists x y, (a :: x, y) el B.
Lemma P_inv_bot x y :
~(y, # :: x) el P.
Lemma tau2_inv (a : nat) B z :
tau2 B = a :: z ->
exists x y, (y, a :: x) el B.
Lemma match_start d' B :
d' :: B <<= P -> tau1 (d' :: B) = tau2 (d' :: B) -> d' = d.
Lemma hash_swap x :
#_L x ++ [#] = # :: #_R x.
Lemma hash_L_app x y :
#_L (x ++ y) = #_L x ++ #_L y.
Lemma hash_R_app x y :
#_R (x ++ y) = #_R x ++ #_R y.
Lemma hash_L_diff x y :
#_L x <> # :: #_R  y.
Lemma hash_R_inv x y :
#_R x = #_R y -> x = y.
Lemma doll_hash_L x:
x <<= Sigma -> ~ $ el #_L x.
Lemma MPCP_PCP x y A :
A <<= x0/y0 :: R -> x ++ tau1 A = y ++ tau2 A ->
exists B, B <<= P /\ (#_L x) ++ tau1 B = # :: #_R y ++ tau2 B.
Lemma PCP_MPCP x y B :
B <<= P -> x <<= Sigma -> y <<= Sigma ->
(#_L x) ++ tau1 B = # :: (#_R y) ++ tau2 B ->
exists A, A <<= x0/y0::R /\ x ++ tau1 A = y ++ tau2 A.
Lemma MPCP_PCP_cor :
MPCP (x0/y0, R) <-> PCP P.