Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

Can we include some variable(e.g. x,y,z,...) in values={}? For example,

{a,b,c,d}::Indices(values={0,1,2, 3, z},position=fixed);
\eta{a b}::KroneckerDelta;
{a b c}::AntiSymmetric;
D{a b c}::AntiSymmetric;
ex1:= C
{a b c} \Gamma^{a b c};
ex2:= C{a b c} D{a b c};
rl:= { C{0 1 2} = \alpha, C{1 2 3} = \beta, C{1 2 z} = \gamma, D{1 2 3} = \theta, D_{1 2 z} = \tau};
evaluate(ex1, rl);
evaluate(ex2, rl);

from which we would like to expect

\alpha \Gamma^{012} + \beta \Gamma^{123} + \gamma \Gamma^{12z}
\beta \theta + \gamma \tau,


asked in General questions by (660 points)

1 Answer

+2 votes
Best answer

Yes, just make sure that you declare z to be a Coordinate, so add as your first line


and then all works as you expected.

answered by (39.9k points)
selected by