Package for simplifying polynomials on non-commutative algebra

172 views
Skip to first unread message

awaw...@gmail.com

unread,
Nov 28, 2025, 3:31:57 AMNov 28
to golang-nuts
Hi fellow Gophers

I wonder if anyone knows of a package that simplifies polynomials on non-commutative algebra?
As a concrete example, let `a` and `b` satisfy the commutator [a, b] = ab-ba = 1,
I want to simplify (a+b)^4 into aabb + ab + ...

There are libraries such as NCAlgebra and Bergman that do this using Gröbner basis.
I wonder does anyone know of something similar in Go?

Thanks!

awaw...@gmail.com

unread,
Dec 23, 2025, 6:54:53 AM (2 days ago) Dec 23
to golang-nuts
I have created this noncommutative algebraic geometry package to perform this task.

Jason E. Aten

unread,
Dec 23, 2025, 1:29:30 PM (2 days ago) Dec 23
to golang-nuts
Thanks Fumin. From looking at the test suite, this looks like useful and high quality work.

awaw...@gmail.com

unread,
Dec 23, 2025, 9:25:33 PM (2 days ago) Dec 23
to golang-nuts
Thanks Jason the kind words, I hope it is of some help to future like-minded scientists who enjoy Go.

I'd also like to share that I find it more productive to do science in a dull "systems language" like Go, compared to other more expressive, feature rich language like Python, Julia, or Mathematica. In fact, the increased productivity comes from better readability/maintainability, interoperability, and performance.

Jason E. Aten

unread,
Dec 23, 2025, 10:37:12 PM (2 days ago) Dec 23
to golang-nuts
I find Go very pleasant for things where the 
computation will run for much longer than it
takes to write the code.  Especially when you need
to leverage multiple cores in a non-uniform way, it
is hard to beat.

On the flip side, I find R offers 10-100x faster
 prototyping and exploratory data analysis (I mean the human time-on-task) 
when you need plotting and/or clustering; and Julia offers 
10-100x performance for some models that really benefit from 
inlining a computation kernel--Julia can even GPU-ize automatically.

I'm also happy to import Go code into R when needed;

awaw...@gmail.com

unread,
Dec 23, 2025, 11:43:14 PM (2 days ago) Dec 23
to golang-nuts
Jason, those are nice observations. Also, pretty cool that you can import Go into R, learnt a new thing today. : )

Dan Kortschak

unread,
Dec 24, 2025, 1:48:09 AM (yesterday) Dec 24
to golan...@googlegroups.com
On Tue, 2025-12-23 at 19:37 -0800, Jason E. Aten wrote:
> https://github.com/glycerine/embedr

Also, https://github.com/rgonomic/rgo/

awaw...@gmail.com

unread,
Dec 24, 2025, 3:30:39 AM (yesterday) Dec 24
to golang-nuts
Cool library, Dan, this looks like a principled and automated way of embedding Go into R.
Reply all
Reply to author
Forward
0 new messages