Can Macaulay2 do computations with symbolic parameters?

949 Views Asked by At

I'm trying to figure out how to use Macaulay2 to do some ideal membership computations, and I'm running into a problem with symbolic parameters. Here is a practical example.

Consider the family of ideals $J_t=\langle tx^2+yz,ty^2 +xz,tz^2+xy\rangle\subset \mathbb{Q}[x,y,z]$ with $t\in\Bbb C$. So long as $t^3\neq 1$ we have $$x^2 y = \frac{t^2 y}{t^3+1}(tx^2+yz)-\frac{t z}{t^3+1}(ty^2+xz)+\frac{x}{t^3+1}(tz^2+xy)$$ and therefore $x^2 y\in J_t$. I would like to reproduce this in Macaulay2 (web browser version here).

If I pick a specific value of the parameter $t$, this isn't terribly hard: I construct the ideal $J$, and then compute the coordinates of the polynomial $x^2 y$ in $J$ by x^2*y // J. For $t=2$ we have

i1 : R=QQ[x,y,z];
i2 : t=2;
i3 : J=ideal(x^2*t+y*z,y^2*t+x*z,z^2*t+x*y);
o3 : Ideal of R
i4 : x^2*y // gens J
o4 = {2} | 4/9y  |
     {2} | -2/9z |
     {2} | 1/9x  |
             3       1
o4 : Matrix R  <--- R

which reproduces the decomposition $$x^2 y =\frac{4y}{9}(2x^2+yz)-\frac{2z}{9}(2y^2+xz)+\frac{x}{9}(2z^2+zy).$$

However, it would be preferable to have an algorithm that works for arbitrary symbolic $t$. Is there any way to do this within Macaulay2?

1

There are 1 best solutions below

0
On BEST ANSWER

There is in fact an easy solution to this, which I'll credit to Thomas Khale's answer to a Google groups question. First, we do K=frac(QQ[t]) to initialize $K$ as a rational fraction field in $t$. We then take the underlying polynomial ring not to be $\mathbb{Q}[x,y,z]$ but rather $K[x,y,z]$ via R=K[x,y,z]. This permits Macaulay2 to decompose $x^2 y$ in the ideal $J_t$ with coefficients being rational functions of $t$.

Here's the modified code:

i1 : K=frac(QQ[t])
o1 = K
o1 : FractionField
i2 : R=K[x,y,z];
i3 : J=ideal(x^2*t+y*z,y^2*t+x*z,z^2*t+x*y);
o3 : Ideal of R
i4 : x^2*y // gens J
o4 = {2} | t2/(t3+1)y |
     {2} | -t/(t3+1)z |
     {2} | 1/(t3+1)x  |
             3       1
o4 : Matrix R  <--- R