On 3/21/06, Richard Fateman <fateman at cs.berkeley.edu> wrote:
> e.g. in Mathematica this rule might be
> s[i_Integer].s[j_Integer] -> s[j].s[i]/; i<j
> or something like that, which is neater.
well, if we are willing to consider alternate syntax,
how about
(s[i] . s[j] --> - s[j] . s[i], s[i]^^2 --> 1)
assuming (integerp(i), integerp(j), i > j);
i wrote some macros a while ago which just pastes
together the necessary matchdeclare and tellsimpafter
calls from the stuff in an expression like that.
(although the stuff i wrote can't handle predicates of
more than one variable, so this example won't work
at present, but i can fix that.)
for what it's worth,
robert dodier