Re: Learning to work with non-commutative oscillators
- To: mathgroup at smc.vnet.net
- Subject: [mg41875] Re: Learning to work with non-commutative oscillators
- From: zhl67 at yahoo.com.cn (Instanton)
- Date: Sat, 7 Jun 2003 11:44:59 -0400 (EDT)
- References: <bbrplh$j9f$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Oleksandr Pavlyk <pavlyk at phys.psu.edu> wrote in message news:<bbrplh$j9f$1 at smc.vnet.net>... > Hi all, > > OK, NonCommutativeMultiply comes with sole attribute Flat, i.e. it is > associative. I would like to also to be distributive over the field of > real numbers, so I write > > (* ************* Start of the code ************* *) > Unprotect[NonCommutativeMultiply]; > (x_ + y_) ** z_ /; (x =!= 0 && y =!= 0) := x ** z + y ** z; > x_ ** (y_ + z_) /; (z =!= 0 && y =!= 0) := x ** y + x ** z; > a_ ** x_ /; Element[a, Reals] := a x; > x_ ** a_ /; Element[a, Reals] := a x; > x_ ** (a_ y_) /; ( Element[a, Reals] ) := a x ** y; > (a_ x_) ** y_ /; ( Element[a, Reals] ) := a x ** y; > Protect[NonCommutativeMultiply]; > (* *************** End of the code *************** *) > > It works beautifully. The trouble starts when I want Mathematica > to rearrange oscillators to some definite order. I constantly run into > infinite recursive well... > > I am trying > > x_ ** y_ /; (Order[x, y] == 1 ) := y ** x - 1; > > The idea is to use two oscillators: annihilation and creation > and be able to manupulate their polynomials. Any ideas, comments > are greatly appreciated :) > > Thanks, > Sasha You might be interested in looking at my package Operator Linear Algebra available at mathsource.