The code below captures my question.
My intention is to create a P of Vec N (suc n) from a P of Vec N (n + 1).
My experience with the subst of Propositional Equality tells me this should be the way to do it.
open import Relation.Binary.HeterogeneousEquality
postulate
n : ℕ
xs : Vec ℕ (n + 1)
ys : Vec ℕ (suc n)
eq : xs ≅ ys
data P : ∀ {n} → Vec ℕ n → Set where
lemma : P xs → P ys
lemma h = subst (λ i → P i) eq h
Obviously lemma doesn't type check because (n + 1) and (suc n) are not the same Nat.
Am I using HeterogeneousEquality correctly?
If not, what is a proper way to substitute Vec N (n+1) by Vec N (suc n)?