hall_basis¶
Return Hall basis elements up to depth over an alphabet of size width.
The Hall basis is a particular basis for the free Lie algebra. Elements are ordered first by depth, then lexicographically by the recursive Hall ordering. Degree-1 elements are labeled 1..width and higher degrees are nested tuples representing Lie brackets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
width
|
int
|
Size of the alphabet (path dimension). Must be >= 1. |
required |
depth
|
int
|
Maximum depth to generate basis elements. Must be >= 1. |
required |
Returns:
| Type | Description |
|---|---|
List[HallBasisElement]
|
Hall basis elements, where each element is either an integer (degree 1) or a nested tuple representing a Lie bracket (higher degrees). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |