Section Accessories.
Context {A : Type}.
#[local] Notation vec := (Vector.t A).
Fixpoint map {A : Type} {B : Type} {n : nat} (f : A -> B) (xs : Vector.t A n) {struct xs} : Vector.t B n :=
match xs with
| [] => []
| x :: xs' => f x :: map f xs'
end.
Fixpoint replicate {A : Type} {n : nat} {struct n} : A -> Vector.t A n :=
match n with
| O => fun x => []
| S n' => fun x => x :: replicate (n := n') x
end.

Lemma replicate_spec {A : Type} {n : nat} (x : A)
: forall i : Fin.t n, x = replicate x !! i.