(* --- BEGIN Talia's equivalent definition of nth to reuse later --- *)
Fixpoint nth_error_opt {A : Type} {m : nat} (v : Vector.t A m) (n : nat) : option A :=
match n with
| O =>
match v with
| Vector.nil _ => None
| Vector.cons _ h _ _ => Some h
end
| S p =>
match v with
| Vector.nil _ => None
| Vector.cons _ _ n1 t0 => nth_error_opt t0 p
end
end.

Lemma fin_of_lt_irrel:
forall {m n : nat} (H1 H2 : Nat.lt n m), Fin.of_nat_lt H1 = Fin.of_nat_lt H2.