# Subtraction of two non-homogenous monomial in a non-commutative ring

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hi every one,

I have a problem for subtracting two non-homogenous monomial "xyyx-xyx" in a unital associative free algebra with two generators x&y.

The error which is appeared is "ArithmaticError : can only subtract the elements of the same degree".

I will apreciate some one who tell me what is the soloution.

Thanks

Abdolrasoul

edit retag close merge delete

Actually the problem is here:

F.<x,y> = FreeAlgebra(QQ, implementation='letterplace') I=F[xyx-2xy]*F J=F.quo(I)

And the eroor is :

ArithmaticError : can only subtract the elements of the same degree"

( 2013-10-07 16:26:39 +0200 )edit

Sort by » oldest newest most voted

This post is a wiki. Anyone with karma >750 is welcome to improve it.

The docstring of FreeAlgebra says

By http://trac.sagemath.org/7797, we provide a different implementation of free algebras, based on Singular's "letterplace rings". Our letterplace wrapper allows for chosing positive integral degree weights for the generators of the free algebra. However, only (weighted) homogenous elements are supported. Of course, isomorphic algebras in different implementations are not identical:

If you drop the implementation='letterplace' option, the ArithmeticError disappears:

sage: F.<x,y> = FreeAlgebra(QQ)
sage: x*y*x + 2*x*y
2*x*y + x*y*x

more

But I need an unital associative free algebra and if I drop the "implementation= 'letterplace", it just give me free algebra.

( 2013-10-08 15:39:01 +0200 )edit

Please use comments instead of "your answer". Maybe I am misunderstanding something, but how is the free algebra over QQ not unital?

( 2013-10-08 17:03:33 +0200 )edit

Maybe I miss understood the definition of free algebra. When I put F.<x,y>=FreeAlgebra(QQ) "Sage" write me "Free Algebra en two generators x,y"" and when I write F.<x,y>=FreeAlgebra(QQ, implementation='letterplace') it gives me "Unital associative free algebra with two generators", but I think the both is the same, yes? Now, my problem is to construct a quotient of this algebra ba a non-homogenous ideal. Do you know, how can I do that?

( 2013-10-09 13:27:15 +0200 )edit

See the example in the documentation by typing F.quo?

( 2013-10-11 05:24:07 +0200 )edit