Ask Your Question

broken_symlink's profile - activity

2021-01-15 18:25:08 +0200 received badge  Nice Answer (source)
2021-01-15 18:25:00 +0200 received badge  Student (source)
2021-01-12 05:35:45 +0200 received badge  Popular Question (source)
2013-07-02 03:20:15 +0200 received badge  Teacher (source)
2013-07-02 03:20:15 +0200 received badge  Self-Learner (source)
2013-07-02 01:35:52 +0200 received badge  Editor (source)
2013-07-02 01:32:45 +0200 answered a question Products in a free algebra.

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

2013-07-01 06:10:15 +0200 asked a question Products in a free algebra.

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.