hello mike,
> If it comes to rewiring, is there some documentation of the means by
> which a new rule is added, where it is stored and how it is fired?
i made an attempt to document the behavior of the
pattern matching code -- see matchdeclare and tellsimpafter
in the reference manual (5.9.2 or later).
> Would there be any pitfalls attached to such an addition?
i don't see any problems -- the additional condition could
just be tacked onto whatever is supplied by a symbol's
matchdeclare property.
> Is there a utility function in Maxima which could be
> used for compiling such a test into whatever
> internal form is required?
not that is visible from the user level -- but the
construction of pattern-matching tests seem to be routed
through the function GETDEC in src/matcom.lisp,
so i guess that would be the place to start tinkering.
whether or not it should be done depends mostly on
whether it seems generally useful. i think it would be
convenient, but it's not necessary (since equivalent
functionality can be achieved via matchdeclare).
thanks to andrej v for the nice example.
hth,
robert dodier