Section Operations.
Variable  A : dfa.
Global Instance empty_dec : dec (empty A).
Instance exists_accept_dec: dec (exists w, accept A w).
Instance exists_not_accept_dec : dec (exists w, ~ accept A w).
Definition Epsilon_autom : dfa.
Definition predCons (A:dfa) (q: option A + unit) := match q with
| inl None => False
| inl (Some q) => F q
| inr tt => False end.
Definition deltaCons x (A:dfa) (q: option A + unit) y  := match q with
| inl None => if decision (y = x) then inl (Some s) else inr tt
| inl (Some q) => inl (Some (delta_S q y))
| inr tt => inr tt end.
Instance predCons_dec  (A:dfa) (q: option A + unit) : dec (predCons q).
Definition cons (A: dfa) (x:Sig) :=
DFA (inl None) (DecPred (@predCons A)) (@deltaCons x A).
Fixpoint exactW (w: word)  := match w with
| nil => Epsilon_autom
| x::w' => cons (exactW w') x end.

Lemma exactW_correct w w': accept (exactW w) w' <-> w' = w.