proposition: Lemma select_In {A: Type} {P: A -> Prop} (dec_p: forall x, Decidable (P x)): forall x l, In x (select dec_p l) <-> In x l /\ P x.
proof: Proof. intros; induction l; simpl; [intuition | destruct (dec_p a)]; split; intro. + simpl in H. destruct H; [subst|]; intuition. + destruct H. simpl. destruct H; [left | right]; intuition. + rewrite IHl in H. intuition. + rewrite IHl. destruct H. split; auto. destruct H; [subst; exfalso|]; intuition. Qed.
imports: Coq.Lists.List Coq.micromega.Lia Coq.Sorting.Permutation Coq.ZArith.ZArith_base Coq.ZArith.Zcomplements Coq.Logic.FunctionalExtensionality CertiGraph.lib.Coqlib CertiGraph.lib.EquivDec_ext VST.zlist.sublist VST.zlist.list_solver