Bugs item #811522, was opened at 20030924 06:13
Message generated for change (Comment added) made by crategus
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104933&aid=811522&group_id=4933
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Lisp Core  Assume
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Stavros Macrakis (macrakis)
Assigned to: Nobody/Anonymous (nobody)
Summary: redundant question in limit
Initial Comment:
limit(r^(b2)*(xr)^2,r,0)
Is b  2 positive, negative, or zero?
neg;
Is x zero or nonzero?
zero;
Is b an integer?
yes;
Is 2  b an even number?
no;
Is 2  b an even number? <== redundant question
no;

>Comment By: Dieter Kaiser (crategus)
Date: 20100320 21:20
Message:
Fixed in compar.lisp revision 1.69. We no longer get the redundant
questions:
(%i3) limit(r^(b2)*(xr)^2,r,0);
Is b2 positive, negative, or zero?
n;
Is b positive, negative, or zero?
z;
(%o3) 'limit(r^(b2)*(xr)^2,r,0)
Closing this bug report as fixed.
Dieter Kaiser

Comment By: Dieter Kaiser (crategus)
Date: 20100314 02:03
Message:
At first again the example of this bug report with the current Maxima
5.20post:
(%i2) limit(r^(b2)*(xr)^2,r,0);
Is b2 positive, negative, or zero?
n;
Is b positive, negative, or zero?
z;
Is 2b an even number?
n;
Is 2b an even number?
n;
Is 2b an even number?
n;
(%o2) 'limit(r^(b2)*(xr)^2,r,0)
After the second question Maxima knows that b=0. Therefore, the expression
2b is even. But Maxima does not recognize this. The answer is in
contradiction to the known facts and Maxima asks the same question three
times.
The reason is that the function evod which is called from askinteger does
not look into the database for facts like equal(b,0). We had the same
problem with maximaintegerp and introduced the extension
checkintegerfacts.
We can extend the routine checkintegerfacts to look for facts which are
related to even or odd integers. With such an extension we will get:
(%i4) limit(r^(b2)*(xr)^2,r,0);
Is b2 positive, negative, or zero?
n;
Is b positive, negative, or zero?
z;
(%o4) 'limit(r^(b2)*(xr)^2,r,0)
Maxima no longer ask the quesition "Is 2b an even number?" because this
fact is deduced from the database.
This is another simple example. We assume n equal to 2. Therefore n is
even, but Maxima does not know it:
(%i1) assume(equal(n,2))$
(%i3) askinteger(n,even);
Is n an even number?
y;
With the extension of checkintegerfacts we get:
(%i5) assume(equal(n,2))$
(%i6) assume(equal(m,3))$
(%i7) askinteger(n,even);
(%o7) yes
(%i8) askinteger(m,odd);
(%o8) yes
Dieter Kaiser

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104933&aid=811522&group_id=4933
