Section EnumVal.
Variables (d : unit) (T : finPOrderType d).
Implicit Types (x : T) (A : {pred T}).
Definition enum_rank_in x0 A (Ax0 : x0 \in A) x :=
insubd (Ordinal (@enum_rank_subproof _ x0 A Ax0)) (index x (enum A)).
Definition enum_rank x := @enum_rank_in x T (erefl true) x.
Definition enum_val A i := nth (@enum_default _ A i) (enum A) i.
Prenex Implicits enum_val.

Lemma nth_enum_rank x0 : cancel enum_rank (nth x0 (enum T)).