rewrite <- H0.
auto.
Qed.
(** %\label{castfin}% *)
Definition cast_fin : forall n n' : Nat, fin n -> n =' n' in _ -> fin n'.
intros.
destruct X.
exact (Build_finiteT (lt_comp in_range_prf H)).
Defined.

(* Specifications: *)
Lemma cast_fin_comp :
forall (n n' : Nat) (i i' : fin n) (H H' : n =' n' in _),
i =' i' in _ -> cast_fin i H =' cast_fin i' H' in _.