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_TerminatesIn (T : Rel (tapes sig n) nat) :
projT1 pMSig ↓ T ->
projT1 LiftAlphabet ↓ lift_sigma_tau_T Retr_g def T.