Macaulay2 » Documentation
Packages » MultigradedImplicitization :: trimBasisInDegree
next | previous | forward | backward | up | index | toc

trimBasisInDegree -- Finds a basis for the homogeneous component of a graded ring but removes basis elements which correspond to previously computed generators.

Synopsis

Description

Computes a monomial basis for the homogeneous component of degree deg of the graded ring dom which is the source of a ring map $F$. Monomials which correspond to previously computed relations which are in G are automatically removed since they will not yield new generators in $\ker(F)$ when applying componentOfKernel to this basis.

i1 : A = matrix {{1,1,1,0,0,0,0,0,0}, {0,0,0,1,1,1,0,0,0}, {0,0,0,0,0,0,1,1,1}, {1,0,0,1,0,0,1,0,0}, {0,1,0,0,1,0,0,1,0}};

              5       9
o1 : Matrix ZZ  <-- ZZ
i2 : R = QQ[x_1..x_(numcols A)];
i3 : S = QQ[t_1..t_(numrows A)];
i4 : F = map(S, R, apply(numcols(A), i -> S_(flatten entries A_i)));

o4 : RingMap S <-- R
i5 : dom = newRing(R, Degrees => A);
i6 : basisHash = new MutableHashTable from apply(gens(dom), i -> degree(i) => i);
i7 : B = basis(2, source F) | basis(3, source F);

             1      210
o7 : Matrix R  <-- R
i8 : lats = unique apply(flatten entries B, i -> degree(sub(i, dom)));
i9 : scan(lats, deg -> basisHash#deg = basis(deg, dom));
i10 : trimBasisInDegree({2,1,0,1,1},  dom, {x_2*x_4-x_1*x_5, x_3*x_4-x_1*x_6, x_3*x_5-x_2*x_6}, basisHash)

o10 = | x_2x_3x_4 |

                1        1
o10 : Matrix dom  <-- dom

Observe that after trimming we get a smaller monomial basis for this homogeneous component. The full monomial basis is

i11 : basis({2,1,0,1,1}, dom)

o11 = | x_1x_2x_6 x_1x_3x_5 x_2x_3x_4 |

                1        3
o11 : Matrix dom  <-- dom

Ways to use trimBasisInDegree:

For the programmer

The object trimBasisInDegree is a method function.