Skip to main content
11 events
when toggle format what by license comment
Oct 5, 2014 at 18:08 comment added Teake Nutma @vanabel Sorry, I can't decode your last sentence. In any case, ___ is a BlankNullSequence, which can match zero or more arguments. See e.g. this tutorial for more information.
Oct 5, 2014 at 14:01 comment added van abel @TeakeNutma So why 1**c/.before___ ** a_?NumericQ ** after___ :> a before ** after output NonCommutativeMultiply[c]? I mean it is weird that here before shall be null, then why before**h return NonCommutativeMultiply[h] then?
Oct 5, 2014 at 8:24 comment added Teake Nutma @vanabel I was referring to the last step in the simplification chain; your example needs the last two steps. So 1**c is not simplified to c because your genericRule is missing the first two rules that move numeric factors outside of NCM.
Oct 5, 2014 at 2:10 comment added van abel @TeakeNutma May I invite you to take a look at my question?
Oct 5, 2014 at 0:56 comment added van abel @TeakeNutma It seems that it is not: when I modify the code as:genericRules = { NonCommutativeMultiply[x_] :> x };, then 1**c//ApplyRules output 1**c rather than c.
Oct 4, 2014 at 16:47 comment added Mr.Wizard @van By the way to automatically apply this set of rules to output you can set $Post = ApplyRules.
Oct 4, 2014 at 15:02 comment added Teake Nutma @vanabel That's for the last step in this simplification sequence: a ** b ** c -> 1 ** c -> NonCommutativeMultiply[c] -> c. This is similar to what happens for Times, compare namely the following: Times[1, x] -> Times[x] -> x.
Oct 4, 2014 at 15:00 history edited Teake Nutma CC BY-SA 3.0
added 234 characters in body
Oct 4, 2014 at 13:03 vote accept van abel
Oct 4, 2014 at 12:51 comment added van abel what's the function of NonCommutativeMultiply[x_] :> x
Oct 4, 2014 at 10:38 history answered Teake Nutma CC BY-SA 3.0