We could convert oddp and related predicates into simplifying
functions. This change could break code. A compromise is to give oddp
(and friends) an optional argument that allows for a literal or
non-literal test; examples:
(%i1) declare(o,odd)$
Default is a literal test for an odd integer:
(%i2) oddp(o);
(%o2) false
Nondefault test:
(%i3) oddp(o, 'nonliteral);
(%o3) true
(%i4) declare(n,integer);
(%o4) done
(%i5) oddp(2*n+1,'nonliteral);
(%o5) true
(%i6) oddp(2*n+1);
(%o6) false
(%i7) oddp(p,'nonliteral);
(%o7) oddp(p, nonliteral)
(%i8) subst(p=%pi,%);
(%o8) false
Good, bad, suggestions, or better alternatives? Maybe we can unify:
(%i101) [a # b, notequal(a,b), is(notequal(a,b)), not (a = b)];
(%o101) [a#b,notequal(a,b),unknown,true]
---Barton