multioutative property



Here is a demo of an experimental multioutative property. 

By default, outativity is applied to every scalarp term, but the default can be changed:

 (%i1) load("multiadditive.lisp")$
 (%i2) declare(f,multioutative)$

Default is to apply outativity to scalarp terms:

 (%i4) f(5*x,a*x);
 (%o4) 5*f(x,a*x)

Define 'a' to be scalar

  (%i5) declare(a,scalar)$

  (%i6) f(5*x,a*x);
  (%o6) 5*a*f(x,x)

Example of a user supplied predicate: (apply outativity to any term that is free of x)

 (%i7) put(f, lambda([s], freeof(x,s)), outative_scalar_p)$

 (%i8) f(k1*x, cos(k2)*x^2);
 (%o8) k1*cos(k2)*f(x,x^2)

Comments? Instead of associating the predicate outative_scalar_p to a particular 
function, the same predicate could be used for all multioutative functions.

--Barton