Instance Fin_Serializer n : Serializer (Fin.t n).(* Serializer for StructTact's fin based on converting to nat. *)
Definition fin_serialize {n} (x : fin n) : IOStreamWriter.t :=
  serialize (fin_to_nat x).

Lemma fin_serialize_deserialize_id n : serialize_deserialize_id_spec fin_serialize (@fin_deserialize n).