I have asked this question on mathstacks, but a collegue of mine recommended me to post it here.
I am trying to find an optimal system of parameters for a graded ring using Magma. Specifically, I want to use Gregor Kemper's 1999 algorithm, which is designed for this purpose. Here is a simple example I tried in Magma:
P<x1,x2,y1,y2> := PolynomialRing(RationalField(), [1, 2, 1, 2]);
I := ideal<P |x1*y2 , x2*y1>;
R:=P/I;
p := PrimaryInvariants(R);
However, when I run this, Magma returns the following error:
Runtime error in 'PrimaryInvariants': Bad argument types Argument types given: RngMPolRes
This suggests that PrimaryInvariants in Magma is implemented only for invariant rings under group actions. My understanding is that Magma doesn't extend this functionality to general polynomial quotient rings like the example above.
For comparison, Macaulay2's systemOfParameters command provides the following sparse system for the same example: $$\texttt{ideal}{}\left(3\,\textit{x1}^{2}+8\,\textit{x1}\,\textit{y1}+4\,\textit{y1}^{2}+2\,\textit{x2}+\textit{y2},\,3\,\textit{x1}^{2}+17\,\textit{x1}\,\textit{y1}+6\,\textit{y1}^{2}+\textit{x2}+3\,\textit{y2}\right).$$ However, as my graded rings become more complicated, Macaulay2 fails to compute system of parameters (primary invariants), which leads me back to Kemper's algorithm. Unfortunately, I believe Macaulay2 does not currently implement this algorithm.
My questions are:
Is there a way to compute a system of parameters for a general graded ring in Magma, potentially by extending or modifying PrimaryInvariants?
Does anyone know of Magma's tools or alternative algorithms that could help in this context?
Is there any workaround or extension in Macaulay2 that implements Kemper's algorithm for more complicated graded rings?
Any guidance or suggestions for solving this problem—either in Magma, Macaulay2, or another software—would be greatly appreciated!