(* * Copying Machines and Helper functions for verifying machines using [CopySymbols] ane [MoveToSymbol] *)
From Undecidability Require Export TM.Compound.CopySymbols TM.Compound.MoveToSymbol.
Local Generalizable All Variables.
Set Default Proof Using "Type".
(* Don't simplify [skipn (S n) xs]; only, if the number and the lists are constructors *)
Local Arguments skipn { A } !n !l.
Local Arguments plus : simpl never.
Local Arguments mult : simpl never.

Corollary CopySymbols_L_correct_midtape ls ls' m rs x t2 :
stop m = false ->
(forall x, List.In x ls -> stop x = false) ->
stop x = true ->
CopySymbols_L_Fun stop (midtape (ls ++ x :: ls') m rs, t2) =
(midtape ls' x (rev ls ++ m :: rs),
midtape (skipn (S (|ls|)) (left t2)) x (rev ls ++ m :: right t2)).