End LPMap.
(** * Semi-lattice over a set. *)
(** Given a set [S: FSetInterface.S], the following functor implements a semi-lattice over these sets, ordered by inclusion. *)
Module LFSet (S: FSetInterface.WS) <: SEMILATTICE.
Definition t := S.t.
Definition eq (x y: t) := S.Equal x y.
Definition eq_refl: forall x, eq x x := S.eq_refl.
Definition eq_sym: forall x y, eq x y -> eq y x := S.eq_sym.
Definition eq_trans: forall x y z, eq x y -> eq y z -> eq x z := S.eq_trans.
Definition beq: t -> t -> bool := S.equal.
Definition beq_correct: forall x y, beq x y = true -> eq x y := S.equal_2.
Definition ge (x y: t) := S.Subset y x.

Lemma ge_bot: forall x, ge x bot.
Definition lub: t -> t -> t := S.union.