Section finite.
Definition finite_t X := { lX | forall x : X, In x lX }.
Definition finite X := exists lX, forall x : X, In x lX.
Fact finite_t_finite X : finite_t X -> finite X.
Fact finite_fin_eq X : finite X <-> fin (fun _ : X => True).
Fact fin_t_map X Y (f : X -> Y) (P Q : _ -> Prop) :
(forall y, Q y <-> exists x, f x = y /\ P x)
-> @fin_t X P
-> @fin_t Y Q.
Fact finite_t_map X Y (f : X -> Y) :
(forall y, exists x, f x = y)
-> finite_t X
-> finite_t Y.
Fact Forall_reif_t X l (P : X -> Prop) : Forall P l -> { m : list (sig P) | map (@proj1_sig _ _) m = l }.
Fact fin_t_finite_t X (P : X -> Prop) (Pirr : forall x (H1 H2 : P x), H1 = H2) :
fin_t P -> finite_t (sig P).
Fact fin_t_equiv X (P Q : X -> Prop) : (forall x, P x <-> Q x) -> fin_t P -> fin_t Q.
Fixpoint list_prod X Y (l : list X) (m : list Y) :=
match l with
| nil  => nil
| x::l => map (fun y => (x,y)) m ++ list_prod l m
end.
Fact list_prod_spec X Y l m c : In c (@list_prod X Y l m) <-> In (fst c) l /\ In (snd c) m.
Fact fin_t_prod X Y (P Q : _ -> Prop) :
@fin_t X P -> @fin_t Y Q -> fin_t (fun c => P (fst c) /\ Q (snd c)).
Fact finite_t_prod X Y : finite_t X -> finite_t Y -> finite_t (X*Y).
Fact finite_prod X Y : finite X -> finite Y -> finite (X*Y).
Fact fin_t_sum X Y (P Q : _ -> Prop) :
@fin_t X P -> @fin_t Y Q -> fin_t (fun z : X + Y => match z with inl x => P x | inr y => Q y end).
Fact finite_t_sum X Y : finite_t X -> finite_t Y -> finite_t (X+Y)%type.
Fact finite_sum X Y : finite X -> finite Y -> finite (X+Y)%type.
Fact finite_t_unit : finite_t unit.

Theorem finite_t_option X : finite_t X -> finite_t (option X).