(** ** Properties of [shiftin] and [shiftrepeat] *)

(* Specifications: *)
Lemma shiftin_nth A a n (v: t A n) k1 k2 (eq: k1 = k2):
nth (shiftin a v) (Fin.L_R 1 k1) = nth v k2.
Lemma shiftin_last A a n (v: t A n): last (shiftin a v) = a.
Lemma shiftrepeat_nth A: forall n k (v: t A (S n)),
nth (shiftrepeat v) (Fin.L_R 1 k) = nth v k.
Lemma shiftrepeat_last A: forall n (v: t A (S n)), last (shiftrepeat v) = last v.
Lemma map_shiftin A B: forall (f : A -> B) a n (v : t A n),
map f (shiftin a v) = shiftin (f a) (map f v).
Lemma fold_right_shiftin A B: forall (f : A -> B -> B) a b n (v : t A n),
fold_right f (shiftin b v) a = fold_right f v (f b a).
Lemma In_shiftin A: forall a b n (v : t A n),
In a (shiftin b v) <-> (b = a \/ In a v).
Lemma Forall_shiftin A: forall (P : A -> Prop) a n (v : t A n),
Forall P (shiftin a v) <-> (P a /\ Forall P v).