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

Hi Folks,

I think I might be doing something wrong so any help would (as always) be appreciated.

The following code should produce answers that differ only in the use of a bar accent in the first expression. But the first expression returns \bar{A}^{a}_{a} \bar{A}^{b}_{b} which is clearly wrong -- somehow the indices have migrated across factors in the product.

Am I using the \bar accent correctly?

Cheers, Leo

{a,b,c,d#}::Indices(position=independent).
\bar{#}::Accent.

A_{a b}::Depends(\bar{#}).
A^{a b}::Depends(\bar{#}).

A_{a b}::Symmetric.
A^{a b}::Symmetric.

\bar{A}_{a b}::Symmetric.
\bar{A}^{a b}::Symmetric.

ex := \bar{A}_{a b} \bar{A}^{b a};
canonicalise (ex);

ex := A_{a b} A^{b a};
canonicalise (ex);
in Bug reports by (1.8k points)

1 Answer

0 votes

It sounds like I am using the wrong type of index iterator somewhere in the canonicalise algorithm. Anyway, it's a bug, this is supposed to work. Will investigate.

by (83.1k points)

So, after installing the update, I think that the issue remains:

In the following code, the result for the variables with the accent is 0 instead of a non-zero correct answer as that for the variables without the accent.

[\bar{\epsilon}_{\mu \nu \rho},\bar{\epsilon}^{\mu \nu \rho}]::AntiSymmetric;
test := \bar{\gamma}^{\sigma \kappa} \bar{\epsilon}_{\mu \kappa \nu} - \bar{\gamma}^{\sigma \kappa} \bar{\epsilon}_{\mu \nu \kappa};
canonicalise(test);
[\epsilon_{\mu \nu \rho},\epsilon^{\mu \nu \rho}]::AntiSymmetric;
test := \gamma^{\sigma \kappa} \epsilon_{\mu \kappa \nu} - \gamma^{\sigma \kappa} \epsilon_{\mu \nu \kappa};
canonicalise(test);

Then you are not running the current version, as I get the correct result for both.

I did some more testing and I think that the new version works partly. Here's an example that I don't know why there's a difference in results:

[\bar{\gamma}_{\mu \nu},\bar{\gamma}^{\mu \nu}]::Symmetric;
[\bar{\epsilon}_{\mu \nu \rho},\bar{\epsilon}^{\mu \nu \rho}]::AntiSymmetric;

test := \bar{\gamma}^{\sigma \kappa} \bar{\epsilon}_{\mu \kappa \nu} - 
\bar{\gamma}^{\sigma \kappa} \bar{\epsilon}_{\mu \nu \kappa};
canonicalise(test);

test := \bar{A}^{\sigma \kappa} \bar{\epsilon}_{\mu \kappa \nu} - 
\bar{A}^{\sigma \kappa} \bar{\epsilon}_{\mu \nu \kappa};
canonicalise(test);

The result with bar{A} are non-zero and correct while the results with \bar{\gamma} are 0. Note that I assert symmetric for gamma but not for A, and it shouldn't affect the result Am I missing here something?

I can't reproduce that. With the current version on github both give the correct result.

So... I tested my code on the proper Cadabra interface on my machine (without jupyterhub) and it works fine.

I found that the jupyterhub server (tljh) is somehow still running the older cadabra library and isn't using the new build... sorry for all of the confsion.

...