Ltac one_plus_x_minus_one :=
  repeat rewrite one_plus_x_minus_one_left in *;
  repeat rewrite one_plus_x_minus_one_right in * by omega.

(* Specifications: *)
Lemma raw_insert_zero: forall A o (e : env A), raw_insert 0 o e = o :: e.
Lemma raw_insert_successor: forall A x o (e : env A), raw_insert (S x) o e = lookup 0 e :: raw_insert x o (tail e).
Lemma empty_eq_insert: forall A x o (e : env A), empty _ = insert x o e -> False.
Lemma lookup_empty_None: forall A x, lookup x (@empty A) = None.
Lemma lookup_empty_Some: forall A x (a : A), lookup x (@empty _) = Some a -> False.
Lemma lookup_successor: forall A x (e : env A), lookup (S x) e = lookup x (tail e).
Lemma lookup_insert_bingo: forall A x y (o : option A) e, x = y -> lookup x (raw_insert y o e) = o.
Lemma lookup_insert_recent: forall A x y (o : option A) e, x < y -> lookup x (raw_insert y o e) = lookup x e.
Lemma lookup_insert_old: forall A x y (o : option A) e, x > y -> lookup x (raw_insert y o e) = lookup (x - 1) e.
Lemma lookup_shift_insert: forall A x y (o : option A) e, lookup (shift y x) (raw_insert y o e) = lookup x e.