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
On Monday, 6 January 2025 at 16:21:22 UTC+1 lev...@gmail.com wrote:

> 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)
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-support/604b722c-b46b-479e-8bbf-230e2cbcf990n%40googlegroups.com.

Reply via email to