## Friday, January 10, 2014

### Partial orders and complementation

Given a bounded lattice we can form a symmetric binary relation of that relates elements to one another if they are complements of one another. Here are some examples of complementation relations produced from bounded lattices:
(= (complementation-relation (weak-order [#{0} #{1} #{2}]))
#relation{
:vertices #{0 1 2}
:edges #{[0 2] [2 0]}})

(= (complementation-relation (weak-order [#{0} #{1 2} #{3}]))
#relation{
:vertices #{0 1 2 3}
:edges #{[0 3] [1 2] [2 1] [3 0]}})

We know that complemented lattices are those bounded lattices that have functional complementation relations and uniquely complemented lattices are those bounded lattices that have complementation relations that are involutions.
(= (complemented-lattice? order)
(unary-operation? (complementation-relation order)))
(= (uniquely-complemented-lattice? order)
(involution? (complementation-relation order)))

It is worth noting that the complementation relation itself can be partially ordered by the complementary pairs ordering function to get a partially ordered relation.