Menu ▾ ▴

#5644 is(abs(f(%i)) >= 0) gives false

None
open
nobody
sign (101)
5
2026-10-04
2026-10-04
No

By Claude:

is takes every expression that contains %i for non-real and answers false to inequalities about it. That is wrong when %i appears only inside a function whose values are real, like abs, realpart, or a function declared real:

(%i1) is(abs(f(%i)) >= 0);
(%o1) false
(%i2) is(realpart(f(%i)) >= 0);
(%o2) false
(%i3) declare(h, posfun, h, real)$
(%i4) sign(h(%i));
(%o4) pos
(%i5) is(h(%i) > 0);
(%o5) false

abs(f(%i)) is never negative, so %o1 should be true. realpart(f(%i)) is real with unknown sign, so %o2 should be unknown. And is should agree with sign in %o5 and give true. Expressions that are not real should still give false, as they do now:

(%i6) [is(%i > 0), is(x + %i > 0), is(f(%i) > 0)];
(%o6) [false, false, false]

Discussion


Log in to post a comment.