Hint Resolve f_pred_precise f_pred_positive.

Lemma filter_find_count : forall {A} (f : A -> bool) d l li (Hunique : NoDup li)
(Hli : forall i, In i li -> f (Znth i l d) = true) (Hrest : forall i, ~In i li -> f (Znth i l d) = false),
Zlength (filter f l) = Zlength li.