Section Compare_fun_lemmas.
Variable (X : finType) (stop : X -> bool).

Lemma Compare_correct_eq_midtape (str : list X) (s1 s2 : X) ls1 rs1 ls2 m rs2 :
(forall x, In x str -> stop x = false) ->
stop m = false ->
stop s1 = true ->
stop s2 = true ->
Compare_fun stop (midtape ls1 m (str ++ s1 :: rs1), midtape ls2 m (str ++ s2 :: rs2)) =
(true, (midtape (rev str ++ m :: ls1) s1 rs1, midtape (rev str ++ m :: ls2) s2 rs2)).