(* Autor(s): Andrej Dudenhefner (1) Affiliation(s): (1) Saarland University, Saarbrücken, Germany *)
(* Enumerable X allows injection into nat *)
Class Enumerable (X: Type) :=
{
to_nat : X -> nat;
of_nat : nat -> X;
enumP {x: X} : of_nat (to_nat x) = x
}.

Lemma enumarableI {X Y: Type} {enum: Enumerable X} (to_X: Y -> X) (of_X: X -> Y) :
(forall (y: Y), of_X (to_X y) = y) -> Enumerable Y.