Ask Your Question

decompose polynomial by ideal members

asked 2022-05-01 17:58:27 +0200

tunekamae gravatar image

updated 2022-05-01 18:20:02 +0200

FrédéricC gravatar image


R.<x,y,z> = QQ[]; f1=x^2+z^2-1; f2=x^2+z^2+(z^2-1)^2 
I=ideal(f1,f2); p=x^2+(1/2)*y^2*z-z-1

Is there way in Sage to decompose p as

p= (− (1/2)*z+1)*f1+((1/2)*z)*f2
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2022-05-03 02:39:24 +0200

dan_fulea gravatar image

The two p polynomials do not coincide. I will retype the code, so that spaces are also there, this makes the code readable.

R.<x,y,z> = QQ[]
f1 = x^2 + z^2 - 1
f2 = x^2 + z^2 + (z^2 - 1)^2
J = R.ideal(f1, f2)

p = x^2 + (1/2)*y^2*z - z - 1
q = (-(1/2)*z + 1)*f1 + ((1/2)*z)*f2

print(f'Is p in J? {p in J}')
print(f'Is q in J? {q in J}')
print(f'The lift of q has the components: {q.lift(J)}')

This gives:

Is p in J? False
Is q in J? True
The lift of q has the components: [-1/2*z + 1, 1/2*z]
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2022-05-01 17:58:27 +0200

Seen: 43 times

Last updated: May 03