# Lower-level Singular interface / turn off unneeded PARI calculations

I am trying to implement an efficient elimination and substitution procedure for calculating the solution set of a zero-dimensional ideal $I \subseteq \mathbb{Q}[x_1, \ldots, x_n]$ over $\bar{\mathbb{Q}}$. (I know there is ideal.variety(QQbar) but would also like to compute directly the smallest number field over which each solution point is defined - number_field_elements_from_algebraics(..., minimal=True) can be very slow.)

The algorithm finds the irreducible factors $f_i$ of a generator of $I \cap \mathbb{Q}[x_n]$. These determine algebraic solutions for $x_n$ which can be plugged in to the remaining polynomials to inductively extend them to solutions of $I$.

The base field is thus extended from $\mathbb{Q}$ to the number field $\mathbb{Q}[x]/(f_i(x))$ (and iteratively to further extensions.)

When running the code, I observed that the construction of the field extensions is actually one of the main performance bottlenecks, in particular _pari_integral_basis. I assume that PARI's additional number field structure like the ring of integers is not necessary for Singular's Groebner algorithms and therefore wonder if these calculations can be turned off?

Working over Sage's quotient rings

QQ['x'].quotient(f)


does not seem to work together with Singular:

TypeError: Cannot call Singular function 'eliminate' with ring parameter of type '<class 'sage.rings.polynomial.multi_polynomial_ring.MPolynomialRing_polydict_domain_with_category'>'


TL;DR It currently seems impossible to call Singular's Groebner methods on an ideal in a polynomial ring defined over a number field without calling PARI's nfinit (which may spend a lot of time calculating an integral basis for the number field).

edit retag close merge delete

Thanks, that is mostly what I resolved to do. In the process, I also need to factorize univariate polynomials over said number field, so I will still use Singular's minpoly it seems. (I will post an update once my algorithm works.)
Hi! I just saw this question. Earlier this year I wrote some script that precisely does this: solving zero-dimensional ideal over the splitting field. In my code I used polredbest from PARI to construct the minpoly for the number fields, which in theory does not compute an integral basis. It is available here. You can try it out to see if the performance is good enough for you.