Hint Resolve enum_ok.

(* Specifications: *)
Lemma countSplit (X: eqType) (A B: list X) (x: X)  : count A x + count B x = count (A ++ B) x.
Fixpoint pos (X : eqType) (x : X) (A : list X) :=
match A with
| [] => None
| a :: A => if Dec (x = a) then Some 0 else match pos x A with Some n => Some (S n) | None => None end
end.