(* 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
}.

(* to_nat is injective *)
Lemma to_nat_inj {X: Type} {enumX: Enumerable X} {x y: X}:
to_nat x = to_nat y <-> x = y.