I have a situation like this (for example):
vv[1, 2, 3] = a;
vv[1, 3, 2] = 11;
vv[3, 1, 2] = 7;
vv[2, 1, 3] = 5;
Sum[LeviCivitaTensor[3][[mu, nu, eta]]*vv[mu, nu, eta], {mu, 1,
3}, {nu, 1, 3}, {eta, 1, 3}]
I obtain this:
-9 + a + vv[2, 3, 1] - vv[3, 2, 1]
I have not defined vv[2, 3, 1]
and vv[3, 2, 1]
so they appear as symbolic expressions, there is another symbolic expr which is vv[1, 2, 3] = a
.
Now here is the question.
Is there a way to set to zero all the components not defined like these ones, if yes does it discriminate the variable a
and vv[3, 2, 1]
?
Thank you.
vv[__] = 0
? $\endgroup$Sum[LeviCivitaTensor[3][[mu, nu, eta]]*vv[mu, nu, eta], {mu, 1, 3}, {nu, 1, 3}, {eta, 1, 3}] /. _vv :> 0
$\endgroup$vv[mu, nu, eta]
, that is, an expression with theHead
ofvv
. The rule_vv :> 0
replaces any expression withHead
ofvv
with0
. $\endgroup$a
. Thank you for the answer. $\endgroup$