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

Lemma Znth_rotate : forall {A} {d : Inhabitant A} i l n, 0 <= n <= Zlength l -> 0 <= i < Zlength l -> Znth i (rotate l n (Zlength l)) = Znth ((i - n) mod Zlength l) l.