Menu

#939 subscripted additive functions should be additive on ( ) arguments, not [ ]

None
open
nobody
5
2022-02-27
2006-06-02
No

(%i1) declare(f,additive)$

(%i2) f[a+b](x);
Improper name or value in functional position:
f[b]+f[a]

Yeechs! The function 'f' is additive in its
subscript:

(%i3) f[a+b];
(%o3) f[b]+f[a]

Surely, a subscripted additive function shouldn't be
additive in its subscript.

Barton

Discussion

  • Robert Dodier

    Robert Dodier - 2006-06-05

    Logged In: YES
    user_id=501686

    I agree that subscripted functions should not be additive in
    their subscripts, but in Maxima the same notation is used
    for subscripted functions as for memoizing functions, and
    there's no reason to rule out additive memoizing functions.
    (Or is there?)

    I suppose F[a + b](x + y) must be a subscripted function
    call, but F[a + b] could be either a memoizing function
    call, or a subscripted function. Even in the case of F[a +
    b](x + y) could be the return value of a memoizing function
    applied to x + y.

     
  • Robert Dodier

    Robert Dodier - 2022-02-27
    • labels: Lisp Core - Simplification --> simplification, declarations, additive, subscripted functions, memoizing functions
    • Group: --> None
     
  • Robert Dodier

    Robert Dodier - 2022-02-27

    Thinking about this one again. At this point I am leaning towards saying that declare(f, something) make f[whatever] inherit the something property. Assuming that, that means f[a + b](x) should be f[a + b](x), and f[a + b](x + y) should be f[a + b](x) + f[a + b](y), i.e., I've come around to agreeing with Barton's original comment above.

     
  • Robert Dodier

    Robert Dodier - 2022-02-27
    • summary: subscripted additive functions --> subscripted additive functions should be additive on ( ) arguments, not [ ]
     

Log in to post a comment.