MathGroup Archive 2007

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

Search the Archive

Re: Why is NonCommutativeMultiply Protected?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82694] Re: Why is NonCommutativeMultiply Protected?
  • From: "Michael Weyrauch" <michael.weyrauch at gmx.de>
  • Date: Mon, 29 Oct 2007 05:28:44 -0500 (EST)
  • References: <fg1ivs$k16$1@smc.vnet.net>

As far as I can see there is absolutely no problem to unprotect and redefine
NonCommutativeMultiply[]. I do it all the time in my programs.
Of course, alternatively you can use e.g. Wedge[] and give it the attributes
and properties you need.

Michael

"Szabolcs Horvát" <szhorvat at gmail.com> schrieb im Newsbeitrag news:fg1ivs$k16$1 at smc.vnet.net...
> Why is NonCommutativeMultiply Protected?
>
> Is it safe to redefine NonCommutativeMultiply?  Does it have any special
> built-in properties (apart from being Flat and OneIdentity)?  Is it used
> by any of the built-in functions?
>
> NonCommutativeMultiply certainly does not evaluate to anything, but the
> same can be said about Rule[], which is not at all safe to redefine
> because: 1. It has some special properties (it affects scoping, it does
> not like Unevaluated[], etc.)  2. It is used together with functions
> such as Replace, and (most probably) built-in functions use it internally.
>
> So is it safe to Unprotect[NonCommutativeMultiply] and attach
> definitions to it?  (I know that in certain situations one can use
> UpValues, but I would like to know the answer to this question.)
>
> -- 
> Szabolcs
> 



  • Prev by Date: Re: A riddle: Functions that return unevaluated when they cannot
  • Next by Date: Re: Zoom2D
  • Previous by thread: Why is NonCommutativeMultiply Protected?
  • Next by thread: Re: Why is NonCommutativeMultiply Protected?