fact: Fixpoint join l : key -> elt -> t -> t := match l with | Leaf _ => add | Node lh ll lx ld lr => fun x d => fix join_aux (r:t) : t := match r with | Leaf _ => add x d l | Node rh rl rx rd rr => if rh+2 <? lh then bal ll lx ld (join lr x d r) else if lh+2 <? rh then bal (join_aux rl) rx rd rr else create l x d r end end.
imports: Coq(Bool PeanoNat BinInt FunInd Int) Coq(Orders OrdersFacts OrdersLists) MMaps(Utils Interface OrdList GenTree)