Module Raw := MSet.Raw.Fixpoint raw_mem_between (m: Raw.tree) : bool :=
  match m with
  | Raw.Leaf => false
  | Raw.Node _ l x r =>
      if above_low_bound x
      then if below_high_bound x
           then true
           else raw_mem_between l
      else raw_mem_between r
  end.Definition mem_between (m: t) : bool := raw_mem_between m.(MSet.this).

(* Specifications: *)
Lemma raw_mem_between_1: forall m, raw_mem_between m = true -> exists x, Raw.In x m /\ above_low_bound x = true /\ below_high_bound x = true.
Lemma raw_mem_between_2: forall x m, Raw.bst m -> Raw.In x m -> above_low_bound x = true -> below_high_bound x = true -> raw_mem_between m = true.
Theorem mem_between_1: forall s, mem_between s = true -> exists x, In x s /\ above_low_bound x = true /\ below_high_bound x = true.
Theorem mem_between_2: forall x s, In x s -> above_low_bound x = true -> below_high_bound x = true -> mem_between s = true.
Lemma raw_mem_between_1: forall m, raw_mem_between m = true -> exists x, Raw.In x m /\ above_low_bound x = true /\ below_high_bound x = true.
Lemma raw_mem_between_2: forall x m, Raw.bst m -> Raw.In x m -> above_low_bound x = true -> below_high_bound x = true -> raw_mem_between m = true.
Theorem mem_between_1: forall s, mem_between s = true -> exists x, In x s /\ above_low_bound x = true /\ below_high_bound x = true.
Theorem mem_between_2: forall x s, In x s -> above_low_bound x = true -> below_high_bound x = true -> mem_between s = true.