(** Checks that all members of a list are P *)

Fixpoint alllist (A : Set) (P : A -> Prop) (qlist : list A) {struct qlist} :
 Prop :=
  match qlist with
  | Nil => True
  | Cons m l => P m /\ alllist A P l
  end.

Lemma alllist_dec : forall (A : Set) (P : A -> Prop) (l : list A), (forall x : A, P x \/ ~ P x) -> alllist A P l \/ ~ alllist A P l.