Function: Cliff5[CLIFFORD_ENV] - displays current values of environmental variables used in 'CLIFFORD' and other supplementary packages
Calling Sequence:
CLIFFORD_ENV();
Parameters:
none
Description:
Procedure ' CLIFFORD_ENV ' displays current values of all invironmental variables used in 'CLIFFORD' , 'Bigebra', 'GTP', 'Cli5plus', and 'Octonion' packages. The default values of these variables are set when each package is loaded, but they can be changed by the user. If any of the current values is not in the range, a warning message is displayed.
Environmental variables used in 'CLIFFORD' and their meanings are as follows:
- dim_V - default value is 9, while possible values are positive integers between 1 and 9, inclusive: It sets the dimension of the vector space V in which a bilinear form B or a quadratic form Q may be defined or left undefined. Then, 'CLIFFORD' assumes that the dimension of the Clifford algebra Cl(V,B), or Cl(V,Q), or the Grassmann algebra /\ V is 2^(dim_V). The value of dim_V limits the maximum grade in the output from the procedure
wedge
when the indices of basis monomials are symbolic. The value of dim_V can be set by the user, but it is overwritten by wedge at its
first
invocation whenever bilinear from 'B' is defined or re-defined. When the value of dim_V is reduced by wedge, a warning message is printed (no such warning message is printed when the value of dim_V remains the same or is increased). These warning messages can be suppressed if 'warnings_flag', whose default value is 'true', is set to 'false' by the user. See
Example 1
below.
- _default_Clifford_product - default value is 'cmulRS' (see
cmulRS
), while other possible values are: 'cmulNUM' (see
cmulNUM
), 'cmulgen' (see
cmulgen
) or 'cmul_user_defined' (see
use
). Procedures 'cmulRS' and 'cmulNUM' essentially compute Clifford product between any two elements in the Clifford algebra (B) which are of type
clibasmon
,
climon
,
clipolynom
, or
cliscalar
using either Rota-Stein cliffordization technique or the recursive definition of the Clifford product due to Chevalley (see
cmul
for more information). Other possible values for this global variable are: 'cmulgen', a generic name for Clifford product that is also a name of a procedure
cmulgen
, and 'cmul_user_defined', a user defined Clifford product that can take three arguments x, y, and lname. The value of _default_Clifford_product is set by
Cliff[init]
to 'cmulRS' upon loading of CLIFFORD. It can be changed by the user either by a direct assignment (see below) or, by using procedure
Cliff5[use]
which checks correctness of the user input and prints an informational message. See
Example 2
below.
- _prolevel - default value is 'false', while possible values are 'true' or 'false': If _prolevel is set to 'false',
cliparse
check user's input for syntax errors which is time consuming. If it is set to 'false', no syntax checking is done, that is, cliparse always returns 'true', and computations are done faster. However, results could be unexpected. Setting _prolevel to 'true' is recommended only for experienced users. See
Example 3
below.
- _shortcut_in_minimalideal - default value is 'true', while possible values are 'true' or 'false': When set to 'true', procedure
minimalideal
checks user's input if it matches input previously used for which results were computed and stored under procedure
clidata
. If yes, results are retrieved from a library file and returned to the user. If not, procedure continues to compute new results. If _shortcut_in_minimal ideal is set to 'false', procedure doesn't check user's input for a match, but it moves directly to find a new output.
- _shortcut_in_Kfield - default value is 'true', while possible values are 'true' or 'false': When set to 'true', procedure
Kfield
checks user's input if it matches input previously used for which results were computed and stored under procedure
clidata
. If yes, results are retrieved from a library file and returned to the user. If not, procedure continues to compute new results. If _shortcut_in_Kfield ideal is set to 'false', procedure doesn't check user's input for a match, but it moves directly to find a new output.
- _shortcut_in_spinorKbasis - default value is 'true', while possible values are 'true' or 'false': When set to 'true', procedure
spinorKbasis
checks user's input if it matches input previously used for which results were computed and stored under procedure
clidata
. If yes, results are retrieved from a library file and returned to the user. If not, procedure continues to compute new results. If _shortcut_in_spinorKbasis ideal is set to 'false', procedure doesn't check user's input for a match, but it moves directly to find a new output.
- _shortcut_in_spinorKrepr - default value is 'true', while possible values are 'true' or 'false': When set to 'true', procedure
spinorKrepr
checks user's input if it matches input previously used for which results were computed and stored under procedure
clidata
. If yes, it calls procedure
matKrepr
which in turn uses previously computed and stored results to compute a new result. If not, procedure continues to compute new results. If _shortcut_in_spinorKrepr ideal is set to 'false', procedure doesn't check user's input for a match, but it moves directly to find a new output.
- _warnings_flag - default value is 'true', while possible values are 'true' or 'false': When set to 'true', certain procedures in 'CLIFFORD' print warning messages, for example, procedure
wedge
. If set to 'false', no warning messages are printed.
- _scalartypes - contains Maple types which are considered to be 'scalars' by procedures
`type/cliscalar`
,
clibilinear
, and
clilinear
. By adding new types to this set, user can make procedures in 'CLIFFORD' linear or bilinear, as appropriate, with respect to the new types added to _scalartypes. It is also conceivable that user may want procedures in 'CLIFFORD' to recognize additional types and treat them as 'scalars'. Thus it will be enouhg to add them to this set.
_quatbasis - contains a list of elements in Cl(3,0) which are used as default by procedure
qdisplay
to display quaternions in the quaternion basis contained in the list. That set can also be changed provided its elements give another ring in the given Clifford algebra that is isomorphic with the quaternionic ring H.
There are no environmental variables in 'Cli5plus'. Instead, there are macros (see
macro
) that are being defined in Cli5plus[init]:
- macro(cmul = climul) - redefines procedure
cmul
internally as
climul
so that 'cmul' can handle now
`type/cliprod`
in polynomials
- macro(cmulQ = climul) - redefines procedure
cmulQ
internally as
climul
so that 'cmulQ' can handle now
`type/cliprod`
in polynomials
- macro(`&c` = climul) - redefines procedure
`&c`
internally as
climul
so that `&c` can handle now
`type/cliprod`
in polynomials
- macro(`&cQ` = climul) - redefines procedure
`&cQ`
internally as
climul
so that `&cQ` can handle now
`type/cliprod`
in polynomials
- macro(reversion = clirev) - redefines procedure
reversion
internally as
clirev
so that 'reversion' can handle now
`type/cliprod`
in polynomials
- macro(LC = LCbig) - redefines procedure
LC
internally as
LCbig
so that
reversion
can handle now
`type/cliprod`
in polynomials
- macro(RC = RCbig) - redefines procedure
RC
internally as
RCbig
so that
reversion
can handle now
`type/cliprod`
in polynomials
There are two environmental variables in 'Bigebra' package. For more information see
Bigebra[init]
.
- _CLIENV[_SILENT] - default value is 'false', while possible values are 'true' or 'false'. It controls displaying warning messages when 'Bigebra' is loaded
- _CLIENV[_QDEF_PREFACTOR] - default value is -1: it controls prefactor in
gswitch
from Bigebra package.
The following environmental variables are used in 'Octonion' package:
- _octbasis = [Id, e1, e2, e3, e4, e5, e6, e7] - This list contains default octonion basis from Cl(0,7). That is, octonions are treated as paravectors in Cl(0,7)
- _pureoctbasis = [ e1, e2, e3, e4, e5, e6, e7] - This list contains default pure octonion basis from Cl(0,7), That is, pure vector part is a 1-vector in Cl(0,7). See also
purevectorpart
in the 'Octonion' package.
- _default_Fano_triples = [[1,3,7], [1,2,4], [1,5,6], [2,3,5], [2,6,7], [3,4,6], [4,5,7]] - This list contains default Fano triples (see
`type/Fano_triples`
) that define octonionic multiplication
omul
in the non-associative algebra of octonions.
- _default_squares = [-Id, -Id, -Id, -Id, -Id, -Id, -Id] - List that keeps default square values of the unit basis octonions, that is omul(e1,e1) = -Id, omul(e2,e2) = -Id,..., omul(e7,e7) = -Id.
- _default_Clifford_product has value changed to 'cmulNUM' upon loading this package. This is because procedure cmulNUM is more efficient than cmulRS when the bilinear form B is numeric which is the case here since quaternions require B to be a 3 by 3 identity matrix.
There are no additional environmental variables in the 'GTP' package.
Examples:
> restart:with(Cliff5):
> CLIFFORD_ENV();
>>> Global variables defined in Cliff5[init] are now available and have these values: <<<
************* Start *************
dim_V = 9
_default_Clifford_product = cmulRS
_prolevel = false
_shortcut_in_minimalideal = true
_shortcut_in_Kfield = true
_shortcut_in_spinorKbasis = true
_shortcut_in_spinorKrepr = true
_warnings_flag = true
_scalartypes = {RootOf, numeric, indexed, complex, `^`, rational, function, constant, mathfunc}
_quatbasis = [[Id, e3we2, e1we3, e2we1], {`Maple has assigned qi:=-e2we3, qj:=e1we3, qk:=-e1we2`}]
************* End *************
>
Example 1: Changing value of dim_V:
> dim_V; #the default value is (max) 9
>
p1:=e1we4we3weiwej-2*elwekweswet;maxgrade(p1);
p2:=e1we4we3weiwej-2*elwekweswet+elwekwes+epwekweswetwey;maxgrade(p2);
> out1:=wedge(p1,p2);
Observe, that 'wedge' has cut out from its output result of wedge(e1we4we3weiwej,epwekweswetwey) = e1we4we3weiwejwepwekweswetwey (up to a permutation sign) since the latter is a monomial of grade 10 which does not exist in the Grassmann algebra /\ V when dim(V) = 9. Observe that one of the terms in the last ouput is of grade 8 and the other is of grade 9. If we decrease the value of dim_V by eaither making an assignment or by defining a bilinear form 'B' of size smaller than 9, more terms will be cut out from the output:
> dim_V:=8;
> out2:=wedge(p1,p2);
Observe that output 'out2' no longer contains term '-4*e1we3we4weiwejwekwelweswet' since it is of grade 9 which does not exist in /\V when dim(V) = 8. It only contains term of grade 8. No warning message is printed since the change of 'dim_V' was done by the user. If the user assigns a bilinear form B of smaller size now than 8, result will be 0:
> B:=matrix(3,3,[]):
> wedge(p1,p2);
Warning, since B has been (re-)assigned, value of dim_V has been reduced by 'wedge' to 3
Error, (in wedge) argument(s) contain(s) index larger then current value of dim_V which is now, 3, To complete computation, increase value of dim_V or assign square matrix of size at least, 4, by, 4, to bilinear form B
The above error message is produced by 'wedge' and is self-explanatory. The warning message is not printed at the second attempt to compute wedge(p1,p2) since the value of dim_V has not been changed.
> wedge(p1,p2);
Error, (in wedge) argument(s) contain(s) index larger then current value of dim_V which is now, 3, To complete computation, increase value of dim_V or assign square matrix of size at least, 4, by, 4, to bilinear form B
Let's assign new values to p1 and p2:
> p1:=2+e1we2+e3we2-e1we3we2;p2:=2+e3+e1we3we2-e3we2;
> out3:=wedge(p1,p2);
> dim_V;
Observe, that since there is no index in p1 or p2 that would be larger than 3, computation can proceed and all terms in the ouput out3 are listed since none of them is of grade higher than 3. If we now decrease the size of 'dim_V' to 2 by re-assigning B, a warning message will be printed and the term of grade 3 will be dropped from out3. The warning message is printed because the default value of '_warnings_flag' is true. To suppress printing of this warning message, change the value of _warnings_flag to 'false':
> _warnings_flag;
> p1:=2+eiwejwek-e1we2;p2:=elwem-e1we2+3;
> B:=matrix(2,2,[]):
> out4:=wedge(p1,p2);
Warning, since B has been (re-)assigned, value of dim_V has been reduced by 'wedge' to 2
> dim_V;
Observe that the value of dim_V has been reduced by 'wedge' from 3 to 2. Observe also that if we increase the size of 'B' to 3, additional terms in out4 above will appear:
> B:=matrix(3,3,[]):
> out5:=wedge(p1,p2);
In order to see all terms in wedge(p1,p2), make sure that B is either unassigned and value of 9 is assigned to dim_V, or the size of B is increased to 9.
> B:='B':dim_V;
> dim_V:=9:
> out6:=wedge(p1,p2);
> dim_V;
>
Example 2:
Selecting Clifford product and value of the global variable _default_Clifford_product.
Upon loading CLIFFORD, the value of _default_Clifford_product is set to 'cmulRS':
> restart:with(Cliff5):
> _default_Clifford_product;
Internally, procedure Cliff5[cmul] calls on procedure Cliff5[cmulgen] which in turn uses Cliff5[cmulRS] on any two Clifford multivectors (with a required third parameter of type name, symbol, matrix or array). I order to see that indeed 'cmulRS' is used internally, let's cause an error message to appear as follows:
> cmulgen(e1,e2);
Error, (in cmulRS) exactly three arguments are needed
The error points to the lack of the third required argument in 'cmulRS'. The error disappears when a third argument is used:
> cmulgen(e1,e2,H);
The value of _default_Clifford_product can be changed to one of the other three possible values either by direct assignment or with the help of procedure Cliff5[use] :
> use(cmulNUM); # changing to Chevalley's recursive definition
Like above, let's check that indeed procedure Cliff5[cmulNUM] is now used internally by causing another error to appear:
> _default_Clifford_product;
> cmulgen(e1,e2);
Error, (in cmulRS) exactly three arguments are needed
Agan, the error this time points to the lack of the third required argument in 'cmulNUM'. The error disappears when a third argument is used:
> cmulgen(e1,e2,K);
We can also change the value of _default_Clifford_product to a generic dummy name cmulgen and a appropriate warning is again printed using procedure useproduct :
> useproduct(cmulgen); # changing to a generic name which is also a dummy procedure in CLIFFORD
Warning, cmul will use cmulgen; for help see pages ?cmul, ?Cliff5[intro], or ?cmulgen
Then, we get:
> cmulgen(e1,e2);
Warning, to assign Clifford product, execute 'useproduct' with argument cmulRS, cmulNUM, or cmul_user_defined first
>
useproduct(cmulNUM); # changing to cmulNUM
cmul(e1,e2);
Warning, cmul will use cmulNUM; for help see pages ?cmul, ?Cliff5[intro], or ?cmulNUM
Printing of warnings can be stopped by assigning false to _warnings_flag:
>
_warnings_flag:=false:
cmul(e1,e2);
The name of the bilinear form can be passed on this way:
> cmul[K](e1,e2);
However, when _default_Clifford_product is set to generic 'cmulgen' or to some undefined yet name 'cmul_user_defined', obviously 'cmul' is not fully functional:
> cmul(e1,e2,e3);
> useproduct(cmul_user_defined);
Warning, no computations with 'cmul' can be peformed yet since 'cmul_user_defined' has not been defined as procedure. Select 'cmulRS', 'cmulNUM', or a new procedure as argument to 'useproduct'.
> cmul(e1,e2,e3);
Error, (in cmul) global variable _default_Clifford_product must be assigned a procedure so that 'cmul' can proceed beyond this point. Sorry. For help see ?cmul.
Changing back to 'cmulRS' or 'cmulNUM' yields correct answer and 'cmul' becomes fully functional:
> useproduct(cmulRS):
Warning, cmul will use cmulRS; for help see pages ?cmul, ?Cliff5[intro], or ?cmulRS
> cmul(e1,e2,e3);
> cmul[K](e1-2,2*e2+e4,e3,e5);
>
Finally, a user can define his/her own Clifford multiplication procedure 'cmul_user_defined' which can be used internally by Cliff5[cmul] internally. That new procedure is expected to have three arguments: x, y, and lname where x and y are arbitrary elements in Cl(B) and lname is of type 'name', 'symbol', 'array', or 'matrix'. The output of this procedure must be an element in Cl(B) of type 'cliscalar', 'clibasmon', 'climon', or'clipolynom'. User will be expected then to write his/her help page for that new function and add it to the library of all CLIFFORD help pages. For example, let's define a new Clifford "multiplication" which just returns the wedge product of the two elements x and y:
> cmul_user_defined:=proc(x,y,lname) RETURN(Cliff5[wedge](x,y)) end:
Let's define two elements in Cl(B):
>
p1:=e1-2*e4we5;
p2:=e2-e9+Pi*e3;
> cmul_user_defined(p1,p2);
> useproduct(cmul_user_defined);
Warning, cmul will use cmul_user_defined; for help see pages ?cmul, ?Cliff5[intro], or ?cmul_user_defined
> cmul(p1,p2);
Another example, in which the bilinear form entered as the third parameter will be used, could be the following
> cmul_user_defined:=proc(x,y,lname) RETURN(LC(vectorpart(x,1),vectorpart(y,1),lname)) end:
> cmul_user_defined(p1,p2,K);
> cmul(p1,p2);
> cmul[P](e1,e2);
>
Example 3: Setting value of _prolevel.
>
restart:with(Cliff5):
CLIFFORD_ENV();
>>> Global variables defined in Cliff5[init] are now available and have these values: <<<
************* Start *************
dim_V = 9
_default_Clifford_product = cmulRS
_prolevel = false
_shortcut_in_minimalideal = true
_shortcut_in_Kfield = true
_shortcut_in_spinorKbasis = true
_shortcut_in_spinorKrepr = true
_warnings_flag = true
_scalartypes = {RootOf, mathfunc, `^`, rational, function, constant, numeric, indexed, complex}
_quatbasis = [[Id, e3we2, e1we3, e2we1], {`Maple has assigned qi:=-e2we3, qj:=e1we3, qk:=-e1we2`}]
************* End *************
> cliparse(e1we); #Intentional error
Error, (in cliparse) check spelling of, e1we, or define it as a constant or an alias
> _prolevel:=true:
> cliparse(e1we);
>
Example 4: Environmental variables in other packages:
> restart:with(Cliff5):with(Cli5plus):with(Bigebra):
Warning, new definition for init
Warning, definitions for type/climon and type/clipolynom now include &C and &C[K]. Type ?cliprod for help.
Warning, new definition for init
Warning, new definition for drop_t
Warning, new definition for gco_d_monom
Warning, new definition for gco_monom
> CLIFFORD_ENV();
>>> Global variables defined in Cliff5[init] are now available and have these values: <<<
************* Start *************
dim_V = 9
_default_Clifford_product = cmulRS
_prolevel = false
_shortcut_in_minimalideal = true
_shortcut_in_Kfield = true
_shortcut_in_spinorKbasis = true
_shortcut_in_spinorKrepr = true
_warnings_flag = true
_scalartypes = {rational, function, constant, RootOf, numeric, indexed, complex, `^`, mathfunc}
_quatbasis = [[Id, e3we2, e1we3, e2we1], {`Maple has assigned qi:=-e2we3, qj:=e1we3, qk:=-e1we2`}]
************* End *************
>>> Global variables defined in Cli5plus[init] are now available and have these values: <<<
macro(cmul = climul)
macro(cmulQ = climul)
macro(`&c` = climul)
macro(`&cQ` = climul)
macro(reversion = clirev)
macro(LC = LCbig)
macro(RC = RCbig)
Warning, new definitions for type/climon and type/clipolynom now include &C
************* End *************
>>> Global variables defined in Bigebra[init] are now available and have these values: <<<
_CLIENV[_SILENT] = false
_CLIENV[_QDEF_PREFACTOR] = -1
************* End *************
>
> with(Octonion);
Warning, new definition for init
> CLIFFORD_ENV();
>>> Global variables defined in Cliff5[init] are now available and have these values: <<<
************* Start *************
dim_V = 9
_default_Clifford_product = cmulNUM
_prolevel = false
_shortcut_in_minimalideal = true
_shortcut_in_Kfield = true
_shortcut_in_spinorKbasis = true
_shortcut_in_spinorKrepr = true
_warnings_flag = true
_scalartypes = {rational, function, constant, RootOf, numeric, indexed, complex, `^`, mathfunc}
_quatbasis = [[Id, e3we2, e1we3, e2we1], {`Maple has assigned qi:=-e2we3, qj:=e1we3, qk:=-e1we2`}]
************* End *************
>>> Global variables defined in Cli5plus[init] are now available and have these values: <<<
macro(cmul = climul)
macro(cmulQ = climul)
macro(`&c` = climul)
macro(`&cQ` = climul)
macro(reversion = clirev)
macro(LC = LCbig)
macro(RC = RCbig)
Warning, new definitions for type/climon and type/clipolynom now include &C
************* End *************
>>> Global variables defined in Bigebra[init] are now available and have these values: <<<
_CLIENV[_SILENT] = false
_CLIENV[_QDEF_PREFACTOR] = -1
************* End *************
>>> Global variables defined in Octonion[init] are now available and have these values: <<<
_octbasis = [Id, e1, e2, e3, e4, e5, e6, e7]
_pureoctbasis = [e1, e2, e3, e4, e5, e6, e7]
_default_Fano_triples = [[1, 3, 7], [1, 2, 4], [1, 5, 6], [2, 3, 5], [2, 6, 7], [3, 4, 6], [4, 5, 7]]
_default_squares = [-Id, -Id, -Id, -Id, -Id, -Id, -Id]
_default_Clifford_product = cmulNUM
************* End *************
>
> with(GTP);
Warning, new definition for `&t`
Warning, new definition for init
>
See Also: Cliff5[maxgrade] , Cliff5[`type/clibasmon`] , Cliff5[reorder] , Cliff5[wedge] , Cliff5[makeclibasmon]
(c) Copyright October 8, 1995, by Rafal Ablamowicz & Bertfried Fauser, all rights reserved.
Last modified: December 26, 2001, RA/BF.