Menu ▾ ▴

#925 featurep of subscripted variable spurious result

None
open
nobody
7
2022-02-27
2006-05-14
No

(%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

Discussion

  • Robert Dodier

    Robert Dodier - 2006-08-26

    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.

     
  • Robert Dodier

    Robert Dodier - 2022-02-27
    • labels: Lisp Core - Assume --> featurep, real, declarations, subscripted variables
    • summary: featurep of subscripted variables --> featurep of subscripted variable spurious result
    • Group: --> None
     
  • Robert Dodier

    Robert Dodier - 2022-02-27

    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.

     

Log in to post a comment.