Inductive ct: comparison -> comparison -> comparison -> Prop :=
| ct_xxx: forall x, ct x  x  x
| ct_xex: forall x, ct x  Eq x
| ct_exx: forall x, ct Eq x  x
| ct_glx: forall x, ct Gt Lt x
| ct_lgx: forall x, ct Lt Gt x.

(* Specifications: *)
Lemma ct_cxe: forall x, ct (CompOpp x) x Eq.
Lemma ct_compare_bool:
forall a b c, ct (compare_bool a b) (compare_bool b c) (compare_bool a c).
Lemma compare_x_Leaf: forall s,
compare s Leaf = if is_empty s then Eq else Gt.
Lemma compare_empty_x: forall a, is_empty a = true ->
forall b, compare a b = if is_empty b then Eq else Lt.
Lemma compare_x_empty: forall a, is_empty a = true ->
forall b, compare b a = if is_empty b then Eq else Gt.
Lemma ct_compare:
forall a b c, ct (compare a b) (compare b c) (compare a c).