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.

Lemma enum_val_ord n i : enum_val i = cast_ord (card_ord n) i.
Definition bump h i := (h <= i) + i.