Definition rotate {A} (l : list A) n m := sublist (m - n) (Zlength l) l ++
sublist 0 (m - n) l.

Lemma upd_complete' : forall l x n, (length l < n)%nat ->
upd_Znth (Zlength l) (map Vint (map Int.repr l) ++ repeat Vundef (n - length l)) (Vint (Int.repr x)) =
map Vint (map Int.repr (l ++ [x])) ++ repeat Vundef (n - length (l ++ [x])).