Precedence
- To: mathgroup at smc.vnet.net
- Subject: [mg60271] Precedence
- From: "Xerxes" <Xerxes314 at gmail.com>
- Date: Fri, 9 Sep 2005 04:07:12 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi all, I've been writing a package using Mathematica to do lattice perturbation theory. As a part of my package, I'd like to define my own matrix multiplication, which I call dotm. Since CenterDot looks pretty and has no previous assignment, I've used it as both the input and output format of dotm. However, I run into problems when I try to type things like Y[x].g A[x].Y[x+a] where the . should be imagined to be CenterDot. Because the precedence of the . is higher than the precedence of the multiplication, this gives (Y.g)(A.Y) instead of Y.(gA).Y. I know I can attach a TagBox to the CenterDot to force it to have lower precedence, but that ruins the convenience of typing esc-.-esc to get the dot. Is there some other way to teach Mathematica to use a lower precedence? Xerxes