intros key update init k0 d0 l0 r0 b0 l b avl_t0 less equiv_ins_l0.
apply equiv_ins_intro.
intros k data equal.
generalize (equal_less_less k key k0 equal less); intro less1.
intro lookup_t0.
apply Lookup_Left.
apply (inv_equiv_ins_equal0 key update init l0 l).
assumption.
assumption.
apply (lookup_avl_inv_less k k0 d0 l0 r0 b0 data); assumption.
intros k equal.
intro not_lookup_t0.
apply Lookup_Left.
apply (inv_equiv_ins_equal1 key update init l0 l).
assumption.
assumption.
intros data lookup_l0.
apply (not_lookup_t0 data).
apply Lookup_Left; assumption.
intros k data notequal.
intro lookup_t0.
elim (inv_lookup k k0 d0 l0 r0 b0 data lookup_t0); intro u0.
elim u0; clear u0; intros u0 u1.
rewrite u0.
rewrite u1.
apply Lookup_Equal.
elim u0; clear u0; intros u0.
apply Lookup_Left.
apply (inv_equiv_ins_notequal0 key update init l0 l); assumption.
apply Lookup_Right; assumption.
intros k data notequal.
intro lookup_t.
elim (inv_lookup k k0 d0 l r0 b data lookup_t); intro u0.
elim u0; clear u0; intros u0 u1.
rewrite u0.
rewrite u1.
apply Lookup_Equal.
elim u0; clear u0; intros u0.
apply Lookup_Left.
apply (inv_equiv_ins_notequal1 key update init l0 l); assumption.
apply Lookup_Right; assumption.
Qed.

(* Specifications: *)
Lemma equiv_ins_right :
forall (key : Int) (update : B -> B) (init : B) (k0 : Int)
(d0 : B) (l0 r0 : avl_tree) (b0 : bal) (r : avl_tree)
(b : bal),
is_avl (Avl_Node k0 d0 l0 r0 b0) ->
Less k0 key ->
equiv_ins key update init r0 r ->
equiv_ins key update init (Avl_Node k0 d0 l0 r0 b0) (Avl_Node k0 d0 l0 r b).