(** * PCP to CFI *)
Section PCP_CFI.
Variable P : SRS.
Definition Sigma := sym P.
Notation "#" := (fresh Sigma).
Definition gamma1 (A : SRS) :=
map (fun '(x,y) => x / (x ++ [#] ++ y ++ [#])) A.
Definition gamma2 (A : SRS) :=
map (fun '(x,y) => y / (x ++ [#] ++ y ++ [#])) A.
Fixpoint gamma (A : SRS) :=
match A with
| [] => []
| x/y :: A => gamma A ++ x ++ [#] ++ y ++ [#]
end.

(* Specifications: *)
Lemma sigma_gamma1 A :
sigma # (gamma1 A) = tau1 A ++ [#] ++ gamma A.
Lemma sigma_gamma2 A :
sigma # (gamma2 A) = tau2 A ++ [#] ++ gamma A.
Lemma gamma1_spec B C :
B <<= gamma1 C ->
exists A, A <<= C /\ gamma1 A = B.
Lemma gamma2_spec B C :
B <<= gamma2 C ->
exists A, A <<= C /\ gamma2 A = B.
Lemma gamma_inj A1 A2 :
~ # el sym A1 -> ~ # el sym A2 ->
gamma A1 = gamma A2 -> A1 = A2.