Skip to content

[pyos][docs] "Monoids are also associative, so the order of the inputs does not matter." #468

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

Closed
szhorvat opened this issue Jun 23, 2023 · 5 comments · Fixed by #469
Closed

Comments

@szhorvat
Copy link

szhorvat commented Jun 23, 2023

Here it says,

Monoids are also associative, so the order of the inputs does not matter.

This is a bit confusing. Did you mean to say that the monoids in py-graphblas are all commutative? Or say that grouping does not matter?

Part of: pyOpenSci/software-submission#81

@eriknw
Copy link
Member

eriknw commented Jun 23, 2023

@jim22k what did you intend to write here? Monoids must be associative--rearranging parentheses--which is very important. In addition, GraphBLAS monoids are typically (and really only make sense to be) commutative, but this only a strict requirement when creating a semiring from a monoid. For example, (a + b) + c equals (c + b) + a.

@jim22k
Copy link
Member

jim22k commented Jun 23, 2023

I was meaning commutative. Sorry for using the wrong terminology.
@eriknw should we list specifically which monoids are not associative? I think it's just first and last.

@eriknw
Copy link
Member

eriknw commented Jun 23, 2023

first and last aren't monoids, and all builtin monoids are both associative and commutative. I think we should mention both associativity and commutivity.

@szhorvat
Copy link
Author

If you wanted a compact phrasing, you could say that

  • associative = the order of operations does not matter
  • commutative = the order of operands does not matter

But I don't think this is actually useful for someone who doesn't already know what associative and commutative mean.

I'm really sorry about the long delay, I expect to finish by Sunday. The package is in a very good shape, so there won't be requests for major changes.

@eriknw
Copy link
Member

eriknw commented Jun 23, 2023

Sounds good @szhorvat, and thanks again!

Also, thanks for carefully reading the docs and raising this issue. Fixing in #469.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants