[Date Index] [Thread Index] [Author Index]
Re: Plus Behavior Inside a Notation Box?
In article <duh39s$5ui$1 at smc.vnet.net>, "Josh" <josh at gocougs.wsu.edu> wrote: > I was trying to set up some aliases using the Notation package and > noticed some odd behavior when Plus is included in the right hand > side. I distilled it down to the following, and I'm hoping someone can > shed some light on this. The command I set up is: > > Notation[a <=> Plus[b,c] ] Add a second notation (using the Notation palette) Notation[a + n__ <=> Plus[b,c,n__] ] > With the following behavior: > > In:= b + c > Out= a > > In:= b + c + 1 > Out= 1+b+c > > In:= b + c + 0 > Out= a > > Case 1 and 3 work as expected, but case 2 is not. Any ideas? The second notation handles case 2. > The goal is to set up aliases for Bessel and Hankel functions in some EM > work, and it was working very nicely until I hit this 'minor' roadblock. I'd be interested to know how the Bessel and Hankel functions require such transformations and how you will use the Notations package to handle them. Cheers, Paul _______________________________________________________________________ Paul Abbott Phone: 61 8 6488 2734 School of Physics, M013 Fax: +61 8 6488 1014 The University of Western Australia (CRICOS Provider No 00126G) AUSTRALIA http://physics.uwa.edu.au/~paul