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

Lemma Compare_correct_eq (str : list X) (s1 s2 : X) rs1 rs2 t :
(forall x, In x str -> stop x = false) ->
stop s1 = true ->
stop s2 = true ->
tape_local (fst t) = str ++ s1 :: rs1 ->
tape_local (snd t) = str ++ s2 :: rs2 ->
Compare_fun stop t =
(true, (midtape (rev str ++ left (fst t)) s1 rs1, midtape (rev str ++ left (snd t)) s2 rs2)).