Ask Your Question

Revision history [back]

In the terms used by the documentation on Toric ideals, it seems that you want the "naive ideal".

This is implemented (but hidden):

sage: IA._naive_ideal(IA.ring())
Ideal (-z2 + 1, -z1*z3 + 1, -z0*z1*z4 + 1, -z1*z5 + z4, z4*z5 - z6) of Multivariate Polynomial Ring in z0, z1, z2, z3, z4, z5, z6 over Rational Field

This is the same as the ideal obtained by your colleague:

sage: IA.ring().inject_variables()
sage: IA._naive_ideal(IA.ring()) == IA.ring().ideal(z2 - 1, z1*z3 - 1, z0*z1*z4 - 1, z0*z1^2*z5 - 1, z0^2*z1^3*z6 - 1, z0^4*z1^7*z2*z3*z4*z5*z6 - 1)
True

According to the source code, the (non-naive) toric ideal is computed from the naive one as follows:

ring = self._init_ring('neglex')
J = self._naive_ideal(ring)
if J.is_zero():
    return J
for i in range(0,self.nvariables()):
    J = self._ideal_quotient_by_variable(ring, J, i)
return J

where _ideal_quotient_by_variable computes $(J:x_n^\infty)$.

I'm not an expert on toric ideals so I cannot judge who is naive here.

In the terms used by the documentation on Toric ideals, it seems that you want the "naive ideal".

This is implemented (but hidden):

sage: IA._naive_ideal(IA.ring())
Ideal (-z2 + 1, -z1*z3 + 1, -z0*z1*z4 + 1, -z1*z5 + z4, z4*z5 - z6) of Multivariate Polynomial Ring in z0, z1, z2, z3, z4, z5, z6 over Rational Field

This is the same as the ideal obtained by your colleague:

sage: IA.ring().inject_variables()
sage: IA._naive_ideal(IA.ring()) == IA.ring().ideal(z2 - 1, z1*z3 - 1, z0*z1*z4 - 1, z0*z1^2*z5 - 1, z0^2*z1^3*z6 - 1, z0^4*z1^7*z2*z3*z4*z5*z6 - 1)
True

According to the source code, the (non-naive) toric ideal is computed from the naive one as follows:

ring = self._init_ring('neglex')
J = self._naive_ideal(ring)
if J.is_zero():
    return J
for i in range(0,self.nvariables()):
    J = self._ideal_quotient_by_variable(ring, J, i)
return J

where _ideal_quotient_by_variable computes $(J:x_n^\infty)$.

I'm not an expert on toric ideals so I cannot judge who is naive here.

here. Maybe it is a matter of conventions?

In the terms used by the documentation on Toric ideals, it seems that you want the "naive ideal".

This is implemented (but hidden):

sage: IA._naive_ideal(IA.ring())
Ideal (-z2 + 1, -z1*z3 + 1, -z0*z1*z4 + 1, -z1*z5 + z4, z4*z5 - z6) of Multivariate Polynomial Ring in z0, z1, z2, z3, z4, z5, z6 over Rational Field

This is the same as the ideal obtained by your colleague:

sage: IA.ring().inject_variables()
sage: IA._naive_ideal(IA.ring()) == IA.ring().ideal(z2 - 1, z1*z3 - 1, z0*z1*z4 - 1, z0*z1^2*z5 - 1, z0^2*z1^3*z6 - 1, z0^4*z1^7*z2*z3*z4*z5*z6 - 1)
True

According to the source code, the (non-naive) toric ideal is computed from the naive one as follows:

ring = self._init_ring('neglex')
J = self._naive_ideal(ring)
if J.is_zero():
    return J
for i in range(0,self.nvariables()):
    J = self._ideal_quotient_by_variable(ring, J, i)
return J

where _ideal_quotient_by_variable computes $(J:x_n^\infty)$.$(J:x_i^\infty)$.

I'm not an expert on toric ideals so I cannot judge who is naive here. Maybe it is a matter of conventions?