Global Instance finType_rsig: finTypeC (EqType rsig).Definition rsig_finType : finType := (@FinType (EqType rsig) finType_rsig).Definition halting_states : list (states T) :=
    List.filter (fun s => halt s) (elem (states T)).Definition not_halting_states : list (states T) :=
    List.filter (fun s => negb (halt s)) (elem (states T)).

Lemma midtape_state A B q1 q2 l r: A ++ (state q1)::B = List.map sym l++(state q2)::(List.map sym r) -> A = List.map sym l /\ B = (List.map sym r) /\ q1 = q2.