Fact joinKI y x : meet x (join x y) = x.
Definition Mixin := LatticeMixin meetC joinC meetA joinA joinKI meetKU leEmeet meetUl.
End TotalLattice.
End TotalLattice.
Module TotalTheory.
Section TotalTheory.
Context {display : unit}.
Local Notation orderType := (orderType display).
Context {T : orderType}.
Implicit Types (x y : T).

(* Specifications: *)
Lemma le_total : total (<=%O : rel T). Proof. by case: T => [? [?]]. Qed.
Hint Resolve le_total.
Lemma comparableT x y : x >=< y. Proof. exact: le_total. Qed.
Hint Resolve comparableT.
Lemma sort_le_sorted (s : seq T) : sorted <=%O (sort <=%O s).
Lemma leNgt x y : (x <= y) = ~~ (y < x).
Lemma leU2r_le y t x z : x `&` t = 0 -> y `|` x <= t `|` z -> x <= z.
Lemma lexUr z x y : x `&` z = 0 -> (x <= z `|` y) = (x <= y).
Lemma join_eq0 x y : (x `|` y == 0) = (x == 0) && (y == 0).
CoInductive eq0_xor_gt0 x : bool -> bool -> Set :=
Eq0NotPOs : x = 0 -> eq0_xor_gt0 x true false
| POsNotEq0 : 0 < x -> eq0_xor_gt0 x false true.
Lemma posxP x : eq0_xor_gt0 x (x == 0) (0 < x).
Lemma le_joins (I : finType) (A B : {set I}) (F : I -> L) :
A \subset B -> \join_(i in A) F i <= \join_(i in B) F i.
Lemma joins_setU (I : finType) (A B : {set I}) (F : I -> L) :
\join_(i in (A :|: B)) F i = \join_(i in A) F i `|` \join_(i in B) F i.
Lemma join_seq (I : finType) (r : seq I) (F : I -> L) :
\join_(i <- r) F i = \join_(i in r) F i.
Lemma joins_disjoint (I : finType) (d : L) (P : pred I) (F : I -> L) :
(forall i : I, P i -> d `&` F i = 0) -> d `&` \join_(i | P i) F i = 0.