Section LiftAlphabet.
Variable sig tau : finType.
Variable n : nat.
Variable F : finType.
Variable pMSig : pTM sig F n.
Variable Inj : Retract sig tau.
Variable def : sig.
Definition surjectReadSymbols : Vector.t (option tau) n -> Vector.t (option sig) n :=
Vector.map (map_opt (surject Retr_g def)).
Definition lift_trans :=
fun '(q, sym) =>
let (q', act) := trans (m := projT1 pMSig) (q, surjectReadSymbols sym) in
(q', Vector.map (map_act Retr_f) act).
Definition LiftAlphabet_TM : TM tau n :=
{| trans := lift_trans;
start := start (projT1 pMSig);
halt := halt (m := projT1 pMSig) |}.
Definition LiftAlphabet :pTM tau F n :=
(LiftAlphabet_TM; projT2 pMSig).
Definition surjectConf : (mconfig tau (state LiftAlphabet_TM) n) -> (mconfig sig (state (projT1 pMSig)) n) :=
fun c => mk_mconfig (cstate c) (surjectTapes Retr_g def (ctapes c)).
(* Definition injectConf : (mconfig sig (state (projT1 pMSig)) n) -> (mconfig tau (state liftM) n) := fun c => mk_mconfig (cstate c) (injectTapes Retr_f (ctapes c)). *)

Lemma LiftAlphabet_lift (c1 c2 : mconfig tau (state LiftAlphabet_TM) n) (k : nat) :
loopM (M := LiftAlphabet_TM) c1 k = Some c2 ->
loopM (M := projT1 pMSig) (surjectConf c1) k = Some (surjectConf c2).