MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem defining transformation rules



Hi Joel,

Why don't you unprotect NonCommutativeMultiply and define your rules?
For  example

Unprotect[NonCommutativeMultiply];

aR ** (a_ ket[m_]) := a aR**ket[m]
(a_ ket[m_]) ** aR := a ket[m]**aR

Protect[NonCommutativeMultiply]

Carl Woll
Dept of Physics
U of Washington

On 14 May 1998, Joel Cannon wrote:

> I wish to define a transformation rule in an input file that sets up the
> following transformation (makes scalar commute with operator aR):
> 
> aR**(a_*ket[m_])->a*aR**ket[m]
> 
> However, I have not been able to accomplish this with either
> 
> 1. ket/:  aR**(a_*ket[m_]) := a*aR**ket[m]
> 
> I get an error message that says: 
> TagSetDelayed::"tagpos": 
>     "Tag ket in (aR ** (ket[m_] a_) is too deep for an  assigned rule to
> be found."
> 
> 2. ket/: aR**(a_*ket[m_])->a*aR**ket[m]
> 
> Can someone help me out?  Thanks
> 
> cannon@centenary.edu
> 
> 
> ------------------------------------------------------------------------------
> Joel W. Cannon                 |   (318)869-5160          Dept. of
> Physics               |   (318)869-5026  FAX    Centenary College of
> Louisiana |       P. O. Box 41188		       |	     
> Shreveport, LA 71134-1188      |      
>                                      
>                     
> 
> 
> 
> 




  • Prev by Date: Re: Viewing 3D slices of data
  • Next by Date: Re: Pagination problems Mathematica 3.0
  • Prev by thread: Re: Problem defining transformation rules
  • Next by thread: Re: Problem defining transformation rules