intros k k0 d0 l0 r0 l b0 greater_k below_l0 equiv_del_r0.
inversion_clear equiv_del_r0.
apply equiv_del_intro.
intros k1 equal_k1 d1 lookup1.
apply H with k1 d1.
assumption.
rewrite (equal_eq k1 k equal_k1).
rewrite (equal_eq k1 k equal_k1) in lookup1; clear equal_k1 k1.
inversion lookup1.
elimtype False.
apply less_irrefl with k0.
rewrite H3 in greater_k.
assumption.
elimtype False.
apply lookup_below_false with k l0 d1.
assumption.
apply below_trans with k0.
assumption.
assumption.
assumption.
intros k1 d1 notequal lookup1.
inversion_clear lookup1.
apply Lookup_Equal.
apply Lookup_Left; assumption.
apply Lookup_Right.
apply H0; assumption.
intros k1 d1 notequal lookup1.
inversion_clear lookup1.
apply Lookup_Equal.
apply Lookup_Left; assumption.
apply Lookup_Right.
apply H1; assumption.
Qed.
(*****************************************************************)

(* Specifications: *)
Lemma delete_avl :
forall (key : Int) (t0 : avl_tree), is_avl t0 -> delete_spec key t0.