Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Macaulay2 Does Nothing

I've been trying to run Macaulay2 in Sage to generate some examples for a project I have.

I used cloud.sagemath.com and everything worked fine for a while, but some inputs just wouldn't evaluate. There was no error, and it wouldn't freeze- it's just that nothing would happen. I figured there was a calculation limit, so I downloaded sage and Macaulay2, but the same problem occurs. Sage and Macaulay2 appear to be properly installed.

An example of code which doesn't do anything is:

R=ZZ[O1,O2,O3,O4,O5,In1,In2,In3,In4,In5];

I= ideal (O1O2,O2O3,O3O4,O4O5,O5O1,In1In3,In3In5,In5In2,In2In4,In4In1,O1In1,O2In2,O3In3,O4In4,O5*In5);

J= ideal (O1,O2,O3,O4,O5,In1,In2,In3,In4,In5);

v= flatten entries mingens J;

e=flatten entries mingens I;

m=table(e,e,(a,b)->a*b);

s= unique flatten m;

for i when i<length e="" do="" s="delete(e#i^2,s);&lt;/p">

dvds = (a,b) -> if b%(a*a)==0 then true else false;

f = x -> any(v, a -> dvds(a,x));

i=0; while i<#s do if f(s#i)==false then s=delete(s#i,s) else i=i+1;

F= ideal (s);

betti F

betti I

Meanwhile, similar code which returns correct-looking output is

%macaulay2

R=ZZ[x1,x2,x3,x4];

I= ideal (x1x2, x2x3, x3x4, x4x1);

J= ideal (x1,x2,x3,x4);

v= flatten entries mingens J;

e=flatten entries mingens I;

m=table(e,e,(a,b)->a*b);

s= unique flatten m;

for i when i<length e="" do="" s="delete(e#i^2,s);&lt;/p">

dvds = (a,b) -> if b%(a*a)==0 then true else false;

f = x -> any(v, a -> dvds(a,x));

i=0; while i<#s do if f(s#i)==false then s=delete(s#i,s) else i=i+1;

                              s

F= ideal (s);

betti F

betti I

The output is Ideal of R

Ideal of R

     2       2      2            2

{x1x3x4 , x2x3 x4, x1 x2x4, x1*x2 x3}

List

Ideal of R

   0 1

total: 1 4 0: 1 . 1: . . 2: . . 3: . 4

BettiTally

   0 1

total: 1 4 0: 1 . 1: . 4

BettiTally

The only real difference seems to be the number of calculations made, and this idea is confirmed in that the calculations always seem to fail around ZZ[x1..xn] for n>8. There must be some way to fix this. Can anyone help?

Macaulay2 Does Nothing

I've been trying to run Macaulay2 in Sage to generate some examples for a project I have.

I used cloud.sagemath.com and everything worked fine for a while, but some inputs just wouldn't evaluate. There was no error, and it wouldn't freeze- it's just that nothing would happen. I figured there was a calculation limit, so I downloaded sage and Macaulay2, but the same problem occurs. Sage and Macaulay2 appear to be properly installed.

An example of code which doesn't do anything is:

R=ZZ[O1,O2,O3,O4,O5,In1,In2,In3,In4,In5];

I= ideal (O1O2,O2O3,O3O4,O4O5,O5O1,In1In3,In3In5,In5In2,In2In4,In4In1,O1In1,O2In2,O3In3,O4In4,O5*In5);

J= ideal (O1,O2,O3,O4,O5,In1,In2,In3,In4,In5);

v=

R = ZZ[O1,O2,O3,O4,O5,In1,In2,In3,In4,In5];
I = ideal(O1*O2,O2*O3,O3*O4,O4*O5,O5*O1,In1*In3,In3*In5,In5*In2,In2*In4,In4*In1,O1*In1,O2*In2,O3*In3,O4*In4,O5*In5);
J = ideal(O1,O2,O3,O4,O5,In1,In2,In3,In4,In5);
v = flatten entries mingens J;

e=flatten J; e = flatten entries mingens I;

m=table(e,e,(a,b)->a*b);

s= I; m = table(e,e,(a,b)->a*b); s = unique flatten m;

m; for i when i<length e="" do="" s="delete(e#i^2,s);&lt;/p">

e do s=delete(e#i^2,s); dvds = (a,b) -> if b%(a*a)==0 then true else false;

false; f = x -> any(v, a -> dvds(a,x));

i=0; dvds(a,x)); i = 0; while i<#s do if f(s#i)==false then s=delete(s#i,s) else i=i+1;

F= ideal (s);

i=i+1; F = ideal(s); betti F

F betti I

I

Meanwhile, similar code which returns correct-looking output is

%macaulay2

R=ZZ[x1,x2,x3,x4];

I=

%macaulay2
R = ZZ[x1,x2,x3,x4];
I = ideal(x1*x2, x2*x3, x3*x4, x4*x1);
J = ideal (x1x2, x2x3, x3x4, x4x1);

J= ideal (x1,x2,x3,x4);

v= (x1,x2,x3,x4); v = flatten entries mingens J;

e=flatten J; e = flatten entries mingens I;

m=table(e,e,(a,b)->a*b);

s= I; m = table(e,e,(a,b)->a*b); s = unique flatten m;

m; for i when i<length e="" do="" s="delete(e#i^2,s);&lt;/p">

e do s=delete(e#i^2,s); dvds = (a,b) -> if b%(a*a)==0 then true else false;

false; f = x -> any(v, a -> dvds(a,x));

i=0; dvds(a,x)); i = 0; while i<#s do if f(s#i)==false then s=delete(s#i,s) else i=i+1;i=i+1; F = ideal(s); betti F betti I

The output is

                              s

F= ideal (s);

betti F

betti I

The output is Ideal of R

R Ideal of R

R

         2       2      2            2

{x1x3x4 {x1*x3*x4 , x2x3 x2*x3 x4, x1 x2x4, x2*x4, x1*x2 x3}

List

x3} List Ideal of R

R

       0 1

total: 1 4 0: 1 . 1: . . 2: . . 3: . 4

BettiTally

4

BettiTally

       0 1

total: 1 4 0: 1 . 1: . 4

BettiTally

4 BettiTally

The only real difference seems to be the number of calculations made, and this idea is confirmed in that the calculations always seem to fail around ZZ[x1..xn] ZZ[x1..xn] for n>8. n>8. There must be some way to fix this. Can anyone help?