Consider the P. Hall basis B , of example for the function phb on page , and the Lie polynomial zr given in the example for the function reduceLB on page . Then, the expressions in the C language for the scalar coefficients of a given Lie polynomial, for example, given by the first and third terms in zr can be obtained as:
> codeCBHcf(op(1,zr)+op(3,zr)*epsilon,z,C);
1. B[12] = `&*`(f2,`&*`(f0,f1))
t0 = -u2_2*u0_1*u1_2/12.0+u0_1*u2_1*u1_2/12.0
-u2_1*u1_1*u0_2/12.0+u0_2*u1_1~*u2_2/12.0;
2. B[6] = `&*`(f1,f2)
t0 = (-u2_1*u1_2+u1_1*u2_2)*epsilon/2.0;
Providing a P. Hall basis is not essential, however a list or set containing at least one element must be given instead, as shown by the next example.
> codeCBHcf(op(1,z6r)+op(3,z6r)*epsilon,[[]],fortran);
1. B[-1] = []
t0 = -u2_2*u0_1*u1_2/12+u0_1*u2_1*u1_2/12
#-u2_1*u1_1*u0_2/12+u0_2*u1_1*u2_2/12
2. B[-1] = []
t0 = (-u2_1*u1_2+u1_1*u2_2)*epsilon/2
Note above that the element which would correspond to a P. Hall basis is simply a list containing an empty list, [[]] , but could have been also [``] , or any other list containing one element, but never an empty expression, such as [] .
|