declaration foo distributes over bar



On 6/9/07, Barton Willis <willisb at unk.edu> wrote:

> (1) Modify 'declare' to allow things like
>
>        declare(f, distributes_over, ["[", set, matrix])

I dunno. This is even more clumsy than the existing
paired-argument notation.

>         (setf (get 'f 'distributes-over) '(mlist $set $matrix)))

> (2) Change 'threadable' (in share/contrib/multiadditive.lisp) to examine
>     the operator of the argument to see if it is in the distributes-over
>     property list of the operator. This could be done by changing a few
>     lines of threadable, I think.

Yeah, it's doubtless more efficient to work directly with
the symbol property list ... I like to try to do stuff directly
in Maxima, but whether it is actually more comprehensible
that way is, at present, a matter of taste.

> (3) Change 'threadable' to a better name.

Well, what about "distributes_over" ?

> Since I wrote threadable, I have an not-invented-here attitude toward a
> tellsimp method. But unlike a tellsimp scheme, I believe this method
> would not slow the simplifier.

I'm not too hung up on the implementation. My main concern
is to make it act a certain way from the user's point of view.

In share/contrib/multiadditive.lisp, the threadable stuff is a
simplification, right? So it would behave more or less the
same as simplification rules. I'm happy with that.

Aside from that I'm hoping we can break with tradition and
allow a less-clumsy declaration syntax.

FWIW
Robert