Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2700

Precedence question

From Arturas.Acus@tfai.vu.lt
Newsgroups comp.soft-sys.math.mathematica
Subject Precedence question
Date 2011-05-25 09:57 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <irijqf$qfi$1@smc.vnet.net> (permalink)

Show all headers | View raw


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















Back to comp.soft-sys.math.mathematica | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Precedence  question Arturas.Acus@tfai.vu.lt - 2011-05-25 09:57 +0000
  Re: Precedence  question David Bailey <dave@removedbailey.co.uk> - 2011-05-25 23:32 +0000

csiph-web