Section Compare_fun_lemmas.
Variable (X : finType) (stop : X -> bool).
Definition swap (A B : Type) : A*B->B*A := ltac:(intros [b a]; now constructor).

Lemma Compare_Move_steps_midtape2 (stop' : X -> bool) (str1 str2 : list X) (s1 s2 : X) (m : X) ls1 ls2 rs1 rs2 :
(forall x, In x str1 -> stop x = false) ->
(forall x, In x str2 -> stop x = false) ->
stop m = false ->
stop s1 = true ->
stop s2 = true ->
stop' m = true ->
(forall x, In x str1 -> stop' x = false) ->
(forall x, In x str2 -> stop' x = false) ->
MoveToSymbol_L_steps stop' id (snd (snd (Compare_fun stop (midtape ls1 m (str1 ++ s1 :: rs1), midtape ls2 m (str2 ++ s2 :: rs2))))) <=
8 + 4 * length str2.