Processing math: 100%
Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

I would like to prove that the scalar action is dilatation invariant.

(m,n,p,q)::Indices(position=free).
\eta_{m n}::Metric.
\eta^{m n}::InverseMetric.
\eta^{m}_{n}::KroneckerDelta.
\eta_{n}^{m}::KroneckerDelta.

\partial{#}::PartialDerivative.
\phi::Depends(\partial{#}).
x^{m}::Depends(\partial{#}).

S := -1/2 \int{ \partial_{m}{\phi} \partial^{m}{\phi}}{x};

S:=1/2mϕmϕ dx;

\delta::Accent.

dil:= \delta{\phi}= \alpha x^{m} \partial_{m}{\phi} + \alpha \phi;

δϕ=αxmmϕ+αϕ;

vary(S, \$ \phi -> \delta{\phi} \$).
substitute(S,dil).
distribute(S).
product_rule(S).
unwrap(S);

1/2((αmxnnϕ+αxnmnϕ)mϕ+αmϕmϕ+mϕ(αmxnnϕ+αxnmnϕ)+mϕαmϕ)dx

Now how do I tell mxn=ηmn without exploiting free index structure. Does Cadabra understand that?

I tried to force it using a relation, but later Cadabra fails to identify indices as free.

in General questions by (160 points)

1 Answer

+1 vote
 
Best answer

The easiest way out is

substitute(S, $\partial_{m} x^{n} = \delta_{m}^{n}$)
by (85.0k points)
selected by

Then, it later fails to sum terms like mϕmϕ+nϕnϕ.

Do

rename_dummies(S)
canonicalise(S)

The first is to ensure that all dummies have the same name. The second will raise/lower so as to make the terms equal.

Thank you very much. I did not know about rename_dummies.

Yeah, I should really get that tutorial on simplifying expressions out, but there are currently only about 27 hours in a day unfortunately... Feel free to ask again though if you get stuck somewhere else.

By the way, your problem makes for a nice example, I'll see if I can polish/extend it a bit and include it on the web site.

...