(* Attempting to rewrite in both directions may seem redundant, because of the symmetry of the law [insert_insert]. It is not: because [omega] fails in the presence of meta-variables, rewriting in one direction may be possible while the other direction fails. *)
Ltac insert_insert :=
first [
rewrite    insert_insert; [ reflexivity | omega ]
| rewrite <- insert_insert; [ reflexivity | omega ]
].
Hint Extern 1 (raw_insert _ _ _ = _) =>
insert_insert
: insert_insert.
Hint Extern 1 (_ = raw_insert _ _ _) =>
insert_insert
: insert_insert.
(* The result of an insertion cannot be nil. *)

Lemma insert_nil:
forall A x a (e : env A),
insert x a e = nil ->
False.