# random(ZZ,LieAlgebra) -- get a random element of a Lie algebra

## Description

The optional inputs given above are not relevant for Lie algebras. Below is an example of a periodic Lie algebra (a periodization of $sl_3$) with five generators and seven random quadratic relations.

## Synopsis

• Usage:
random(d,L)
• Inputs:
• Outputs:
• an instance of the type LieElement, a random Lie element of degree $d$

## Synopsis

• Usage:
random(m,L)
• Inputs:
• Outputs:
• an instance of the type LieElement, a random Lie element of multi-degree $m$

## Synopsis

• Usage:
random(m,n,L)
• Inputs:
• Outputs:
• an instance of the type LieElement, a random Lie element of degree $m$ and homological degree $n$
 i1 : L = lieAlgebra({a,b,c,d,e}, Field=>ZZ/7) o1 = L o1 : LieAlgebra i2 : Q = L/apply(7,i->random(2,L)) o2 = Q o2 : LieAlgebra i3 : dims(1,8,Q) o3 = {5, 3, 5, 3, 5, 3, 5, 3} o3 : List i4 : random({4,0},Q) o4 = (-2)(d e e a) - (e e e a) + (-3)(e e e d) o4 : Q

## Ways to use this method:

• "random(List,LieAlgebra)"
• random(ZZ,LieAlgebra) -- get a random element of a Lie algebra
• "random(ZZ,ZZ,LieAlgebra)"