{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 12 " }}{PARA 19 "" 0 "" {TEXT -1 162 "Copyright (c) Oct-23-2001 -- 2009 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 70 "Maple versions supported : Should run on Maple 6, 7, 8, 9, 10, 11, 12 " }}{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 "no tes: 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 pat h to a local libary (not Maple's libary) where the new define can be s tored. 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 pl atforms) or even in the stratup script under unix as follows:" }} {PARA 14 "" 0 "" {TEXT -1 1 " " }{TEXT 269 307 "-- .mapleinit\n lib name := //Cliffordlib,libname: \n-- maple.ini\n libnam e := //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 wrappe r functions define and definemore, change either the code below or set libname[1] correctly." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "re start:" }}{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 fo llows:\n\n" }{TEXT 256 600 "--Define (The main module)\n exports : define, # Patched code\n definemore # un altered code of Maple(R)\n locals: canonic, # Patched cod e\n define/diff, # unaltered code of Maple(R)\n \+ skeleton, # Patched code\n mlinear, \+ # Patched code\n DefineTable, # unaltered code of M aple(R)\n DefaultNameProps # unaltered code of Maple(R)\n --define # a constructor method to make define globally available \n--definemore # a constructor method to make definemore globally ava ilable \n" }{MPLTEXT 1 0 2 "\n\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7560 "unprotect(Define);\nmodule Define() \n local canonic, `define/d iff`, skeleton, mlinear, DefineTable, DefaultNameProps; \n export de fine, definemore; \n option package, \n `Copyright (C) 1999 Wa terloo Maple, Inc. All rights reserved. Patched Oct-23-2001 BF.`; \n \+ description \"Patched (Oct-23-2001 BF.) module implementing the define and definemore routines\"; \n\n define := proc (functionname::name) \+ \n local properties, prop, eprops, nprops, i; \n option `Copyrig ht (c) 1999 Waterloo Maple Inc. All rights reserved.`; \n\n if as signed(functionname) then \n error \"%1 is assigned\", functionna me \n elif type(functionname,'protected') then \n error \"%1 i s protected\", functionname \n end if; \n if member(convert('lin ear','`global`'),[args[2 .. -1]]) and member(convert('multilinear','`g lobal`'),[args[2 .. -1]]) then\n error \"linear and multilinear a re mutually exclusive\" \n end if; \n DefineTable[functionname] \+ := ''args''; \n eprops, nprops := selectremove(type,[args[2 .. -1]] ,'\{specfunc(anything,conditional), `=`\}');\n ##\n ## ==> resto re default if no domain is given by the user! \n ## \n if not me mber('domain',convert(map(lhs,eprops),set)) then\n userinfo(1,Big ebra,`define can 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,functionname,nprops)), op(DefaultNameProps)];\n if eprops = [] then \n functionname := subs([op(nprops), ('_HASATABLE') = fa lse, ('_TABLE') = eprops],eval(skeleton)) \n else \n eprops := compiletable(eprops); \n functionname := subs([op(nprops), ('_HA SATABLE') = true, ('_TABLE') = eprops],eval(skeleton)) \n end if;\n userinfo(3,Bigebra,`New operator`,functionname,`defined`); \n \+ NULL \n end proc:\n\n definemore := proc () \n local fname; \n \+ option `Copyright (c) 1999 Waterloo Maple Inc. All rights reserved.`; \n description \"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 end if; \n fname := args[1]; \n if not assigned(De fineTable[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, p rop)\n option `Copyright (c) 1999 Waterloo Maple Inc. All rights re served. Patched Oct-23-2001 BF.`; \n\n if type(prop,'`=`') then\n ##\n ## ==> new option 'domain' added\n ## domain replac es 'constant' in all procedures\n ## involved in define and all ows it to define\n ## e.g. tensor products over arbitrary 'ring s'\n ##\n ## a new global type `type/domain` is created\n \+ ## \n if lhs(prop) = ('`domain`') then \n convert(`typ e/domain`,'`global`');\n assign(`type/domain`,proc(_var) type(_ var,rhs(prop)) end proc):\n userinfo(3,Bigebra,`New global type created as type/domain:`,print(`type/domain`));\n elif member(lh s(prop),\{_LINEAR, _MLINEAR, _ORDERLESS, _FLAT\}) then\n ; \n \+ elif lhs(prop) = ('inverse') then \n fname(rhs(prop)(('`/X `')::anything)) = ('`/X`'), rhs(prop)(fname(('`/X`')::anything)) = ('` /X`') \n elif lhs(prop) = ('zero') then \n fname(rhs(prop) ) = 0 \n elif lhs(prop) = ('identity') then \n fname(('`/X `')::anything,rhs(prop)) = ('`/X`'), fname(rhs(prop),('`/X`')::anythin g) = ('`/X`') \n elif type(lhs(prop),'function') and op(0,lhs(pro p)) = ('diff') then `define/diff`(prop) \n else \n if has( lhs(prop),fname) then \n lhs(prop) = subs(fname = `/FUNCNAME` ,rhs(prop)) \n else \n error \"left hand side of equat ional property `%1' does not contain function name %2\", prop, fname \+ \n end if \n end if \n elif type(prop,'specfunc(anythin g,conditional)') then \n ('conditional')(op([1, 1],prop) = subs(f name = `/FUNCNAME`,op([1, 2],prop)),op(2,prop)) \n elif member(prop ,\{'flat', 'associative'\}) then \n ('_FLAT') = true \n elif m ember(prop,\{'orderless', 'commutative'\}) then \n ('_ORDERLESS') = true \n elif prop = convert('linear','`global`') then \n (' _LINEAR') = true \n elif prop = convert('multilinear','`global`') t hen \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 Water loo 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(lhs(In))] := evaln(rt[op(lhs(In))]); \n protect(diff); \n assign(func,proc (expr, var) subs(op(2,lhs(In)) = expr,rhs(In)) *diff(expr,var) end proc); \n NULL \n end proc:\n\n skeleton := p roc () \n local theArgs, arg, look, me, cf, term; \n option `Cop yright (c) 1999 Waterloo Maple Inc. All rights reserved. Patched Oct-2 3-2001 BF.`; \n description \"a Patched (Oct-23-2001, BF.) Maple pr ocedure automatically generated by define()\"; \n\n me := eval(proc name,1); \n ####\n if _ORDERLESS then \n theArgs := op(sort ([args],'address')) \n else\n theArgs := args \n end if; \n ####\n if _FLAT then \n look := theArgs; \n theArgs : = map(proc (u) if type(u,('specfunc')('anything',me)) then op(u) else \+ u end if end proc,[theArgs]);\n ASSERT(type(theArgs,'list')); \n \+ ####\n if _ORDERLESS then \n theArgs := op(sort(theAr gs,'address')) \n else \n theArgs := op(theArgs) \n e nd if \n end if; \n ####\n if _MLINEAR then \n look := m linear(op(eval([theArgs],('me') = ('_FUNCNAME')))); \n if op(look ) <> theArgs then \n return eval(look,('_FUNCNAME') = ('me')) \+ \n end if \n end if; \n ####\n if _LINEAR then \n a rg := args[1]; \n if arg = 1 then \n NULL \n elif \n \+ type(arg,'name') then \n NULL \n elif type(arg,conv ert('domain','`global`')) then \n return arg*procname(1,args[2 \+ .. -1]) \n elif type(arg,'`+`') then \n return map(procnam e,args) \n elif type(arg,'`*`') then \n cf,term := selectr emove(type,arg,convert('domain','`global`')); \n if cf = 1 then \n return ('procname')(args) \n else \n retu rn cf*procname(term,args[2 .. -1]) \n end if \n end if \n \+ end if; \n ####\n if _HASATABLE then \n look := tableloo k(('procname')(theArgs),'_TABLE'); \n if look <> FAIL then \n \+ eval(look,`/FUNCNAME` = procname) \n else \n ('procnam e')(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, terms, cf, coefficient; \n options remember, system, \n `Copyright (c) 1999 Waterloo Maple Inc. All rights reser ved. 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(`domai n`,'`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 ## ==> B UGfix, this code handles _FUNCNAME(fload*anything) correctly\n \+ ## \n cf,term := selectremove(type,args[1],convert(`domain`,'`g lobal`'));\n return cf*('_FUNCNAME')(term) \n else \n \+ '_FUNCNAME(args)' \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],'`+`') t hen \n return map2('_FUNCNAME',args[1],args[2 .. -1]) \n e lse \n for k from 3 to nargs do \n if type(args[k],'`+ `') then \n return map(curry('_FUNCNAME',args[1 .. k-1]),ar gs[k .. nargs]) \n end if \n end do \n end if; \n ASSERT(map(type,\{args\},'`+`') = \{false\}); \n terms := m ap(proc (u) \n if type(u,convert(`domain`,'`global`' )) and u <> 1 then \n [u, 1] \n \+ elif type(u,'`*`') then \n [selectremove(type,u,co nvert(`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(a rgs)' \n else \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 Define has been altered, we need two wrapper functions as con structor methods for define and definemore.\nThis prevents the user fr om having to type the long form Define:-define(more), but allows him t o use define(more) directly.\n\nTHIS implementation is awkward and doe s not support module philosophy, but we failed to find a better way, a nd 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) en d proc:\n`definemore`:=proc() Define:-definemore(args) end proc:\n" } {TEXT -1 10 "assumiong " }{TEXT 270 10 "libname[1]" }{TEXT -1 41 " to \+ contain a writable 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:\\Maple12/Cliffordlib6\"" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "with(LibraryTools);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#72%1ActivationModuleG%1AddFromDirectoryG%'AuthorG%'Brow seG%3BuildFromDirectoryG%/ConvertVersionG%'CreateG%'DeleteG%,FindLibra ryG%,PrefixMatchG%)PriorityG%%SaveG%-ShowContentsG%*TimestampG%4Update FromDirectoryG%*WriteModeG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "ShowContents(libname[1]);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#7+7&Q +Clifford.m6\"7(\"%3?\"#7\"#?\"#;\"\"*\"#@\"%C5\"%NB7&Q*Cliplus.mF&7(F (F)F*F+\"#8\"#\\\"'x.a\"$l$7&Q)Define.mF&7(F(F)F*F+\"#:\"#=\"'xJb\"$*[ 7&Q+matcompL.mF&7(F(F)F*F+\"#5\"#L\"'k#[$\"&=X(7&Q+matcompR.mF&F@\"'#y A%\"&^M(7&Q+matquatL.mF&F@\"'Li\\\"&9@#7&Q+matquatR.mF&F@\"'Z$=&\"&I?# 7&Q+matrealL.mF&F@\"'1b6\"'9k67&Q+matrealR.mF&F@\"'?>B\"'Wj6" }}} {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 libar y 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 each sub list gives informations about the stored entry. Check if you see the f ollowing entries:\n" }{TEXT 261 154 "-- [\"Define.m\",[Year,Month,Day, HH,MM,SS],no#,no#]\n-- [\"define.m\",[Year,Month,Day,HH,MM,SS],no#,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#7]r7&Q':-81.m6\"7(\"%3?\"#7\"#?\"#;\"\"*\"#@\"%q]\"$$ e7&Q':-25.mF&F'\"&e\"H\"$v&7&Q':-53.mF&F'\"&L(H\"%tG7&Q':-68.mF&F'\"&t ]'\"%cK7&Q&:-7.mF&F'\"&05(\"%C:7&Q':-10.mF&F'\"'&[3\"\"$o$7&Q':-96.mF& 7(F(F)F*F+\"#8\"#\\\"'W3b\"%LB7&Q&:-5.mF&F'\"%.v\"%l:7&Q':-23.mF&F'\"& H2\"\"$g%7&Q':-51.mF&F'\"&)3S\"$s(7&Q':-38.mF&F'\"&Z3*\"%#>\"7&Q':-66. mF&F'\"'=15\"$'z7&Q':-94.mF&FF\"'!HW&\"$!))7&Q(:-104.mF&7(F(F)F*F+\"#: \"#=\"'h%e&\"#**7&Q':-79.mF&F'\"&XI\"\"%+:7&Q&:-3.mF&F'\"&mq\"\"%tH7&Q ':-36.mF&F'\"&T(G\"$<%7&Q':-64.mF&F'\"&:`%\"%<57&Q':-21.mF&F'\"&^y*\"% nF7&Q':-92.mF&FF\"'U2a\"%187&Q(:-102.mF&F_o\"'mOb\"$m(7&Q':-49.mF&F'\" &V:\"\"%T57&Q&:-1.mF&F'\"&$)o#\"%K77&Q':-34.mF&F'\"&g3%\"$B*7&Q':-77.m F&F'\"&$yT\"$E)7&Q':-62.mF&F'\"&K,*\"$:(7&Q+matquatR.mF&7(F(F)F*F+\"#5 \"#L\"'Z$=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$=%7&Q':-27.mF&F'\" &\"pi\"$$))7&Q':-12.mF&F'\"'`)3\"\"%%e\"7&Q':-83.mF&F'\"'l:6\"%l77&Q': -98.mF&F_o\"'(*ob\"$i%" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 134 "To get some more informations, we set in interface verboseproc to 3. Further more, we can set the infolevel of BIGEBRA to 3 or higher. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 103 "interface(verboseproc=3): # for p rint commands\ninfolevel[Bigebra]:=3: # sets verbosity level higher " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 279 "Now define the new operators , one using domain to specify the 'constants' over which the tensor pr oduct is build, in the example below\nwe define the tensor product to \+ work over a polynomial ring in the variables x over the integers 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 global t ype created as type/domain:" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#f*6#%%_ varG6\"F&F&-%%typeG6$9$-%$rhsG6#T$F&F&6$%%propG/%'domainG%)constantG" }}{PARA 6 "" 1 "" {TEXT -1 37 "define: New operator &r defined" }}}{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$,$*&\"\"$\"\"\"-%#&rG6#*&% \"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/domai n`);\ntype(2,domain);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6/%*interfaceG% /convert/globalG%'defineG%5interface/kerneloptsG%3type/interfaceargsG% #&rG%,type/domainG%,convert/setG%'DefineG%*infolevelG%'assignG%&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(integer,[x,y]),`&s `(0)=0);" }}{PARA 6 "" 1 "" {TEXT -1 50 "canonic: New global type cr eated as type/domain:" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#f*6#%%_varG6 \"F&F&-%%typeG6$9$-%$rhsG6#T$F&F&6$%%propG/%'domainG-%(polynomG6$%(int egerG7$%\"xG%\"yG" }}{PARA 6 "" 1 "" {TEXT -1 37 "define: New operat or &s defined" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 226 "We got some information about the global new type type/domain and the module info rms 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 like Define:-m linear." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "print(`&s`);" }} {PARA 12 "" 1 "" {XPPMATH 20 "6#f*6\"6(%(theArgsG%$argG%%lookG%#meG%#c fG%%termG6#%^pCopyright~(c)~1999~Waterloo~Maple~Inc.~All~rights~reserv ed.~Patched~Oct-23-2001~BF.GF$C,>8'-%%evalG6$9!\"\"\">8$9\">8&F7>F7-%$ mapG6$f*6#%\"uGF$F$F$@%-%%typeG6$9$-.%)specfuncG6$.%)anythingGT#-%#opG 6#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\"\"!-%)/PATTERNG6#Fip@%0F :%%FAILG-F26$F:/%*/FUNCNAMEGF4F^p6#Q[pa~Patched~(Oct-23-2001,~BF.)~Map le~procedure~automatically~generated~by~define()F$F$6$%(mlinearG%(mlin earG" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 291 "Finally let us give an e xample:\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 an n o t ex tracted \nfrom the tensor. However, x, 4*x and x^2 are elements of 'd omain' 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%-%#&sG 6#,$*&$\"#D!\"\"F%%#e1GF%F%F%" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,&*( \"\"%\"\"\")%\"xG\"\"#F&-%#&sG6$,$*&$\"#D!\"\"F&%#e1GF&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$%(int egerG7$%\"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 changed: December 20, 2007 /B F/RA." }}}}{MARK "22 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }