Section POrder.
Variable T : porderType disp.
Implicit Types s : seq T.
Fixpoint le s1 s2 := if s1 isn't x1 :: s1' then true else
if s2 isn't x2 :: s2' then false else
(x1 <= x2) && le s1' s2'.
Fact refl : reflexive le. Proof. by elim=> //= ? ? ?; rewrite !lexx. Qed.
Fact anti : antisymmetric le.
Fact trans : transitive le.
Definition porderMixin := LePOrderMixin (rrefl _) refl anti trans.
Canonical porderType := POrderType disp' (seq T) porderMixin.
Fact meetKU y x : join x (meet x y) = x.
Definition latticeMixin :=
Lattice.Mixin meetC joinC meetA joinA joinKI meetKU leEmeet.
Canonical latticeType := LatticeType (seq T) latticeMixin.
Fact trans: transitive le.
Definition porderMixin := LePOrderMixin lt_def refl anti trans.
Canonical porderType := POrderType disp' (seq T) porderMixin.
Canonical latticeType := LatticeType (seq T) total.
Canonical bLatticeType :=
BLatticeType (seq T) (BLattice.Mixin (@lexi0s _)).
Canonical distrLatticeType := DistrLatticeType (seq T) total.
Canonical bDistrLatticeType := [bDistrLatticeType of seq T].
Canonical orderType := OrderType (seq T) total.
End Total.

Lemma sub_seqprod_lexi d (T : POrder.Exports.porderType disp) :
subrel (<=%O : rel (seqprod_with d T)) (<=%O : rel (seq T)).