Ask Your Question

# multivariate polynomials, libsingular and polydict

When defining mutlivariate polynomial in two different ways, I cannot compare them because they seem to have a different type. On the one hand I have

R = PolynomialRing(QQ,'x', 3); x = R.gens()
f = x[0] + x[1] + x[2]
type(f)


which gives <ππ’ππ'ππππ.πππππ.ππππ’ππππππ.πππππβ―ππππ’ππππππβ―πππππππππππ.πΌπΏπππ’ππππππβ―πππππππππππ'>. On the other hand I define what is (to me) the same polynomial:

SF = SymmetricFunctions(F); SF.inject_shorthands(verbose=False)
g = h[1].expand(3, alphabet = R.gens())
type(g)


which gives <πππππ'ππππ.πππππ.ππππ’ππππππ.πππππβ―ππππ’ππππππβ―πππππππ.πΌπΏπππ’ππππππβ―ππππ’ππππ'>

Thus when comparing f == g it gives false. How can get these two modules to talk to each other?

edit retag close merge delete

## Comments

What is F ? I got:

NameError: name 'F' is not defined

( 2019-10-14 07:35:43 -0500 )edit

## 1 answer

Sort by Β» oldest newest most voted

Remove the verbose=False option and you will see the problem: f is redefined when you call SF.inject_shorthands() !

Note that, while f and g are not of the same type, they have the same parent:

sage: parent(f)
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field
sage: parent(g)
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field


And, if you redefine f after it has been overwritten by SF.inject_shorthands(), you get:

sage: f == g
True

more

## Your Answer

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

Add Answer

## Stats

Asked: 2019-10-14 07:22:36 -0500

Seen: 49 times

Last updated: Oct 14 '19