Definition HdRel' (R: key -> key -> Prop) (lo: option key) (l: list key) :=
match lo with Some lo' => HdRel R lo' l | None => True end.

Lemma treeify'_g_is_searchtree:
forall n l lo,
HdRel' K.lt lo l -> Sorted K.lt l ->
S (length l) >= nat_of_P n ->
(searchtree lo (hd_error (snd (treeify_g n l))) (fst (treeify_g n l)) /\
(forall k, interp (fst (treeify_g n l)) k \/ InA K.eq k (snd (treeify_g n l)) <-> InA K.eq k l) /\
Sorted K.lt (snd (treeify_g n l))).