0

I'm trying to learn how to compute the radical of polynomial ideals in multiple variables over the real numbers in Macaulay2. From what I've gathered in some stack exchange posts([1], [2]), I just need to define a polynomial ring and run the radical command. Now when I do it, I get the following:

enter image description here

Here, I'm trying the basic example of $I = (x^2 + y^2 - 2, y - x^3) \subset \mathbb{R}[x,y]$.

From what I gathered from what I gathered from this answer as well as from the documentation is that there are general algorithms to compute radicals of polynomial ideals - even if they can get slow with increasing numeric complexity in the generators - and that as long as the ground field is characteristic 0, we can do so in Macaulay2. My questions are:

  1. Are there any mistakes in my code? If not, am I misunderstanding something about the algorithm / theory around this?

  2. More generally, if one has a groebner basis of an ideal, is there a general algorithm for computing the generators of the radical? I know classifying such a basis in general is a difficult question.

EDIT: 3. I should note that I did see this post which claims that one can only generate a subset of the generating set (in general). I'm not quite sure how that connects to the other linked posts which state that there are algorithms which are slow.

User20354
  • 1,070

1 Answers1

1

If $I$ is an ideal with generators defined over a subring like $\mathbb{Q} \subset \mathbb{R}$ in your case, then in algorithms such as

  • Buchberger's algorithm to compute a Groebner basis of $I$, or

  • the algorithm to compute generators of the radical $\sqrt{I}$ of a zero-dimensional ideal $I$

all the steps involve only computations over the subring, so for computational purposes you can replace the big ring (your $\mathbb{R}$) by the subring (your $\mathbb{Q}$).

Moreover, these algorithms need to do exact computations in the respective ring, e.g. mainly we need to know for sure what is the leading monomial of a polynomial (not possible if we do not know the coefficients exactly).

So, repeating your calculation with the exact KK = QQ instead of the inexact KK = RR gives the desired result:

i4 : radical I

o4 = ideal(x^2+y^2-2, xy^2-2x+y)

o4 : Ideal of R

i5 : (radical I) == I

o5 = true

For zero-dimensional ideals $I$ like this one there is a simple algorithm to compute generators of the radical $\sqrt{I}$: compute generators $g_1, g_2$ of the intersections $I \cap \mathbb{Q}[x] = \langle g_1 \rangle$ and $I \cap \mathbb{Q}[y] = \langle g_2 \rangle$, let $h_i = g_i / \gcd(g_i, g_i')$ be the square-free part of $g_i$, and then the radical is $\sqrt{I} = I + \langle h_1, h_2 \rangle$.

To compute the intersections $I \cap \mathbb{Q}[x_i]$ one can use elimination (eliminate all variables except for $x_i$, e.g. using an elimination ordering where $x_i$ is the smallest), or use a single Groebner basis $G = [g_1, \ldots, g_r]$ to compute a finite normal basis $$\operatorname{NB}(I) = \mathbb{M} \setminus \operatorname{LM}(I) = \mathbb{M} \setminus \operatorname{LM}(G) = \mathbb{M} \setminus \langle \operatorname{LM}(g_1), \ldots, \operatorname{LM}(g_r) \rangle$$ which is a $\mathbb{Q}$-vector space basis for the quotient $\mathbb{Q}[x,y]/I$, then express powers of $x$ (after multivariate polynomial division by $G$) as vectors with respect to this basis to find a linear dependence $c_0 + c_1 x + c_2 x^2 + \ldots = 0 \mod I$ between those powers, which yields $c_0 + c_1 x + c_2 x^2 + \ldots \in I$ of smallest degree, hence $I \cap \mathbb{Q}[x] = \langle c_0 + c_1 x + c_2 x^2 + \ldots \rangle$, and the same can be done for $I \cap \mathbb{Q}[y]$.

Ricardo Buring
  • 6,649
  • 7
  • 35
  • 63