Section AlphabetLifting.
Variable (sig tau : Type).
Variable (retr : Retract sig tau).
Definition LiftSpec_single (T : RegSpec sig) : RegSpec tau :=
match T with
| Contains r x => Contains (ComposeRetract retr r) x
| Contains_size r x s => Contains_size (ComposeRetract retr r) x s
| Void => Void
| Void_size s => Void_size s
| Custom p => Custom (fun t => p (surjectTape (Retr_g) (inl UNKNOWN) t))
end.
Variable (n : nat).
Definition LiftSpec (T : SpecV sig n) : SpecV tau n :=
Vector.map LiftSpec_single T.

Lemma LiftSpec_surjectTape_tspec_single t T :
tspec_single (LiftSpec_single T) t ->
tspec_single T (surjectTape Retr_g (inl UNKNOWN) t).