proposition: Fact hfs_select t (P : hfs -> Prop) : (forall x, x ∈ t -> { P x } + { ~ P x }) -> { s | forall x, x ∈ s <-> x ∈ t /\ P x }.
proof: Proof. intros H. destruct btm_select with (P := fun x => P (cls x)) (t := repr t) as (s & Hs). + intros x y E. apply bt_cls_equiv in E. rewrite E; auto. + intros x Hx. apply H, btm_cls_repr; auto. + exists (bt_cls s); intros x. rewrite btm_repr_cls, Hs, bt_cls_hfs_repr; tauto. Qed.
imports: List Arith Lia Max Wellfounded Setoid Eqdep_dec Bool Undecidability.Shared.Libs.DLW.Utils(utils_tac utils_list finite) Undecidability.Shared.Libs.DLW.Vec(pos vec) Undecidability.Shared.Libs.DLW.Wf(wf_finite wf_chains) Undecidability.FOL.TRAKHTENBROT(notations fol_ops membership btree)