# Depends

Makes an object implicitly dependent on other objects.

Makes an object implicitly dependent on other objects, i.e. assumes
that the indicated object is a function of the arguments of the
property. For examplex::Coordinate;
\phi::Depends(x);

\\(\\displaystyle{}\text{Attached property Coordinate to }x.\\)

\\(\\displaystyle{}\text{Attached property Depends to }\phi.\\)

makes $\phi$ an implicit function of $x$. Instead of indicating the
coordinate on which the object depends, it is also possible to
indicate which derivatives would yield a non-zero answer, as in

\nabla{#}::Derivative;
\phi::Depends(\nabla{#});

\\(\\displaystyle{}\text{Attached property Derivative to }\nabla{\#}.\\)

\\(\\displaystyle{}\text{Attached property Depends to }\phi.\\)

(Note: if you did this in Cadabra 1.x you could write

`Depends(\nabla)`

; this is no longer
possible in 2.x and you need to write the full pattern `Depends(\nabla{#})`

).
Finally, it is possible to use an index name to indicate on which
coordinates a field depends,{m,n,p,q}::Indices(vector);
\phi::Depends(m);

\\(\\displaystyle{}\text{Attached property Indices(position=free) to }\left(m, \\mmlToken{mo}[linebreak="goodbreak"]{} n, \\mmlToken{mo}[linebreak="goodbreak"]{} p, \\mmlToken{mo}[linebreak="goodbreak"]{} q\right).\\)

\\(\\displaystyle{}\text{Attached property Depends to }\phi.\\)

Taking objects out of derivatives (because they do not depend on them)
is handled using the

`unwrap`

algorithm.
If you want to make an object depend on more than one thing, you need
to specify them all in one `Depends`

property. If you specify
them in two separate properties, the last property will overwrite
the previous one. Therefore, you get\hat{#}::Accent;
{x,y}::Coordinate;
\partial{#}::PartialDerivative;
A::Depends(\hat{#});
A::Depends(x);
ex:=\hat{A};
unwrap(ex);

\\(\\displaystyle{}\text{Attached property Accent to }\widehat{\#}.\\)

\\(\\displaystyle{}\text{Attached property Coordinate to }\left(x, \\mmlToken{mo}[linebreak="goodbreak"]{} y\right).\\)

\\(\\displaystyle{}\text{Attached property PartialDerivative to }\partial{\#}.\\)

\\(\\displaystyle{}\text{Attached property Depends to }A.\\)

\\(\\displaystyle{}\text{Attached property Depends to }A.\\)

\\(\\displaystyle{}\widehat{A}\\)

\\(\\displaystyle{}0\\)