#[ local ] Definition lt (b1 b2:bool) :=
  match b1 with
    | true => False
    | false => b2 = true
  end.#[ local ] Definition compare (b1 b2 : bool) :=
  match b1, b2 with
   | false, true => Lt
   | true, false => Gt
   | _, _ => Eq
  end.

(* Specifications: *)
Lemma compare_spec : forall b1 b2, CompareSpec (b1 = b2) (lt b1 b2) (lt b2 b1) (compare b1 b2).