Section Reachability.
Variable  A : dfa.
(** transition function for whole words *)
Fixpoint delta_star (q: A) (w: word) :=
match w with
| nil => q
| x::w' => delta_star (delta_S q x) w'
end.
(** Definition if acceptance *)
Definition accept (w:word) := F (@delta_star s w).
Instance accept_dec w : dec (accept w).
(** * Reachability - normal reachability - reachability with a specific word *)
Inductive reachable (q: A) :  A -> Prop :=
| refl: reachable q q
| step q' x: reachable (delta_S q x) q' -> reachable q q'.
Definition reachable_with q w q':= delta_star q w = q'.
Hint Constructors reachable.
Hint Resolve reachable_with_reachable.
(* Lemma reachable_delta_star q w: reachable q (delta_star q w). *)
(** * Reach (set of all reachable states) - defined using fixed-point iteration *)
(* The predicate for the fixed-point iteration *)
Definition step_reach (set: list A) (q: A) := exists q' x, q' el set /\ reachable_with q' [x] q.
Definition reach (q: A) := FCIter step_reach [q].

Lemma reach_correct q q': reachable q q' <-> q' el (reach q).