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

open
nobody
5
2006-04-09
2004-01-08
No

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.

## Discussion

• Barton Willis - 2004-01-11

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

• Barton Willis - 2004-01-11

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

• Stavros Macrakis - 2004-01-12

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.

• Wolfgang Jenkner - 2004-01-12

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?

• Stavros Macrakis - 2004-01-12

Logged In: YES
user_id=588346

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

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.

• Barton Willis - 2004-01-12

Logged In: YES
user_id=895922

The idom "Take the <limit, derivative, cube, ...> of both
sides" is uttered a few thousand times per hour; for that
reason, I think mapping limit, diff, and cube over an equality
is sensible (not always correct, but GIGO) If, as you suggest

(x = x) == true

we'd also have to live with

diff(x = x,x) ---> diff(true,x) ---> huh?

I doubt this is what most users expect or want.