(* Lookup *)

Definition index x := find (pred1 x).

(* Specifications: *)
Lemma index_size x s : index x s <= size s.
Lemma index_uniq i s : i < size s -> uniq s -> index (nth s i) s = i.
Lemma index_head x s : index x (x :: s) = 0.
Lemma index_last x s : uniq (x :: s) -> index (last x s) (x :: s) = size s.
Lemma mem_rot s : rot n0 s =i s.