intros k k0 d0 l0 r0 l b0 less_k above_r0 equiv_del_l0.
inversion_clear equiv_del_l0.
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 less_k.
assumption.
assumption.
elimtype False.
apply lookup_above_false with k r0 d1.
assumption.
apply above_trans with k0.
assumption.
assumption.
intros k1 d1 notequal lookup1.
inversion_clear lookup1.
apply Lookup_Equal.
apply Lookup_Left.
apply H0; assumption.
apply Lookup_Right; assumption.
intros k1 d1 notequal lookup1.
inversion_clear lookup1.
apply Lookup_Equal.
apply Lookup_Left.
apply H1; assumption.
apply Lookup_Right; assumption.
Qed.

Lemma equiv_del_trans_right :
forall (k k0 : Int) (d0 : B) (l0 r r0 : avl_tree) (b0 : bal),
Less k0 k ->
is_below l0 k0 ->
equiv_del k r0 r ->
equiv_del k (Avl_Node k0 d0 l0 r0 b0) (Avl_Node k0 d0 l0 r b0).