intros key k d l r b data avl_t less lookup_t.
elim (inv_lookup key k d l r b data lookup_t); intro u0.
elimtype False.
apply (less_irrefl key).
elim u0; clear u0; intros u0 u1.
rewrite u0 in less.
assumption.
elim u0; clear u0; intro u0.
assumption.
elimtype False.
apply (lookup_above_false key r data u0).
apply is_above_avl_is_above.
apply (inv_is_avl_right k d l r b avl_t).
apply (above_avl_trans r k key).
apply (inv_is_avl_is_is_above_avl k d l r b avl_t).
assumption.
Qed.

Lemma lookup_avl_inv_greater :
forall (key k : Int) (d : B) (l r : avl_tree) (b : bal) (data : B),
is_avl (Avl_Node k d l r b) ->
Less k key -> lookup key (Avl_Node k d l r b) data -> lookup key r data.