Definition list2set {U} (l: list U) : Ensemble U :=
fun x => List.In x l.
Program Definition ff U (F: Ensemble U) (l : sig (@NoDup (sig F))) : sig (@NoDup U) :=
(map (@proj1_sig _ _) (proj1_sig l)).
Next Obligation.
induction H. constructor.
simpl.
constructor.
contradict H.
clear - H.
induction l; simpl in H. contradiction.
destruct H; simpl; [left | right].
destruct a; destruct x; simpl. apply exist_ext; auto.
apply IHl. auto.
auto.
Qed.

Lemma clause_bound_finite: forall n, Finite n -> Finite (clause_bound n).
Definition var2nat v := nat_of_P (id2pos v).