proposition: Lemma vector_cons_eq_inv : forall (A : Set)(n : nat)(a1 a2 : A)(v1 v2 : Vector.t A n), Vector.cons A a1 n v1 = Vector.cons A a2 n v2 -> a1 = a2 /\ v1 = v2.
proof: Proof. intuition. inversion H; trivial. assert (tailOpt (Vector.cons A a1 n v1) = tailOpt (Vector.cons A a2 n v2)). eapply tailOpt_eq. trivial. simpl in *. inversion H0; clear H0; subst. trivial. Qed.
imports: FCF.StdNat List Bvector micromega.Lia FCF.EqDec FCF.Fold ZArith Permutation