add Kleene Algebra
Opened this issue · 1 comments
johnynek commented
https://en.wikipedia.org/wiki/Kleene_algebra
This is always fun. We could have a method to get the BoundedSemilattice from the +
operation.
I guess this extends Rig
. So something like:
trait KleeneAlgebra[A] extends Rig[A] {
def star(a: A): A
def additiveSemilattice: BoundedSemilattice[A]
}
non commented
There are actually two structures: star rigs and kleene algebras. They have the same structure but different laws.
For example: http://r6.ca/blog/20110808T035622Z.html