Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Type » Ring » degreeLength
next | previous | forward | backward | up | index | toc

# degreeLength -- the length of the degree vector

- Usage:
    `degreeLength A`
- Inputs:
  - A, a ring or a monoid,
- Outputs:
  - an integer, the length of a multidegree vector used as a degree of elements of A.

## Description

    i1 : degreeLength ZZ

    o1 = 0

    i2 : degreeLength(ZZ[])

    o2 = 1

    i3 : degreeLength(ZZ[x])

    o3 = 1

    i4 : degreeLength(ZZ[x, Degrees => {{1,2,3}}])

    o4 = 3

    i5 : degreeLength(ZZ[x,y,z, DegreeRank => 3])

    o5 = 3

    i6 : degreeLength(GF 9)

    o6 = 0

## See also

- degree
- degreesRing -- the ring or monoid of degrees
- degreesMonoid -- the ring or monoid of degrees
- monoid(...,DegreeRank=>...) -- specify the degrees of the variables

## Ways to use degreeLength:

- `degreeLength(Monoid)`
- `degreeLength(Ring)`

## For the programmer

The object degreeLength is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/functions/degreeLength-doc.m2:40:0.