intros l0 r r0 b0 Balanced_l0 height_r.
inversion_clear Balanced_l0.
apply Is_Left_Balanced_Avl.
rewrite height_r; assumption.
apply Is_Fully_Balanced_Avl.
rewrite height_r; assumption.
apply Is_Right_Balanced_Avl.
rewrite height_r; assumption.
Qed.
(*************************************************)
(*		Definition Avl		  	 *)
(*************************************************)
Inductive is_avl : avl_tree -> Prop :=
| Nil_Is_Avl : is_avl Avl_Nil
| Node_Is_Avl :
forall (k : Int) (d : B) (l r : avl_tree) (b : bal),
is_avl l ->
is_avl r ->
is_balanced_avl l r b ->
is_below_avl l k -> is_above_avl r k -> is_avl (Avl_Node k d l r b).

(* Specifications: *)
Lemma is_avl_rec :
forall P : avl_tree -> Set,
P Avl_Nil ->
(forall (k : Int) (d : B) (l r : avl_tree) (b : bal),
is_avl l ->
P l ->
is_avl r ->
P r ->
is_balanced_avl l r b ->
is_below_avl l k -> is_above_avl r k -> P (Avl_Node k d l r b)) ->
forall t : avl_tree, is_avl t -> P t.