1 | initial version |
To complement @jipilab's answer, since your equations have only integer coefficients you will not miss points by looking at algebraic solutions.
So, the first idea is to replace RR
with QQbar
in the definition of R
. Unfortunately, we currently do not ship fast implementation of groebner bases in over this field, so that it will be very slow:
sage: R.<x1,x2,x3,x4,x5> = PolynomialRing(QQbar,5,order='lex')
sage: f1=x1+x2+x3+x4+x5
sage: f2=x1*x2+x2*x3+x3*x4+x4*x5+x1*x5
sage: f3=x1*x2*x3+x2*x3*x4+x3*x4*x5+x4*x5*x1+x5*x1*x2
sage: f4=x1*x2*x3*x4+x2*x3*x4*x5+x3*x4*x5*x1+x4*x5*x1*x2+x5*x1*x2*x3
sage: f5=x1*x2*x3*x4*x5-1
sage: I = Ideal(f1,f2,f3,f4,f5)
sage: I.variety()
The trick is to define the equations over the rational and pass to the algebraics only when asking for the variaty:
sage: R.<x1,x2,x3,x4,x5> = PolynomialRing(QQ,5,order='lex')
sage: f1=x1+x2+x3+x4+x5
sage: f2=x1*x2+x2*x3+x3*x4+x4*x5+x1*x5
sage: f3=x1*x2*x3+x2*x3*x4+x3*x4*x5+x4*x5*x1+x5*x1*x2
sage: f4=x1*x2*x3*x4+x2*x3*x4*x5+x3*x4*x5*x1+x4*x5*x1*x2+x5*x1*x2*x3
sage: f5=x1*x2*x3*x4*x5-1
sage: I = Ideal(f1,f2,f3,f4,f5)
sage: I.variety(QQbar)
2 | No.2 Revision |
To complement @jipilab's answer, since your equations have only integer coefficients you will not miss points by looking at algebraic solutions.
So, the first idea is to replace RR
with QQbar
in the definition of R
. Unfortunately, we currently do not ship fast implementation of groebner bases in over this field, so that it will be very slow:
sage: R.<x1,x2,x3,x4,x5> = PolynomialRing(QQbar,5,order='lex')
sage: f1=x1+x2+x3+x4+x5
sage: f2=x1*x2+x2*x3+x3*x4+x4*x5+x1*x5
sage: f3=x1*x2*x3+x2*x3*x4+x3*x4*x5+x4*x5*x1+x5*x1*x2
sage: f4=x1*x2*x3*x4+x2*x3*x4*x5+x3*x4*x5*x1+x4*x5*x1*x2+x5*x1*x2*x3
sage: f5=x1*x2*x3*x4*x5-1
sage: I = Ideal(f1,f2,f3,f4,f5)
sage: I.variety()
verbose 0 (3452: multi_polynomial_ideal.py, groebner_basis) Warning: falling back to very slow toy implementation.
[...stalled...]
The trick is to define the equations over the rational and pass to the algebraics only when asking for the variaty:variety:
sage: R.<x1,x2,x3,x4,x5> = PolynomialRing(QQ,5,order='lex')
sage: f1=x1+x2+x3+x4+x5
sage: f2=x1*x2+x2*x3+x3*x4+x4*x5+x1*x5
sage: f3=x1*x2*x3+x2*x3*x4+x3*x4*x5+x4*x5*x1+x5*x1*x2
sage: f4=x1*x2*x3*x4+x2*x3*x4*x5+x3*x4*x5*x1+x4*x5*x1*x2+x5*x1*x2*x3
sage: f5=x1*x2*x3*x4*x5-1
sage: I = Ideal(f1,f2,f3,f4,f5)
sage: V = I.variety(QQbar)
sage: len(V)
70
So, you get that there are 70 solutions to your system of polynomial equations.