Macaulay2 » Documentation
Packages » GradedLieAlgebras :: degreeLength(LieAlgebra)
next | previous | forward | backward | up | index | toc

# degreeLength(LieAlgebra) -- get the length of the weight of a generator

- Function: degreeLength
- Usage:
    `n=degreeLength(L)`
- Inputs:
  - L, an instance of the type LieAlgebra,
- Outputs:
  - n, an integer, the length of an arbitrary weight

## Description

Observe that the weights of the generators in a Lie algebra will have an extra component 0 if the option LastWeightHomological is false.

    i1 : L=lieAlgebra{a,b}

    o1 = L

    o1 : LieAlgebra

    i2 : M=lieAlgebra({a,b},Weights=>{{1,0},{2,1}},LastWeightHomological=>true)

    o2 = M

    o2 : LieAlgebra

    i3 : degreeLength L

    o3 = 2

    i4 : weight\gens L

    o4 = {{1, 0}, {1, 0}}

    o4 : List

    i5 : degreeLength M

    o5 = 2

## See also

- firstDegree(LieElement) -- get the degree of an element
- weight -- get the weight of a homogeneous element

## Ways to use this method:

- degreeLength(LieAlgebra) -- get the length of the weight of a generator

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