[Date Index]
[Thread Index]
[Author Index]
Re: Gross Bug in Simplify
*To*: mathgroup at smc.vnet.net
*Subject*: [mg32643] Re: Gross Bug in Simplify
*From*: "Alan Mason" <swt at austin.rr.com>
*Date*: Fri, 1 Feb 2002 02:03:02 -0500 (EST)
*References*: <a3api0$49r$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
"Andrzej Kozlowski" <andrzej at platon.c.u-tokyo.ac.jp> wrote in message
news:a3api0$49r$1 at smc.vnet.net...
> 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.
>
Hello.
To be sure, I can get things to work by adding a condition to the rule:
In[33]:=
\[Delta][u__]^v_ ^:= \[Delta][u] /; v \[NotEqual] 0 ;
Simplify[(1-\[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]]
Out[34]=
-(-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)
gives
In[51]:=
Clear[\[Delta]]
SetAttributes[\[Delta], Orderless];
\[Delta][u__]^v_ ^:= \[Delta][u] ;
Simplify[(2- x \[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]]
Out[54]=
(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
Simplify.
:=))
Sincerely, Alan
In[1]:=
Clear[\[Delta]]
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]]]
Out[4]=
\[Delta][i,\[Mu]] \[Delta][j,\[Mu]]
Out[5]=
(2-x \[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]
Out[6]=
2 \[Delta][j,\[Mu]]-\[Delta][i,\[Mu]] \[Delta][j,\[Mu]]
In[7]:=
Clear[\[Delta]];
\[Delta][u__]^v_ ^:= \[Delta][u] /; v \[NotEqual] 0;
Simplify[(2-\[Delta][i,\[Mu]]) \[Delta][j,\[Mu]]]
Out[9]=
-(-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**
| |