{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 "" -1 256 "fixed" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 1 14 0 0 0 0 0 2 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "fixed" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "Times" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "fixed" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {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 6 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 2 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{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 "Maple Output" -1 12 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "List It em" -1 14 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 3 3 1 0 1 0 2 2 14 5 }{PSTYLE "Title" -1 18 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 }3 1 0 0 12 12 1 0 1 0 2 2 19 1 }{PSTYLE "Author" -1 19 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 8 8 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 3 "Bug" }{TEXT 258 0 "" } {TEXT 259 0 "" }{TEXT -1 40 " fix and Extension of Define in Maple 11 " }}{PARA 19 "" 0 "" {TEXT -1 162 "Copyright (c) Oct-23-2001 -- 2008 b y Rafal Ablamowicz and Bertfried Fauser. All rights reserved.\nCreated using Patcher of Carl deVore and Helmut Kahovec, thanks!\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 1092 "####################################### ######################################\n# \+ #\n#DISCLAIMER: \+ #\n# \+ #\n#TH ERE IS NO WARRANTY FOR THE CLIFFORD, BIGEBRA, Cliplus, Octonion, GTP \+ #\n#PACKAGES TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE #\n#STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER P ARTIES PROVIDE THE #\n#PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIN D, EITHER EXPRESSED OR IMPLIED, #\n#INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY #\n#AND FITNESS FOR A PARTICU LAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY #\n#AND PERFORMANCE \+ OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE #\n#DEFECTI VE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR # \n#CORRECTION. \+ #\n########################################################### ##################\n" }{TEXT -1 1 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 263 14 "Document info:" }}{PARA 14 "" 0 "" {TEXT -1 40 "spell-c hecked (with Maple 8): 2002-10-09" }}{PARA 14 "" 0 "" {TEXT -1 20 "ver ison: 1.00-stable" }}{PARA 14 "" 0 "" {TEXT -1 31 "filename: Define_c ode.1.00.mws" }}{PARA 14 "" 0 "" {TEXT -1 62 "Maple versions supported : Should run on Maple 6, 7, 8, 9, 10 " }}{PARA 14 "" 0 "" {TEXT -1 37 "pltforms: should run on all platforms" }}{PARA 14 "" 0 "" {TEXT -1 34 "URL: http://math.tntech.edu/rafal/" }}{PARA 14 "" 0 "" {TEXT -1 21 "filetype: libary file" }}{PARA 14 "" 0 "" {TEXT -1 12 "notes: \+ set " }{TEXT 264 7 "libname" }{TEXT -1 25 " to a suitable value. In " }{TEXT 265 10 "libname[1]" }{TEXT -1 129 " there should be a path to a local libary (not Maple's libary) where the new define can be stored. It might be convenient to set " }{TEXT 266 7 "libname" }{TEXT -1 29 " during startup either in an " }{TEXT 268 10 ".mapleinit" }{TEXT -1 6 " or a " }{TEXT 267 9 "maple.ini" }{TEXT -1 73 " (M$ Win platforms) o r even in the stratup script under unix as follows:" }}{PARA 14 "" 0 " " {TEXT -1 1 " " }{TEXT 269 307 "-- .mapleinit\n libname := //Cliffordlib,libname: \n-- maple.ini\n libname := //Cliffordlib,libname:\n-- stratupscript, see //bin/maple , \n change\n -> $\{Maple_Path\}/maple \n to\n -> $\{Maple_Path\}/maple -b $\{Maple_Path\}/Cliffordlib -b $\{Maple_path \}/lib" }}{PARA 14 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 7 "We use " }{TEXT 257 11 "libname[1] " }{TEXT 260 0 "" } {TEXT -1 132 "to save the module Define and the wrapper functions defi ne and definemore, change either the code below or set libname[1] corr ectly." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}{PARA 0 "" 0 "" {TEXT -1 108 "The following code is based on the define code of Maple (R) versions 6 and 7. The structure is as follows:\n\n" } {TEXT 256 600 "--Define (The main module)\n exports: define, \+ # Patched code\n definemore # unaltered code \+ of Maple(R)\n locals: canonic, # Patched code\n \+ define/diff, # unaltered code of Maple(R)\n skele ton, # Patched code\n mlinear, # Patched c ode\n DefineTable, # unaltered code of Maple(R)\n \+ DefaultNameProps # unaltered code of Maple(R)\n--define \+ # a constructor method to make define globally available\n--definemor e # a constructor method to make definemore globally available \n" } {MPLTEXT 1 0 2 "\n\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7560 "unprotect (Define);\nmodule Define() \n local canonic, `define/diff`, skeleton, mlinear, DefineTable, DefaultNameProps; \n export define, definemor e; \n option package, \n `Copyright (C) 1999 Waterloo Maple, I nc. All rights reserved. Patched Oct-23-2001 BF.`; \n description \"P atched (Oct-23-2001 BF.) module implementing the define and definemore routines\"; \n\n define := proc (functionname::name) \n local pro perties, prop, eprops, nprops, i; \n option `Copyright (c) 1999 Wat erloo Maple Inc. All rights reserved.`; \n\n if assigned(function name) then \n error \"%1 is assigned\", functionname \n elif t ype(functionname,'protected') then \n error \"%1 is protected\", \+ functionname \n end if; \n if member(convert('linear','`global`' ),[args[2 .. -1]]) and member(convert('multilinear','`global`'),[args[ 2 .. -1]]) then\n error \"linear and multilinear are mutually exc lusive\" \n end if; \n DefineTable[functionname] := ''args''; \n eprops, nprops := selectremove(type,[args[2 .. -1]],'\{specfunc(an ything,conditional), `=`\}');\n ##\n ## ==> restore default if n o domain is given by the user! \n ## \n if not member('domain',c onvert(map(lhs,eprops),set)) then\n userinfo(1,Bigebra,`define ca n have a user specified domain k for k-tensor products`,\n \+ lprint(`use option: 'domain'=''`));\n eprops:=[op( eprops),`domain`=`constant`];\n end if;\n ##\n eprops := map2 (canonic,functionname,eprops);\n nprops := [op(map2(canonic,functio nname,nprops)), op(DefaultNameProps)];\n if eprops = [] then \n \+ functionname := subs([op(nprops), ('_HASATABLE') = false, ('_TABLE') = eprops],eval(skeleton)) \n else \n eprops := compiletable(e props); \n functionname := subs([op(nprops), ('_HASATABLE') = tru e, ('_TABLE') = eprops],eval(skeleton)) \n end if;\n userinfo(3, Bigebra,`New operator`,functionname,`defined`); \n NULL \n end pr oc:\n\n definemore := proc () \n local fname; \n option `Copyri ght (c) 1999 Waterloo Maple Inc. All rights reserved.`; \n descript ion \"add to the definition of a function\"; \n\n if not type(args[ 1],'name') then \n error \"first argument is not a name\" \n e nd if; \n fname := args[1]; \n if not assigned(DefineTable[fname ]) then \n error \"nothing known about %1\", fname \n end if; \+ \n unassign(args[1]); \n define(DefineTable[fname],args[2 .. -1] );\n userinfo(3,Bigebra,`Property added sucessfully to`,fname); \n NULL \n end proc:\n\n\n canonic := proc (fname, prop)\n optio n `Copyright (c) 1999 Waterloo Maple Inc. All rights reserved. Patched Oct-23-2001 BF.`; \n\n if type(prop,'`=`') then\n ##\n ## \+ ==> new option 'domain' added\n ## domain replaces 'constant' i n all procedures\n ## involved in define and allows it to defin e\n ## e.g. tensor products over arbitrary 'rings'\n ##\n \+ ## a new global type `type/domain` is created\n ## \n if lhs(prop) = ('`domain`') then \n convert(`type/domain`,'`glo bal`');\n assign(`type/domain`,proc(_var) type(_var,rhs(prop)) \+ end proc):\n userinfo(3,Bigebra,`New global type created as typ e/domain:`,print(`type/domain`));\n elif member(lhs(prop),\{_LINE AR, _MLINEAR, _ORDERLESS, _FLAT\}) then\n ; \n elif lhs(p rop) = ('inverse') then \n fname(rhs(prop)(('`/X`')::anything)) = ('`/X`'), rhs(prop)(fname(('`/X`')::anything)) = ('`/X`') \n e lif lhs(prop) = ('zero') then \n fname(rhs(prop)) = 0 \n e lif lhs(prop) = ('identity') then \n fname(('`/X`')::anything,r hs(prop)) = ('`/X`'), fname(rhs(prop),('`/X`')::anything) = ('`/X`') \+ \n elif type(lhs(prop),'function') and op(0,lhs(prop)) = ('diff') then `define/diff`(prop) \n else \n if has(lhs(prop),fnam e) then \n lhs(prop) = subs(fname = `/FUNCNAME`,rhs(prop)) \n else \n error \"left hand side of equational property `%1' does not contain function name %2\", prop, fname \n end i f \n end if \n elif type(prop,'specfunc(anything,conditional)' ) then \n ('conditional')(op([1, 1],prop) = subs(fname = `/FUNCNA ME`,op([1, 2],prop)),op(2,prop)) \n elif member(prop,\{'flat', 'ass ociative'\}) then \n ('_FLAT') = true \n elif member(prop,\{'o rderless', 'commutative'\}) then \n ('_ORDERLESS') = true \n e lif prop = convert('linear','`global`') then \n ('_LINEAR') = tru e \n elif prop = convert('multilinear','`global`') then \n ('_ MLINEAR') = true\n else \n error \"unrecognised property\" \n \+ end if \n end proc:\n\n\n `define/diff`:=proc (In::equation) \n \+ local func, rt; \n option `Copyright (c) 1999 Waterloo Maple Inc. \+ All rights reserved.`; \n\n func := cat(`diff/`,op(0,op(1,lhs(In))) ); \n unprotect(diff); \n rt := op(4,eval(diff)); \n rt[op(lh s(In))] := evaln(rt[op(lhs(In))]); \n protect(diff); \n assign(f unc,proc (expr, var) subs(op(2,lhs(In)) = expr,rhs(In))*diff(expr,var) end proc); \n NULL \n end proc:\n\n skeleton := proc () \n lo cal theArgs, arg, look, me, cf, term; \n option `Copyright (c) 1999 Waterloo Maple Inc. All rights reserved. Patched Oct-23-2001 BF.`; \n description \"a Patched (Oct-23-2001, BF.) Maple procedure automat ically generated by define()\"; \n\n me := eval(procname,1); \n \+ ####\n if _ORDERLESS then \n theArgs := op(sort([args],'addres s')) \n else\n theArgs := args \n end if; \n ####\n i f _FLAT then \n look := theArgs; \n theArgs := map(proc (u) \+ if type(u,('specfunc')('anything',me)) then op(u) else u end if end pr oc,[theArgs]);\n ASSERT(type(theArgs,'list')); \n ####\n \+ if _ORDERLESS then \n theArgs := op(sort(theArgs,'address')) \+ \n else \n theArgs := op(theArgs) \n end if \n end if; \n ####\n if _MLINEAR then \n look := mlinear(op(eval( [theArgs],('me') = ('_FUNCNAME')))); \n if op(look) <> theArgs th en \n return eval(look,('_FUNCNAME') = ('me')) \n end if \+ \n end if; \n ####\n if _LINEAR then \n arg := args[1]; \+ \n if arg = 1 then \n NULL \n elif \n type(arg ,'name') then \n NULL \n elif type(arg,convert('domain','` global`')) then \n return arg*procname(1,args[2 .. -1]) \n \+ elif type(arg,'`+`') then \n return map(procname,args) \n \+ elif type(arg,'`*`') then \n cf,term := selectremove(type,arg, convert('domain','`global`')); \n if cf = 1 then \n re turn ('procname')(args) \n else \n return cf*procname( term,args[2 .. -1]) \n end if \n end if \n end if; \n \+ ####\n if _HASATABLE then \n look := tablelook(('procname')( theArgs),'_TABLE'); \n if look <> FAIL then \n eval(look,` /FUNCNAME` = procname) \n else \n ('procname')(theArgs) \n end if \n else \n ('procname')(theArgs) \n end if \n \+ end proc:\n\n\n mlinear := proc (OpName)\n local func, k, term, t erms, cf, coefficient; \n options remember, system, \n `C opyright (c) 1999 Waterloo Maple Inc. All rights reserved. Patched Oct -23-2001 BF.`; \n \n if nargs < 1 then \n 0 \n elif \n \+ nargs = 1 then \n if type(args[1],convert(`domain`,'`global`')) \+ then \n return args[1]*('_FUNCNAME(1)') \n elif type(args[ 1],'`+`') then \n return map('_FUNCNAME',args[1]) \n elif \+ type(args[1],'`*`') then\n ##\n ## ==> BUGfix, this code handles _FUNCNAME(fload*anything) correctly\n ## \n cf, term := selectremove(type,args[1],convert(`domain`,'`global`'));\n \+ return cf*('_FUNCNAME')(term) \n else \n '_FUNCNAME(ar gs)' \n end if \n" }{TEXT -1 0 "" }{MPLTEXT 1 0 1076 " elif 2 \+ <= nargs then \n if type(args[1],'`+`') then \n return map ('_FUNCNAME',args) \n elif type(args[2],'`+`') then \n ret urn map2('_FUNCNAME',args[1],args[2 .. -1]) \n else \n for k from 3 to nargs do \n if type(args[k],'`+`') then \n \+ return map(curry('_FUNCNAME',args[1 .. k-1]),args[k .. nargs]) \+ \n end if \n end do \n end if; \n ASSERT(map (type,\{args\},'`+`') = \{false\}); \n terms := map(proc (u) \n \+ if type(u,convert(`domain`,'`global`')) and u <> 1 th en \n [u, 1] \n elif type(u,'`*` ') then \n [selectremove(type,u,convert(`domain`,' `global`'))] \n else \n [1, u] \+ \n end if \n end proc,[args]); \n \+ coefficient := mul(k[1],k = terms); \n terms := map2(op,2,terms );\n if terms = [args] then \n '_FUNCNAME(args)' \n e lse \n coefficient*('_FUNCNAME')(op(terms)) \n end if \n \+ end if \n end proc:\n\n DefineTable := TABLE([]);" }{TEXT -1 0 "" }{MPLTEXT 1 0 97 "\n\n DefaultNameProps := [_LINEAR = false, _MLINEAR = false, _ORDERLESS = false, _FLAT = false];\n\n" }{TEXT -1 0 "" } {MPLTEXT 1 0 11 "end module:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 419 "After the package Defin e has been altered, we need two wrapper functions as constructor metho ds for define and definemore.\nThis prevents the user from having to t ype the long form Define:-define(more), but allows him to use define(m ore) directly.\n\nTHIS implementation is awkward and does not support \+ module philosophy, but we failed to find a better way, and we have not figured out, how Maple(R) treats this problem.\n\n" }}{PARA 0 "" 0 " " {TEXT -1 53 "We unprotect the names Define, define and definemore:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 150 "unprotect('define');\nunprotect( 'definemore');\n`define`:=proc() Define:-define(args) end proc:\n`defi nemore`:=proc() Define:-definemore(args) end proc:\n" }{TEXT -1 10 "as sumiong " }{TEXT 270 10 "libname[1]" }{TEXT -1 41 " to contain a writa ble user-define libary" }{MPLTEXT 1 0 127 "\nlibname[1];\nsave define, cat(libname[1],\"/\",\"define.m\");\nsave definemore, cat(libname[1], \"/\",`definemore.m`);\nsavelib(Define);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#Q7C:\\Maple11/Cliffordlib6\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "with(LibraryTools);" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#72%1ActivationModuleG%1AddFromDirectoryG%'AuthorG%'BrowseG%3BuildFro mDirectoryG%/ConvertVersionG%'CreateG%'DeleteG%,FindLibraryG%,PrefixMa tchG%)PriorityG%%SaveG%-ShowContentsG%*TimestampG%4UpdateFromDirectory G%*WriteModeG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "ShowConten ts(libname[1]);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7*7&Q+Clifford.m6\" 7(\"%2?\"#7\"#?\"#:\"#6\"#a\"%C5\"%OB7&Q)Define.mF&7(F(F)F*F+\"#9\"#d \"'Q.a\"$$[7&Q+matcompL.mF&7(F(F)F*F+\"#8F3\"'D#[$\"&=X(7&Q+matcompR.m F&F9\"'VFU\"&^M(7&Q+matquatL.mF&F9\"'%>'\\\"&9@#7&Q+matquatR.mF&F9\"'3 $=&\"&I?#7&Q+matrealL.mF&F9\"'na6\"'9k67&Q+matrealR.mF&F9\"'\")=B\"'Wj 6" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 73 "Now restart Maple and see what was written into the \+ libary in libanme[1]:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "march('list',libname[1]);" }} {PARA 0 "" 0 "" {TEXT -1 134 "You should find a list-of-lists where ea ch sublist gives informations about the stored entry. Check if you see the following entries:\n" }{TEXT 261 154 "-- [\"Define.m\",[Year,Mont h,Day,HH,MM,SS],no#,no#]\n-- [\"define.m\",[Year,Month,Day,HH,MM,SS],n o#,no#]\n-- [\"definemore.m\",[Year,Month,Day,HH,MM,SS],no#,no#]\n" } {TEXT 262 42 "if so, the module is now ready to be used." }}{PARA 12 " " 1 "" {XPPMATH 20 "6#7aq7&Q':-53.m6\"7(\"%2?\"#7\"#?\"#:\"#6\"#a\"&(z 9\"%sG7&Q&:-7.mF&F'\"&II$\"%C:7&Q':-25.mF&F'\"&#QZ\"$v&7&Q':-68.mF&F' \"&$oi\"%cK7&Q':-10.mF&F'\"&m0)\"$o$7&Q':-81.mF&F'\"'_O6\"$$e7&Q':-66. mF&F'\"%Df\"$%))7&Q&:-5.mF&F'\"&KK\"\"%l:7&Q':-38.mF&F'\"&%Q=\"%#>\"7& Q':-23.mF&F'\"&k0(\"$g%7&Q':-51.mF&F'\"'v@6\"$s(7&Q':-36.mF&F'\"&xO%\" $<%7&Q&:-3.mF&F'\"&4W%\"%tH7&Q':-64.mF&F'\"&kW(\"%<57&Q':-79.mF&F'\"&s S)\"%*\\\"7&Q':-21.mF&F'\"&z)*)\"%nF7&Q':-92.mF&7(F(F)F*F+\"#9\"#d\"'% *=a\"#[7&Q':-49.mF&F'\"%yP\"%T57&Q':-62.mF&F'\"&pw\"\"$:(7&Q':-34.mF&F '\"&TN(\"$B*7&Q':-77.mF&F'\"&Vp(\"$E)7&Q&:-1.mF&F'\"'NU6\"%K77&Q+matqu atR.mF&7(F(F)F*F+\"#8Fio\"'3$=&\"&I?#7&Q':-90.mF&Fho\"'U>a\"$^*7&Q':-1 9.mF&F'\"&aX$\"%T67&Q':-47.mF&F'\"&V;'Fen7&Q':-60.mF&F'\"&y$p\"$]&7&Q' :-32.mF&F'\"&G*p\"$O'7&Q':-75.mF&F'\"&@k*\"$a'7&Q+matcompR.mF&Fcq\"'VF U\"&^M(7&Q':-73.mF&F'\"&w8\"\"%c=7&Q':-45.mF&F'\"&'\\\"&9@#7&Q':-86.mF &Fho\"'$*Ga\"%*4\"7&Q':-13.mF&F'\"%J\"*\"%!e\"7&Q':-41.mF&F'\"&62\"\"$ l'7&Q':-84.mF&F'\"&7$Q\"%K@7&Q':-28.mF&F'\"&;1&\"$h%7&Q':-56.mF&F'\"&C 5(\"$a$7&Q+matcompL.mF&Fcq\"'D#[$\"&=X(7&Q':-26.mF&F'\"&==&\"%*>\"7&Q' :-54.mF&F'\"&[N&\"$#Q7&Q':-11.mF&F'\"&`+'\"%!f\"7&Q&:-8.mF&F'\"&Rf'\"% G67&Q':-69.mF&F'\"&\"[v\"$O)7&Q':-82.mF&F'\"'$[-\"\"$H*7&Q':-39.mF&F' \"%>[\"$\\'7&Q':-67.mF&F'\"&&pN\"%1;7&Q':-52.mF&F'\"&l'\\\"$s$7&Q&:-6. mF&F'\"&rb)Fex7&Q':-80.mF&F'\"&vq*\"%x>7&Q':-24.mF&F'\"'7M5\"%j()7&Q+m atrealR.mF&Fcq\"'\")=B\"'Wj67&Q&:-4.mF&F'\"%4o\"%AB7&Q':-37.mF&F'\"&[% [\"%<77&Q':-22.mF&F'\"&x5&\"$T(7&Q':-50.mF&F'\"&M4)\"%1F7&Q':-65.mF&F' \"&SO)\"$K%7&Q)Define.mF&Fho\"'Q.a\"$$[7&Q':-93.mF&Fho\"'1ca\"#)*7&Q+C lifford.mF&F'\"%C5\"%OB7&Q':-63.mF&F'\"%oa\"$d%7&Q':-20.mF&F'\"&W/%\"% \\67&Q':-78.mF&F'\"&dz%\"$\"\\7&Q':-35.mF&F'\"&)3b\"%wE7&Q&:-2.mF&F'\" &eY*\"$v*7&Q':-91.mF&Fho\"'T[a\"$l(7&Q':-48.mF&F'\"&w&>\"#_7&Q':-76.mF &F'\"&IR&\"%e67&Q':-33.mF&F'\"&nq'\"%G97&Q':-61.mF&F'\"&SI(\"$,&7&Q+ma trealL.mF&Fcq\"'na6\"'9k67&Q':-46.mF&F'\"&px(\"%'3\"7&Q':-74.mF&F'\"&b q)\"%CG7&Q':-31.mF&F'\"&Lc*\"$)y7&Q':-18.mF&F'\"'ZH6\"$0(7&Q':-89.mF&F ho\"'`Wa\"$)Q7&Q':-72.mF&F'\"&%4W\"$:$7&Q':-59.mF&F'\"&kx&\"$J'7&Q':-4 4.mF&F'\"&<)e\"%O77&Q':-16.mF&F'\"&g?'\"$B'7&Q':-87.mF&Fho\"'#*RaF]w7& Q':-85.mF&F'\"&G'>\"&-M\"7&Q':-42.mF&F'\"&,t$\"$Z%7&Q':-29.mF&F'\"&[x$ \"$k&7&Q':-14.mF&F'\"&$fT\"%%3#7&Q':-57.mF&F'\"&b)y\"%6<7&Q':-70.mF&F' \"&*p')\"$c$7&Q':-40.mF&F'\"%gL\"$=%7&Q&:-9.mF&F'\"&&Re\"$A%7&Q':-27.m F&F'\"&&\\o\"$$))7&Q':-55.mF&F'\"& " 0 "" {MPLTEXT 1 0 103 "interface(verboseproc=3): \+ # for print commands\ninfolevel[Bigebra]:=3: # sets verbosity level higher" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 279 "Now define the new op erators, one using domain to specify the 'constants' over which the te nsor product is build, in the example below\nwe define the tensor prod uct to work over a polynomial ring in the variables x over the integer s Z[[x]]. The other case tests the default value." }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 30 "define(`&r`,multilinear,flat);" }}{PARA 6 " " 1 "" {TEXT -1 73 "define: define can have a user specified domain \+ k for k-tensor products" }}{PARA 6 "" 1 "" {TEXT -1 35 "`use option: ' domain'=''`" }}{PARA 6 "" 1 "" {TEXT -1 50 "canonic: New g lobal type created as type/domain:" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# f*6#%%_varG6\"F&F&-%%typeG6$9$-%$rhsG6#T$F&F&6$%%propG/%'domainG%)cons tantG" }}{PARA 6 "" 1 "" {TEXT -1 37 "define: New operator &r de fined" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "&r(3*x*e1),&r(2.6* e1,3*e2,a*e3);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6$,$*&\"\"$\"\"\"-%#&r G6#*&%\"xGF&%#e1GF&F&F&,$*&$\"#y!\"\"F&-F(6%F,%#e2G*&%\"aGF&%#e3GF&F&F &" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "anames();\nprint(`type /domain`);\ntype(2,domain);" }}{PARA 11 "" 1 "" {XPPMATH 20 "60%*inter faceG%/convert/globalG%-savelibname2G%'defineG%-savelibname3G%3type/in terfaceargsG%#&rG%,type/domainG%,convert/setG%'DefineG%*infolevelG%'as signG%&marchG%,savelibnameG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#f*6#%%_ varG6\"F&F&-%%typeG6$9$-%$rhsG6#T$F&F&6$%%propG/%'domainG%)constantG" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%%trueG" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 72 "define(`&s`,flat,multilinear,'domain'=polynom(integ er,[x,y]),`&s`(0)=0);" }}{PARA 6 "" 1 "" {TEXT -1 50 "canonic: New g lobal type created as type/domain:" }}{PARA 11 "" 1 "" {XPPMATH 20 "6# f*6#%%_varG6\"F&F&-%%typeG6$9$-%$rhsG6#T$F&F&6$%%propG/%'domainG-%(pol ynomG6$%(integerG7$%\"xG%\"yG" }}{PARA 6 "" 1 "" {TEXT -1 37 "define: \+ New operator &s defined" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 226 "We got some information about the global new type type/domain and the module informs us that a new operator is defined.\n\nLet us print out the source code of &s, note that the work is done in sub-functions li ke Define:-mlinear." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "prin t(`&s`);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#f*6\"6(%(theArgsG%$argG%%l ookG%#meG%#cfG%%termG6#%^pCopyright~(c)~1999~Waterloo~Maple~Inc.~All~r ights~reserved.~Patched~Oct-23-2001~BF.GF$C,>8'-%%evalG6$9!\"\"\">8$9 \">8&F7>F7-%$mapG6$f*6#%\"uGF$F$F$@%-%%typeG6$9$-.%)specfuncG6$.%)anyt hingGT#-%#opG6#FFFFF$F$6$F)F07#F7-%'ASSERTG6#-FD6$F7.%%listG>F7-FO6#F7 >F:-FM6#-FO6#-F26$FR/.F0.%*_FUNCNAMEG@$0-FO6#F:F7O-F26$F:/F`oF_o>F:-%* tablelookG6$-.F4Ffn.7%-%%/POSG6%F5%#&sGF5-%'/LITERG6%F5F5\"\"!-%)/PATT ERNG6#Fip@%0F:%%FAILG-F26$F:/%*/FUNCNAMEGF4F^p6#Q[pa~Patched~(Oct-23-2 001,~BF.)~Maple~procedure~automatically~generated~by~define()F$F$6$%(m linearG%(mlinearG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 291 "Finally let us give an example:\n\n2.5 is a float and thus not an element of our \+ polynom ring 'domain'. It is treated as if it where a ring extension a n n o t extracted \nfrom the tensor. However, x, 4*x and x^2 are e lements of 'domain' and are pulled out of the tensor product (function ). " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 63 "whattype(2*x*y*e1); \n&s(2.5*x*y*e1);\n&s(2.5*x*e1,4*x*e2+x^2*e3);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%\"*G" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*(%\"xG\"\"\"% \"yGF%-%#&sG6#,$*&$\"#D!\"\"F%%#e1GF%F%F%" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*(\"\"%\"\"\")%\"xG\"\"#F&-%#&sG6$,$*&$\"#D!\"\"F&%#e 1GF&F&%#e2GF&F&*&)F(\"\"$F&-F+6$F-%#e3GF&F&" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "print(`type/domain`);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#f*6#%%_varG6\"F&F&-%%typeG6$9$-%$rhsG6#T$F&F&6$%%propG/ %'domainG-%(polynomG6$%(integerG7$%\"xG%\"yG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "type(2*x,domain);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#%%trueG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 39 "Last change d: December 20, 2007 /BF/RA." }}}}{MARK "25 0 0" 25 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }