I want to prove the following lemma:
Require Import CoLoR.Util.Vector.VecUtil.
Require Import Coq.Vectors.Vector.
From mathcomp Require Import ssreflect.
Definition Equiv {A n m l}(I:t A n -> t A l)(J:t A m -> t A l)(eq:n=m):Prop:=
forall (a : t A n), I a = J (Vcast a eq) .
Lemma Vcast_func (A:Type):
forall (n m l:nat)(v:t A n)(eq:n=m)
(func1:t A n -> t A l)(func2:t A m -> t A l)
(foo: forall {n l:nat}, (t A n -> t A l) -> t A n -> t A n),
Equiv func1 func2 eq -> Vcast (foo func1 v) eq = foo func2 (Vcast v eq).
Proof.
induction n;rewrite /Equiv. destruct m => //.
intros.
rewrite !Vcast_refl.
Abort.
I think that Vcast (foo func1 v) eq = foo func2 (Vcast v eq). holds because of Equiv whatever foo is. But I don't know how to prove it.
Are there any solutions?