Re: Please Help with Sums with the same StandardForm but different
- To: mathgroup at smc.vnet.net
- Subject: [mg89133] Re: Please Help with Sums with the same StandardForm but different
- From: dh <dh at metrohm.ch>
- Date: Mon, 26 May 2008 06:24:20 -0400 (EDT)
- References: <g15qqi$pf2$1@smc.vnet.net>
Ho Jose, in general an expression sum1 sum2 means the summands of sum1 are sum2. This is in line with conventions from Mathematica (that is in a double sum, the first index sums last). Therefore, both expressions are identical. As there is no description what Equal really does we have to guess. If we look at the FullForm of your expression, we see that they differ, only the printed Form is the same. Well, I would gues that Equal compares the FullForm. To obtain "True" from Equal we have therefore to ensure that both sides of the equation have the asme form. E.g.: t1=Sum[f[j,k],{j,ja,jb},{k,ka,kb}] t2=Sum[Sum[f[j,k],{k,ka,kb}],{j,ja,jb}] t1==t2/.{HoldPattern[Sum[v1_,v2_,v3_]]:>Sum[Sum[v1,v3],v2]} hope this helps, Daniel Jose Luis Gomez wrote: > (* Dear group > > > > In Mathematica 6.0 it is possible to generate Sums with the same > StandardForm but different InputForm > > > > In other words, they look exactly the same for the final user, but they are > considered different by Mathematica > > > > Please evaluate: > > (PLEASE NOTICE THAT HERE INDEX j GOES FIRST) > > *) > > > > Clear[f,j,k,ja,jb,ka,kb]; > > > > Sum[f[j,k],{j,ja,jb},{k,ka,kb}] > > > > (* You obtain the sum in "sigma notation" (StandardForm). > > Next evaluate the following > > (PLEASE NOTICE THAT HERE INDEX k GOES FIRST) > > *) > > > > Sum[ Sum[f[j,k],{k,ka,kb}], {j,ja,jb}] > > > > (*As you can see, both expressions display exactly the same, they look the > same in StandardForm, > > However they are considered different by Mathematica. > > To see this, evaluate: > > *) > > > > Sum[f[j,k],{j,ja,jb},{k,ka,kb}] == Sum[ Sum[f[j,k],{k,ka,kb}], {j,ja,jb}] > > > > (* I was expecting to obtain True, as both Sums look exactly the same in the > Mathematica notebook. > > However Mathematica does Not answer True or False, it just returns > unevaluated, > > > > So I have the following questions for those who would like to help me: > > FIRST: Am I right? Both expressions are the same? Or is there a situation > where these two expressions, which look almost identical in StandardFrom, > are actually different? > > SECOND: I have try FullSimplify, Reduce and Refine, trying to obtain True, > but it does Not work. Is there any command or simplification to make > Mathematica answer True, maybe under certain assumptions? > > THIRD: Could this behavior be considered a bug? > > I am using Mathematica 6.0 > > Thank you for your time and help > > > > Jose > > Mexico > > *) > > > -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh at metrohm.com> Internet:<http://www.metrohm.com>
- Follow-Ups:
- RE: Re: Please Help with Sums with the same StandardForm but different
- From: "Jose Luis Gomez" <jose.luis.gomez@itesm.mx>
- RE: Re: Please Help with Sums with the same StandardForm but different