Module Make(Import A:Automaton.T).
(** The singleton predicate for states **)
Definition singleton_state_pred (state:state) :=
(fun state' => match compare state state' with Eq => true |_ => false end).
(** [past_state_of_non_init_state], extended for all states. **)
Definition past_state_of_state (state:state) :=
match state with
| Init _ => []
| Ninit nis => past_state_of_non_init_state nis
end.
(** Concatenations of last and past **)
Definition head_symbs_of_state (state:state) :=
match state with
| Init _ => []
| Ninit s =>
last_symb_of_non_init_state s::past_symb_of_non_init_state s
end.
Definition head_states_of_state (state:state) :=
singleton_state_pred state::past_state_of_state state.
(** * Validation for correctness **)
(** Prefix predicate between two lists of symbols. **)
Inductive prefix: list symbol -> list symbol -> Prop :=
| prefix_nil: forall l, prefix [] l
| prefix_cons: forall l1 l2 x, prefix l1 l2 -> prefix (x::l1) (x::l2).

(** [prefix] is transitive **)
Lemma prefix_trans:
forall (l1 l2 l3:list symbol), prefix l1 l2 -> prefix l2 l3 -> prefix l1 l3.