Tellsimpafter conditions



Hi everyone.

By inference from the following web page:

  http://www.clifford.org/anonftp/clf-alg/software/macsyma.txt

Macsyma per se apparently has the ability to add a condition (as a third
argument) to tellsimpafter and used as follows:

=====================================================================
Problem: Expand (s9 + s8 + s7 + s6 + s5 + s4 + s3 + s2 + s1 + s0 )^5
in an algebra where 1/2 ( si . sj + sj . si ) = delta(i,j)

/* Define the two simplification rules. */
(c1) matchdeclare([i,j],integerp)$

(c2) tellsimpafter(s[i]^^2,1)$

(c3) tellsimpafter(s[i].s[j],-s[j].s[i],i>j)$

/* Optional: compile rules for speed. */
(c4) compile_rule(all)$

/* Compute the result. */
(c5) factor(expand(sum(s[i],i,0,9)^^5))

(d5)  100 (s  + s  + s  + s  + s  + s  + s  + s  + s  + s  )
            9   8     7    6    5    4    3    2    1    0
=====================================================================


Looking at the function "proc-$tellsimpafter" in "src/matcom.lisp"
Maxima does not do anything with that third argument.

Is there a way to add this kind of functionality without rewiring
"proc-$tellsimpafter"?

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?

Would there be any pitfalls attached to such an addition?

Is there a utility function in Maxima which could be used for compiling
such a test into whatever internal form is required?

Cheers

Mike Thomas.