REDUCE

7.27 Creating / Removing Variable Dependency

There are several facilities in REDUCE, such as the differentiation operator and the linear operator facility, that can utilize knowledge of the dependency between various variables, or kernels. Such dependency may be expressed by the command depend. This takes an arbitrary number of arguments and sets up a dependency of the first argument on the remaining arguments. For example,

        depend x,y,z;

says that x is dependent on both y and z.

        depend z,cos(x),y;

says that z is dependent on cos(x) and y.

Dependencies introduced by depend can be removed by nodepend. The arguments of this are the same as for depend. For example, given the above dependencies,

        nodepend z,cos(x);

says that z is no longer dependent on cos(x), although it remains dependent on y.

As a convenience, one or more dependent variables can be specified together in a list for both the depend and nodepend commands, i.e.

(no)depend {\(y_1\), \(y_2\), \(\ldots \)}, \(x_1\), \(x_2\), \(\ldots \)

is equivalent to

(no)depend \(y_1\), \(x_1\), \(x_2\), \(\ldots \); (no)depend \(y_2\), \(x_1\), \(x_2\), \(\ldots \); \(\ldots \)

Both commands also accept a sequence of “dependence sequences”, where the beginning of each new dependence sequence is indicated by a list of one or more dependent variables. For example,

        depend {x,y,z},u,v,{theta},time;

is equivalent to

        depend x,u,v;
        depend y,u,v;
        depend z,u,v;
        depend theta,time;


Hosted by Download REDUCE Powered by MathJax