In a given context, facts(v) applied with various v
must reproduce the entire output of the facts()
command. This is not the case:
(C14) facts();
(D14) [z + a > 0, b > z]
(C15) facts(a);
(D15) []
(C16) facts(b);
(D16) [b > z]
(C17) facts(z);
(D17) [b > z]
(C18) facts(z + a);
(D18) []
It would be OK to have:
facts(z); => [z + a > 0, - z + b > 0]
facts(a); => [z + a > 0]
facts(b); => [- z + b > 0]
facts(z+a); => [z + a > 0]
facts(a+z); => [z + a > 0]
facts(b-z); => [- z + b > 0]
facts(-z+b); => [- z + b > 0]
Logged In: YES
user_id=501686
Observed in 5.9.3cvs.
Adding a copy of the posting from the bug report ID: 2035858, which has been closed, because it is a duplicate of this report.
--------------------------------
Barton Willis ( willisbl ) - 2008-08-02 13:07
(%i1) assume(x > a);
(%o1) [x>a]
OK--list facts about x:
(%i2) facts(x);
(%o2) [x>a]
(%i3) assume(x > a -b);
(%o3) [x+b-a>0]
Not OK--- facts(x) doesn't include x + b - a > 0
(%i4) facts(x);
(%o4) [x>a]
Based on the user documentation, I think most readers would assume that
facts(x) would include x + b - a > 0.
The user documentation says:
"If item is not the name of a context, facts (item) returns a list of the
facts known about item in the current context"
Maybe this is mostly a documentation problem; it's not clear what "item"
means:
(%i10) assume(x > a + b);
(%o10) [x-b-a>0]
(%i11) facts(a+b);
(%o11) []
------------------------------
Dieter Kaiser
Fixed in compar.lisp revision 1.70. We get for the examples of this bug report:
(%i2) assume(z+a>0,b>z)$
(%i3) facts(a);
(%o3) [z+a > 0]
(%i4) facts(b);
(%o4) [b > z]
(%i5) facts(z);
(%o5) [z+a > 0,b > z]
(%i6) facts(z+a);
(%o6) [z+a > 0]
(%i7) facts(a+z);
(%o7) [z+a > 0]
But the following does not work. This case has to be deduced from the database. This is not done by the current implementation of $facts:
(%i8) facts(b-z);
(%o8) []
Closing this bug report as fixed.
Dieter Kaiser