Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sage crash when computing variety for an ideal with many variables

I try to run a code (on a Jupyter notebook) which computes the variety of an ideal for some polynomial in many variables (64 for in this case. Notice I solve for a and not for x,y,z). My code crashes with the following message:

RuntimeError: error in Singular function call 'groebner':
int overflow in hilb 1
error occurred in or before standard.lib::stdhilb line 299: `    intvec hi = hilb( Id(1),1,W );`
expected intvec-expression. type 'help intvec;'
leaving standard.lib::stdhilb 
leaving standard.lib::groebner

This is the code:

K = PolynomialRing(GF(2),2^6,'a') 
R = K["x, y, z"]
x, y, z = R.gens()[0], R.gens()[1], R.gens()[2]
a = K.gens()

pbc = lambda p :(( poly%(x^(4)+1))%(y^4+1))%(z^4+1)

e_L = Matrix([[pbc(R((1 + x + y + z)^(2^4)/(1 + x + y + z)))],
                    [0]])
X,Y,Z = [Matrix(g.powers(4)) for g in [x,y,z]]
XY=X.tensor_product(Y)
XYZ = XY.tensor_product(Z)
poly = (Matrix(a)*XYZ.transpose())[0,0]
RHS_eq = Matrix([[pbc((1 + x*y + x*z + y*z) * poly)],
                 [pbc((1 + x + y + z) * poly)]])

IJK = list(Words(alphabet=range(4), length=3))
for i,j,k in IJK:
    P = Matrix([[pbc(e_L + x^i*y^j*z^k*e_L)],[0]])
    lhs = RHS_eq + P
    Eq = Matrix([[R(lhs[0,0])],
                 [R(lhs[1,0])]])

I = K.ideal(Eq[0,0].coefficients() + Eq[1,0].coefficients() + [q^4+q for q in K.gens()])
sols = I.variety(GF(2^6,'w'))
sols_arr = np.asarray([list(sol.values()) for sol in sols])     
print(sols_arr)

Sage crash when computing variety for an ideal with many variables

I try to run a code (on a Jupyter notebook) which computes the variety of an ideal for some polynomial in many variables (64 for in this case. Notice I solve for a and not for x,y,z). My code crashes with the following message:

RuntimeError: error in Singular function call 'groebner':
int overflow in hilb 1
error occurred in or before standard.lib::stdhilb line 299: `    intvec hi = hilb( Id(1),1,W );`
expected intvec-expression. type 'help intvec;'
leaving standard.lib::stdhilb 
leaving standard.lib::groebner

This is the code:

K = PolynomialRing(GF(2),2^6,'a') 
R = K["x, y, z"]
x, y, z = R.gens()[0], R.gens()[1], R.gens()[2]
a = K.gens()

pbc = lambda p :(( poly%(x^(4)+1))%(y^4+1))%(z^4+1)
p%(x^4+1))%(y^4+1))%(z^4+1)

e_L = Matrix([[pbc(R((1 Matrix([[R((1 + x + y + z)^(2^4)/(1 + x + y + z)))],
z))],
                    [0]])
X,Y,Z = [Matrix(g.powers(4)) for g in [x,y,z]]
XY=X.tensor_product(Y)
XYZ = XY.tensor_product(Z)
poly = (Matrix(a)*XYZ.transpose())[0,0]
RHS_eq = Matrix([[pbc((1 + x*y + x*z + y*z) * poly)],
                 [pbc((1 + x + y + z) * poly)]])

IJK = list(Words(alphabet=range(4), length=3))
for i,j,k in IJK:
    P = Matrix([[pbc(e_L + x^i*y^j*z^k*e_L)],[0]])
pbc(e_L + (x^i*y^j*z^k)*e_L)
    lhs = RHS_eq + P
    Eq = Matrix([[R(lhs[0,0])],
                 [R(lhs[1,0])]])

I = K.ideal(Eq[0,0].coefficients() + Eq[1,0].coefficients() + [q^4+q for q in K.gens()])
sols = I.variety(GF(2^6,'w'))
sols_arr = np.asarray([list(sol.values()) for sol in sols])     
print(sols_arr)