/* First load the necessary file: */
/* LOAD('DECLIN); */
/* for DOE-MACSYMA */
/* For example, define the linearity properties of F.
F is to be linear in its first, third and fifth arguments.
The predicate to be used for distinguishing the coefficients
of these arguments will be called FVARP. */
/* An example of an expression with the necessary property is: */
/* In this expression, FF is linear in [X, Y, Z], taken
as the components of a vector. Note that this is distinguished
from being linear in X, Y, or Z taken one at a time.
Here is an expression that is equivalent to 0. */
/* The function LINSIMP looks at sums contained in its
first argument and combines the F expressions whenever possible. */
/* The function LINSIMP extracts coefficients from the arguments
of F whenever it can. */
/* To remove the LINEAR_OPERATOR property from F, use REM. */
/* Now verify that it is gone: */
/* LINSIMP can simplify with respect to several operators.
To illustrate this, we first make the
necessary declarations. */
/* Notice that in the above example, LINSIMP was NOT confused
by the presence of F as both a variable and an undefined
LINSIMP will not combine forms that differ in the
arguments that are not specified in the linearity
/* But it will make combinations whenever possible, even
when the operator appears with varying numbers of
/* LINSIMP also recognizes the zero case: */
/* Here is an example with SUM: */