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 Finite_var_upto:
forall v, Finite (var_upto v).