next up previous contents
Next: simpLB Up: phbize Previous: posxinphb   Contents

bracketlen



  
Purpose 		 
Return the length of the Lie bracket $x$.


Syntax l:=bracketlen(x);

Description
This function also expects a pure bracket as posxinphb (see simpLB below for the explanation of the pure bracket concept) and returns the length, also known as order or depth of the Lie bracket. The length of any generator is one, for any other Lie product $x$ it is the number of terms (operands) in the expansion of $x$.


Arguments $x$ Some pure Lie bracket.

Examples
Consider the PHB $B$, given in example for the function phb in p. [*]. Then the length of the third and twenty-second elements of $B$ can be found as:
> l1:=bracketlen(B[3]);
> l2:=bracketlen(B[22]);
l1:=1
l2:=4


Notes
This function is required by the phbize routine. It has been provided to the user for his/her convenience, however it is unlikely that it will really be needed.


Miguel Attilio Torres-Torriti 2004-05-31