Learning to work with non-commutative oscillators
- To: mathgroup at smc.vnet.net
- Subject: [mg41864] Learning to work with non-commutative oscillators
- From: Oleksandr Pavlyk <pavlyk at phys.psu.edu>
- Date: Sat, 7 Jun 2003 00:08:56 -0400 (EDT)
- Organization: Penn State University, Center for Academic Computing
- Sender: owner-wri-mathgroup at wolfram.com
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