-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monoid and Partial Monoid #69
Conversation
Some more possible alternatives:
I'm fine with
I think mentioning this in the README file and in the commit message should be fine. |
Ah, in my previous comment I missed we use Unicode for orthogonality. Perhaps we should use |
In the end, I've decided to choose the following names :)
|
This PR features the monoid and partial monoid structures (the latter inherits from the former). The partial monoid is intended to be a base class for synchronization algebra later #59. Partiality is encoded using the binary orthogonality relation (see [1] for details).
Why did we decide to invent the wheel here? Below are alternative formalizations of monoids and the reasons why we abandoned them.
mathcomp
Here the monoids are used primarily in the context of so-called big operations. The canonical instances are linked to operations themselves rather than to types. We decided that for our use cases, it makes more sense to attach the instance to the type.
relation-algebra
Relation-Algebra has a very heavyweight notion of "monoid". First, it uses its own tricks to pack several operations into one structure and then enable/disable modularly (see this file). This design has some advantages but overall it seems too complex for our needs. Also, relation-algebra has heterogeneous typed monoids, which is also an overkill for us.
fcsl-pcm
In fcsl-pcm package, the PCMs (partial commutative monoids) are at the top of the hierarchy. We don't want to enforce commutativity for our synchronization algebras. Besides that, we've decided to try out the alternative encoding of partiality through the orthogonality relation, instead of validity predicate.
Question
Let's discuss a couple of questions about this PR.
I used the notation
\+
for the monoidal operation (borrowed from fcsl-pcm package) andid
for the unit.Do we have better suggestions? My minor concern, is that
id
is shorthand for identity, but using\+
and1
as a unit of monoid a bit frustrating... Also, perhaps we want a notation for the unit, like0
,1
, or\eps
etc?For the orthogonality I picked the
\perp
latex notation (Unicode)? Any alternative suggestions?Also, we got some inspiration from fcsl-pcm, so perhaps we should mention the authors? What is a proper way to do this? @anton-trunov
[1] Bart Jacobs --- Convexity, Duality and Effects