Precedence question
- To: mathgroup at smc.vnet.net
- Subject: [mg119214] Precedence question
- From: Arturas.Acus at tfai.vu.lt
- Date: Wed, 25 May 2011 05:56:45 -0400 (EDT)
Dear Group In order to implement some geometric algebra code I need to reverse the order of the following operators which have no built in meaning: Precedence/@{NonCommutativeMultiply,Wedge,CenterDot} Acording to geometric algebra rules the highest precedence has inner product operator (I plan to use CenterDot symbol to denote this), then goes Wedge (outer multiplication) and last is geometric product (will definetely use NonCommutativeMultiply for that) Because of Mathematica predefined precedences the following input MV[a]\[Wedge]MV[b]\[CenterDot]MV[c]**MV[d]//FullForm is interpreted as CenterDot[Wedge[MV[a],MV[b]],NonCommutativeMultiply[MV[c],MV[d]]] whereas I need NonCommutativeMultiply[Wedge[MV[a],CenterDot[MV[b],MV[c]]],MV[d]]] Few hours of Mathematica documentation reading did not yield any simple solution. Sure, instead of operators with no build in meaning I can use symbols with user precedence level ( for example \[RawWedge] instead of \[Wedge]). The problem then is to define proper Infix INPUT notation+ alias. This can be done with Notation package, hovewer this is what I would like to avoid, because the task becomes complicated from the very begining. Could anybody suggest more simple alternative? Sincerely, Arturas Acus