Re: Plus Behavior Inside a Notation Box?

*To*: mathgroup at smc.vnet.net*Subject*: [mg64896] Re: Plus Behavior Inside a Notation Box?*From*: Paul Abbott <paul at physics.uwa.edu.au>*Date*: Tue, 7 Mar 2006 06:11:46 -0500 (EST)*Organization*: The University of Western Australia*References*: <duh39s$5ui$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

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[1]:= b + c > Out[1]= a > > In[2]:= b + c + 1 > Out[2]= 1+b+c > > In[3]:= b + c + 0 > Out[3]= 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