Multivariate Non-Commuting power series

28 views
Skip to first unread message

levav ferber tas

unread,
Jan 6, 2025, 10:21:22 AMJan 6
to sage-support
Hi everyone,

I couldn't find an implementation of Multivariate Non-Commuting power series.
Is there perhaps some simple way to implement this that I missed?
I know it could probably be implement based on the Multivariate power series class and the Free Algebra class, but I would like to avoid doing that just yet if there is a simpler solution (I haven't understood SageMath well enough yet to feel like I can contribute tbh)


Martin R

unread,
Jan 7, 2025, 5:52:16 AMJan 7
to sage-support
In principle, the lazy series framework should be able to do what you want.

sage: F = FreeAlgebra(QQ, ["x","y"], degrees=(1,1))
sage: A = LazyCompletionGradedAlgebra(F)
sage: F.<x,y> = FreeAlgebra(QQ, degrees=(1,1))
sage: A = LazyCompletionGradedAlgebra(F)
sage: x = A(x); y = A(y)
sage: f = 1/(1-x-y^2)
sage: f
1 + x + (x^2+y^2) + (x^3+x*y^2+y^2*x) + (x^4+x^2*y^2+x*y^2*x+y^2*x^2+y^4) + (x^5+x^3*y^2+x^2*y^2*x+x*y^2*x^2+x*y^4+y^2*x^3+y^2*x*y^2+y^4*x) + (x^6+x^4*y^2+x^3*y^2*x+x^2*y^2*x^2+x^2*y^4+x*y^2*x^3+x*y^2*x*y^2+x*y^4*x+y^2*x^4+y^2*x^2*y^2+y^2*x*y^2*x+y^4*x^2+y^6) + O^7
sage: log(f)
x + (1/2*x^2+y^2) + (1/3*x^3+2/3*x*y^2+1/3*y^2*x) + (1/4*x^4+1/2*x^2*y^2+1/4*x*y^2*x+1/4*y^2*x^2+1/2*y^4) + (1/5*x^5+2/5*x^3*y^2+1/5*x^2*y^2*x+1/5*x*y^2*x^2+2/5*x*y^4+1/5*y^2*x^3+2/5*y^2*x*y^2+1/5*y^4*x) + (1/6*x^6+1/3*x^4*y^2+1/6*x^3*y^2*x+1/6*x^2*y^2*x^2+1/3*x^2*y^4+1/6*x*y^2*x^3+1/3*x*y^2*x*y^2+1/6*x*y^4*x+1/6*y^2*x^4+1/3*y^2*x^2*y^2+1/6*y^2*x*y^2*x+1/6*y^4*x^2+1/3*y^6) + (1/7*x^7+2/7*x^5*y^2+1/7*x^4*y^2*x+1/7*x^3*y^2*x^2+2/7*x^3*y^4+1/7*x^2*y^2*x^3+2/7*x^2*y^2*x*y^2+1/7*x^2*y^4*x+1/7*x*y^2*x^4+2/7*x*y^2*x^2*y^2+1/7*x*y^2*x*y^2*x+1/7*x*y^4*x^2+2/7*x*y^6+1/7*y^2*x^5+2/7*y^2*x^3*y^2+1/7*y^2*x^2*y^2*x+1/7*y^2*x*y^2*x^2+2/7*y^2*x*y^4+1/7*y^4*x^3+2/7*y^4*x*y^2+1/7*y^6*x) + O^8

This is not well tested yet, so please be careful and report bugs!

Best wishes,

Martin
Reply all
Reply to author
Forward
0 new messages