{VERSION 6 0 "IBM INTEL NT" "6.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" 0 21 "" 0 1 0 0 0 1 0 0 0 0 2 0 0 0 0 1 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 269 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 271 "Helvetica"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 0 }{CSTYLE "" -1 476 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 477 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 478 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 479 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 3 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Warning" 2 7 1 {CSTYLE "" -1 -1 "" 0 1 0 0 255 1 0 0 0 0 0 0 1 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helveti ca" 1 12 0 0 255 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 255 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 258 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 } 1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 258 "" 0 "" {TEXT -1 29 "\nThis is clifford_M10_0 8.mws\n" }}{PARA 258 "" 0 "" {TEXT -1 25 "(Created: July 22, 2006)\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1092 "############################### ##############################################\n# \+ #\n#DISCLAIMER: \+ #\n# \+ \+ #\n#THERE IS NO WARRANTY FOR THE CLIFFORD, BIGEBRA, Cliplus, Octonio n, GTP #\n#PACKAGES TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXC EPT WHEN OTHERWISE #\n#STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE #\n#PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, #\n#INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY #\n#AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY #\n#AND PERF ORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE #\n #DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR \+ #\n#CORRECTION. \+ #\n#################################################### #########################\n" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }} {PARA 258 "" 0 "" {TEXT -1 325 "This is a listing (without examples) o f all procedures in a Maple package called 'CLIFFORD' (Version 10, Co pyright 1995-2006 by Rafal Ablamowicz, Tennessee Technological Univer sity), and Bertfried Fauser, Universit\"at Konstanz, for Maple 108. U ser will know which version he/she is using by using the 'version()' f unction." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 277 55 "The following procedures can use index such as K or -K:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 66 "cmul[K](p1,p2,. ..,pn); ##Clifford product of p1,p2,...,pn in Cl(K)" }}{PARA 0 "" 0 " " {TEXT -1 81 "&c[K](p1,p2,...,pn); ##Clifford product of p1,p2,...,pn in Cl(K) (ampersand form)" }}{PARA 0 "" 0 "" {TEXT -1 112 "cmulQ[K](p 1,p2,...,pn); ##Clifford product of p1,p2,...,pn in Cl(K) (here K is e xpected to be a diagonal matrix)" }}{PARA 0 "" 0 "" {TEXT -1 126 "&cQ[ K](p1,p2,...,pn); ##Clifford product of p1,p2,...,pn in Cl(K) (here K \+ is expected to be a diagonal matrix), ampersand form" }}{PARA 0 "" 0 " " {TEXT -1 56 "cexp[K](p,N); ## exponential of p in Cl(K) up to order \+ N" }}{PARA 0 "" 0 "" {TEXT -1 102 "cexpQ[K](p,N); ## exponential of p \+ in Cl(K) up to order N (here K is expected to be a diagonal matrix)" } }{PARA 0 "" 0 "" {TEXT -1 53 "climinpoly[K](p); ## minimal polynomial \+ of p in Cl(K)" }}{PARA 0 "" 0 "" {TEXT -1 91 "sexp[K](p,N); ## exponen tial of p in Cl(K) up to order N modulo the minimal polynomial of p" } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 278 96 "The fol lowing procedures can use name K or a numeric multiple of a name as an optional argument:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 106 "LC(p1,p2,K); ##left contraction of p2 by p1 w.r.t. K\n RC(p1,p2,K); ##right contraction of p1 by p2 w.r.t. K" }}{PARA 0 "" 0 "" {TEXT -1 68 "cmulNUM(m1,m2,K); ##Clifford (numeric) product of m1 a nd m2 in Cl(K)" }}{PARA 0 "" 0 "" {TEXT -1 41 "reversion(p,K); ##rever sion of p in Cl(K)" }}{PARA 0 "" 0 "" {TEXT -1 43 "cinv(p,K); ##Cliffo rd inverse of p in Cl(K)" }}{PARA 0 "" 0 "" {TEXT -1 73 "LCQ(p1,p2,K); ##left contraction of p2 by p1 w.r.t. diagonal entries in K" }}{PARA 0 "" 0 "" {TEXT -1 74 "RCQ(p1,p2,K); ##right contraction of p1 by p2 w .r.t. diagonal entries in K" }}{PARA 0 "" 0 "" {TEXT -1 46 "conjugatio n(p,K); ## conjugation of p in Cl(K)" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 279 86 "The folllowing procedures can pass on \+ name or a numeric multiple of a name via a list:" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 121 "type([p,K],nilpotent); # # checks if p is nilpotent in Cl(K)\ntype([p,K],idempotent); ## checks if p is idempotent in Cl(K)" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }} {PARA 258 "" 0 "" {TEXT -1 580 "\nProcedures that define types: `type/ climon`, `type/clipolynom`, `type/climatrix` as well as other procedur es such as 'reorder', 'wedge', etc., have been substantially revised t o improve efficiency and speed of the package. This work has been done together with Bertfried Fauser, Universit\"at Konstanz, in Cookeville on October 5, 2001. \n\nThis version includes \"Bigebra\" package tha t has been created together with Bertfried Fauser, Universit\"at Konst anz, Konstanz, Germany. Additional help pages have been written and ad ded to the database that explain the usage of this package." }{TEXT 276 0 "" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 302 "An additional feature in this version is an ability to display and change environmental variables. They can be displayed with proced ure CLIFFORD_ENV.\n\nThis package is made to run under Maple 10. It i s available on a server of the Department of Mathematics, Tennessee \+ Technological University, at: \n" }}{PARA 258 "" 0 "" {TEXT -1 69 " \+ http://math.tntech.edu/rafal/clifford/ " } }{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 130 "In \+ order to create a Maple file 'Clifford.m' containing the 'CLIFFORD' pa ckage, execute this worksheet.\n\nTo load the package type:" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 17 ">with(Cliff ord); " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 189 "You will know if the package has been loaded because a list wi th Clifford procedures will be displayed on the screen. To check the \+ current version of the package, at the Maple prompt type " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 12 ">version( ) ;" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 35 " Rafal Ablamowicz, Ph.D. and Chair " }}{PARA 258 "" 0 "" {TEXT -1 35 " Department of Mathematics, Box 5054" }}{PARA 258 "" 0 "" {TEXT -1 36 " Tennessee Technological University " }}{PARA 258 "" 0 "" {TEXT -1 21 "Cookeville, TN 38505 " }}{PARA 258 "" 0 "" {TEXT -1 24 "rablamowicz@t ntech.edu " }}{PARA 258 "" 0 "" {TEXT -1 25 "phone: USA (931) 372-356 9" }}{PARA 258 "" 0 "" {TEXT -1 23 "fax: USA (931) 372-6353" }}{PARA 0 "" 0 "" {TEXT -1 1 "\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 59 "restart :\nunprotect('Clifford','e','qi','qj','qk','Id','w');" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 989 "Clifford:=module()\n########################### ########\nexport `&m`, Bsignature, CLIFFORD_ENV, Kfield, LC, LCQ, RC, \+ RCQ, RHnumber, adfmatrix, all_sigs, beta_minus, beta_plus, buildm, byg rade, c_conjug, cbasis, cdfmatrix, cexp, cexpQ, cinv, clibilinear, cli collect, clidata, clilinear, climinpoly, cliparse, cliremove, clisolve , clisort, cliterms, cmul, cmulNUM, cmulQ, cmulRS, cmulgen, cocycle, c ommutingelements, conjugation,ddfmatrix, diagonalize, displayid, extra ct, factoridempotent, find1str, findbasis, gradeinv, init, isVahlenmat rix, isproduct, makealiases, makeclibasmon, matKrepr, maxgrade, maxind ex, mdfmatrix, minimalideal, ord, permsign, pseudodet, q_conjug, qdisp lay, qinv, qmul, qnorm, reorder, reversion, rmulm, rot3d, scalarpart, \+ sexp, specify_constants, spinorKbasis, spinorKrepr, squaremodf, subs_c lipolynom, useproduct, vectorpart, version, wedge, wexp, rd_clibasmon, rd_climon, rd_clipolynom;\n###################################\nlocal setup;\noption package, load=setup;\n" }}{PARA 258 "" 0 "" {TEXT -1 84 "No. 1. Name 'version' stores information about the current version of the package. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 25 "Typical use: version(); " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1514 "version:= proc()\noptio ns `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. \+ All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\npr int(`+++++++++++++++++++++++++++++++++++++++++++`);\nprint(`CLIFFORD - A Maple 10 Package for Clifford Algebras with \"Bigebra\"`); \nprint( `(Version 10 with environmental variables given by CLIFFORD_ENV())`); \nprint(`Last revised: July 22, 2006 (Source file: clifford_M10_08.mws )`);\nprint(`Copyright 1995-2006 by Rafal Ablamowicz (*) and Bertfried Fauser ($)`);\nprint(``);\nprint(`(*) Department of Mathematics, Box \+ 5054`);\nprint(` Tennessee Technological University, Cookeville, TN 38505`);\nprint(` tel: USA (931) 372-3569, fax: USA (931) 372-6353 `);\nprint(` rablamowicz@tntech.edu`);\nprint(` http://math.tnte ch.edu/rafal/Cliff8/`);\nprint(`($) Universit\"at Konstanz, Fachbereic h Physik, Fach M678`);\nprint(` 78457 Konstanz, Germany`);\nprint(` Bertfried.Fauser@uni-konstanz.de`);\nprint(` http://kaluza.phys ik.uni-konstanz.de/~fauser/`); \nprint(``);\nprint(`If you are a \+ Clifford algebra pro, assign 'true' to '_prolevel' and see`);\nprint(` how much faster your computations will be! But watch your syntax!`);\n print(`Use 'useproduct' to change value of _default_Clifford_product i n Cl(B) from`);\nprint(`cmulRS when B is symbolic to cmulNUM when B is numeric. Type ?cmul for help.`);\nprint(`Type CLIFFORD_ENV() to see c urrent values of environmental variables.`); \nprint(`++++++++++++This is CLIFFORD version 10++++++++++++`);\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 17 "No. 2. Procedure " }{TEXT 282 17 "specify_constants" } {TEXT -1 503 " allows user to specify any new symbolic constants, e.g. , a, b, c, B, e.t.c, which are to be known to Maple. The originally \+ known constants are stored in a global, non-protected variable 'consta nts' and must be saved separately, if needed. This procedure is neede d when sorting or collecting multivariate Clifford polynomials contain ing expressions like 'aa*eiwej' in which 'aa' is intended to be a cons tant and 'eiwej' is intended to be a Clifford basis monomial with indi ces i and j. Before using " }{TEXT 281 7 "clisort" }{TEXT -1 4 " or \+ " }{TEXT 280 10 "clicollect" }{TEXT -1 350 " user should make any addi tional constants of length 2 or more known to Maple as shown below. I f these constants of length 2 or more are not defined as Maple constan ts, then some procedures might yield error messages (although an attem pt has been made to avoid this problem). Constants of length one are a utomatically assumed to be Maple constants. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 46 "Typical use: specify_co nstants(a, b, B, aa); " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 186 "NOTE: from now on, extra spaces have been ad ded for the Reader's convenience in the sequence of input variables as in the above example. These spaces are not needed or required by Mapl e." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 368 "specify_constants:=proc(a1::anything) global constants;\noptions \+ `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\n##### ########################################\nconstants:=op(\{constants,ar gs\});\nprintf(\"Maple now knows the following constant(s): %q\\n\",co nstants);\nreturn NULL;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 21 "No. 3. The procedure " }{TEXT 283 6 "cbasis" }{TEXT -1 793 " writes a canonical basis for a Clifford algebra Cl(B) over a vector space V en dowed with a bilinear form B. The dimension of V is specified by a Ma ple global variable 'dim' where 1 <= dim <= 9. This procedure can be \+ used with one or two arguments as, for example, in cbasis(4) or cbasis (4, 2). In the first case, it returns a list of all basis elements in the Clifford algebra Cl(4). In the second case, it returns a list of \+ basis elements in the 2-vector subspace of Cl(4). Below, 'Id' stands f or the algebra unit element and 'w' denotes wedge/exterior product in \+ the Clifford algebra. An option 'even' allows one to create a basis in the even subalgebra of the given Clifford algebra as in cbasis(3, 'ev en'). In fact, 'even' can be replaced with any name which evaluates t o a string. \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1872 "cbasis:=proc(a 1::nonnegint,a2::\{string,symbol,nonnegint\})\nlocal i,k,X,XX,YY,L,Lev en,Lodd,bas,nxt,ind,start; global choose,e;\noptions `Copyright (c) 19 95-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved. `,remember;\ndescription `Last revised: July 22, 2006`;\n############# ################################\nif a1>9 then \n error \"first argu ment must be between 0 and 9 inclusive but received %1 instead\",a1 \n end if;\nif a1=0 and nargs=1 then return [Id] end if;\nif nargs=2 and \+ type(a2,\{string,symbol\}) then do\n L:=procname(a1):\n Leven:=[Id ]:Lodd:=[]:\n if nops(L) > 1 then\n for i from 2 to nops(L) do\n \+ if type(length(L[i]),odd) then Leven:=[op(Leven),L[i]] else\n \+ Lodd:=[op(Lodd),L[i]]\n end i f \n end do \n end if; \nif args[2]='even' then return Leven \n \+ elif args[2]='odd' then return Lodd\n else error \"second argument m ust be an integer or a string 'even' or 'odd' but received %1 instead \",args[2]\nend if\nend do \nend if;\nfor k from 0 to a1 do \n X[k] :=combinat[choose]([seq(i,i=1..a1)],k) \nend do;\nif not nargs = 1 and not nargs = 2 then \n error \"one or two arguments are needed as in put but received %0 instead\",args\nelif nargs = 1 then XX:=[seq(op(X[ k]),k=0..a1)] \nelse if not a2 >= 0 or not a2 <= a1 then \n error \"se cond argument must satisfy: 0 <= 'a2' <= %1 but received %2 instead\", a1,a2 \nelse XX:=X[a2] \nend if \nend if;\nYY:=array(1..nops(XX),[]); start:=1:\nif XX[1] = [] then \n YY[1]:=Id; \n start:=2 \nend if; \nfor k from start to nops(XX) do\n ind:=XX[k][1];\n if ind=10 t hen \n bas:=e||0 else bas:=e||ind \n end if;\nfor i from 2 to nops(XX[k]) do \n ind:=XX[k][i]:\n if ind=10 then nxt:=e||0 els e nxt:=e||ind end if:\n bas:=cat(bas,\"w\",nxt): \n end do;\n YY[k]:=bas;\nend do:\nYY:=convert(YY,list);\nprotect(op(YY)); #protect basis monomials\nreturn YY\nend proc:\n " }}{PARA 258 "" 0 "" {TEXT -1 17 "No. 4. Procedure " }{TEXT 284 8 "find1str" }{TEXT -1 327 " find s all locations of the first string of length one in the second string of length at least one. It returns a set of these positions. If the \+ first string is not found then it returns \{0\}. This procedure is pri marily for internal use in 'type/clibasmon' and 'cliparse'. \nTypical \+ use: find1str(e,e1we2we3); find1str(w,e1we2);" }{MPLTEXT 0 21 1 "\n" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 659 "find1str:=proc(a1::symbol,a2::sym bol) local ns,p,p1,ap,le2;\nglobal _prolevel;\noptions `Copyright (c) \+ 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserve d.`,remember;\ndescription `Last revised: July 22, 2006`;\n########### ##################################\nle2:=length(a2):\nif _prolevel=fal se then\nif length(a1) <> 1 or le2<1 then \n error \"first string mu st be of length 1 but received %1 instead\",a1 \nend if;\nend if;\np: =SearchText(a1,a2):\nap:=\{p\}:p1:=p:\nwhile p<>0 and p10 the n p1:=p1+p;\n ap:=ap union \{p1\} \n end if;\nend do; \nreturn ap\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 16 "No. 5. Func tion " }{TEXT 285 8 "cliparse" }{TEXT -1 349 " checks user's input for correct spelling of basis monomials. When unable to decide if the gi ven input is correct, it tells the user to check spelling or define th e given string as a Maple constant. If the spelling is correct, it ret urns true; if it is not correct, it returns a set of suspect words.\n \+ \nTypical use: cliparse(e1+e2we3+2*Pi*B[1,2]);\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1176 "cliparse:=proc(a1::anything) local x,S1,S2,p,S;\ngl obal _prolevel,_scalartypes;\noptions `Copyright (c) 1995-2006 by Rafa l Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\n##################################### ########\nif _prolevel then return true end if;\nif type(a1,_scalartyp es) then return true end if;\np:=remove(type,a1,_scalartypes):S1:=\{op (p)\}:\nfor x in S1 do \n if type(x,_scalartypes) or type(x,clibasm on) then S1:=S1 minus \{x\} end if;\nend do; \nS2:=map(op,S1); \nfor x in S2 do \n if type(x,_scalartypes) or type(x,clibasmon) then S2:= S2 minus \{x\} end if;\nend do;\nS:=remove(hastype,map(op,\{op(expand( p))\}),\{op(_scalartypes),clibasmon\});\nfor x in S do \n if find1s tr(e,x)=\{0\} and x<>'Id' then S:=S minus \{x\} end if;\nend do;\nif S =\{\} then return true end if;\nS1:=select(type,S,procedure):\nif S1 < > \{\} then\n error \"procedure name %1 that has been found in input is not allowed as a symbolic coefficient\",op(S1)\nend if;\nif nops(S )=1 then \n error \"check spelling of %1 or define it as a constant \+ or an alias\",op(S)\nelse \n error \"check spelling of %1 or define \+ them as constants or aliases\",op(S) \nend if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 16 "No. 6. Function " }{TEXT 286 9 "displayid" } {TEXT -1 186 " replaces a user-entered Clifford scalar with the scalar times the unit element 'Id'. It may also be applied to matrices with \+ Clifford algebra entries.\n\nTypical use: displayid(e1+2*Pi);\n" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 618 "displayid:=proc(a1::\{array,matrix ,algebraic\}) local KK,p;\noptions `Copyright (c) 1995-2006 by Rafal A blamowicz and Bertfried Fauser. All rights reserved.`;\ndescription `L ast revised: July 22, 2006`;\n######################################## #####\nKK:=proc() if type(args[1],cliscalar) then return args[1]*Id \n elif hastype(args[1],clibasmon) then return args[1] \n \+ end if \nend proc:\nif type(a1,\{array,matrix\}) then return map (procname,a1) end if;\np:=expand(a1):\nif type(p,\{`*`,cliscalar,cliba smon,climon\}) then return KK(p) \nelif type(p,\{`+`\}) then return ma p(KK,p) \nelse return a1 \nend if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 17 "No. 7. Procedure " }{TEXT 287 8 "cliterms" }{TEXT -1 222 " identifies Clifford basis elements in the given Clifford polynomial. \n\nNOTE: 'cliterms' also works with terms of type cliprod and it find s correctly terms involving such expressions. \n\nTypical use: cliterm s(2*Pi+2*e1we2);\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1016 "cliterms:= \+ proc(a1::anything) local S1,S2,S3,x,p,Cliplusflag;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights re served.`;\ndescription `Last revised: July 22, 2006`;\n############### ##############################\nCliplusflag:=assigned(Cliplus):\nif ha stype(a1,cliprod) and not Cliplusflag and _warnings_flag then \n WAR NING(`argument to 'cliterms' contains type cliprod. Load 'Cliplus' to \+ extend functionality of CLIFFORD. Type ?cliprod for help.`)\nend if; \nif type(a1,\{clibasmon,cliprod\}) then return \{a1\} end if;\np:=dis playid(simplify(a1)):\nif hastype(p,cliprod) then \n S1:=remove(type ,\{op(p)\},cliscalar);\n S2:=select(hastype,S1,\{clibasmon,climon,cl iprod\});\n S3:=\{\}:\n while not S2=\{\} do\n S3:=S3 unio n select(type,S2,\{clibasmon,cliprod\});\n S2:=select(hastype, map(op,remove(type,S2,\{clibasmon,cliprod\})),\{clibasmon,cliprod\}); \n end do;\nreturn S3\nend if;\nx:='x':\nS1:=remove(type,\{op(p)\},c liscalar);\nreturn \{seq(select(hastype,x,clibasmon),x=S1)\}\nend proc :\n" }}{PARA 258 "" 0 "" {TEXT -1 17 "No. 8. Procedure " }{TEXT 288 11 "clibilinear" }{TEXT -1 360 " makes any procedure K specified as th e third argument bilinear with respect to Clifford scalars in the firs t two arguments. The first two arguments are of the type clipolynom, i .e., Clifford polynomials. The third argument is a string or a procedu re.\nIt can handle terms involving elements of type cliprod.\n\nTypica l use: clibilinear(e1+2*e2we3,Id+2*e2+e3,K);\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 919 "clibilinear:=proc(a1,a2,a3::\{procedure,name,symbol, matrix,array\}) \n local tail,p1,p2,S1,S2,S12,res,x,y,cli1 ,cli2,co1,co2;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz a nd Bertfried Fauser. All rights reserved.`;\ndescription `Last revised : July 22, 2006`;\n#############################################\nif s implify(a1)=0 or simplify(a2)=0 then return 0 end if; \np1:=clicollect (a1):\np2:=clicollect(a2):\n tail:=args[4..-1];\n if type(p1,\{climo n,cliprod\}) then S1:=[p1] else S1:=[op(p1)] end if:\n if type(p2,\{c limon,cliprod\}) then S2:=[p2] else S2:=[op(p2)] end if:\n S12:=[seq( seq([x,y],x=S1),y=S2)];#this list will be huge for long polynomials\n \+ res:=0:\n for x in S12 do \n cli1:=select(type,x[1],\{cliprod,cli basmon\}):\n cli2:=select(type,x[2],\{cliprod,clibasmon\}):\n co 1:=coeff(x[1],cli1):\n co2:=coeff(x[2],cli2):\n res:=res+co1*co2 *a3(cli1,cli2,tail):\n end do:\n return res;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 17 "No. 9. Procedure " }{TEXT 289 9 "clilinear" } {TEXT -1 336 " makes any procedure K specified as the second argument \+ linear with respect to Clifford scalars (elements of type cliscalar). \+ It can now distribute over Clifford polynomials with elements of `type /cliprod`. Any additional parameters are passed on to the procedure en tered as the second argument.\nTypical use: clilinear(a*e1+2*e2we3,K); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 618 "clilinear:=proc(a1::\{symbol ,cliscalar,clibasmon,climon,clipolynom\},a2::\{name,procedure\}) \nloc al tail,p1,S1,res,x,cli1,co1;\noptions `Copyright (c) 1995-2006 by Raf al Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescriptio n `Last revised: July 22, 2006`;\n#################################### #########\ntail:=args[3..-1];\nif type(a1,cliscalar) then return a1*a2 (Id,tail) end if;\np1:=displayid(a1):\nif type(p1,climon) then S1:=[p1 ] else S1:=[op(p1)] end if:\nres:=0:\nfor x in S1 do\n cli1:=select (hastype,x,\{clibasmon,cliprod\}):\n co1:=coeff(x,cli1); \nres:=res +co1*a2(cli1,tail):\nend do:\nreturn res\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 10. Procedure " }{TEXT 290 7 "clisort" }{TEXT -1 312 " sorts the given multivariate Clifford polynomial with respect to the Clifford indetereminates found in the expression via the proce dure 'cliterms'. It puts scalar coefficients of the type cliscalar in \+ front of the Clifford basis monomials. It may also be applied to matri ces with entries in a Clifford algebra. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 40 "Typical use: clisort(2*e1we2 \+ - e1*b); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 436 "clisort:=proc(p::a lgebraic) local L,N;\noptions `Copyright (c) 1995-2006 by Rafal Ablamo wicz and Bertfried Fauser. All rights reserved.`;\ndescription `Last r evised: July 22, 2006`;\n############################################# \nif type(p,matrix) then return map(procname,p) end if;\nif type(eval( p),\{climon,clipolynom\}) or hastype(eval(p),cliprod) then\n L:=clit erms(expand(displayid(p)));\n return sort(p,L);\nend if:\nreturn p\n end proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 19 "No. 11. Procedure " } {TEXT 291 10 "clicollect" }{TEXT -1 382 " reorders monomial terms in s tandard order and then collects them in a multivariate Clifford polyno mial. It may also be applied to matrices with entries in a Clifford al gebra. It will simplify 6 + 7*Id to 13*Id. It collects now terms of t ype cliprod, if present.\n\nNOTE: 'clicollect' also works with terms o f type cliprod and it collects correctly terms involving such expressi ons. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 46 "Typical use: clicollect(e1 + a*e1 - e1we2); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 493 "clicollect:=proc(a1::algebraic) local p,L; \nopti ons `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\n# ############################################\nif type(a1,matrix) then \+ return map(procname,a1) end if;\np:=expand(a1):\nif type(p,cliscalar) \+ then return p*Id\nelif type(p,clipolynom) then \n L:=cliterms(p); \n return map(simplify,collect(displayid(p),L,'distributed'))\nels e return args[1] \nend if\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 23 "No. 12. The procedure " }{TEXT 292 3 "ord" }{TEXT -1 319 " return s an ordered list of positions in a monomial, e.g., e1we2, where vect or indices are found. Then, nops(ord(e1we2)) can be used to find the order of the monomial. Note that for consistency we have ord(Id) = o rd(numeric) = ord(numeric*Id) = ord(cliscalar)=[] where cliscalar is a ny object of the type cliscalar." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }} {PARA 258 "" 0 "" {TEXT -1 35 "This procedure is for internal use." }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 383 "or d:=proc(a1) local v,k;\noptions `Copyright (c) 1995-2006 by Rafal Abla mowicz and Bertfried Fauser. All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\n########################################### ##\nif type(a1,cliscalar) then return [] end if;\nv:=select(type,a1,cl ibasmon);\nif v = Id then return [] end if;\nk:='k':\nreturn [seq(2+3* k,k=0..((length(v)+1)/3-1))]\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 19 "No. 13. Procedure " }{TEXT 293 9 "cliremove" }{TEXT -1 193 " r emoves one symbol 'ei' from the location specified by the procedure 'o rd'. \n(NOTE: procedure 'ord' specifies location of the index 'i' in ' ei'.) This procedure is primarily for internal use." }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 575 "cliremove:=proc( p::posint,s::symbol) local S1,S2;global _prolevel;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights re served.`,remember;\ndescription `Last revised: July 22, 2006`;\n###### #######################################\nif not _prolevel then\n if \+ s=Id then error \"second argument must be Grassmann basis monomial of \+ rank >= 1\" end if;\nend if;\nS2:=substring(s,(p+2)..length(s));\nS1:= substring(s,1..(p-3));\nif length(S2)=0 and S1 <> s then return S1 \n \+ elif S1 = s then return S2 \n else return cat(S1,\"w\",S2); \nend if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 14. Procedure \+ " }{TEXT 294 7 "extract" }{TEXT -1 445 " extracts indices of a monomia l (or a constant times a monomial) and it returns them as a list of st rings. If necessary, they can be returned as a list of integers if op tion 'integers' is selected (in fact, any name which evaluates to a st ring may be used as the option). Indices could be now integers, lette rs, or they could be mixed. Note that extract(Id) = [] and extract(num eric) = extract(numeric*Id) = [] results in no vector indices. " }} {PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 63 "Typic al use: extract(2*e1we2); or extract(e2we3, \"integers\"); " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 728 "extract: =proc(a1,a2) \nlocal v,k,inds;global _prolevel,str_to_int;\noptions `C opyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All r ights reserved.`,remember;\ndescription `Last revised: July 22, 2006`; \n#############################################\nif type(a1,cliscalar) or (type(a1,symbol) and length(a1)=1) then return [] \nelif\n type( a1,\{climon,clibasmon\}) then v:=select(type,a1,clibasmon):\nelse \n \+ error \"wrong argument: %1\",a1 \nend if;\nif v = Id then return [] e nd if;\ninds:=map(convert,remove(member,StringTools:-Explode(v),\{\"e \",\"w\"\}),symbol);\nif nargs=1 then return inds \n elif type(a2,sy mbol) then \n return map(parse,inds)\n else error \"wrong op tion or number of arguments\" \nend if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 19 "No. 15. Procedure " }{TEXT 295 7 "reorder" }{TEXT -1 330 " reorders Clifford monomials in the given Clifford polynomial \+ using standard ordering and calculates sign of each permutation, e.g., reorder(e1we3we2) = -e1we2we3, reorder(e2we1 + 2*e1we5we2) = -e1we2 - 2*e1we2we5. If any one of the indices of the monomial is a letter, e. g., reorder(eiwe3) = eiwe3, reorder returns its argument. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 139 "Reorder no w can order monomials and polynomials with symbolic coefficients, e.g . reorder(ejwei) = -eiwej, using the lexicographic order. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 48 "Typical use : reorder(e2we1 + 2*Id + e4we3we1); " }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1072 "reorder:=proc(a1::algebraic) \+ \n local L1,L2,N,newbas,f,a,x,K,dummy_set,n12,s12,ss;\n \+ global B,dim_V;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowic z and Bertfried Fauser. All rights reserved.`;\ndescription `Last revi sed: July 22, 2006`;\n#############################################\ni f type(a1,\{matrix,`+`,`*`\}) then return map(procname,a1) end if; \nL 1:=Clifford:-extract(a1);\nN:=nops(L1);\nif N>9 then error \"detected \+ basis monomial of grade higher than 9 in the input\" end if;\nif N=0 o r N=1 then return a1 end if;\nn12,s12:=selectremove(member,L1,\{`1`,`2 `,`3`,`4`,`5`,`6`,`7`,`8`,`9`\}):\n#s12:=remove(member,L1,\{`1`,`2`,`3 `,`4`,`5`,`6`,`7`,`8`,`9`\}):\nL2:=[op(sort(n12)),op(sort(s12))];\nf:= proc() end proc:\nfor ss from 1 to N do\n f(L2[ss]):=L1[ss];\nend do: \ndummy_set:=convert(L1,set):\nK:=0:\nwhile dummy_set <> \{\} do\n a: =dummy_set[1]:\n dummy_set:=dummy_set[2..-1];\n x:=a:\n while f(x)< >a do\n x:=f(x);\n dummy_set:=dummy_set minus \{x\};\n \+ K:=K+1;\n end do:\nend do:\nnewbas:=cat(e||(op(L2[1..-2]))||w,e,L2[-1 ]):\nreturn (-1)^K*newbas\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 35 "No. 16. Defining a useful function " }{TEXT 296 8 "maxindex" } {TEXT -1 226 " which finds the greatest index in the given Clifford po lynomial or in the given list or set of Clifford monomials. It returns 0 for a Clifford scalar (an element of type cliscalar).\n\nTypical us e: maxindex(a*Id+6+2*Pi*e1we2);\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 809 "maxindex:=proc(a1::\{cliscalar,clibasmon,climon,clipolynom,list,s et\}) \nlocal inds,mons,symbinds;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescri ption `Last revised: July 22, 2006`;\n################################ #############\nif type(a1,cliscalar) or a1=Id then return 0 elif\n t ype(a1,list) then return max(op(convert(map(procname,a1),set))) elif\n type(a1,set) then return max(op(map(procname,a1))) else \n mons:= cliterms(a1);\n inds:=map(op,map(Clifford:-extract,mons,'integers')) ;\n symbinds:=remove(type,inds,integer);\n if symbinds = \{\} then \n if inds=\{\} then return 0 else return max(op(inds)) end if;\n else\n error \"cannot determine maximum index because input co ntains symbolic index or indices\"\n end if;\n end if;\nend proc:\n " }}{PARA 258 "" 0 "" {TEXT -1 35 "No. 17. Defining a useful function \+ " }{TEXT 297 8 "maxgrade" }{TEXT -1 176 " which finds the maximum grad e in the given Clifford polynomial. It returns 0 for a Clifford scala r (an element of type cliscalar).\n\nTypical use: maxgrade(a*Id+6+2*Pi *e1we2);\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 396 "maxgrade:=proc(a1:: \{cliscalar,clibasmon,climon,clipolynom\}) local S;\noptions `Copyrigh t (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights r eserved.`;\ndescription `Last revised: July 22, 2006`;\n############## ###############################\nif type(eval(a1),cliscalar) then retu rn 0 end if;\nS:=\{op(cliterms(eval(a1)))\}:\nreturn max(op(map(nops,m ap(Clifford:-extract,S))))\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 19 "No. 18. Procedure " }{TEXT 298 2 "LC" }{TEXT -1 233 " defines a l eft contraction between any multivector u and a multivector v, i.e., m ultivector u acts on the multivector v from the left. This procedure \+ is now bilinear in both arguments. It can accept third argument such \+ as K or -K." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 46 "Typical use: LC(e1 + 2*e2, e1we3 + b*e2we3); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2313 "LC:=proc(x1::\{cliscalar,clibasmon,clim on,clipolynom\},\n y1::\{cliscalar,clibasmon,climon,clipolynom \})\n local N1,N2,lst1,lst2,i,j,cf,term,lname,res,coB,nameB,x,y;\n \+ global _CLIENV,B;\noptions `Copyright (c) 1995-2006 by Rafal Ablamo wicz and Bertfried Fauser. All rights reserved.`;\ndescription `Last r evised: July 22, 2006`;\n############################################# \nif nargs=2 then\n coB:=1:\n nameB:=`B`: \n lname:=`B`: \nel if nargs=3 then\n if type(args[3],\{name,symbol,matrix,array\}) the n\n coB:=1:\n nameB:=args[3];\n lname:=args[3];\n \+ elif type(args[3],`&*`(numeric,\{name,symbol,matrix,array\})) then\n \+ coB:=op(select(type,\{op(args[3])\},numeric));\n nameB:=op (remove(type,\{op(args[3])\},numeric));\n lname:=args[3]:\n e lse \n error \"wrong type of third argument in LC. See ?LC for m ore help.\" \n end if;\nelse\n error \"two or three arguments exp ected in LC. See ?LC for more help.\"\n end if;\n##################### ###########\nx,y:=expand(x1),expand(y1): ##NEW\n if type(x,clibasmon) then\n if type(y,clibasmon) then\n lst1:=Clifford:-extract(x, 'integers');\n lst2:=Clifford:-extract(y,'integers');\n N1:= nops(lst1);N2:=nops(lst2);\n if N1>N2 then return 0 end if;\n \+ if N1=0 then return y end if;\n if N1=1 then \n res:=`+ `(seq(coB*nameB[lst1[1],lst2[j]]*_CLIENV[_QDEF_PREFACTOR]^(j-1)*\n \+ makeclibasmon([op(subs(lst2[j]=NULL,lst2))]),j=1 ..N2));\n return reorder(res) \n else\n res:=\nprocn ame(makeclibasmon(lst1[1..-2]),procname(makeclibasmon([lst1[-1]]),y,ln ame),lname);\n return reorder(res)\n end if;\n elif \+ type(y,climon) then\n term,cf:=selectremove(type,y,clibasmon);\n \+ return expand(cf*procname(x,term,lname))\n elif type(y,cl ipolynom) then\n return add(procname(x,i,lname),i=[op(y)])\n \+ elif type(y,cliscalar) then \n return displayid(scalarpart (x)*y)\n end if; \n elif type(x,climon) then\n term,cf:=selec tremove(type,x,clibasmon);\n return expand(cf*procname(term,y,lname ))\n elif type(x,clipolynom) then\n return add(procname(i,y,lname) ,i=[op(x)])\n elif type(x,cliscalar) then \n return x*reorder(y)\n end if;\nerror \"Got input %1 and %2 but LC can only process consta nts and Clifford numbers\",x,y;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 19. Procedure " }{TEXT 299 3 "LCQ" }{TEXT -1 270 " is a special version of 'LC' and gives left contraction in the orthogona l Clifford algebra Cl(Q) of the quadratic form Q defined via the symme tric part g of B as Q(x) = g(x, x) = B(x, x). It can accept name as a third optional argument or a numeric multiple of a name." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 76 "Proposed by Yvon Siret, Universite Joseph Fourier, Grenoble, France. Thanks!" }} {PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 82 "Typic al use: LCQ(e1 + 2*e2, e1we3 + b*e2we3);\nLCQ(e1 + 2*e2, e1we3 + b*e2w e3,K); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1791 "LCQ:=proc(x::\{clisc alar,clibasmon,climon,clipolynom\},\n y::\{cliscalar,clibasmo n,climon,clipolynom\}) \n local ii,N,L,m,Sxy,symbxy,lname,coB,name B;global B:\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and \+ Bertfried Fauser. All rights reserved.`;\ndescription `Last revised: J uly 22, 2006`;\n#############################################\nif narg s=2 then\n coB:=1:\n nameB:=`B`: \n lname:=`B`: \nelif nargs= 3 then\n if type(args[3],\{name,symbol,matrix,array\}) then\n \+ coB:=1:\n nameB:=args[3];\n lname:=args[3];\n elif typ e(args[3],`&*`(numeric,\{name,symbol,matrix,array\})) then\n coB :=op(select(type,\{op(args[3])\},numeric));\n nameB:=op(remove(t ype,\{op(args[3])\},numeric));\n lname:=args[3]:\n else \n \+ error \"wrong type of third argument in LCQ. See ?LCQ for more hel p.\" \n end if;\nelse\n error \"two or three arguments expected i n LCQ. See ?LCQ for more help.\"\nend if;\n########################### #####\nSxy:=remove(type,map(op,\{op(x),op(y)\}),cliscalar);\nSxy:=map( op,map(Clifford:-extract,Sxy,'integers'));\nsymbxy:=remove(type,Sxy,po sint);\nif symbxy <> \{\} then \n return LC(x,y,lname) \nend if;\nm: =max(op(Sxy),1);# 1 is needed when both x and y have maxindex=0\nif ty pe(evalm(lname),matrix) then \n N:=linalg[coldim](evalm(lname)):\n \+ if m>N then \n error \"input contains index larger than size of \+ bilinear form %1\",lname \n end if;\nend if:\nif type(lname,\{name,s ymbol,array,matrix\}) then\n L:=seq(lname[ii,ii],ii=1..m);\n retur n LC(x,y,linalg[diag](L))\nelif \n type(lname,`&*`(numeric,\{name,sy mbol,array,matrix\})) then\n coB:=op(select(type,\{op(lname)\},numer ic));\n nameB:=op(select(type,\{op(lname)\},\{name,symbol,array,matr ix\}));\n L:=seq(coB*nameB[ii,ii],ii=1..m);\n return LC(x,y,linalg [diag](L))\n end if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 19 "No . 20. Procedure " }{TEXT 300 2 "RC" }{TEXT -1 241 " defines a right c ontraction between any multivector u and a multivector v, i.e., multiv ector u acts on the multivector v from the right. This procedure is n ow bilinear in both arguments. It can accept third optional argument \+ like B or -B." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 258 46 "Typical use: RC(e1 + 2*e2, e1we3 + b*e2we3); \n" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 2276 "RC:=proc(x::\{cliscalar,clibasmon ,climon,clipolynom\},\n y::\{cliscalar,clibasmon,climon,clipol ynom\})\n local N1,N2,lst1,lst2,i,j,cf,term,lname,res,coB,nameB;\n g lobal _CLIENV,B;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescription `Last revis ed: July 22, 2006`;\n#############################################\nif nargs=2 then\n coB:=1:\n nameB:=`B`: \n lname:=`B`: \nelif n args=3 then\n if type(args[3],\{name,symbol,matrix,array\}) then\n \+ coB:=1:\n nameB:=args[3];\n lname:=args[3];\n eli f type(args[3],`&*`(numeric,\{name,symbol,matrix,array\})) then\n \+ coB:=op(select(type,\{op(args[3])\},numeric));\n nameB:=op(rem ove(type,\{op(args[3])\},numeric));\n lname:=args[3]:\n else \+ \n error \"wrong type of third argument in RC. See ?RC for more \+ help.\" \n end if;\nelse\n error \"two or three arguments expecte d in RC. See ?RC for more help.\"\nend if;\n########################## ######\n if type(x,clibasmon) then\n if type(y,clibasmon) then\n \+ lst1:=Clifford:-extract(x,'integers');\n lst2:=Clifford:-extr act(y,'integers');\n N1:=nops(lst1);N2:=nops(lst2);\n if N2> N1 then return 0 end if;\n if N2=0 then return x end if;\n i f N2=1 then \n res:=`+`(seq(coB*nameB[lst1[-i],lst2[1]]*_CLIEN V[_QDEF_PREFACTOR]^(i-1)*\n makeclibasmon([op(subs( lst1[-i]=NULL,lst1))]),i=1..N1));\n return reorder(res) \n \+ else\n res:=procname(procname(x,makeclibasmon([lst2[1]]), lname),\n makeclibasmon(lst2[2..-1]), lname);\n return reorder(res)\n end if;\n elif type(y, climon) then\n term,cf:=selectremove(type,y,clibasmon);\n re turn expand(cf*procname(x,term,lname))\n elif type(y,clipolynom) th en\n return add(procname(x,i,lname),i=[op(y)])\n elif type(y,c liscalar) then return reorder(x)*y \n end if;\n elif type(x,climo n) then\n term,cf:=selectremove(type,x,clibasmon);\n return expa nd(cf*procname(term,y,lname))\n elif type(x,clipolynom) then\n ret urn add(procname(i,y,lname),i=[op(x)])\n elif type(x,cliscalar) then \+ \n return displayid(x*scalarpart(y))\n end if;\nerror \"Got input %1 and %2 but can only process constants and Clifford numbers\",x,y\n end proc:\n" }}{PARA 0 "" 0 "" {TEXT 259 18 "No. 21. Procedure " } {TEXT 301 3 "RCQ" }{TEXT 302 85 ": Right contraction in Cl(Q). It can \+ accept third optional argument such as K or -K.\n" }{TEXT -1 0 "" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 1796 "RCQ:=proc(x::\{cliscalar,clibasmo n,climon,clipolynom\},\n y::\{cliscalar,clibasmon,climon,clip olynom\}) \n local ii,N,L,m,Sxy,symbxy,lname,coB,nameB;global B:\n options `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fau ser. All rights reserved.`;\ndescription `Last revised: July 22, 2006` ;\n############################################# \nif nargs=2 then\n \+ coB:=1:\n nameB:=`B`: \n lname:=`B`: \nelif nargs=3 then\n \+ if type(args[3],\{name,symbol,matrix,array\}) then\n coB:=1:\n \+ nameB:=args[3];\n lname:=args[3];\n elif type(args[3],` &*`(numeric,\{name,symbol,matrix,array\})) then\n coB:=op(select (type,\{op(args[3])\},numeric));\n nameB:=op(remove(type,\{op(ar gs[3])\},numeric));\n lname:=args[3]:\n else \n error \+ \"wrong type of third argument in RCQ. See ?RCQ for more help.\" \n \+ end if;\nelse\n error \"two or three arguments expected in RCQ. See ?RCQ for more help.\"\nend if;\n################################\nSxy :=remove(type,map(op,\{op(x),op(y)\}),cliscalar);\nSxy:=map(op,map(Cli fford:-extract,Sxy,'integers'));\nsymbxy:=remove(type,Sxy,posint);\nif symbxy <> \{\} then \n return RC(x,y,lname) \nend if;\nm:=max(op(Sx y),1);# 1 is needed when both x and y have maxindex=0\nif type(evalm(l name),matrix) then \n N:=linalg[coldim](evalm(lname)):\n if m>N th en \n error \"input contains index larger than size of biline ar form %1\",lname \n end if:\nend if:\nif type(lname,\{name,symbol, array,matrix\}) then\n L:=seq(lname[ii,ii],ii=1..m);\n return RC(x ,y,linalg[diag](L))\nelif \n type(lname,`&*`(numeric,\{name,symbol,a rray,matrix\})) then\n coB:=op(select(type,\{op(lname)\},numeric)); \n nameB:=op(select(type,\{op(lname)\},\{name,symbol,array,matrix\}) );\n L:=seq(coB*nameB[ii,ii],ii=1..m);\n return RC(x,y,linalg[diag ](L))\n end if;\nend proc:" }}{PARA 258 "" 0 "" {TEXT -1 19 "\nNo. 22. Procedure " }{TEXT 303 8 "gradeinv" }{TEXT -1 133 " is the grade invo lution in the Clifford algebra,i.e., it reverses signs of odd elements and leaves signs of even elements unchanged." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 48 "Typical use: gradeinv(e 1 + e1we2 - 4*e3we4); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 549 "grad einv:=proc(a1::\{matrix,cliscalar,clibasmon,climon,clipolynom\}) globa l _CLIENV;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and B ertfried Fauser. All rights reserved.`;\ndescription `Last revised: Ju ly 22, 2006`;\n#############################################\nif type( a1,matrix) then return map(procname,a1) end if;\n#if not assigned(_CLI ENV) then _CLIENV[_QDEF_PREFACTOR]:=-1 end if;\nif type(a1,clibasmon) then return (_CLIENV[_QDEF_PREFACTOR])^maxgrade(a1)*a1 \n \+ else return clilinear(a1,procname) \nend if;\nend proc:\n" } }{PARA 258 "" 0 "" {TEXT -1 19 "No. 23. Define the " }{TEXT 304 5 "wed ge" }{TEXT -1 1306 " product of any number of Clifford polynomials. T he infix form of this associative multiplication is `&w`. Thus, e1 &w e2 = wedge(e1, e2), etc. Via the procedure 'rmulm' described below, \+ wedge multiplication may be applied to matrices with entries in a Clif ford algebra or in an exterior algebra.\n\nNew feature: When the dimen sion of the vector space is known, either from the size of the matrix \+ B or from the global parameter dim_V that can be set by the user, the \+ output of the procedure does not include terms of grade higher than th e dimension of the vector space in case symbolic indices are used. \n \nThe default value of this global variable is 9 and it it set by the \+ initialization file when Clifford is loaded.\n\nWhen the procedure is \+ invoked, it checks whether the bilinear form B has been defined. If ye s, the procedure checks whether the size of B is less than the current value of dim_V. If again yes, a warning message is issued by the proc edure and the value of dim_V is reduced. If the size of B is larger th an the current value of dim_V, no warning message is issued and the va lue of dim_V is increased to linalg[coldim](B).\n\nThe warning messag e can be supressed by addign 'false' to a global parameter _warnings_f lag whose default value is set to true by the Clifford initialization \+ file." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 96 "Typical use: wedge(e1 + e2, e4 + e1we2); wedge(e2 + 2*e1, e3, e4) ; (e2 + 2*e1) &w (e3 + 2*); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 3058 "wedge:=proc(a1::\{cliscalar,clibasmon,climon,clipolynom\},\n \+ a2::\{cliscalar,clibasmon,climon,clipolynom\}) \nlocal ii,kk,w edge2,pi,p1,p2,i1,i2,i12,n12,maxindexflag,expr,maxin;\nglobal dim_V,B, _warnings_flag;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz \+ and Bertfried Fauser. All rights reserved.`;\ndescription `Last revise d: July 22, 2006`;\n#############################################\nkk: ='kk':\nif member(0,[args]) then return 0 \nelif \n remove(type,\{ar gs\},cliscalar)=\{\} then return product(args[kk],kk=1..nargs)\nend if ;\nif type(B,matrix) then\n if linalg[coldim](B)<>dim_V then \n \+ if linalg[coldim](B) < dim_V then\n dim_V:=linalg[coldim](B); \n if _warnings_flag then\nprintf(\"Warning, since B has been \+ (re-)assigned, value of dim_V has been reduced by 'wedge' to %g\\n\",d im_V);\n end if;\n elif linalg[coldim](B)>dim_V then\n \+ dim_V:=linalg[coldim](B);\n end if;\n end if;\n end if; \nif n ot type(dim_V,Range(0,10)) or \n not type(dim_V,posint) then\n err or \"value of dim_V must be a positive integer between 1 and 9, inclus ive, but current value of dim_V is %1\",dim_V\nend if;\n############## ##\ni12:=\{\}:\nfor ii from 1 to nargs do\n pi:=args[ii]: \n i12 :=i12 union map(op,map(Clifford:-extract,cliterms(pi),'integers')):\ne nd do;\nn12:= select(member,i12,\{1,2,3,4,5,6,7,8,9\}):\nif not n12=\{ \} then\n maxin:=max(op(n12)); \n maxindexflag:=evalb(maxin > dim_ V);\nelse maxindexflag:=false:\nend if:\nif maxindexflag then \n err or \"argument(s) contain(s) index larger then current value of dim_V w hich is now %1. To complete computation, increase value of dim_V or as sign square matrix of size at least %2 by %3 to bilinear form B\",dim_ V,maxin,maxin\nend if;\n################\nwedge2:=proc() local expr,i1 ,i2,n1,n2,i12,s12,symbindexflag;global dim_V;\n i1:=\{op(Clifford:-ext ract(args[1]))\};n1:=nops(i1):\n i2:=\{op(Clifford:-extract(args[2])) \};n2:=nops(i2):\n if args[1]=Id then \n if n2>dim_V then return 0 \+ else return args[2] end if;\n end if;\n if args[2]=Id then \n if n1 >dim_V then return 0 else return args[1] end if;\n end if;\n i1:=\{o p(Clifford:-extract(args[1]))\};\n i2:=\{op(Clifford:-extract(args[2 ]))\};\n i12:=i1 union i2;\n s12:= remove(member,i12,\{`1`,`2`,`3` ,`4`,`5`,`6`,`7`,`8`,`9`\}):\n symbindexflag:=evalb(not s12=\{\}):\n if i1 intersect i2 <> \{\} then return 0 end if;\n if symbindexfl ag and nops(i1)+nops(i2) > dim_V then return 0 end if;\nreturn reorder (cat(args[1],\"w\",args[2]));\nend proc:\n################\nif nargs=1 then return args\nelif nargs=2 then p1:=displayid(a1):\n \+ p2:=displayid(a2):\n expr:=clibilinear(p1,p2,wed ge2);\n if hastype(expr,trig) then \n \+ return clicollect(map(combine,clicollect(expr),trig))\n \+ else \n return reorder(expr)\n \+ end if;\nelse expr:=procname(procname(a1,a2),args[3..nargs]):\n \+ if hastype(expr,trig) then \n return clicollect(map(combine ,clicollect(expr),trig))\n else \n return reorder(expr)\n \+ end if;\nend if;\nend proc:\n" }}{PARA 0 "" 0 "" {TEXT 269 29 "No. \+ 24. Ampersand version of " }{TEXT 307 5 "wedge" }{TEXT 308 38 ". (Has \+ been moved to Clifford:-setup)\n" }}{PARA 0 "" 0 "" {TEXT 260 18 "No. \+ 25. Procedure " }{TEXT 305 8 "permsign" }{TEXT 306 118 " computes sign of a permutation that sorts a list of indices.\n\nTypical use: permsi gn([1,3,2]); permsign([j,1,i,k,2]);\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 877 "permsign:=proc(L::list) local newbas,ss,a,n12,s12,L1,L2,N,f,dum my_set,K,x;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and \+ Bertfried Fauser. All rights reserved.`;\ndescription `Last revised: J uly 22, 2006`;\n#############################################\nL1:=L: \nN:=nops(L1):\nif N=1 then return 1 end if:\n################## new\n n12,s12:=selectremove(member,L1,\{1,2,3,4,5,6,7,8,9\});\n#s12:=remove( member,L1,\{1,2,3,4,5,6,7,8,9\});\nL2:=[op(sort(n12)),op(sort(s12))]; \n################## new\nf:=proc() end proc:\nfor ss from 1 to N do\n f(L2[ss]):=L1[ss];\nend do;\ndummy_set:=convert(L1,set);\nK:=0:\nwhi le dummy_set <> \{\} do\n a:=dummy_set[1]:\n dummy_set:=dummy_set[2. .-1];\n x:=a:\n while f(x)<>a do\n x:=f(x);\n dummy_set:=d ummy_set minus \{x\};\n K:=K+1;\n end do:\nend do;\n#newbas:=cat (e.(op(L2[1..-2])).w,e,L2[-1]):\n#return ((-1)^K*newbas);\nreturn (-1) ^K;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 26. Procedure \+ " }{TEXT 309 7 "cmulNUM" }{TEXT -1 148 " calculates Clifford product b etween any two Clifford monomials using the recursivelyChevalley's def inition of the Clifford product: " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 93 " \+ xu = wedge(x, u) + LC(x, u) = x &w u + LC(x, u) \+ " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 477 " where x is a vector and u is any element in the algebra, wedge(x,u) = \+ x &w u denotes the wedge or exterior product between x and u, and LC( x, u) denotes the left contraction of u by x. This procedure is now bi linear in both arguments. The infix form is available e.g., e1 &c e2. This procedure works in Clifford algebras in dimensions up to and in cluding 9. Multiplication of matrices with entries in a Clifford alge bra can be done with a procedure 'rmulm' described below." }}{PARA 0 " " 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 128 "This procedure \+ requires third argument of type name or a numeric multiple of a name. \+ Then it computes Clifford product in Cl(K)." }}{PARA 258 "" 0 "" {TEXT -1 221 "\nThis version can take index as a way of passing a para meter. The index could be of type `&*`(numeric,\{name,symbol,array,ma trix\}) or of type \{name,symbol,array,matrix\}.\n\nWhen the bilinear form B is symbolic, use cmulRS." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 264 55 "Typical use: cmulNUM(e1,e3we4,B); cmulNU M(e1,e3we4,-K);" }{TEXT 265 3 " \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2250 "cmulNUM:=proc(a1,a2,lname) \n local L,N,L2,x,x1,x2,S,i,ii,T1,T2 ,K,p1,p2,coB,nameB,a12;global B:\n options `Copyright (c) 1995-2006 b y Rafal Ablamowicz and Bertfried Fauser. All rights reserved.`;\n des cription `Last revised: July 22, 2006`;\n############################# ################\n###This is additional code for Maple 6 version:\n### ##########################################\nif hastype(\{a1,a2\},clipr od) then\n a12:=map(Cliplus:-clieval,[a1,a2]);\n return Cliplus:-c liexpand(clibilinear(a12[1],a12[2],procname,lname))\nend if: \n####### ###################################################################### #########\n### old name cmul2B: this procedure computes recursively Cl ifford product of any two #\n### cliscalars, clibasmons, climons, and \+ clipolynoms in Clifford algebras Cl(lname) #\n####################### ###############################################################\n if \+ nargs<>3 then error \"exactly three arguments are needed\" end if:\n \+ if has(0,map(simplify,[a1,a2])) then return 0 end if;\n if a2=`Id` th en return a1 end if:\n if a1=`Id` then return a2 end if:\n L:=Cliffo rd:-extract(a1,'integers');\n N:=nops(L):\n ################\n #### # The following will allow for lname to be -B, for example:\n if type (lname,\{name,symbol,array,matrix\}) then\n coB,nameB:=1,lname:\n \+ elif type(lname,`&*`(numeric,\{name,symbol,array,matrix\})) then\n \+ coB:=op(select(type,\{op(lname)\},numeric));\n nameB:=op(select( type,\{op(lname)\},name));\n else\n error \"third argument is of \+ unexpected type\"\n end if;\n ################\n if N=0 then return coeff(a1,Id)*a2\n elif N=1 then\n L2:=Clifford:-extract(a2,'integ ers'):\n return reorder(simplify(makeclibasmon([L[1],op(L2)])\n \+ +add((-1)^(i-1)*coB*nameB[L[1],L2[i]]*makeclibasmon(subs(L2[i]=NULL,L 2)),i=1..nops(L2))))\n elif N=2 then\n x1:=substring(a1,1..2):x2:= substring(a1,4..5);\n p2:=procname(x2,a2,lname):\n S:=clibilinea r(x1,p2,procname,lname);\n return simplify(S-coB*nameB[op(L)]*a2)\n end if;\n x:=cat(e,L[-1]);\n p1:=substring(a1,1..(3*N-4));\n p2:= procname(x,a2,lname):\n S:=clibilinear(p1,p2,procname,lname)\n - add((-1)^(i)*coB*nameB[L[-i],L[-1]]*\nprocname(makeclibasmon(subs(L[-i ]=NULL,L[1..-2])),a2,lname),i=2..N); \n return reorder(simplify(S))\n end proc:\n" }}{PARA 0 "" 0 "" {TEXT 266 19 "No. 27. Procedure " } {TEXT 310 6 "cmulRS" }{TEXT 311 114 " computes Clifford product using \+ Rota-Stein cliffordization technique. It can accept now -K in place of the name.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4899 "cmulRS:=proc(a1,a 2,lname)\nlocal max_grade,L1,N1,L2,N2,genPS,fun1,fun2,srt,cup,pList1,P N1,\n pList2,PN2,pSgn1,pSgn2,a,i,j,m,n,res,pos1,pos2,F1,F2,coB,na meB,a12;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Ber tfried Fauser. All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\n#############################################\n###This is additional code for Maple 6 version:\n############################### ##############\nif hastype(\{a1,a2\},cliprod) then\n a12:=map(Cliplu s:-clieval,[a1,a2]);\n return Cliplus:-cliexpand(clibilinear(a12[1], a12[2],procname,lname))\nend if: \n################################### #######################################################\n### This proc edure computes Clifford product of any two cliscalars, clibasmons, cli mons, #\n### and clipolynoms in Clifford algebras Cl(lname) using Rota -Sten cliffordization #\n### Procedure cmulRS modified by Rafal \+ to accept -K, or -B for lname. #\n################# ###################################################################### ###\n if nargs<>3 then error \"exactly three arguments are needed\" e nd if:\n if has(0,map(simplify,[a1,a2])) then return 0 end if;\n if \+ a1 = `Id` then return a2 end if;\n if a2 = `Id` then return a1 end if ;\n ################\n ##### The following will allow for lname to b e -B, for example:\n if type(lname,\{name,symbol,array,matrix\}) then \n coB,nameB:=1,lname:\n elif type(lname,`&*`(numeric,\{name,symb ol,array,matrix\})) then\n coB:=op(select(type,\{op(lname)\},numer ic));\n nameB:=op(select(type,\{op(lname)\},name));\n else\n \+ error \"third argument is of unexpected type\"\n end if;\n ######### #######\n L1:=Clifford:-extract(a1,'integers');\n N1:=nops(L1);\n L 2:=Clifford:-extract(a2,'integers');\n N2:=nops(L2);\n if N1=1 then \+ \n return reorder(simplify(makeclibasmon([L1[1],op(L2)])\n +add( (-1)^(i-1)*coB*nameB[L1[1],L2[i]]*makeclibasmon(subs(L2[i]=NULL,L2)),i =1..N2)))\n end if;\n if N2=1 then \n return reorder(simplify(mak eclibasmon([op(L1),L2[1]])\n +add((-1)^(i-1)*coB*nameB[L1[-i],L2[1] ]*makeclibasmon(subs(L1[-i]=NULL,L1)),i=1..N1)))\n end if;\n#### genP S ; generate a power set of 1..N, option remember\n genPS:=proc(N)\n \+ local a,i,plst;\n option remember; \n a:=[seq(i,i=1..N)]:\n \+ plst:=[a]:\n for i in a do\n plst:=[op(subs(i=NULL,plst)),op (plst)]:\n end do:\n end proc:\n#### prepare combinatorics for L1: \n fun1:=proc(a1) a1 end proc:\n for i from 1 to N1 do\n fun1(i): =L1[i];\n end do:\n#### here is the old code for the poweset \n# a:= [seq(i,i=1..N1)]:\n# pList1:=[a]:\n# for i in a do\n# pList1 := [ op(subs(i = NULL,pList1)), op(pList1)]:\n# end do:\n####\npList1:=gen PS(N1); \n PN1:=nops(pList1)+1; ## added 1 here\n pList1:=sort(pLi st1,(a,b)->evalb(nops(a)<=nops(b)));\n pSgn1 :=[seq((-1)^(add(pList1[ i][m]-m,m=1..nops(pList1[i]))),i=1..PN1-1)];\n#### prepare combinatori cs for L2:\n fun2:=proc(a2) a2 end proc:\n for i from 1 to N2 do\n \+ fun2(i):=L2[i];\n end do:\n#### here is the old code for the powese t \n# a:=[seq(i,i=1..N2)]:\n# pList2:=[a]:\n# for i in a do\n# p List2 := [op(subs(i = NULL,pList2)), op(pList2)]:\n# end do:\n####\np List2:=genPS(N2);\n PN2:=nops(pList2)+1; ## added 1 here\n pList2:= sort(pList2,(a,b)->evalb(nops(a)<=nops(b)));\n pSgn2:=[seq((-1)^(add( pList2[i][m]-m,m=1..nops(pList2[i]))),i=1..PN2-1)];\n#### cup tangle o f the rota-stein sausage tangle\n cup:=proc(lst1,lst2,coB,nameB)\n \+ local i;\n if nops(lst1)<>nops(lst2) then return 0 end if;\n if lst1=[] then return 1 end if;\n if nops(lst1)=1 then return coB*na meB[lst1[1],lst2[1]] end if;\n add((-1)^(i-1)*coB*nameB[lst1[-1],ls t2[i]]*cup(lst1[1..-2],subs(lst2[i]=NULL,lst2),coB,nameB)\n \+ ,i=1..nops(lst2))\n end proc:\n######################################################### ########################## \n## Rota-Stein Tangle : cliffordization \+ #\n## compose only such ter ms which are potentially non zero in the cup(..) tangle #\n########### ###################################################################### ##\n max_grade:=nops(\{op(L1),op(L2)\}); ## <== new code\n res:=0: \n pos1:=0:\n for j from 0 to N1 do # for all j-vectors of pList1\n F1:=N1!/((N1-j)!*j!);\n pos2:=0:\n for i from 0 to min(N2,max_grad e-j) do # for all i-vectors of pList2\n \+ # which do not exceed max_grade (others are zero)\n F2:=N 2!/((N2-i)!*i!);\n for n from 1 to F1 do\n for m from 1 to F2 do \n res:=res+\n pSgn1[pos1+n]*pSgn2[pos2+m]*\n cup( map(fun1,pList1[PN1-pos1-n]),map(fun2,pList2[pos2+m]),coB,nameB)*\n \+ makeclibasmon([op(map(fun1,pList1[pos1+n])),op(map(fun2,pList2[P N2-pos2-m]))])\n end do:\n end do:\n pos2:=pos2+F2;\n e nd do:\n pos1:=pos1+F1;\n end do: \nreturn reorder(res); ## note t hat cmulRS INCLUDES already reorder !!\nend proc:\n" }}{PARA 0 "" 0 " " {TEXT 267 19 "No. 28. Procedure " }{TEXT 312 7 "cmulgen" }{TEXT 313 47 " is just a place holder for a Clifford product." }{TEXT -1 1 " \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 554 "cmulgen:=proc() global _defa ult_Clifford_product,_warnings_flag;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndes cription `Last revised: July 22, 2006`;\n############################# ################\nif _default_Clifford_product <> 'cmulgen' then\n r eturn _default_Clifford_product(args)\nelse \n if _warnings_flag the n\n WARNING(\"to assign Clifford product, execute 'useproduct' with \+ argument cmulRS, cmulNUM, or cmul_user_defined first\");\n end if; \n return 'cmulgen'(args);\n end if; \nend proc:\n" }}{PARA 0 "" 0 " " {TEXT 268 25 "No. 29. Wrapper function " }{TEXT 314 4 "cmul" }{TEXT 315 90 " for the Clifford product given by cmulNUM, cmulRS, or other p rocedure such as 'cmulgen'.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1375 " cmul:=proc() local lname;\noptions `Copyright (c) 1995-2006 by Rafal A blamowicz and Bertfried Fauser. All rights reserved.`;\ndescription `L ast revised: July 22, 2006`;\n######################################## #####\n if type(op(procname),procedure) then\n lname:=`B`;\n else \n lname:=op(procname);\n end if;\n if member(0,[args]) then ret urn 0 end if;\n if nargs <=1 then return args end if;\n if nargs = 2 then\n##########################################################\n### Speed-wise it makes no difference whether cmulgen or #\n### _default_ Clifford_product is used in the following. # ######################## ##################################\n return clicollect(clibilinear(ev al(args[1]),eval(args[2]),cmulgen,lname)); \n end if;\n###### <=== do NOT use 'procname' in the next line this will not work\n############# #############################################\n### Speed-wise it makes no difference whether cmulgen or #\n### _default_Clifford_product is \+ used in the following. # ############################################ ##############\nif not type(_default_Clifford_product,procedure) then \+ \n error \"global variable _default_Clifford_product must be assigne d a procedure so that 'cmul' could proceed beyond this point. Sorry. F or help see ?cmul.\" \nend if;\n return procname(clibilinear(eval( args[1]),eval(args[2]),cmulgen,lname),args[3..-1]); \nend proc :\n" }}{PARA 0 "" 0 "" {TEXT 270 29 "No. 30: Ampersand version of " } {TEXT 316 4 "cmul" }{TEXT 317 226 ". This version of `&c` correctly us es -K for index. When K has been assigned a matrix, use\n&c[''K''](e1, e2) and &c[''-K''](e1,e2). Otherwise, use &c[K](e1,e2), &c[-K](e1,e2), or &c(e1,e2). (Has been moved to Clifford:-setup).\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2301 "`&m`:=proc() local NP,ARGS,coB,nameB,lname,dec index,flagdec;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz a nd Bertfried Fauser. All rights reserved.`;\ndescription `Last revised : July 22, 2006`;\n#############################################\n#### ###################################\n### Works when &c[''K''] or &c['' -K''] is entered and K is a matrix\n################################## #####\nflagdec:=true:\nif type(op(procname),procedure) then\n if typ e([args],listlist) then\n if type(op(args),array) then\n \+ WARNING(\"enclose index in double quotes as in &c[''B''] or &c[''-B''] when B has been assigned a matrix to avoid the following:\");\n \+ return 'procname(args)';\n end if;\n else coB:=1:\n name B:=`B`:\n lname:=`B`:\n ARGS:=[args]:\n flagdec:=fal se:\n end if;\nelse lname:=op(procname);\n ARGS:=[args];\n i f type(lname,`&*`(numeric,name)) then\n coB:=op(select(type,\{ op(lname)\},numeric));\n nameB:=op(select(type,\{op(lname)\},n ame));\n else\n coB:=1:\n nameB:=lname:\n end if;\n flagdec:=false:\n end if;\n################################ #######\ndecindex:=proc() local ARGS,coB,nameB;global B;\nif type([arg s],listlist) then\n if type(op(args),function) then\n ARGS:=op( op(args));\n coB:=1:\n nameB:=eval(op(0,op(args)));\n i f type(nameB,`&*`(numeric,name)) then\n coB:=op(select(type,\{ op(nameB)\},numeric));\n nameB:=op(select(type,\{op(nameB)\},n ame));\n end if;\n elif type(op(args),`&*`(numeric,function)) \+ then\n nameB:=\{op(op(args))\}:\n coB:=op(select(type,nameB, numeric));\n nameB:=op(select(type,nameB,function));\n ARGS: =op(nameB);\n nameB:=op(0,nameB);\n else\n error \"unable \+ to determine index or wrong index, use name in double quotes as in &c[ ''B''] or &c[''-B'']\"\n end if;\nelif\n type([args],list) then\n ARGS:=args;\n coB:=1:\n nameB:=`B`; #default name \nelse\n er ror \"cannot determine arguments and/or index from arguments\"\n end i f;\nreturn coB,nameB,[ARGS];\nend proc:\n############################# ########\nif flagdec then \n coB,nameB,ARGS:=decindex(args);\n lna me:=coB*nameB;\nend if;\nNP:=nops(ARGS);\nif member(0,ARGS) then retur n 0 end if;\nif NP <=1 then return op(ARGS) end if;\nreturn cmul[eval( lname)](op(ARGS)); \nend proc:\n" }}{PARA 0 "" 0 "" {TEXT 271 18 "No. \+ 31. Procedure " }{TEXT 318 10 "useproduct" }{TEXT 319 80 " that allows user to select which procedure is used to compute Clifford product." }{TEXT 478 1 "\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1254 "useproduct:=p roc(name::\{symbol,name\})\nlocal wstr;\nglobal _default_Clifford_prod uct; #,cmulgen;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz \+ and Bertfried Fauser. All rights reserved.`;\ndescription `Last revise d: July 22, 2006`;\n#############################################\n### ################################################################\n###T his procedure uses global variable _default_Clifford_product #\n##### ############################################################## \nif no t member(name,\{cmulRS,cmulNUM,cmulgen,cmul_user_defined\}) then \n \+ WARNING(\"expecting one of the following Clifford products: cmulRS, c mulNUM, cmulgen, or cmul_user_defined\") \nend if;\nif member(name,\{c mul_user_defined\}) and not type(name,procedure) then\n WARNING(\"no computations with cmul can be peformed yet since cmul_user_defined ha s not been defined as procedure. Select cmulRS, cmulNUM, or a new proc edure as argument to useproduct.\");\n _default_Clifford_product:=na me;\nreturn NULL;\nend if;\n################################\n_default _Clifford_product:=name; #change value of _default_Clifford_product \n ################################\nwstr:=cat(\"cmul will use \",name,\" ; for help see pages ?cmul, ?Clifford:-intro, or ?\",name);\nWARNING(w str);\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 32. Procedure " }{TEXT 320 5 "cmulQ" }{TEXT -1 20 " and its infix form " }{TEXT 321 3 "&cQ" }{TEXT -1 514 " is a special version of 'cmul' and '&c'. \+ It gives the Clifford multiplication in the Clifford algebra of the qu adratic form Q related to the symmetric part g of B as Q(x) = g(x, x) \+ = B(x, x) where B = g + A (A is the alternating part of B). Like 'cmu l', it works now in all dimensions 1 through 9. Via the procedure 'rm ulm' described below in (32), this multiplication can also be applied \+ to matrices with entries in a Clifford algebra.\n\nThis procedure can \+ now accept an optional index which could be K or -K. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 78 "Proposed by Yvon S iret, Universite Joseph Fourier , Grenoble, France. Thanks!" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 158 "Typical us e: cmulQ(e1 + e2 + 2*Id, e3we4 + e6); or (e1 + e2) &cQ (2*e2we3 + e4); or &cQ(e1, e2, e3); \n cmulQ(e1we2+e2,e3+e4,e5 -Pi*Id); " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1420 "cmulQ:=proc() local ii,N,L,m,Sxy,symbxy,lname,coB,n ameB;global B:\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz a nd Bertfried Fauser. All rights reserved.`;\ndescription `Last revised : July 22, 2006`;\n#############################################\n#### ################################\nif type(op(procname),procedure) then \n lname:=`B`;\nelse\n lname:=op(procname);\nend if;\n########## ##########################\nif member(0,[args]) then return 0 end if; \n####################################\nSxy:=map(op,map(cliterms,\{arg s\}));\nSxy:=map(op,map(Clifford:-extract,Sxy,'integers'));\nsymbxy:=r emove(type,Sxy,posint);\nif symbxy <> \{\} then \n return cmul[lname ](args) \nend if;\nm:=max(op(Sxy),1);# 1 is needed when both x and y h ave maxindex=0\nif type(evalm(lname),matrix) then \n N:=linalg[coldi m](evalm(lname)):\n if m>N then \n error \"input contains index larger than size of bilinear form %1\",lname \n end if:\nend if:\n# ###############################\nif type(lname,\{name,symbol,array,mat rix\}) then\n L:=seq(lname[ii,ii],ii=1..m);\n return cmul[linalg[d iag](L)](args);\nelif \n type(lname,`&*`(numeric,\{name,symbol,array ,matrix\})) then\n coB:=op(select(type,\{op(lname)\},numeric));\n \+ nameB:=op(select(type,\{op(lname)\},\{name,symbol,array,matrix\}));\n \+ L:=seq(coB*nameB[ii,ii],ii=1..m);\n return cmul[linalg[diag](L)](a rgs); \nelse\n error \"index of unexpected type has been found in c mulQ\"\nend if;\nend proc:\n" }}{PARA 0 "" 0 "" {TEXT 272 29 "No. 33. \+ Ampersand version of " }{TEXT 322 5 "cmulQ" }{TEXT 323 222 ". This ver sion can accept index B and -B. When B has been defined as matrix, use \n&cQ[''B''](e1,e2) and &cQ[''-B''](e1,e2) . Otherwise, use &cQ[B](e1, e2), &cQ[-B](e1,e2) or &cQ(e1,e2). \n(Has been moved to Clifford:-setu p).\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 34. Procedure " }{TEXT 324 10 "scalarpart" }{TEXT -1 137 " computes the scalar part of the gi ven Clifford polynomial. For example, scalarpart(e1 + e2we3) = 0 but scalarpart(2*Id + e2we3) = 2. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }} {PARA 258 "" 0 "" {TEXT -1 46 "Typical use: scalarpart(2*Id + e1 + e1w e2); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 372 "scalarpart:=proc(a::\{ cliscalar,clibasmon,climon,clipolynom\}) local a1,p; \noptions `Copyri ght (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\n############ #################################\na1:=simplify(a):\nif type(a1,clisca lar) then return a1 end if;\np:=clicollect(a1):\nreturn coeff(p,Id);\n end proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 35. Procedure " } {TEXT 325 10 "vectorpart" }{TEXT -1 353 " computes the k-vector part o f the given Clifford polynomial u where k is a nonnegative integer. Fo r example, vectorpart(e1 + 3*e2we3, 2) = 3*e2we3. When k = 0 then the procedure returns the scalar part of u times 'Id', e.g., vectorpart(2 *Id + 3*e2we3, 0) = 2*Id. Note that vectorpart(2*Id + e1we2, 0) equal s 2*Id while scalarpart(2*Id + e1we2) = 2. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 47 "Typical use: vectorpart (e1 + e2we3 + e3, 1); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 593 "vecto rpart:=proc(a::\{cliscalar,clibasmon,climon,clipolynom\},a2::nonnegint ) \nlocal a1,p,K;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowic z and Bertfried Fauser. All rights reserved.`;\ndescription `Last revi sed: July 22, 2006`;\n#############################################\na 1:=expand(simplify(a)): #expand is needed\nif maxgrade(a1) < a2 then r eturn 0 end if;\n K:=proc() if maxgrade(args[1])=a2 then true else f alse end if end proc:\nif type(a1,`+`) then p:=select(K,a1) elif\n m axgrade(a1)<>a2 then p:=NULL else \n p:=a1 \nend if;\nif p=NULL then return 0 else return p end if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 36. Procedure " }{TEXT 326 4 "cexp" }{TEXT -1 236 " c omputes Clifford exponential of a Clifford number in Cl(B) up to the o rder specified by the second argument which is a nonnegative integer \+ n. It n = 0 then this procedure returns 'Id'. It can accept another ar gument such as B or -B. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 185 "Typical use: cexp(e1we2*t, 3);cexp(e1we2*t, \+ 3,K);\n cexp((e1 + e1we2)*t, 4); cexp((e1 + e1we2) *t, 4,-K); \n cexp(e1we2, 3); cexp(e1 + e1we2, 4,K );\n" }}{PARA 258 "> " 0 "" {MPLTEXT 1 0 1356 "cexp:=proc(p::\{numeric ,cliscalar,clibasmon,climon,clipolynom\},N::nonnegint) \nlocal pp,k,an s,ans1,ans2,lname,coB,nameB;\noptions `Copyright (c) 1995-2006 by Rafa l Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\n##################################### ########\nif nargs=2 then\n coB:=1:\n nameB:=`B`: \n lname:=` B`: \nelif nargs=3 then\n if type(args[3],\{name,symbol,matrix,arra y\}) then\n coB:=1:\n nameB:=args[3];\n lname:=args[ 3];\n elif type(args[3],`&*`(numeric,\{name,symbol,matrix,array\})) then\n coB:=op(select(type,\{op(args[3])\},numeric));\n n ameB:=op(remove(type,\{op(args[3])\},numeric));\n lname:=args[3] :\n else \n error \"wrong type of third argument in cexp. See ?cexp for more help.\" \n end if;\nelse\n error \"two or three a rguments expected in cexp. See ?cexp for more help.\"\nend if;\n###### ##########################\nk:='k':\nif type(p,\{numeric,cliscalar\}) \+ then return (add(p^k/k!,k=0..N)) end if;\nif evalb(vectorpart(p,0)=p) \+ then \n pp:=scalarpart(p);\n return ((add(pp^k/k!,k=0..N)*Id)) \ne nd if;\npp:=clisort(displayid(p)):\nif N=0 then return Id \n elif N= 1 then return Id+pp; \n else \n ans1:=cexp(pp,N-1,lname);\n \+ ans2:=cexp(pp,N-2,lname);\n ans:=ans1+cmul[lname](((ans1-ans 2)*(N-1)!),pp)/N!;\n return ans;\nend if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 37. Procedure " }{TEXT 327 5 "cexpQ" } {TEXT -1 257 " computes Clifford exponential of a Clifford number in C l(Q) up to the order specified by the second argument which is a nonn egative integer n. It n = 0 then this procedure returns 'Id'. This pr ocedure can also accept an optional argument such as B or -B." }} {PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 210 "Typi cal use: cexpQ(e1we2*t, 3); or cexpQ((e1 + 2*e1we2)*t, 4);\n \+ cexpQ(e1we2*t, 3,K); or cexpQ((e1 + 2*e1we2)*t, 4,K);\n \+ cexpQ(Id+2*e1we3,4); or cexpQ(e1 + 2*e1we2, 4,-K);\n " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1370 "cexpQ:=proc(p::\{numeric,clis calar,clibasmon,climon,clipolynom\},N::nonnegint) \nlocal pp,k,ans,ans 1,ans2,lname,coB,nameB;\noptions `Copyright (c) 1995-2006 by Rafal Abl amowicz and Bertfried Fauser. All rights reserved.`;\ndescription `Las t revised: July 22, 2006`;\n########################################## ###\nif nargs=2 then\n coB:=1:\n nameB:=`B`: \n lname:=`B`: \+ \nelif nargs=3 then\n if type(args[3],\{name,symbol,matrix,array\}) then\n coB:=1:\n nameB:=args[3];\n lname:=args[3]; \n elif type(args[3],`&*`(numeric,\{name,symbol,matrix,array\})) th en\n coB:=op(select(type,\{op(args[3])\},numeric));\n name B:=op(remove(type,\{op(args[3])\},numeric));\n lname:=args[3]:\n else \n error \"wrong type of third argument in cexpQ. See ? cexpQ for more help.\" \n end if;\nelse\n error \"two or three ar guments expected in cexpQ. See ?cexpQ for more help.\"\nend if;\n##### ###########################\nk:='k':\nif type(p,\{numeric,cliscalar\}) then return (add(p^k/k!,k=0..N)) end if;\nif evalb(vectorpart(p,0)=p) then \n pp:=scalarpart(p);\n return add(pp^k/k!,k=0..N)*Id \nend \+ if;\npp:=clisort(displayid(p)):\nif N=0 then return Id \n elif N=1 t hen return Id+pp; \n else \n ans1:=cexpQ(pp,N-1,lname);\n \+ ans2:=cexpQ(pp,N-2,lname);\n ans:=ans1+cmulQ[lname]((( ans1-ans2)*(N-1)!),pp)/N!;\n return ans;\nend if;\nend proc:\n " }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 38. Procedure " }{TEXT 328 4 "w exp" }{TEXT -1 168 " computes exterior exponential of a Clifford numbe r u up to the order specified by the second argument which is a nonne gative integer n. It returns 'Id' when n = 0. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 38 "Typical use: wexp(e1we2 + e3we4, 5); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 607 "wexp:= proc(p: :\{cliscalar,clibasmon,climon,clipolynom\},N::nonnegative) \nlocal pp, power,cu,i;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and \+ Bertfried Fauser. All rights reserved.`;\ndescription `Last revised: J uly 22, 2006`;\n#############################################\n if na rgs<>2 then error \"two parameters are needed in 'wexp'\" end if;\n p p:=expand(p);\n if N=0 then return 1 elif\n N=1 then return 1+cli sort(pp) end if;\n power:=pp;\n cu:=1+pp;\n for i from 2 to N do\n \+ power:=wedge(power,pp);\n cu:=cu + power/i!;\n end do;\n ret urn subs(Id=1,clicollect(clisort(cu)));\n end proc:\n" }}{PARA 258 " " 0 "" {TEXT -1 18 "No. 39. Procedure " }{TEXT 329 9 "reversion" } {TEXT -1 411 " calculates reversion in the Clifford algebra. It is lin ear in its argument and it is always a Clifford algebra anti-automorph ism. When the antisymmetric part of B is not zero, 'reversion' does n ot preserve the multilinear structure of the algebra because it mixes \+ grades, i.e., it does not preserve the gradation of the exterior algeb ra. This procedure can now take a third optional argument such as B o r -B." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 53 "Typical use: reversion(2*e1we2 + 4*Id - e3we4we5); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2636 "reversion:=proc(a1::\{cliscalar,clibasmon ,climon,clipolynom,matrix\}) \n local ind,expr,wtp,ptw,lname ,flagindexed;\n global _scalartypes,B;\noptions `Copyright ( c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights rese rved.`;\ndescription `Last revised: July 22, 2006`;\n################# ############################\nif hastype([args[1]],cliprod) then \n \+ error \"in order to handle 'type/cliprod', load in package Cliplus\" \+ \n end if;\n############################\nif type(a1,cliscalar) then r eturn a1 end if;\n############################\nif nargs=1 then\n l name:=`B`;\n flagindexed:=false:\nelif nargs=2 and type(args[2],\{s ymbol,name,array,matrix,`&*`(algebraic,name)\}) then\n lname:=args[ 2];\n flagindexed:=true:\nelse error \"only one or two arguments ar e expected\"\nend if;\n############################\n### Auxiliary fun ction that converts wedges to Clifford products: wedge ->> Clifford pr oduct\n############################\nwtp:=proc(a1,lname) local ind,i,a rg,rdmon,eq1,ans; global _scalartypes; \nif type(a1,\{`+`,`*`\}) the n return (map(wtp,a1,lname)) \n elif type(a1,_scalartypes) then retu rn a1\n elif type(a1,symbol) and SearchText(w,a1)=0 then return a1\n elif type(a1,symbol) and not member(length(a1),\{5,8,11,14,17,20,23 ,26\}) \n then return a1 \nend if;\nrdmon:=reorder(a1):\nind:=C lifford:-extract(a1,'integers'):\ni:='i':\narg:=[seq(cat(e,op(ind[i])) ,i=1..nops(ind))];\neq1:=cat(op(arg))=simplify(eval(cmul[lname](op(arg ))));\nif a1=rdmon then ans:=simplify(solve(eq1,a1)) \n els e ans:=-simplify(solve(-eq1,-rdmon)) \nend if;\nif nops(ind) < 4 th en return ans else return wtp(ans,lname) end if;\nend proc:\n######### ###################\n### Auxiliary function that converts Clifford pro ducts to wedge: Clifford products ->> wedge\n######################### ###\nptw:=proc(a1,lname) local i,arg,revarg; global _scalartypes; \nif type(a1,\{`+`,`*`\}) then return (map(ptw,a1,lname)) \n elif type(a 1,_scalartypes) then return a1 \n elif type(a1,symbol) and SearchTex t(e,a1)=0 then return a1 \n elif type(a1,symbol) and length(a1)=2 th en return a1 \n elif type(a1,symbol) and not member(length(a1),\{2,4 ,6,8,10,12,14,16,18\})\n then return a1 \n end if;\ni:='i':\nar g:=[seq(cat(e,substring(a1,2*i..2*i)),i=1..(length(a1)/2))];\nrevarg:= [seq(arg[nops(arg)-i],i=0..(nops(arg)-1))];\nreturn expand(eval(cmul[l name](op(revarg))))\nend proc:\n##############################\n### No w the actual function:\n##############################\nif type(a1,mat rix) then return map(reversion,a1,lname) end if;\nexpr:=ptw(expand(wtp (a1,lname)),lname);\nexpr:=expand(displayid(expr)):\nreturn clisort(ex pr)\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 40. Procedure \+ " }{TEXT 330 11 "conjugation" }{TEXT -1 317 " calculates conjugation i n the Clifford algebra. It is linear in its argument. Note that 'conj ugation' is defined as a composition of 'reversion' and 'gradeinv'. H ence, it does not preserve the multivector gradation when the antisymm etric part of B is non-zero. It can now accept optional argument such as B or -B." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 41 "Typical use: conjugation(e1 + 4*e2we3); " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 820 "conjugation:= proc(a1::algebraic) local lname;global B;\noptions `Copyright (c) 1995 -2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved.`; \ndescription `Last revised: July 22, 2006`;\n######################## #####################\nif nargs=1 then\n lname:=`B`;\nelif nargs=2 \+ and type(args[2],\n \{symbol,name,array,matrix,`&*`(numeric,\{symb ol,name,array,matrix\})\}) then\n lname:=args[2];\nelse error \"onl y one or two arguments are expected\"\nend if;\n###################### #####\nif type(a1,matrix) then return map(procname,a1,lname) elif\n \+ type(a1,cliscalar) then return a1 elif\n type(a1,\{clibasmon,climon, clipolynom\}) then\n return eval(gradeinv(reversion(a1,lname))) \nelse \n error \"wrong input type: input must be of type cliscalar, clibasmon, climon, clipolynom, or 'matrix'\" \nend if;\nend proc:" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 41. Procedure " }{TEXT 331 8 "c_conjug" }{TEXT -1 72 " calculates complex conjugate in a complexified Clifford algebra; thus, " }}{PARA 258 "" 0 "" {TEXT -1 80 " c_conjug(u) = c_c onjug(a + I*b) = a - I*b " }}{PARA 258 "" 0 "" {TEXT -1 140 "where \+ a and b are in the real Clifford algebra and `I` is the imaginary unit , i.e., I = sqrt(-1). This procedure is linear in its argument. " }} {PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 51 "Typic al use: c_conjug((1 + 2*I)*e1 - 3*I*e1we2); \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 694 "c_conjug:=proc(a1::algebraic) local ba,co,terms,t,i; \noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried F auser. All rights reserved.`;\ndescription `Last revised: July 22, 200 6`;\n#############################################\nif type(a1,matrix) then return map(procname,a1) elif\n type(a1,cliscalar) then return \+ conjugate(a1) elif\n type(a1,\{clibasmon,climon,clipolynom\}) then\n t:='t':\n ba:=cliterms(a1);\n co:=[coeffs(a1,ba, 't')];\n terms:=[t];i:='i':\n return clisort(add(conjuga te(co[i])*terms[i],i=1..nops(co)))\n else \nerror \"wrong input type : input must be of type cliscalar, clibasmon, climon, clipolynom, or ' matrix'\" \nend if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 42. Procedure " }{TEXT 332 6 "buildm" }{TEXT -1 863 " builds a matrix for the given element u of the Clifford algebra Cl(B) in the left- or right-regular representation, or under Lie or automorphism action wit h respect to an ordered basis specified by the user. The element p is entered as the first argument and the basis in the form of a list is \+ specified as the second argument, e.g., buildm(u, basis). It is also \+ possible to specify options 'left', 'right', 'Lie', 'auto', 'false, an d 'true'. For example, one can find the left-regular representation of the algebra on itself or, when Cl(B) is simple and isomorphic to a ri ng of real matrices, one can find matrices representing Clifford polyn omials in a real basis of a minimal ideal. However, there are new pro cedures below specifically designed for finding spinor representations of Clifford algebras in terms of real, complex, and quaternionic matr ices. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 270 "Typical use: \n\nbuildm(e1, [Id, e1, e2, e1we2]); buildm(e1, [ Id, e1, e2, e1we2], 'right'); buildm(e1, [Id, e1, e2, e1we2], 'Lie'); \nbuildm(e2, [Id, e1, e2, e1we2],'false'); buildm(e1we2+e2, [Id, e1, e 2, e1we2], 'true'); buildm(e1, [Id, e1, e2, e1we2], 'Lie','false'); \+ \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2964 "buildm:=proc(a1::\{cliscal ar,clibasmon,climon,clipolynom\},\n a2::list(\{cliscalar,c libasmon,climon,clipolynom\}))\nlocal A,L,N,a11,xm,i,j,Lbasis,neq,vars ,sys,sol,nontrivial,a33,flag;\noptions `Copyright (c) 1995-2006 by Raf al Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescriptio n `Last revised: July 22, 2006`;\n#################################### #########\nflag:=true:\nif nargs=2 then a33:='left' end if;\nif nargs= 3 then \n if member(args[3],\{'true','false'\}) then flag:=args[3]; \n a33:='left';\n elif m ember(args[3],\{'left','right','Lie','auto'\}) \n \+ then a33:=args[3]\n else error \"third optional ar gument must be 'left', 'right', 'Lie', 'auto', 'true', 'false'\"\n e nd if; \nend if;\nif nargs=4 then\n if member(args[3],\{'left','righ t','Lie','auto'\}) and member(args[4],\{'false','true'\}) then\n \+ a33:=args[3]; \n flag:=args[4];\n else \n error \"t hird optional argument must be 'left', 'right', 'Lie', 'auto', and the fourth optional argument must be 'false' or 'true'\"\n end if;\nend if;\nif nargs>4 then error \"too many arguments. See ?buildm for more help.\" end if;\n#################################################\ni f flag then \nA:=linalg[genmatrix](args[2],cbasis(maxindex(args[2]))); \nif linalg[rank](A) < nops(args[2]) then \n error \"elements of the list %1 are linearly dependent. Apply 'findbasis' to this list first. \",a2 \nend if;\nend if;\n###local procedure\nnontrivial:=proc(S::\{se t(\{relation,algebraic\}),list(\{relation,algebraic\})\}) \nlocal istr ivial;\nprintlevel:=2:\nistrivial:=proc(x) if type(x,relation) then ev alb(x) else evalb(x=0) end if end;\nremove(istrivial,S)\nend proc:\n## # \nL:=a2:N:=nops(L):xm:=array(1..N,1..N):\nif a33='left' then \n f or i from 1 to N do \n eq||i:=clicollect(expand(cmul(a1,L[i])-a dd(xm[j,i]*L[j],j=1..N))) \n end do;\nelif a33='right' then \n f or i from 1 to N do \n eq||i:=clicollect(expand (cmul(L[i],a1)-add(xm[j,i]*L[j],j=1..N)))\n end do;\nelif a33='Lie' then\n for i from 1 to N do\n eq||i:=clicollect(expand(cm ul(L[i],a1)-cmul(a1,L[i])-add(xm[j,i]*L[j],j=1..N)))\n end do;\nel if a33='auto' then\n a11:=cinv(a1):\n for i from 1 to N do \+ \n eq||i:=clicollect(expand(cmul(cmul(a1,L[i]),a1 1)-add(xm[j,i]*L[j],j=1..N)))\n end do;\nelse error \"third option al argument must be 'left', 'right', 'Lie', or 'auto'\"\nend if;\n#### ######################################################\nLbasis:=[op(`u nion` (seq(cliterms(L[i]),i=1..N)))];\nfor i from 1 to N do \n for \+ j from 1 to nops(Lbasis) do \n neq[i,j]:=coeff(eq||i,Lbasis[j]) =0 \nend do;\nend do;\nvars:=convert(evalm(xm),set):sys:=map(op,\{entr ies(neq)\});\nsys:=nontrivial(sys): #eliminate trivial equations\nsol: =solve(sys,vars);\nif sol=NULL then \n error \"no matrix represents \+ %1 in the basis %2 under the %3 action\",a1,a2,a33; \nend if;\nassign( sol);\nreturn evalm(xm);\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 43. Procedure " }{TEXT 333 9 "findbasis" }{TEXT -1 680 " finds a basis in a linear vector space spanned by a set of Clifford polynom ials entered as a list. The procedure is used, for example, when fin ding a basis for a spinor space S considered as a minimal left or righ t ideal in Cl(B) generated by a primitive idempotent f. To speed up co mputations, it is advisable to a standard Clifford basis for Cl(B) in \+ the form of a list of basis monomials as the second argument. If only one list is specified, 'findbasis' determines a suitable Clifford bas is itself but it takes twice as much time then since it creates a Clif ford basis by using 'cbasis(maxindex)' where 'maxindex' is the maximum index found among the elements of the list." }}{PARA 258 "" 0 "" {TEXT -1 69 "\nTypical use: findbasis([2*e1+e2,e2+e1we2,e1we2],[Id,e1, e2,e1we2]);\n " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1474 "findbasis:=proc (a1,a2) local L,clibasis,M,i,m,r,v,S; \nglobal _prolevel;\noptions `Co pyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All ri ghts reserved.`;\ndescription `Last revised: July 22, 2006`;\n######## #####################################\nif evalb(_prolevel=false) then \n if nargs=1 and not (type(a1,list(\{clibasmon,climon,clipolynom\}) ) or \n type(a1,set(\{clibasmon,climon,clipolyno m\}))) then\nerror \"argument of type list/set(\{clibasmon,climon, or \+ clipolynom\}) was expected\"\n elif nargs=2 and \n not ((type(a 1,list(\{clibasmon,climon,clipolynom\})) or \n type(a1, set (\{clibasmon,climon,clipolynom\}))) and \n (type(a2,list(cli basmon)) or type(a2,set(clibasmon)))) or nargs>2 then\nerror \"argumen ts of type list/set(\{clibasmon,climon,clipolynom\}) and list/set(clib asmon) were expected\" \nend if;\nend if;\nif nops(a1)=1 then return a 1 end if;\n#L:=sort(map(displayid,convert(a1,list)),bygrade):\nL:=map( displayid,convert(a1,list)): ####NO SORT\nif nargs=2 then clibasis:=so rt(convert(a2,list),bygrade) else \n clibasis:=sort(convert(`union`( op(map(cliterms,L))),list),bygrade);\nend if;\nM:=linalg[genmatrix](L, clibasis);\nr:=linalg[rank](M):m:=linalg[rowdim](M):\nfor i from 1 to \+ m do v[i]:=linalg[row](M,i) end do;\nS:=[v[1]]:\nfor i from 2 to m whi le nops(S) < r do \n if linalg[rank](linalg[stackmatrix](op(S),v[i] ))=nops(S)+1 \n then S:=[op(S),v[i]] \n end if\nend do;\nretu rn [seq(L[i],i=map(op,S))]\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 44. Procedure " }{TEXT 334 12 "minimalideal" }{TEXT -1 143 " c alculates a real basis for a left S=Cl(B)f or right S=fCl(B) minimal i deal in the algebra Cl(B) where f is a primitive idempotent in Cl(B). " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 151 "The first argument of the procedure is an ordered list of basis monom ials sorted bygrade, e.g., a Clifford basis generated by the procedure 'cbasis'. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 198 "Note: to sort a list L by grade one may use sort(L, byg rade) where 'bygrade' is a new procedure in this package described be low. The output from the procedure 'cbasis' is already sorted that wa y." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 392 "The second argument is the idempotent f. If the idempotent f is \+ the same as the one stored under clidata()[4] then 'minimalideal' us es the generators of S stored under clidata()[5] to generate the real \+ basis and it returns the stored list clidata()[5] as the second list in its ouput. If f does not equal clidata()[4] then complete comput ations are performed but they may take longer. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 129 "It is assumed that the numerical values of B have been specified.\n\nThe procedure returns a list consisting of two ordered lists: " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 91 "(1) the first list contains the real basis of S written as expanded Clifford polynomials; " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 106 "(2) the se cond list contains basis monomials from the standard basis in Cl(B) wh ich generate the " }}{PARA 258 "" 0 "" {TEXT -1 108 " fir st list by multiplying f on the left or on the right depending whether S=Cl(B)f or S=fCl(B). " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT 257 260 "There is a one-to-one correspodence bet ween the two ordered lists.\n\nTypical use: minimalideal([Id,e1,e2,e3, e1we2,e1we3,e2we3,e1we2we3],(1/2)*(Id+e3),'left');\n \+ minimalideal([Id,e1,e2,e3,e1we2,e1we3,e2we3,e1we2we3],(1/2)*(Id+ e3),'right');\n" }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 2243 "minimalideal:=proc(a1,a2,a3) \nlocal L,gens,m,flag1,f,flag_left, data,SB,g,SBgens,pq,p,q,l,ni,realdim,dimoverK,cb,N,bel; \nglobal B,_sh ortcut_in_minimalideal,_prolevel;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved.`;\ndescri ption `Last revised: July 22, 2006`;\n################################ #############\nif not type(B,diagmatrix) then \n error \"bilinear fo rm B has not been assigned a matrix or is not diagonal\" \nend if; \ni f not _prolevel then\n if not type(a1,list(\{clibasmon,climon,clipol ynom\})) then\n error \"first argument must of type list(\{cl ibasmon,climon,clipolynom\})\" \n elif not type(a2,'primitiveidem p') then \n error \"second argument must be a primitive \+ idempotent\" \n elif not member(a3,\{'left','right',\"left\" ,\"right\"\}) then\n error \"third argument must be 'left', or 'right'\" \n end if;\n end if;\nf:=displayid(eval(a2)):\ni f member(a3,\{'left',\"left\"\}) then flag_left:=true else flag_left:= false end if;\ng:='g':\nL:=sort(a1,bygrade):\nif _shortcut_in_minimali deal then\n m:=maxindex(L):\n flag1:=evalb(L=cbasis(m)): \n if \+ flag1 then\n data:=clidata():\n if eval(eval(data[4]))=eval( f) or eval(eval(data[4]))=gradeinv(f) then\n SBgens:=data[5]: \n if flag_left then SB:=[seq(cmulQ(g,f),g=SBgens)] else \n \+ SB:=[seq(cmulQ(f,g),g=SBgens)] \n end if;\n return [SB,SBgens,a3];\n end if;\n end if;\nend \+ if; \n#If can't use the shortcut, perform necessary computations.\npq :=Bsignature():\np:=pq[1]:q:=pq[2]:\nl:=floor((p+q)/2);ni:=2^(l-1);\ni f member((p-q) mod 8,\{0,1,2\}) then \n realdim:=2*ni; \n di moverK:=2*ni; \nelif member((p-q) mod 8,\{3,7\}) then \n realdim: =4*ni; \n dimoverK:=2*ni; \nelse\n realdim:=4*ni; \n di moverK:=ni \nend if;\ngens:=clidata()[5]: #put elements from clidata() [5] first in L\nL:=remove(member,L,gens):\nL:=[op(gens),op(L)]:\nSB:=[ f]:SBgens:=[Id]:cb:=remove(member,L,[Id]); \nfor g in cb while nops(SB ) < realdim do\n N:=nops(SB):\n if flag_left then bel:=cmulQ(g,f ) else bel:=cmulQ(f,g) end if; \n SB:=findbasis([op(SB),bel]); \n \+ if nops(SB)>N then SBgens:=[op(SBgens),g] end if;\nend do:\nreturn \+ [SB,SBgens,a3];\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 19 "No. 48. Procedure " }{TEXT 335 6 "Kfield" }{TEXT -1 340 " computes a basis f or a field K. The field K is the field of the spinor space S = Cl(B)f or S = fCl(B) of the given Clifford algebra Cl(B). It is isomorphic \+ to the reals, or to the complexes, or to the quaternions according to whether (p-q) mod 8 is 0, 1, 2, or 3, 7, or 4, 5, 6, respectiv ely (here [p,q] is the signature of B). " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 205 "Assuming that the bilinear f orm B has been defined, the first argument of the procedure is expecte d to be the same as the output from the procedure 'minimalideal'. The second argument is the idempotent f." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 225 "The procedure eliminates from the list of basis elements in the real ideal space nilpotent elements and leaves only those whose square modulo f is either +1 or -1. It retur ns those elements as the first list in its output. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 200 "If the primitive \+ idempotent f is the same as the one stored under clidata()[4] and if \+ the generators of the real basis in the minimal ideal S match those st ored under clidata()[5], then the procedure" }}{PARA 258 "" 0 "" {TEXT -1 99 "uses generators of K stored under clidata()[6] and retur ns them as the second list in its ouput. " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 178 "Thus, the second list in the output contains generators (Clifford basis monomials) of the elements in the first list. Elements of the two lists are in one-to-one relat ionship. " }}{PARA 258 "" 0 "" {TEXT -1 204 "\nTypical use: dim:=2:B: =linalg[diag](1,-1):clibasis:=cbasis(dim):data:=clidata(B):f:=data[4]: \n sbasis:=minimalideal(clibasis,f,'left'); \n Kfield(sbasis,f);\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 4629 "Kfield:=proc(a1::list(\{list,string,symbol\}),a2::c lipolynom) \nlocal SB,gens,f,ff,k,n,fg,f_from_data,field,flag3,side,ex pr,i,ijk,g,dimen,Kbasis,Kgens,Kdim,data,T4: \nglobal B,_shortcut_in_Kf ield,_prolevel;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz \+ and Bertfried Fauser. All rights reserved.`;\ndescription `Last revise d: July 22, 2006`;\n#############################################\n### # Local procedure needed only in 'Kfield' ###\nT4:=proc() \nlocal gens ,Kbasis,f,mi,clibas,clibas2,x,y,z; global B;\nKbasis:=args[1];f:=Kbasi s[1];mi:=max(op(map(maxindex,Kbasis)));\nclibas:=subsop(1=NULL,cbasis( mi));\nif type(B,matrix) then gens:=subsop(1=NULL,clidata()[6]);\n \+ clibas:=remove(member,clibas,gens):\n \+ clibas:=[op(gens),op(clibas)];\nend if;\nclibas2:=[]:\nfor x in c libas do \n if evalb(cmul(x,x) = -Id) then clibas2:=[op(clibas2),x] end if; \nend do:\nfor x in clibas2 do \nfor y in remove(member,cliba s2,[x]) do\nfor z in remove(member,clibas2,[x,y]) do\n if member( cmul(x,f),\{Kbasis[2],-Kbasis[2]\}) then \n if member(cmul(y,f ),\{Kbasis[3],-Kbasis[3]\}) then\n if member(cmul(z,f),\{Kb asis[4],-Kbasis[4]\}) then \n if type([x,y,z],'purequatb asis') then return [x,y,z]\n end if;\n end if;\n end if;\n end if; \nend do;\nend do;\nend do;\nend proc:\n############################## ################\nif not _prolevel then\n if not type(a2,'primitivei demp') then \n error \"second argument must be a primitive idempo tent\"\n end if;\nend if;\n######################################### #####\nSB:=a1[1]:gens:=a1[2]:side:=a1[3]:f:=eval(a2):i:='i':g:='g':\n# #############################################\nif not member(f,SB) the n \n error \"idempotent entered %1 is not a member of the first list \",f \nend if;\n###new line here instead of >>>not assigned(B)<<<\nif \+ not type(B,matrix) then \n error \"matrix must be assigned to B\" \n end if;\nif side='right' then flag3:=true else flag3:=false end if;\nd ata:=clidata():\nfield:=data[1]:\nif field = 'real' then return [[f],[ Id]] \nelif field = 'complex' then \n if _shortcut_in_Kfield t hen\n f_from_data:=eval(eval(data[4])):\n fg:=grad einv(f): \n if member(f_from_data,\{f,-f,fg,-fg\}) and gens =data[5] then \+ Kgens:=data[6];\nif flag3 then Kbasis:=[f,seq(cmul(Kgens[i],f),i=2. .nops(Kgens))]\n else Kbasis:=[f,seq(cmul(f,Kgens[i]),i=2..nop s(Kgens))] \nend if;\nreturn ([Kbasis,Kgens]) \nend if;\nend if;\n#### #############################################################\n#Do thi s when shortcut can't be used when field = 'complex'\n################ #################################################\nKdim:=2:\nKbasis:=[ f]:Kgens:=[Id]:\nn:=nops(gens):\nfor i from 1 to n while nops(Kbasis) \+ < Kdim do\n if cmul(gens[i],gens[i])=-Id then\n expr:=cmu l(f,gens[i],f);\n if expr<>0 then Kbasis:=[op(Kbasis),SB[i]]; \n Kgens:=[op(Kgens),gens[i]] \n e nd if;\n end if:\nend do;\nreturn [Kbasis,Kgens];\n################ ###############################################\nelif field = 'quatern ionic' then \n dimen:=linalg[coldim](B):\n if dimen=2 then Kba sis:=[op(SB)];\n Kgens:=[op(gens)];\n \+ return [Kbasis,Kgens]\n elif member(dimen,\{3,4,5,6,7,8,9 \}) then\n if _shortcut_in_Kfield then\n f_from_ data:=eval(eval(data[4])):\n fg:=gradeinv(f): \n \+ if member(f_from_data,\{f,-f,fg,-fg\}) and gens=data[5] then \+ Kgens:=data[6] ;\nif flag3 then Kbasis:=[f,seq(cmul(Kgens[i],f),i=2..nops(Kgens))]\n \+ else \n Kbasis:=[f,seq(cmul(f,Kgens[ i]),i=2..nops(Kgens))] \nend if;\nreturn [Kbasis,Kgens] \nend if;\nend if;\nend if;\n####################################################### #########\n#Do this when shortcut can't be used and field = 'quaternio nic'\n################################################################ \nKdim:=4:\nKbasis:=[f]:Kgens:=[Id]:\nn:=nops(gens):\nfor i from 1 to \+ n while nops(Kbasis) < Kdim do\n if cmul(gens[i],gens[i])=-Id then \n expr:=cmul(f,gens[i],f);\n if expr<>0 then Kbasis :=[op(Kbasis),SB[i]];\n Kgens:=[op(Kgens),ge ns[i]] \n end if;\n end if:\nend do;\n################### #########\n ijk:=T4(Kbasis);\n############################\n K gens:=[Id,op(ijk)]:\nif flag3 then Kbasis:=[f,seq(cmul(g,f),g=ijk)] el se \n Kbasis:=[f,seq(cmul(f,g),g=ijk)]\nend if;\nreturn [ Kbasis,Kgens]\nelse error \"wrong name of the field. See ?Kfield for m ore help.\" \nend if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 " No. 46. Procedure " }{TEXT 336 12 "spinorKbasis" }{TEXT -1 263 " finds a spinor basis for S=Cl(B)f or S=fCl(B) over a field K where K is iso morphic to the reals, or to the complexes, or to the quaternions acco rding to whether (p-q) mod 8 is 0, 1, 2, or 3, 7, or 4, 5, 6, res pectively (here [p,q] is the signature of B). " }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 276 "The first argument is \+ an ordered list SBgens containing generators of a real basis in a mini mal ideal Cl(B)f or fCl(B) (it doesn't matter whether the ideal was le ft or right). These generators are found by the procedure 'minimalide al' and are returned by it as a second list." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 104 "The second argument is the primitive idempotent f used to generate the minimal ideal Cl(B) f or fCl(B)." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 150 "The third argument is a list FBgens of generators that g enerate the field K; these generators are returned as a second list by the procedure 'Kfield'." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 143 "The fourth argument is either 'left' or 'rig ht' depending whether we deal with the left minimal ideal Cl(B)f or th e right minimal ideal Cl(B)f." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }} {PARA 258 "" 0 "" {TEXT -1 434 "If the first three arguments in the in put match respectively clidata()[5], clidata()[4], and clidata()[6] \+ in that order, i.e., SBgens=clidata()[5], f=clidata()[4], and FBgens =clidata()[6], then the procedure finds previously computed generators of S over K which are stored as clidata()[7]. These generators are t hen used to compute the K-basis for S=Cl(B)f or S=fCl(B) depending whe ther the fourth argument is 'left' or 'right'." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 47 "The procedure returns a list of three elements:" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 163 "(1) the first list is an ordered list of Cli fford polynomials which give a basis in Cl(B)f or fCl(B) (depending o n what was the fourth argument in the procedure);" }}{PARA 258 "" 0 " " {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 178 "(2) the second list \+ is an ordered list of generators over f which give the elements in the first list. There is a one-to-one correspodence between the elements of the two lists." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 254 "(3) the third element in the output is either 'left ' or 'right' and it matches the fourth argument in the input to the pr ocedure. That element is to remind the user that the basis returned a s the first list is for the left or right ideal respectively. " }} {PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 334 "Typi cal use: dim:=2:B:=linalg[diag](1,-1):clibasis:=cbasis(dim):data:=clid ata(B):f:=data[4]:\n sbasis:=minimalideal(clib asis,f,'left');\n fbasis:=Kfield(sbasis,f);\n \+ SBgens:=sbasis[2];FBgens:=fbasis[2];\n \+ spinorKbasis(SBgens,f,FBgens,'left')\n" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 2861 "spinorKbasis:=\nproc(a1::list,a2::\{clibasmo n,climon,clipolynom\},a3::list,a4::\{string,symbol\}) \nlocal flag,fla g_left,Kdim,f,SBgens,SB,FBgens,g,SBKbasis,SBKgens,data,i,poss,m,p; \ng lobal B,_shortcut_in_spinorKbasis,_prolevel;\noptions `Copyright (c) 1 995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights reserved .`;\ndescription `Last revised: July 22, 2006`;\n##################### ########################\nif not type(B,matrix) then \n error \"matr ix must be assigned to B\" \nend if;\nif not _prolevel then\n if not type(a2,'idempotent') then \n error \"second argument must be an idempotent\" elif\n not member(a4,\{'left','right',\"left\",\"right \"\}) then \n error \"the fourth argument must be 'left', or 'rig ht'\"\n end if;\nend if;\nSBgens:=a1:f:=eval(a2):FBgens:=a3:\nif SBg ens=FBgens then return [[f],[Id],a4] end if;\nif a4='left' or a4=\"lef t\" then flag_left:=true else flag_left:=false end if;\ndata:=clidata( ):\nif _shortcut_in_spinorKbasis then\n if eval(f)=eval(data[4]) \+ and SBgens=data[5] and FBgens=data[6] then\n SBKgens:=data[7];\n \+ SBKbasis:=[]:\n g:='g':\n if flag_left then SBKbasis:=[ seq(cmulQ(g,f),g=SBKgens)]\n else SBKbasis:=[seq(cmu lQ(f,g),g=SBKgens)]\n end if; \n return [SBKbasis,SBKgens ,a4];\n end if;\nend if; \nKdim:=nops(FBgens):SB:=[]:\ng:='g':\nif \+ flag_left then SB:=[seq(cmulQ(g,f),g=SBgens)] \n else SB:= [seq(cmulQ(f,g),g=SBgens)]\nend if;\nif Kdim=1 then return [SB,SBgens, a4] end if;\nm:=max(op(map(maxindex,SBgens)));\nposs:=cbasis(m);\nSBKg ens:=[Id]:\ng:='g':\nif flag_left then SB:=remove(member,SB,[seq(cmul( f,g),g=FBgens)])\n else SB:=remove(member,SB,[seq(cmul(g,f ),g=FBgens)])\nend if;\nposs:=remove(member,poss,FBgens);\nfor g in po ss while nops(SB)>0 do\n if flag_left then \n for i from 1 to Kdim do p[i]:=cmul(g,f,FBgens[i]) end do;\n else \n for i fr om 1 to Kdim do p[i]:=cmul(FBgens[i],f,g) end do;\n end if; \n \+ for i from 1 to Kdim do\n flag[1,i]:=member(p[i],SB): \n \+ flag[2,i]:=member(-p[i],SB):\n end do;\n if Kdim=2 then \+ \n if (flag[1,1] or flag[2,1]) and (flag[1,2] or flag[2,2]) th en\n SB:=remove(member,SB,[p[1],-p[1],p[2],-p[2]]):\n \+ SBKgens:=[op(SBKgens),g]\n end if:\n else\n if (flag[1 ,1] or flag[2,1]) and \n (flag[1,2] or flag[2,2]) and\n \+ (flag[1,3] or flag[2,3]) and\n (flag[1,4] or flag[2,4])\n \+ then\n SB:=remove(member,SB,[p[1],-p[1],p[2],-p[2],p[3],-p[ 3],p[4],-p[4]]):\n SBKgens:=[op(SBKgens),g]\n end if:\n \+ end if;\n if flag[1,1] then SBKbasis:=[op(SBKbasis),p[1]] else\n \+ SBKbasis:=[op(SBKbasis),-p[1]] \n end if;\n \+ end do;\ng:='g':\nif flag_left then SBKbasis:=[seq(cmul(g,f),g=SBKgen s)] else\n SBKbasis:=[seq(cmul(f,g),g=SBKgens)]\nend \+ if;\nreturn [SBKbasis,SBKgens,a4]\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 47. Procedure " }{TEXT 337 10 "squaremodf" }{TEXT -1 390 " computes the square of a basis element u in a left or right mini mal ideal Cl(B)f or fCl(B) entered as the first argument modulo a pri mitive idempotent f entered as the second argument. The procedure do esn't check whether f is primitive or not. Thus, the procedure return s 1 or -1 depending whether cmul(u,u) = f or cmul(u,u) = -f. The pro cedure returns 0 if u is a nilpotent element." }}{PARA 258 "" 0 "" {TEXT -1 115 "\nThis procedure is needed to identify/verify squares of the basis elements in the field K of the spinor ideal S. \n" }} {PARA 258 "" 0 "" {TEXT -1 54 "Typical use: squaremodf((1/2)*(Id+e1),( 1/2)*(Id+e1);\n " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 780 "squaremodf:=pr oc(a1::\{clibasmon,climon,clipolynom\},a2::idempotent) \nlocal p;globa l B;\noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfri ed Fauser. All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\n#############################################\nif nargs<>2 th en \n error \"two arguments needed of type clibasmon, or climon, or \+ clipolynom, and 'idempotent'\" \nend if;\nif a1=a2 then return 1 elif \n not type(B,matrix) then error \"matrix must be assigned to B\" \n end if;\np:=cmul(a1,a1):\nif expand(p-a2)=0 then return 1 elif\n exp and(p+a2)=0 then return -1 elif\n (p=0 or type(a1,nilpotent)) then r eturn 0 else \n error \"either element %1 is not a basis elem ent or it does not belong to the spinor space Cl(Q)f (or fCl(Q))\",a1 \+ \nend if;\nend proc:\n" }}{PARA 258 "" 0 "" {TEXT -1 18 "No. 48. Proc edure " }{TEXT 338 8 "RHnumber" }{TEXT -1 76 " gives the Radon-Hurwitz number for any integer.\n\nTypical use: RHnumber(2);\n" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 501 "RHnumber:=proc(a1::integer)\noptions `Copyrig ht (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. All rights \+ reserved.`;\ndescription `Last revised: July 22, 2006`;\n############# ################################\nif member(a1,\{0,1,2\}) then return \+ a1 elif\n a1=3 then return 2 elif\n member(a1,\{4,5,6,7\}) then re turn 3 elif\n a1>=8 then return RHnumber(a1-8)+4 elif\n a1<0 then \+ return RHnumber(a1+8)-4 else\n error \"wrong value of the argument. \+ See ?RHnumber for more help.\" \nend if;\nend proc:\n" }}{PARA 258 " " 0 "" {TEXT -1 19 "No. 49. Procedure " }{TEXT 339 7 "clidata" } {TEXT -1 304 " returns a list containing basic information about the o rthogonal Clifford algebra Cl(Q) of the given bilinear form B (assumed to have been diagonalized). The procedure must be called with B, or \+ with a signature of B given as a list [p,q], or simply as clidata() (c urrently defined B will then be used)." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 47 "It returns a list with the foll owing elements:" }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 " " {TEXT -1 187 "(a) the first entry is the string 'real', 'complex', \+ or 'quaternionic' depending whether the spinor representation of Cl(Q) is over the field K of the reals, complexes, or quaternions;\n" }} {PARA 258 "" 0 "" {TEXT -1 305 "(b) the second entry is the dimension \+ of the spinor representation over the field K;\n\n(c) the third entry \+ is 'simple' or 'semisimple' depending on the structure of the algebra; \n\n(d) the fourth entry is a primitive idempotent f which may be us ed to generate a left or right minimal ideal in the algebra." }} {PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 574 "NOTE : the idempotents are stored here in an unevaluated form so that they \+ could be easily recognized as Clifford products of simpler projection \+ operators. The number of factors in these products is determined by \+ the value of q - RHnumber(q-p).\n\n(e) the fifth entry is a list of b asis monomials ordered by grade which generate Cl(Q)f and fCl(Q).\n\n( f) the sixth entry is a list of basis monomials ordered by grade which give a basis for K (this is in terms of these monomials that matrices representing Clifford polynomials will be written by the procedure 's pinorKrepr').\n" }}{PARA 258 "" 0 "" {TEXT -1 92 "(g) the seventh entr y is a list of basis monomials ordered by grade which generate S over \+ K." }}{PARA 258 "" 0 "" {TEXT -1 139 "\nIf the procedure is called as \+ 'clidata()' then it returns information about the Clifford algebra of \+ the currently defined bilinear form B." }}{PARA 258 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 81 "Typical use: clidata(); clidata( [2,3]); clidata(B);clidata(linalg[diag](1,1,1));\n" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 470 "clidata:=proc() local a1,clidata2;global B;\noptio ns `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried Fauser. \+ All rights reserved.`;\ndescription `Last revised: July 22, 2006`;\n## ###########################################\nif nargs=0 then a1:=`B` e lse a1:=args end if:\nif not type(a1,\{list(nonnegint),matrix\}) then \n WARNING(\"to find out about Clifford algebra Cl_\{p,q\} try clida ta([p,q]) or enter ?clidata for more help\");\n return ('procname(ar gs)')\nend if;\n" }}{PARA 258 "" 0 "" {TEXT -1 76 "This is a data file that is read in when needed by the procedure 'clidata'.\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "clidata2" }{TEXT -1 0 "" }{MPLTEXT 1 0 16597 ":=proc(a1::\{list(nonnegint),matrix\})\nlocal SBgens,FBgens,SBK gens,p,q,l,ni,K,dimoverK,dimoverR,numfact,struct,primidemp;\nglobal B; \noptions `Copyright (c) 1995-2006 by Rafal Ablamowicz and Bertfried F auser. All rights reserved.`,remember;\ndescription `Last revised: Jul y 22, 2006`;\n#############################################\n#K = fiel d of spinor repesentation, it is R, C, or H depending on [p,q]\n#dimov erK = dimension of spinor representation over the field K\n#dimoverR = dimension of spinor representation over the reals R\n#numfact = numbe r of idempotent factors in any primitive idempotent\n#SBgens = basis m onomials generating Cl(Q)f and fCl(Q) over R\n#FBgens = basis monomial s providing a basis for K\n#SBKgens = basis monomials generating Cl(Q) f and fCl(Q) over K \n#p = number of +1 in the diagonal form Q of B\n# q = number of -1 in the diagonal form Q of B\n#struct = structure of C l(Q) is 'simple' or 'semisimple'\n#primidemp = primitive idempotent f \+ to generate Cl(B)f or fCl(B)\nif nargs=0 then\n###new line instead of \+ >>>not assigned(B)<<<\nif not type(B,matrix) then \n error \"matrix \+ must be assigned to B\" else\n return clidata(B)\nend if;\nend if ; \nif type(args[1],list(nonnegint)) then p:=args[1][1]:q:=args[1][2]: \n elif type(args[1],matrix) then \n p:=Bsignature(args)[1]; q:=Bsignature(args)[2] \n else \n error \"wrong argument typ es in 'clidata'\" \n end if;\nif type(args[1],list(nonnegint)) and ( p>9 or q>9) then\n error \"p and q must satisfy 0 <= p,q <= 9\" \nen d if;\nl:=floor((p+q)/2);ni:=2^(l-1);\nif member((p-q) mod 8,\{0,1,2\} ) then \n K:='real'; dimoverR:=2*ni; dimoverK:=2*ni; \nelif membe r((p-q) mod 8,\{3,7\}) then \n K:='complex'; dimoverR:=2*2*ni; di moverK:=2*ni; else\n K:='quaternionic'; dimoverR:=4*ni; dimoverK: =ni \nend if;\nnumfact:=q-RHnumber(q-p);\nif modp((p-q) = 1,4) then st ruct:='semisimple' \n else struct:='simple' \nend if;\nprimidemp:=ta ble():SBgens:=table():FBgens:=table():SBKgens:=table():\n############# ############>>>DATA<<<#################################\n#Real, simple (13 cases)\nprimidemp[[0,0]]:=Id; #real numbers\nSBgens[[0,0]]:=[Id] ;\nFBgens[[0,0]]:=[Id];\nSBKgens[[0,0]]:=SBgens[[0,0]];\n\nprimidemp[[ 1,1]]:=(1/2)*(Id+e1we2);\nSBgens[[1,1]]:=[Id,e1];\nFBgens[[1,1]]:=[Id] ;\nSBKgens[[1,1]]:=SBgens[[1,1]];\n\nprimidemp[[2,0]]:=(1/2)*(Id+e1); \nSBgens[[2,0]]:=[Id,e2];\nFBgens[[2,0]]:=[Id];\nSBKgens[[2,0]]:=SBgen s[[2,0]];\n\nprimidemp[[2,2]]:=\n''cmulQ''((1/2)*(Id+e1we3),(1/2)*(Id+ e2we4));\nSBgens[[2,2]]:=[Id,e1,e2,e1we2];\nFBgens[[2,2]]:=[Id];\nSBKg ens[[2,2]]:=SBgens[[2,2]];\n\nprimidemp[[3,1]]:=\n''cmulQ''((1/2)*(Id+ e1),(1/2)*(Id+e3we4));\nSBgens[[3,1]]:=[Id,e2,e3,e2we3];\nFBgens[[3,1] ]:=[Id];\nSBKgens[[3,1]]:=SBgens[[3,1]];\n\nprimidemp[[0,6]]:=\n''cmul Q''((1/2)*(Id+e1we2we3),(1/2)*(Id+e3we4w