# Getting the error message: The dimension of the ideal is 1, but it should be 0

I'm trying to solve a system of 5 polynomial equations.

Here's the code I tried to run:

P.<b, qa, qb, qc, qd>=PolynomialRing(QQ,order='degrevlex')
eq1=P(-25997.02495*qc+73589.75314*qa+19275.89428*qb^3+42024.09724*qc^3-35275.79436*qd^3+31409.96375*qd-22475.53767*qb+11165.49567*qc*qa*qd+38392.81504*qd*qb*qc-5354.736466*qc*qa*qb-40769.13796*qd*qb*qa-50708.36034*qc^2*qa-67780.84581*qd*qb^2+39326.95066*qd^2*qb+5359.28038*qb^2*qa-35437.12402*qd*qc^2+48529.90789*qd^2*qc-6801.32966*qb^2*qc+13747.85604*qc^2*qb+9197.21841*qd^2*qa+2*b*qa)
eq2=-P(1938.516702*qc-9153.752714*qa-15279.24300*qb^3+8131.520743*qc^3+35208.27094*qd^3-25334.07110*qd+71321.57867*qb+38392.81500*qc*qa*qd-48554.44832*qd*qb*qc-64028.43710*qc*qa*qb-58696.44966*qd*qb*qa+2*b*qb+426.071103*qc^2*qa+26980.57949*qd*qb^2-29944.11326*qd^2*qb+4540.542985*qb^2*qa-1130.66934*qd*qc^2-8809.128406*qd^2*qc-9514.136166*qb^2*qc-21010.04302*qc^2*qb+26005.16567*qd^2*qa)
eq3=P(1938.516702*qc-9153.752714*qa-15279.24300*qb^3+8131.520743*qc^3+35208.27094*qd^3-25334.07110*qd+71321.57867*qb+38392.81500*qc*qa*qd-48554.44832*qd*qb*qc-64028.43710*qc*qa*qb-58696.44966*qd*qb*qa+2*b*qb+426.071103*qc^2*qa+26980.57949*qd*qb^2-29944.11326*qd^2*qb+4540.542985*qb^2*qa-1130.66934*qd*qc^2-8809.128406*qd^2*qc-9514.136166*qb^2*qc-21010.04302*qc^2*qb+26005.16567*qd^2*qa)
eq4=P(2123.141846*qc+5788.216407*qa+22583.23914*qb^3-8500.597767*qc^3-9489.15234*qd^3+75013.55778*qd-25334.07110*qb+46634.03800*qc*qa*qd-22972.99327*qd*qb*qc+38392.81504*qc*qa*qb+38688.54642*qd*qb*qa+2*b*qd-9815.37666*qc^2*qa-33782.05127*qd*qb^2+64855.67483*qd^2*qb-42159.09845*qb^2*qa-35072.07256*qd*qc^2-8694.617828*qd^2*qc-29859.97200*qb^2*qc-1130.66933*qc^2*qb-3340.393775*qd^2*qa)
eq5= P(qa^2+qb^2+qc^2+qd^2-1)
I = Ideal(eq1, eq2, eq3, eq4, eq5)
I.groebner_basis('libsingular:std')
I.variety(RR)


At the last line of code:

I.variety(RR)


I get this error:

The dimension of the ideal is 1, but it should be 0


Anyone knows why? or alternatively, how to get the solutions of the equations?

Thanks

edit retag close merge delete

Sort by » oldest newest most voted

I actually understood my mistake. I accidently wrote twice the same equation (eq2=-eq3).

So I guess that the meaning of the dimension of ideal (at least in this case) is the number of equations that are linear combination of the other equations (therefore should be zero and not positive number).

I'm writing this here in case anyone else gets the same error in the future.

more

1

The codimension is not the number linearly independent equations in general. You have variety of dimension 2 in C^4 that can not be obtained with 2 equations. You can have a look at algebraic dimension (wikipedia).

( 2018-01-01 05:11:05 -0500 )edit

I will look at it thanks. It was just guess. The reason I said that is that if I write: I = Ideal(eq1) I.dimension() I get 4. and if I define the ideal with 2 equations the dimension is 3 and so on.

( 2018-01-01 07:15:44 -0500 )edit

You are mostly right of course!

( 2018-01-01 12:25:41 -0500 )edit