As usual in Macaulay2, the first generator has index zero.
i1 : R = QQ[a..d];
|
i2 : I = ideal(a^3, b^3-c^3, a^4, a*c);
o2 : Ideal of R
|
i3 : numgens I
o3 = 4
|
i4 : I_0, I_2
3 4
o4 = (a , a )
o4 : Sequence
|
Notice that the generators are the ones provided. Alternatively we can minimalize the set of generators.
i5 : J = trim I
3 3 3
o5 = ideal (a*c, b - c , a )
o5 : Ideal of R
|
i6 : J_0
o6 = a*c
o6 : R
|
Elements of modules are useful for producing submodules or quotients.
i7 : M = cokernel matrix{{a,b},{c,d}}
o7 = cokernel | a b |
| c d |
2
o7 : R-module, quotient of R
|
i8 : M_0
o8 = | 1 |
| 0 |
o8 : cokernel | a b |
| c d |
|
i9 : M/M_0
o9 = cokernel | 1 a b |
| 0 c d |
2
o9 : R-module, quotient of R
|
i10 : N = M/(a*M + R*M_0)
o10 = cokernel | a 0 1 a b |
| 0 a 0 c d |
2
o10 : R-module, quotient of R
|
i11 : N_0 == 0_N
o11 = true
|