Re: Re: equaltity of lists

*To*: mathgroup at smc.vnet.net*Subject*: [mg19243] Re: [mg19162] Re: equaltity of lists*From*: "Drago Ganic" <drago.ganic at in2.hr>*Date*: Wed, 11 Aug 1999 02:06:54 -0400*Organization*: HiNet*References*: <7ooid4$i0c@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Hi, thank all of you for answering my beginners questions. It is really an excellent group like Mathematica is an excellent program. I do now accept the Equal functionality of Mathematica (a==b don't results to False because a,b could be "anything" - equal or unequal) the problem is now : Why does Mathematica simplify expressions like x^2/x to x. I have a suggestion. Wouldn't it be nice to have such a behavior. 1. Mathematica should not use Cancel[ ] when doing automatically simplifications. When I enter, for example, x^2/x I should get back x^2/x and not x as it is now. 2. Reduce[] should use Cancel[] for the generation of the result and not for simplification (see point 1). Reduce[x^2/x == x,x] should not evaluate to True because x^2/x == x is an equation and not an identity. The expression is valid only for x != 0 (that's the solution for the equation). In my opinion this is a bug (wrong behavior) because it is written in The Book: "The equations generated by Reduce are equivalent to eqns, and contain _ all the possible solutions_. " 3. Simplify should have an option GenerateConditions like Integrate but the option should work for the case x^2/x too. In Integrate it does not - the reason is for sure the use of Cancel[] (as part of Simplify) over the function _before_ integration (auomatically simplification - see point 1) Example: Integrate[1/x,{x,-2,3}] ... diveragas ... That's nice but why Integrate[1/x,{x,-2,3}, GenerateConditions->True] -Log[a]+Log[b] That's wrong for a= -2, b =3 !!! For Simplify, GenerateConditions should have False as the default value, so there would be backward compatibility, and no efficiency loss. 4. Why having the function Reduce[] when Solve[] could have the option GenerateConditions (default value: False). Wouldn't this be consistent. Andrzej Kozlowski <andrzej at tuins.ac.jp> said the following some time ago. >If Mathematica did not perform this basic simplification but >waited for additional information to be entered (e.g. that x >is not zero) or if it returned conditional answers it would >greatly slow down many complex operations. (for example if any >expression contained something of the form p/p mathematica >would have to solve the equation p==0 before performing a >simplification). The additional information is now easy to enter as an Assumption in Simplify (version 4.0). Making the default value False for the option GenerateConditions, Complex operations should not been slow down (Research usage of Mathemtacia). On the other hand, in the educational area or for rather simple computations it _would_ be nice to have those conditionals. Of course, the function Solve must be use (with Option GenerateConditions - see point 4). Andrzej wrote also >But there is also a more mathematical justification for >this simplification. If you think of the expression x/x as a >(say) complex function of x than indeed it is not defined at >x=0 and not equal to x. But when you think of it "algebraically" >as x*x^(-1), you can read this as x times the multiplicative >inverse of x, which is indeed always 1 whenever the >expression makes sense. So in this context the simplification >Mathematica performs automatically may seem quite reasonable. As you said Andrzej x^2 * x^(-1) = x^(2-1) Equals to x _whenever the expression makes sense_. But x makes sense in the point 0 and x^2/x does not. So I don't see any difference between function equality and expression equality, because an expression _is a function_. When Wolfram says "Everything is an expression" he could also say "Everything is a function". Isn't the full form of an expression h[x1, x2, ...]. To me, this looks like a function. Every one is talking about generic solutions and formal algebra - that's something new for me. Is there a book about such a thing ? Am I right when I say division by zero is not defined in mathematics (algebra, calculus, what ever), computer languages (starting from assembler). So when it is said Mathematica is just a computer language and one should not look at it as an implementation of mathematics, I cannot agree with it because Mathematica implements mathematics so fantastic (as far as I know mathematics). So why she divides with 0 ? (okay she doesn't numerically : 1/0 -> ComplexInfinity). The better question is: why cancels she x/x to 1 when we know that is not true for x=0 and it is true for, say, x=1. If Mathematica doesn't know the answer for {a,b} == {b,a} {a,b} == {b,a} because a,b could be anything she should also not answer x^2/x == x True or x^2/x x because x could be anything and acording to that the answer would be different. So the right and consistent answer should be x^2/x == x x^2/x == x or x^2/x x^2/x As I see it, the main problem (if there is anyone) is in the usage of Concel[] in the simplification procedures without generating conditions. Greetings from Croatia Drago Ganic

**Cleanslate -- where to find it?**

**Re: SetDirectory**

**Re: equaltity of lists**

**Re: Re: Re: equaltity of lists**