Definition partition'  (f: key -> bool) (s: tree) : (tree*tree) :=
  match partition_aux f s (1%positive, nil) (1%positive,  nil)
   with ((n1,l1),(n2,l2)) => (fst (treeify_g n1 l1), fst (treeify_g n2 l2))
  end.

Lemma tree_similar_lemma: forall c c' k k' s s' lo hi lo' hi', searchtree lo hi (T c EE k s) -> searchtree lo' hi' (T c' EE k' s') -> (forall x : key, interp (T c EE k s) x <-> interp (T c' EE k' s') x) -> K.eq k k' /\ (forall x, interp s x <-> interp s' x).