3

I'm a very beginner in Macaulay2, so I apologize if this question is too trivial...

I'm using Macaulay2 for a computation involving over $30$ variables. Roughly speaking I have a $4\times 4$ matrix where entries are polynomials while coefficients are also variables. It's (minor) determinants give certain conditions and should simplify the form of the matrix.

I'm trying to solve this by creating a huge ring with many variables, compute an (again huge) ideal generated by the given conditions, and use "trim" to express the ideal in a simple way.

One important part of this computation is that some of the variables are invertible, like say $x$ is invertible if I know $xy=0$ , then $y=0$. I tried to put this condition by adding one more auxiliary variable, say $z$ , and give the condition $xz-1 = 0$ (as what we usually do in commutative algebra).

However, I found that Macaulay2 does not do this job; when it has $xy$ in the ideal, it does not provide $y$ in the ideal and so the set of generators does not get simplified well.

Are there some other way to put this condition, so that Macaulay2 reflects the invertibility in its computation?

Randy Marsh
  • 3,786

1 Answers1

2

Here is a way to turn an indeterminate into a unit, however I can't say if it will be enough to do what you want to do.

Declare a ring in the indeterminate x which you want to invert, say R=QQ[x], take its fraction field F=frac R. Now you can test if x is a unit in F with isUnit x, and the returned answer is True. Now x will be a unit in any ring S=F[y,z,...].

Note however that something as simple as roots(x*y) will not work since the expected ring is one of ZZ, QQ, RR or CC.

Here is a small example in which everything works as intended

A=QQ[x]; B=frac A; R=B[y]; (note that something like R=frac(QQ[x])[y] or R=(frac(QQ[x]))[y] will not work properly, i.e. it will not consider x as a unit)

isUnit x returns True

isUnit y returns False (sanity check)

gens ideal(x) still returns ideal generated by x, however

gens gb ideal(x) returns ideal generated by 1.

Randy Marsh
  • 3,786
  • Thanks a lot! It seems working as I wanted. – quasi-mathematician Aug 01 '20 at 02:40
  • Update: I found using frac makes too many polynomials invertible. Instead, I used saturate(I,x) (I ideal, x ring element that I want to be invertible) to get the ideal (more precisely, generators of ideal) when x is invertible. Note that if you want to invert more than one element, use I1 = saturate(I,x) , I2 = saturate(I1,y) ,,, and repeat it once more to make sure it is performed well. This is because saturate(I,x) does not make x invertible in the later process, so you may need to do it again until it gives you no effect. – quasi-mathematician Aug 06 '20 at 16:12