(*********************************************************)
(*		Definition is_balanced		  	 *)


Inductive is_balanced (l r : avl_tree) : bal -> Prop :=
  | Is_Left_Balanced :
      height l = S (height r) -> is_balanced l r Left_Balanced
  | Is_Fully_Balanced : height l = height r -> is_balanced l r Balanced
  | Is_Right_Balanced :
      S (height l) = height r -> is_balanced l r Right_Balanced.(*********************************************************)
(*		Definition is_balanced		  	 *)


Inductive is_balanced (l r : avl_tree) : bal -> Prop :=
  | Is_Left_Balanced :
      height l = S (height r) -> is_balanced l r Left_Balanced
  | Is_Fully_Balanced : height l = height r -> is_balanced l r Balanced
  | Is_Right_Balanced :
      S (height l) = height r -> is_balanced l r Right_Balanced.(*********************************************************)
(*		Definition is_balanced		  	 *)


Inductive is_balanced (l r : avl_tree) : bal -> Prop :=
  | Is_Left_Balanced :
      height l = S (height r) -> is_balanced l r Left_Balanced
  | Is_Fully_Balanced : height l = height r -> is_balanced l r Balanced
  | Is_Right_Balanced :
      S (height l) = height r -> is_balanced l r Right_Balanced.(*********************************************************)
(*		Definition is_balanced		  	 *)


Inductive is_balanced (l r : avl_tree) : bal -> Prop :=
  | Is_Left_Balanced :
      height l = S (height r) -> is_balanced l r Left_Balanced
  | Is_Fully_Balanced : height l = height r -> is_balanced l r Balanced
  | Is_Right_Balanced :
      S (height l) = height r -> is_balanced l r Right_Balanced.

Lemma inv_right_balanced : forall l r : avl_tree, is_balanced l r Right_Balanced -> S (height l) = height r.