proposition: Lemma filter_twice : forall (A : Set)(p1 p2 : A -> bool)(ls : list A), filter p1 (filter p2 ls) = filter (fun a => (p1 a) && (p2 a)) ls.
proof: Proof. induction ls; intuition; simpl in *. destruct (p2 a); simpl. destruct (p1 a); simpl. f_equal. intuition. intuition. rewrite andb_false_r. intuition. Qed.
imports: Crypto FCF RndNat Asymptotic