End EnumRank.
Arguments enum_val_inj {T A} [i1 i2] : rename.
Arguments enum_rank_inj {T} [x1 x2].
Prenex Implicits enum_val enum_rank enum_valK enum_rankK.

(* Specifications: *)
Lemma enum_rank_ord n i : enum_rank i = cast_ord (esym (card_ord n)) i.
Lemma enum_val_ord n i : enum_val i = cast_ord (card_ord n) i.
Definition bump h i := (h <= i) + i.