haskellari / lattices

Fine-grained lattice primitives for Haskell
BSD 3-Clause "New" or "Revised" License
35 stars 15 forks source link

Add Flat join-semilattices #60

Closed gwils closed 6 years ago

gwils commented 6 years ago

Happy to accept suggestions for better type or constructor names, or missing instances :)

phadej commented 6 years ago

and this from http://hackage.haskell.org/package/lattices-1.7/docs/Algebra-Lattice-Levitated.html

gwils commented 6 years ago

Its JoinSemiLattice instance is different (and cannot be expressed in terms of Levitated)

phadej commented 6 years ago

ah, I see. The Flat name makes sense.

gwils commented 6 years ago

I'm no longer sure I'm happy with the name Flat.

I think that name is used for partial orders that only have bottom and then one row of elements, all incomparable to each other. This structure has a top as well, to make it a join-semilattice. So I think it would be wrong to use the name Flat. I'll have to think of another one. I'm open to suggestions :)

gwils commented 6 years ago

I'm going to work on this further and open a new PR later.