Ignore tensors while canonicalizing

31 views
Skip to first unread message

Ayon Tarafdar (Joy)

unread,
Sep 11, 2024, 9:33:22 AMSep 11
to xAct Tensor Computer Algebra
Hi,

I'm working with a bunch of tensors the indices of which I do not want to be raised or lowered. However, I still want this to happen for other tensors in my expressions. Is there a way to exclude certain tensors when using ToCanonical? I don't just want to use "UseMetricOnVBundle → None" because it significantly complicates my expressions where there is clearly plenty of terms to canonicalize.

If there is another way of looking at this problem, please let me know!

Thomas Bäckdahl

unread,
Sep 11, 2024, 9:56:29 AMSep 11
to xa...@googlegroups.com

Hi!

If the indices belongs to the same VBundle, you can only allow or disallow ToCanonical to raise or lower all indices of the VBundle.

The best way to handle this is probably to allow ToCanonical to change the index position of all tensors, and afterwards try to arrange the index positions for some of the tensors.

For instance, you can reset the standard index positions (used in DefTensor) of MyTensor with the rule
SeparateMyTensorRule = x : MyTensor[inds__] :> SeparateMetric[][x];
Unfortunately, this also introduces extra metrics which needs to be contracted into the other factors. This can for instance be done with
ContractOthersRule = Times[MyTensor[inds__], factors__] :> MyTensor[inds] ContractMetric[Times[factors]];
This rule only works the way you wanted if MyTensor only appears once, but with a bit more coding one can probably make it work in a more general setting too.

I hope this gives you some ideas how to do this.

Regards
Thomas

--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xact/35b596c8-8401-463b-a3fe-c2b7be124b81n%40googlegroups.com.

Ayon Tarafdar (Joy)

unread,
Sep 12, 2024, 9:40:23 PMSep 12
to xAct Tensor Computer Algebra
Hi! Thanks for your suggestions. I see the merit of what you suggested, but unfortunately, I'm working with a product manifold and multiple metrics. So when I selectively apply SeparateMetric on some tensors after splitting product tensors, it does not respect the actual index order of the defined tensor.

Thomas Bäckdahl

unread,
Sep 13, 2024, 8:27:23 AMSep 13
to xa...@googlegroups.com

Hi!

Could you send a small example notebook so we can see exactly what is going wrong?

Regards
Thomas

Reply all
Reply to author
Forward
0 new messages