Maximum and Minimum monoids

wren ng thornton wren at
Sun Dec 30 00:18:37 CET 2012

On 12/29/12 8:29 AM, Strake wrote:> and (Max a) and (Min a) are not
properly monoids.

They're monoids just fine. It's just that their identity element need not
be in the set being folded over.

> We could define these:
> Supr, Infi :: * -> *

Please please, if we're going to abbreviate mathematical terms then we
ought to stick to the standard mathematical abbreviations: sup, inf.

Personally, I'm fine with Min and Max as they are, because in particular
they capture the fact that we're dealing with total orders here. That is,
other than for empty sets, they do in fact return the maximum/minimum.
Whereas Sup and Inf bring to mind the fact that what we're dealing with is
a complete lattice, which need not be a total order. While Sup and Inf
make perfectly good monoids/semigroups, I'd prefer if they properly allow
all complete lattices rather than being unnecessarily restricted to Ord.

Live well,

More information about the Libraries mailing list