MathGroup Archive 2002

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

Search the Archive

Re: Gross Bug in Simplify

  • To: mathgroup at
  • Subject: [mg32643] Re: Gross Bug in Simplify
  • From: "Alan Mason" <swt at>
  • Date: Fri, 1 Feb 2002 02:03:02 -0500 (EST)
  • References: <a3api0$49r$>
  • Sender: owner-wri-mathgroup at

"Andrzej Kozlowski" <andrzej at> wrote in message
news:a3api0$49r$1 at
> I can't see why you claim this is a bug and that it is caused by
> >  Simplify misparses expressions m + n f[__], where m and n are
> > numeric,  as (m+n)
> > f[__]
> It seems to me that what you are seeing is just  a special case of the
> following:
> In[1]:=
> z/:z^v_=z;
> In[2]:=
> Simplify[1-z]
> Out[2]=
> 0
> This seems to me entirely correct, since z==1 is the only complex number
> with the property that z^(anything)==z. Thus it would appear that your
> function f[z__] ought to have the value 1 for all arguments. This is
> consistent with all your outputs. Maybe I am missing your point, but
> mathematically at least there appears to be nothing wrong here.

To be sure, I can get things to work by adding a condition to the rule:

\[Delta][u__]^v_ ^:= \[Delta][u] /; v \[NotEqual] 0 ;
Simplify[(1-\[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]]

-(-1+\[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]

It seems counterintuitive to have to add the condition, even granting that
Mathematica always treats f^0 as 1, even for symbols f.
But your logic doesn't explain why my original rule (without the condition)

SetAttributes[\[Delta], Orderless];
\[Delta][u__]^v_  ^:= \[Delta][u]  ;
Simplify[(2- x \[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]]

(2-x \[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]

Clearly in this case, Mathematica isn't treating delta[__] as 1.  Also, the
phenomenon in question occurs only with Simplify-- not with other functions
such as Expand, e.g.

Perhaps someone can account for the behavior illustrated in the following
notebook; I am unable to do so.  I continue to think it's a "gross bug" in


Sincerely, Alan

SetAttributes[\[Delta], Orderless];
\[Delta][u__]^v_  ^:= \[Delta][u]  ;
Simplify[(2 - \[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]]
Simplify[(2- x \[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]]
Expand[(2-  \[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]]

\[Delta][i,\[Mu]] \[Delta][j,\[Mu]]

(2-x \[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]

2 \[Delta][j,\[Mu]]-\[Delta][i,\[Mu]] \[Delta][j,\[Mu]]

\[Delta][u__]^v_ ^:= \[Delta][u] /; v \[NotEqual] 0;
Simplify[(2-\[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]]

-(-2+\[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]

  • Prev by Date: Re: Re: Keeping order with Union
  • Next by Date: Re: finding independent variable groups
  • Previous by thread: Re: Gross Bug in Simplify
  • Next by thread: Re: Gross Bug in Simplify