Ask Your Question
1

Products in a free algebra.

asked 2013-07-01 06:10:15 +0100

broken_symlink gravatar image

If I have a free algebra generated by x and y is there a way to tell that xy is a product of x and y? I would like to define a function that takes products xy and returns -2x - 2y - 4.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-07-02 01:32:45 +0100

broken_symlink gravatar image

updated 2013-07-02 01:35:52 +0100

Someone answered my question on the mailing list. To get access to each generator in a product you need to use the following:

F.<x,y>=FreeAlgebra(ZZ,2)
g=4+3*x^7*y^10*x^13
h=g._FreeAlgebraElement__monomial_coefficients
print h
print h.items()
print h.items()[1][0]._element_list

Source

edit flag offensive delete link more

Comments

Thanks. I have opened ticket 14848

ppurka gravatar imageppurka ( 2013-07-02 03:20:06 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-07-01 06:10:15 +0100

Seen: 309 times

Last updated: Jul 02 '13