Section WDFA.
Hypothesis wdfa:U->Σ->(U*Z).
Fixpoint WDFA_match(ls:Word):U*Z :=
match ls with
| nil => (U0,Z0)
| h::t => let (u,z) := WDFA_match t in
let (u',a) := wdfa u h in
(u',(z+a)%Z)
end.
Definition WDFA_pop(u0:U) :=
concat
(map (fun i0 =>
map (fun u1 => (u1,i0,snd (wdfa u1 i0))) (filter (fun u1 => U_eqb (fst (wdfa u1 i0)) u0) U_list))
Σ_list).
Definition wdfa_0:=
wdfa U0 Σ0 = (U0,Z0).
Definition wdfa_0_dec :=
let (u0,z0):=wdfa U0 Σ0 in
U_eqb u0 U0 &&&
Z.eqb z0 Z0.

Lemma wdfa_0_dec_spec:
wdfa_0_dec = true ->
wdfa_0.