Module fin_OT_compat (Import N : NatValue) <: UsualOrderedType.
Definition t := fin n.
Definition eq := @eq (fin n).
Definition lt := @fin_lt n.
Definition eq_refl := @eq_refl (fin n).
Definition eq_sym := @eq_sym (fin n).
Definition eq_trans := @eq_trans (fin n).
Definition lt_trans := @fin_lt_trans n.
Definition lt_not_eq := @fin_lt_not_eq n.
Definition compare := fin_compare_compat n.
Definition eq_dec := fin_eq_dec n.
End fin_OT_compat.

Lemma CompSpec_Eq_Some :
forall n' (x' y' : fin n'),
CompSpec eq fin_lt x' y' Eq ->
Some x' = Some y'.