Ask Your Question
0

Products in a free algebra.

asked 2013-06-30 23:10:15 -0500

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
1

answered 2013-07-01 18:32:45 -0500

broken_symlink gravatar image

updated 2013-07-01 18:35:52 -0500

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-01 20:20:06 -0500 )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-06-30 23:10:15 -0500

Seen: 113 times

Last updated: Jul 01 '13