(* ---------------------------------------------------------------------------- *)
(* [length e] should be viewed as an upper bound on the true length of the environment [e], since there may be useless [None] entries at the end. We are careful to always work with hypotheses and goals of the form [length e <= k]. *)

(* Specifications: *)
Lemma length_monotonic:
forall A (e : env A) k1 k2,
length e <= k1 ->
k1 <= k2 ->
length e <= k2.
Lemma lookup_beyond_length:
forall A (e : env A) x,
length e <= x ->
lookup x e = None.