COMPACT INDEX

COMPACT _ _ _ _ _ _ _ _ _ _ _ _ package

Author: Anthony C. Hearn

COMPACT is a package of functions for the reduction of a polynomial in the presence of side relations. COMPACT applies the side relations to the polynomial so that an equivalent expression results with as few terms as possible. For example, the evaluation of


     compact(s*(1-sin x^2)+c*(1-cos x^2)+sin x^2+cos x^2,
             {cos x^2+sin x^2=1});

yields the result



              2           2
        SIN(X) *C + COS(X) *S + 1

The first argument to the operator compact is the expression and the second is a list of side relations that can be equations or simple expressions (implicitly equated to zero). The kernels in the side relations may also be free variables with the same meaning as in rules, e.g.


     sin_cos_identity :=  {cos ~w^2+sin ~w^2=1}$
     compact(u,in_cos_identity);

Also the full rule syntax with the replacement operator is allowed here.