(%i1) featurep(a,real);
(%o1) false <-- OK
(%i2) featurep(a[1],real);
(%o2) true <-- not OK
Do we have a policy? Are all mapatoms except %i and
infinity real? That would make %o1 wrong and %o2 correct.
Should the setting of domain make a difference?
Barton
Logged In: YES
user_id=501686
featurep is a pretty confused function. A substantial bit of
logic has accreted onto featurep, but as it stands it is
incomplete (as in the example above).
We probably need to separate (1) the stuff which is just
checking for declaration flags from (2) the stuff which is
attempting to infer elementp(x, S) for S = reals, complexes,
etc. I think featurep should implement (1), but not (2),
which should be a revision of elementp.
Bumping up the priority -- weakness of assume/declare stuff
is a serious hindrance.
Maxima post-5.45, same behavior for the two examples shown.
Making a note, for myself mostly, that this case is different from discussions about whether or not subscripted x[i] should inherit properties declared for x; in this case there's no declaration for x, so the result for x[i] is spurious.