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.

- Usage:
    `trimBasisInDegree(deg, dom, G, B)`
    `trimBasisInDegree(deg, dom, B)`
- Inputs:
  - deg, a list, the degree of the homogeneous component to compute
  - dom, a ring, a graded ring which is the source of a homogeneous ring map $F$
  - G, a list, a list of previously computed generators of $\ker(F)$
  - B, a hash table, a hashtable which contains all bases of homogeneous components which correspond to lower total degrees than deg
- Outputs:
  - a matrix, A monomial basis for the homogeneous component of degree deg of dom with any monomials which cannot be involved in new generators of $\ker(F)$ removed.

## 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 computeComponent 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 : dom = newRing(R, Degrees => A);

    i4 : use R;

    i5 : S = QQ[t_1..t_(numrows A)];

    i6 : F = map(S, R, apply(numcols(A), i -> S_(flatten entries A_i)));

    o6 : RingMap S <-- R

    i7 : B = basis(1, source F) | basis(2, source F) | basis(3, source F);

                 1      219
    o7 : Matrix R  <-- R

    i8 : lats = unique apply(flatten entries B, i -> degree(sub(i, dom)));

    i9 : basisHash = hashTable apply(lats, deg -> {deg, sub(basis(deg, dom), R)});

    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 R  <-- R

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:

- `trimBasisInDegree(List,Ring,HashTable)`
- `trimBasisInDegree(List,Ring,List,HashTable)`

## For the programmer

The object trimBasisInDegree is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/MultigradedImplicitization.m2:498:0.