Definition eqopt (a b : option key) :=
 match a, b with
 | Some x, Some y => K.eq x y
 | _ , _ => False
 end.

Lemma searchtree_mid_congr: forall c c' s1 x y s2 lo hi, searchtree lo hi (T c s1 x s2) -> K.eq x y -> searchtree lo hi (T c' s1 y s2).