Re: The orde of product
- To: mathgroup at smc.vnet.net
- Subject: [mg123438] Re: The orde of product
- From: "Chris Degnen" <degnen at cwgsy.net>
- Date: Wed, 7 Dec 2011 06:15:29 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Hi, This includes the reverse process: SameQ[a*b,b*a] Unprotect[Times]; Attributes[Times]=DeleteCases[Attributes[Times],Orderless]; Protect[Times]; SameQ[a*b,b*a] Unprotect[Times]; Attributes[Times]=Append[Attributes[Times],Orderless]; Protect[Times]; SameQ[a*b,b*a] But I think you should probably use Bob Hanlon's suggestion of NonCommutativeMultiply (**), i.e. SameQ[a*b,b*a] SameQ[a**b,b**a] ----- Original Message ----- From: Happ To: Chris Degnen ; mathgroup Sent: Wednesday, December 07, 2011 2:31 AM Subject: =BB=D8=B8=B4=A3=BA The orde of product Thank you very much! What you have done is really what I want. Besides this, I also want to know how can I get back to the original definition of "*" by Mathematica 7. Can you help me? ------------------ =C9=D0=C1=C1 =D3=DA ------------------ =D4=AD=CA=BC=D3=CA=BC=FE ------------------ =B7=A2=BC=FE=C8=CB: "Chris Degnen"; =B7=A2=CB=CD=CA=B1=BC=E4: 2011=C4=EA12=D4=C27=C8=D5(=D0=C7=C6=DA=C8=FD) = =C9=CF=CE=E77:25 =CA=D5=BC=FE=C8=CB: "mathgroup"; "=B5=C0 =BA=F1"; =D6=F7=CC=E2: Re: The orde of product I'm pretty sure this isn't what you want: SameQ[a*b, b*a] Unprotect[Times]; Attributes[Times] == DeleteCases[Attributes[Times], Orderless]; Protect[Times]; SameQ[a*b, b*a] =B5=C0 =BA=F1 wrote: > > How can I do that a*b is unequal to b*a in Mathematica 7? > Thank you. >