# Revision history [back]

When I try your two examples on SageMathCloud in a terminal, I get similar-looking output.

Here is what I get running your simpler example on SageMathCloud in a terminal.

~$M2 Macaulay2, version 1.6 with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases, PrimaryDecomposition, ReesAlgebra, TangentCone i1 : R = ZZ[x1,x2,x3,x4]; i2 : I = ideal(x1*x2, x2*x3, x3*x4, x4*x1); o2 : Ideal of R i3 : J = ideal (x1,x2,x3,x4); o3 : Ideal of R i4 : v = flatten entries mingens J; i5 : e = flatten entries mingens I; i6 : m = table(e,e,(a,b)->a*b); i7 : s = unique flatten m; i8 : for i when i<length e do s=delete(e#i^2,s); i9 : dvds = (a,b) -> if b%(a*a)==0 then true else false; i10 : f = x -> any(v, a -> dvds(a,x)); i11 : i = 0; while i<#s do if f(s#i)==false then s=delete(s#i,s) else i=i+1; i13 : F = ideal(s); o13 : Ideal of R i14 : betti F 0 1 o14 = total: 1 4 0: 1 . 1: . . 2: . . 3: . 4 o14 : BettiTally i15 : betti I 0 1 o15 = total: 1 4 0: 1 . 1: . 4 o15 : BettiTally  And here is what I get running your more involved example on SageMathCloud in a terminal. ~$ M2
Macaulay2, version 1.6
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases, PrimaryDecomposition, ReesAlgebra, TangentCone

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

i2 : 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);

o2 : Ideal of R

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

o3 : Ideal of R

i4 : v = flatten entries mingens J;

i5 : e = flatten entries mingens I;

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

i7 : s = unique flatten m;

i8 : for i when i<length e do s=delete(e#i^2,s);

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

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

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

i13 : F = ideal(s);

o13 : Ideal of R

i14 : betti F

0  1
o14 = total: 1 30
0: 1  .
1: .  .
2: .  .
3: . 30

o14 : BettiTally

i15 : betti I

0  1
o15 = total: 1 15
0: 1  .
1: . 15

o15 : BettiTally