Corollary index_of_rebase : forall m n k, 0 <= n <= Zlength m -> NoDup (map fst m) ->
  index_of (rebase m n) k = option_map (fun i => (i - n) mod Zlength m) (index_of m k).

(* Specifications: *)
Lemma index_of'_succeeds : forall k m i (Hi : 0 <= i < Zlength m) (Hnz : Forall (fun x => fst x <> 0 /\ fst x <> k) (sublist 0 i m)) (Hk : fst (Znth i m) = k \/ fst (Znth i m) = 0), index_of' m k = Some i.
Lemma lookup_spec : forall m k (Hwf : wf_map m) (Hchain : well_chained m) (Hlen : Zlength m = size) (Hnz : k <> 0) (Hin : In k (map fst m)), lookup m k = index_of m k.
Lemma sepcon_rebase : forall l m, 0 <= m <= Zlength l -> fold_right sepcon emp l = fold_right sepcon emp (rebase l m).
Lemma rebase_map : forall {A B} (f : A -> B) l m, rebase (map f l) m = map f (rebase l m).