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.

Lemma listd_omapl_pred {C : Type} h (g : C -> pred B) l s
(H : forall a, f a s -> match h a with Some a' => g a' s | None => True end) :
listd f inter TT l s -> listd g inter TT (omapl h l) s.