(* The integer bump / unbump operations. *)
Definition unbump h i := i - (h < i).

(* The lift operations on ordinals; to avoid a messy dependent type, *)
(* unlift is a partial operation (returns an option).                *)
Lemma lift_subproof n h (i : 'I_n.-1) : bump h i < n.
Definition unlift n (h i : 'I_n) :=
omap (fun u : {j | j != h} => Ordinal (unlift_subproof u)) (insub i).