On Apr 11, 2011, at 3:56 PM, Ronan Lamy wrote:

> Le lundi 11 avril 2011 à 15:42 -0600, Aaron S. Meurer a écrit :
>> On Apr 11, 2011, at 2:25 AM, smichr wrote:
>> 
>>> Should `Integral(x, (x, 1, 2)) == Integral(y, (y, 1, 2))` be True? If
>>> so, smichr branch 2068b has a commit that makes this testing possible.
>>> 
>> This is a good question.  For one thing, == is not mathematical
>> equality but exact equality, so there is no reason why it should have
>> to be True.  So my initial response is that no, it should not.  
>> 
> I think it should. x and y are bound symbols that have no meaning
> outside the integrals, so their identity should be completely
> irrelevant. In fact, they should probably be replaced with dummies upon
> instantiation of the Integral.
> 

Well, of course, it does not matter mathematically, but it does matter for 
other reasons.  For example, it matters for printing.  You wouldn't want to have

>>> Integral(xyz, (xyz, 0, 1))
Integral(x, (x, 0, 1))

Using dummies internally is a good idea.  I think that they shouldn't compare 
equal unless we at least do that.  

And we can take it further.  To take an example from a discussion from one of 
the pull requests, should Integral(f(x, y), (x, 0, 1), (y, 0, 1)) == 
Integral(f(x, y), (y, 0, 1), (x, 0, 1)) return True? At what point do we draw 
the line for the "exact equality" that == is supposed to be checking for?

Anyway, I think if we do more work with manipulating integrals (like combining 
them), we will see if this is a good idea or not.

Aaron Meurer

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to