Function:
Cli5plus[climul] - extends Clifford multiplication 'cmul' to polynomials expressed in the Clifford bases e.g., &C(e1,e2), `&C`[K](e1,e2,e3)
Calling Sequence:
cmul(p1, p2,..., pn);
climul(p1, p2,..., pn);
cmul[K](p1, p2,..., pn);
climul[K](p1, p2,..., pn);
Parameters:
p1, p2, ..., pn - polynomials whose terms are of type
Cliff5[`type/cliprod`]
.
K - (optional) index of type name, symbol, matrix, array, or `&*`(numeric,{name,symbol,matrix,array})
Description:
This procedure extends procedure cmul from 'CLIFFORD' to polynomials in Cl(B) or Cl(K) expressed in terms of the Clifford basis written in terms of the unevaluated Clifford product `&C` or `&C`[K] or `&C`[-K] respectively.
Notice that the default is K=B. In this case, the basis can be displayed and used as &C(e1,e2), etc., or, with B listed explicitly as index as in `&C`[B](e1,e2). Not internal mechanism exists to convert from one form to the other although they givethe same Clifford basis in Cl(B).
User can use now the modified procedure 'cmul' which now can be applied to a new type of input, that is, `type/cliprod` .
It is also possible to mix Grassmann basis with the Clifford basis.
When package 'Cli5plus' is loaded, definitions of `type/climon` and `type/clipolynom` are modified so that expressions like 2*`&C`(e1,e2), a*`&C`[K](e3,e2), etc. are of `type/climon` while sums of such expressions, e.g., 2*`&C`(e1,e2) + 4*`&C`(e3,e2), 2*`&C`[B](e1,e2) + 4*`&C`[B](e3,e2), 2*`&C`[K](e1,e2) + 4*`&C`[K](e3,e2) are of `type/clipolynom`. This is needed so that procedures Cli5plus[clieval] and Cli5plus[cliexpand] from Cli5plus work properly.
Notice that although procedures cmulQ and its ampersand form `&cQ` are extended by climul, they don't compute correctly (off-diagonal entries in B are included) unless the form is diagonal. See Example 2 below. Procedure 'climul' was meant to extend 'cmul' and `&c` only.
Examples:
> restart:with(Cliff5):
Example 1 : Let's do first some type checking.
> p1:=e1 &C e2;p2:=2*p1;p3:=p2+3*`&C`(e1,e3,e4);
> p1,type(p1,cliprod);p2,type(p2,cliprod);p3,type(p3,cliprod);
> p1,type(p1,clibasmon);p2,type(p2,clibasmon);p3,type(p3,clibasmon);
> p1,type(p1,climon);p2,type(p2,climon);p3,type(p3,climon);
Warning, argument to 'type/climon' contains type 'cliprod'. Load 'Cli5plus' to extend functionality of CLIFFORD. Type ?cliprod for help.
Warning, argument to 'type/climon' contains type 'cliprod'. Load 'Cli5plus' to extend functionality of CLIFFORD. Type ?cliprod for help.
Warning, argument to 'type/climon' contains type 'cliprod'. Load 'Cli5plus' to extend functionality of CLIFFORD. Type ?cliprod for help.
> p1,type(p1,clipolynom);p2,type(p2,clipolynom);p3,type(p3,clipolynom);
Warning, argument to 'type/clipolynom' contains type 'cliprod'. Load 'Cli5plus' to extend functionality of CLIFFORD. Type ?cliprod for help.
Warning, argument to 'type/clipolynom' contains type 'cliprod'. Load 'Cli5plus' to extend functionality of CLIFFORD. Type ?cliprod for help.
Warning, argument to 'type/clipolynom' contains type 'cliprod'. Load 'Cli5plus' to extend functionality of CLIFFORD. Type ?cliprod for help.
Now let's see index cliprods:
> p1:=`&C`[B](e1,e2);p2:=2*p1;p3:=p2+3*`&C`[K](e3,e4);p4:=`&C`[-B](e1,e2);
> p1,type(p1,cliprod);p2,type(p2,cliprod);p3,type(p3,cliprod);p4,type(p4,cliprod);
> p1,type(p1,clibasmon);p2,type(p2,clibasmon);p3,type(p3,clibasmon);p4,type(p4,clibasmon);
We can turn off priniting of the warning messages by changing the default value of the environmental variable _warnings_flag (see CLIFFORD_ENV ):
>
_warnings_flag:=false;
p1,type(p1,climon);p2,type(p2,climon);p3,type(p3,climon);p4,type(p4,climon);
p1,type(p1,clipolynom);p2,type(p2,clipolynom);p3,type(p3,clipolynom);
Thus, in the main package CLIFFORD (version 5), expressions p1, p2, and p3 are not of type 'clibasmon', 'climon', or 'clipolynom', p2 and p3 are not of type 'cliprod', and only p1 is of type 'cliprod'. Furthermore, procedure 'cmul' cannot expressions containing types 'cliprod' unless it is modified by loading the supplementary package 'Cli5plus':
> cmul(p1,p1); #testing error message
Error, (in cmulRS) Cliff5[extract] expects its 1st argument, a1, to be of type {symbol, climon, clibasmon, cliscalar}, but received `&C`[B](e1,e2)
However, loading 'Cli5plus' modifies 'cmul' so that the above products can be computed:
> with(Cli5plus);
Warning, new definition for init
Warning, definitions for type/climon and type/clipolynom now include &C and &C[K]. Type ?cliprod for help.
> cmul(p1,p1);cmul(p1,p2);cmul[-B](p4,p4);
and the result is expressed in terms of the Clifford basis.
Notice that an error message is returned when various different names (indices) for the unevaluated Clifford products are used:
>
'p3'=p3;
cmul(p3,p3);
Error, (in climul) optional (or default B) parameter in climul differs from indices encountered in its cliprod arguments. Found these names as indices of &C:, {B, K}
This is because expression p3 contains terms `&C`[B](e1,e2) and `&C`[K](e1,e2,e3) with different indices. However, when all indices are the same, computation proceeds:
>
p4:=2*`&C`[K](e1,e2)- 3*`&C`[K](e3,e4)+Id;
p5:=2*`&C`[-K](e1,e2)- 3*`&C`[-K](e3,e4)+Id;
>
cmul[K](p4,p4);
cmul[-K](p5,p5);
>
&c[K](p4,p4); #short for of the Clifford product can be used as well
&c[-K](p5,p5); #short for of the Clifford product can be used as well
>
climul[K](p4,p4); #climul can be used directly too
climul[-K](p5,p5); #climul can be used directly too
> cmul[B](p1,p1,p1);
> &c[B](p1,p1,p1); #short for of the Clifford product can be used as well
>
Example 2 : Procedure 'climul' extends 'cmulQ' and `&cQ` also except that off-diagonal terms from B are included unless B is a diagonal matrix. For example,
> B:='B':p1;
> cmulQ(p1,p1);&cQ(p1,p1);
while the correct result should be only -B[2,2]*B[1,1]*Id. However, if B is defined as a diagonal matrix then result is correct:
> B:=matrix(2,2,[a,0,0,b]);
> cmulQ(p1,p1);&cQ(p1,p1);
>
Example 3 : Notice the following changes in type definitions when 'Cli5plus' is loaded:
> p1,type(p1,cliprod);p2,type(p2,cliprod);p3,type(p3,cliprod); #no change here
> p1,type(p1,clibasmon);p2,type(p2,clibasmon);p3,type(p3,clibasmon); #no change here
> p1,type(p1,climon);p2,type(p2,climon);p3,type(p3,climon); #changes here
> p1,type(p1,clipolynom);p2,type(p2,clipolynom);p3,type(p3,clipolynom); #changes here
>
Example 4 : Let's see some more computations:
>
B:='B':
p1:=Id+2*(e1 &C e2) + 3*&C(e1,e2,e3);
> cmul(p1,p2);
It is also possible to use the infix form of 'cmul':
> p1 &c p2;
One use 'clicollect' to collect the above output:
> clicollect(%);
Mixed basis elements are also allowed:
> p2:=p1+2*e2we3;
> cmul(p2,p2);
Polynomial p2 has three terms, two expressed the Clifford basis and one in the Grassmann basis. By the way, to express p2 solely in terms of the Clifford basis, use procedure 'cliexpand':
> cliexpand(p2);
while to express p2 solely in terms of the Grassmann basis, use 'clieval':
> clieval(p2);
Let's see how 'cmul' now handles mixed input:
> clicollect(cmul(p2,p1));
Finally, let's see the multiplication table for the basis Clifford monomials in Cl(3):
> B:=linalg[diag](1,1,1):
> Clifford_basis:=clibasis(3);
> M:=matrix(8,8,(i,j)->cmul(Clifford_basis[i],Clifford_basis[j])):
> map(cliexpand,evalm(M));
>
See A lso: Cliff5[cmul] , Cliff5[clicollect] , Cliff5[`type/cliprod`] , Cli5plus[clieval] , Cli5plus[cliexpand] , Cli5plus[clibasis]
(c) Copyright October 8, 1995, by Rafal Ablamowicz & Bertfried Fauser, all rights reserved.
Last modified: December 26, 2001, RA/BF.