rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

limit(x=0,x,0) wrong #2729

Closed rtoy closed 2 months ago

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-06 20:28:29 Created by macrakis on 2004-01-08 19:15:48 Original: https://sourceforge.net/p/maxima/bugs/484


limit(x=0,x,0) => 0=0. limit(equal(x,0),x,0) => equal(x,0)

Let's leave aside the fact that 0=0 could simplify to True -- that is not a limit issue, but a broader issue in Maxima.

The real problem is that limit(x=0,x,0) is in fact FALSE, not TRUE. Since x=0 is FALSE for all x#0, it is FALSE in particular for all 0<x<epsilon.

Presumably the problem here is that Limit is assuming that "=" is a continuous function of its arguments.

On the other hand, limit is *too* careful with other relationals:

limit(x>0,x,0,plus) => noun limit(x>=0,x,0,plus) => noun

These could perfectly well return TRUE.

But that is a feature request, not a bug.

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-06 20:28:30 Created by willisbl on 2004-01-11 21:11:23 Original: https://sourceforge.net/p/maxima/bugs/484/#489a


Logged In: YES user_id=895922

I think mapping limit over an mbag is sensible and consistent with much of Maxima.

0 = 0 could reasonally simplify to true, but it could just as well represent the set of all real (or complex) numbers. [ If 0 = 0, then 0 x = 0; the solution set of 0 x = 0 is everything.] I think Maxima shouldn't simplify 0 = 0 to true or anything else.

Barton

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-06 20:28:34 Created by willisbl on 2004-01-11 21:12:02 Original: https://sourceforge.net/p/maxima/bugs/484/#4ad5


Logged In: YES user_id=895922

I think mapping limit over an mbag is sensible and consistent with much of Maxima.

0 = 0 could reasonally simplify to true, but it could just as well represent the set of all real (or complex) numbers. [ If 0 = 0, then 0 x = 0; the solution set of 0 x = 0 is everything.] I think Maxima shouldn't simplify 0 = 0 to true or anything else.

Barton

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-06 20:28:37 Created by macrakis on 2004-01-12 19:37:40 Original: https://sourceforge.net/p/maxima/bugs/484/#7617


Logged In: YES user_id=588346

But mapping limit over an *equation* (not a generic mbag) is in general wrong if you consider an equation to be a boolean- valued object.

Remember, limit is defined for epsilon > 0, not epsilon >= 0.

Limit(x=0,x,0) really is false, since x=0 is false for all abs(x)>0.

On the other hand, limit(sin(x)=sin(x),x,inf) is true, even though limit(sin(x),x,inf) is ind, and in general ind does not equal ind (like NaN). And limit(x=x^2,x,inf) is false, even though limit(x,x,inf)=limit(x^2,x,inf)=inf.

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-06 20:28:40 Created by wjenkner on 2004-01-12 19:42:05 Original: https://sourceforge.net/p/maxima/bugs/484/#2ee0


Logged In: YES user_id=581700

> The real problem is that limit(x=0,x,0) is in fact FALSE, > not TRUE. Since x=0 is FALSE for all x#0, it is FALSE in > particular for all 0<x<epsilon.

Do you mean that in some punctured neighbourhood of 0,

is(limit(x=0,x,0)) == is(0=0) == TRUE, limit(is(x=0),x,0) == limit(FALSE,x,0) == FALSE

But this just shows that IS and LIMIT don't commute and, in particular, that IS(? = 0) is not continuous at 0.

But... where is Maxima wrong?

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-06 20:28:44 Created by macrakis on 2004-01-12 19:42:12 Original: https://sourceforge.net/p/maxima/bugs/484/#18e0


Logged In: YES user_id=588346

Whether 0=0 should simplify to true is a side issue.

I don't follow your argument about 0=0 representing the set of all numbers. ANY true statement represents the universal set (if you believe in that), whether it is {x | 0=0} or {x | true} or {x | Socrates is mortal}. Note by the way that there is nothing telling you the domain. 0=0 could equally well represent the set of all determinant-1 matrices or all the 5th degree polynomials over Z7, if that's the domain of x's you are manipulating.

rtoy commented 2 months ago

Imported from SourceForge on 2024-07-06 20:28:48 Created by robert_dodier on 2006-04-09 20:40:07 Original: https://sourceforge.net/p/maxima/bugs/484/#62ac


rtoy commented 2 months ago

Imported from SourceForge on 2024-07-06 20:28:51 Created by willisbl on 2022-01-29 13:17:01 Original: https://sourceforge.net/p/maxima/bugs/484/#f31e


rtoy commented 2 months ago

Imported from SourceForge on 2024-07-06 20:28:54 Created by willisbl on 2022-01-29 13:17:01 Original: https://sourceforge.net/p/maxima/bugs/484/#5874


Fixed by Commit [20b306]. Closing ticket.