(*  ** Encoding of Configurations **)
Definition mk_srconf (c: conf): list rsig :=
match (ctape c) with
| niltape _ => [state (cstate c);#;$]
| leftof s r => [state(cstate c); #]++ (List.map sym (s::r))++[$]
| rightof s l => [#]++(List.map sym (List.rev (s::l)))++[state(cstate c);$]
| midtape l s r => [#]++(List.map sym (List.rev l))++ [(state(cstate c))]
++ (List.map sym (s::r))++[$]
end.

Lemma mk_srconf_inj (c1 c2: conf) :
mk_srconf c1 = mk_srconf c2 <-> c1 = c2.