Section ListDenotePred.
Context {A B : Type}.
Variables (f : A -> pred B) (b : pred B).
Proof with auto.
induction l; simpl... apply extensionality; intro x.
apply prop_ext; split; intro H. right... destruct H... inversion H.
rewrite IHl, union_assoc...
Qed.
Proof with auto.
induction l; simpl... intros [C D].
solve[rewrite listd_app; apply H; split; auto].
Qed.
Proof with simpl; try solve[exfalso; auto]; auto.
induction l... intro C; split; [ solve [apply (C a); left; auto] | ].
apply IHl...
Qed.
Proof with try solve[exfalso; auto]; auto.
revert a; induction l; simpl; intros a' C D...
destruct D as [D|D]; [rewrite <- D|].
solve [destruct C as [C1 C2]; auto]. solve[destruct C; apply IHl; auto].
Qed.
Proof with simpl; try solve[exfalso; auto|congruence]; auto.
induction l... intros [[a [C D]]|E]... intros [[a0 [C D]]|E]...
destruct C; subst. left... right; apply IHl; eauto.
right; eapply IHl...
Qed.
Proof with try solve[exfalso; auto|congruence]; auto.
induction l... destruct 1. left; exists a; split; simpl...
spec IHl H. destruct IHl as [[a0 [C D]]|E].
left; exists a0; split; simpl... right...
Qed.
(* todo: add map/fold_right lems for prop, etc. *)
Proof with try solve [exfalso; auto]; auto.
induction l... simpl; intros [? ?]; split...
Qed.
Proof with simpl; try solve [exfalso; auto]; auto.
induction l... simpl; intros [? ?]. spec H a. destruct (h a)... split...
Qed.

Lemma listd_foldr_pred h c0 l s
(H : forall a x, f a s -> f x s -> f (h a x) s) :
f c0 s -> listd f inter TT l s -> f (fold_right h c0 l) s.