Definition ge (x y: t) : Prop := x = y \/ x = true.

(* Specifications: *)
Lemma ge_refl: forall x y, eq x y -> ge x y.
Lemma eq_sym: forall x y, eq x y -> eq y x.
Lemma eq_trans: forall x y z, eq x y -> eq y z -> eq x z.
Definition beq (x y: t) : bool :=
match x, y with
| None, None => true
| Some x1, Some y1 => L.beq x1 y1
| _, _ => false
end.
Lemma beq_correct: forall x y, beq x y = true -> eq x y.
Definition ge (x y: t) : Prop :=
match x, y with
| None, _ => True
| _, None => False
| Some x1, Some y1 => L.ge x1 y1
end.
Lemma ge_refl: forall x y, eq x y -> ge x y.
Lemma ge_trans: forall x y z, ge x y -> ge y z -> ge x z.
Definition bot : t := Some L.bot.
Lemma ge_bot: forall x, ge x bot.
Definition lub (x y: t) : t :=
match x, y with
| None, _ => None
| _, None => None
| Some x1, Some y1 => Some (L.lub x1 y1)
end.
Lemma ge_lub_left: forall x y, ge (lub x y) x.
Lemma ge_lub_right: forall x y, ge (lub x y) y.
Definition top : t := None.
Lemma ge_top: forall x, ge top x.
End LOption.