Section NFA_NonHalt.
Hypothesis nfa_h0:
forall {i0},
nfa None i0 None = true.
Hypothesis nfa_h:
forall {s0 u0 i0},
tm s0 i0 = None ->
nfa (Some (s0,u0)) i0 None = true.
Hypothesis nfa_r:
forall {s0 u0 i0 s1 i1},
tm s0 i0 = Some {| nxt:= s1; out:=i1; dir:=Dpos |} ->
nfa (Some (s0,u0)) i0 (Some (s1,dfa u0 i1)) = true.
Hypothesis nfa_l:
forall {s0 i0 s1 u1 i1 i2 su2 su3},
tm s0 i0 = Some {| nxt:= s1; out:=i1; dir:=Dneg |} ->
nfa (Some (s1,u1)) i2 su2 = true ->
nfa su2 i1 su3 = true ->
nfa (Some (s0,dfa u1 i2)) i0 su3 = true.
Hypothesis dfa_0:
dfa U0 Σ0 = U0.
Inductive NFA_match: (option (St*U))->Word->Prop :=
| NFA_match_O: NFA_match None nil
| NFA_match_S v0 v1 i w: nfa v0 i v1 = true -> NFA_match v1 w -> NFA_match v0 (i::w)
.
Definition makeES' (l0 r0:Word)(m0:Σ)(s0:St):ExecState Σ :=
(s0,make_tape' half_tape_all0 l0 m0 r0 half_tape_all0).
Fixpoint DFA_match(w:Word):U :=
match w with
| nil => U0
| h::t => dfa (DFA_match t) h
end.
Definition ES_matched(l0 r0:Word)(m0:Σ)(s0:St):Prop :=
exists n0,
NFA_match (Some (s0,DFA_match l0)) ((m0::r0)++(repeat Σ0 n0)).

Lemma NFA_match_None w:
NFA_match None w.