Uplifting frozen metric to default metric

33 views
Skip to first unread message

E. Şeyma KUTLUK

unread,
Jul 28, 2026, 12:21:11 PM (7 days ago) Jul 28
to xAct Tensor Computer Algebra
Hi,
I am working (with a student) on writing a code to implement Bondi formalism, more specifically using the steps here: https://arxiv.org/abs/1001.1541. This starts with a full metric in Bondi gauge but then uses an 1/r expansion. (Not perturbative in fields). At some point from the full metric on the sphere you need to go to a background metric plus corrections expanded in 1/r. After this point you need to express everything in terms of the covariant derivatives of the background metric and you need to raise and lower with respect to this metric. For this we would like to define the full metric h and the background metric q on the sphere and after some point undefine the h metric or set q metric to be the first metric. However it looks like even after either of these steps q does not behave as a "default metric". 

To understand the issue I have written a sample code which I am attaching. The root of the issue seems to be following. Consider the following code:
................
<< xAct`xTensor`;
$DefInfoQ = False;
$PrePrint = ScreenDollarIndices;
DefManifold[M, 3, {a, b, c, d, e, f, g, h, j, k, l, m, n}];
DefMetric[1, Q[-a, -b], cdQ];
DefMetric[1, W[-a, -b], cdW, SymbolOfCovD -> {"|", "D"}];

UndefMetric[Q]

 cdW[-a][W[a, b]]
............

The final line does not produce zero. Can anyone explain why and if there is a way to work around this. I do not need to change back to the original metric, after some point I replace my original metric with new expressions (see the attached code) and I do not need it anymore.

Best Regards,
Şeyma

(My apologies if this has been addressed elsewhere, I could not find anything that this was discussed directly.)
Double metric-example.nb

Leo Stein

unread,
Jul 28, 2026, 2:37:48 PM (7 days ago) Jul 28
to E. Şeyma KUTLUK, xAct Tensor Computer Algebra
Dear Şeyma,

My approach would not undefine the earlier metric — I think it's fine to keep around reference metrics and do all of your calculations with respect to them. To see an example of this, look at e.g. CCE-system-public.nb in the repository https://github.com/xAct-contrib/examples . Another similar approach was in Jordan Moxon's notebook https://github.com/moxcodes/cce_formalism_companion that was a companion to the paper on the implementation of the characteristic formulation of the EFE into spectre.

Best
Leo


--
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 visit https://groups.google.com/d/msgid/xact/1829bae4-1b7b-4e51-9497-dd05d3c9a16dn%40googlegroups.com.

Juan Margalef

unread,
Jul 28, 2026, 4:38:17 PM (7 days ago) Jul 28
to xAct Tensor Computer Algebra
I agree with Leo. Just for your information, when a metric is defined, several rules are stablished and some of them are different depending of weather it is the first metric or not. When you Undef the first metric, the Frozen one gets "promoted" to the main one for raising and lowering indices, but those rules don't get redefined (for instance, RiemandDowndcdW is defined for non-primary metrics, but it doesn't get underfined). You can force the rules by hand but it is hard to keep track of everything. 

For instance, inside DefMetric you have (just to name a few, there are more)

If[firstQ,
  metric[Dir[expr_], b_] :=ReplaceIndex[expr, UltraindexOf[expr] -> b];
  metric[a_, Dir[expr_]] :=ReplaceIndex[expr, UltraindexOf[expr] -> a];
  ];

If[firstQ,
  metric[a_?UpIndexQ, b_?DownIndexQ] := delta[b, a];
  metric[a_?DownIndexQ, b_?UpIndexQ] := delta[a, b]
  ];

and inside DefCovd you have similar rules.

E. Şeyma KUTLUK

unread,
Jul 29, 2026, 3:57:36 AM (6 days ago) Jul 29
to xAct Tensor Computer Algebra
Hi Leo,
Thank you for the response. Yes, we are aware of your code and we are actually using the first part with some modifications. But after you calculate the Ricci tensors for the Bondi metric you seem to take a different route (I am not really familiar with CCE) than in this paper https://arxiv.org/abs/1001.1541, we would like to make a very generic 1/r expansion. Equations get quite involved after that, I am not sure it will be easy to do it without promoting the frozen metric to the default one.  Meanwhile actually my student/collaborator Nikola seem to have find a simple fix which I will write in a separate message.

E. Şeyma KUTLUK

unread,
Jul 29, 2026, 3:57:40 AM (6 days ago) Jul 29
to xAct Tensor Computer Algebra
Meanwhile my student/collaborator Nikola have realized the following works:

<< xAct`xTensor`;
$DefInfoQ = False;
$PrePrint = ScreenDollarIndices;
DefManifold[M, 3, {a, b, c, d, e, f, g, h, j, k, l, m, n}];
DefMetric[1, Q[-a, -b], cdQ];

UndefMetric[Q]

DefMetric[1, W[-a, -b], cdW]

cdW[-a][W[c, d]]

This properly produces zero and seem to fix our problem. Would be better to understand why though, just in case we miss something.

Şeyma

E. Şeyma KUTLUK

unread,
Aug 3, 2026, 10:35:12 AM (23 hours ago) Aug 3
to xAct Tensor Computer Algebra
Hi,
Thank you for the response. I could not find what " RiemandDowndcdW" is, is there a typo? 
So the thing you wrote for DefMetric seems to be for the raising and lowering and should and seems to be working for the frozen metric after undefining the first metric, isn't that the case?
Do you have a more specific guess why cdW[-a][W[a, b]] (W being the second metric) does not give zero after undefining the first metric? Is W[a,b] is somehow stored to be raised by the first metric even before you call it? Sorry not really mathematica-savvy, I appreciate the help.

Şeyma

Juan Margalef

unread,
Aug 3, 2026, 10:41:11 AM (23 hours ago) Aug 3
to xAct Tensor Computer Algebra
I meant RiemannDown, which is only defined for frozen metrics. The Riemann with all indices down. For main metrics, it is not defined since the Riemann is enough.

"Do you have a more specific guess why cdW[-a][W[a, b]]". It is what I mentioned: some of these rules are only defined for the main metric, not for frozen metrics since they are not true. Indeed, notice that W[a,b]=Q[a,c]Q[b,c]W[-c,-d] which is not the inverse of W[-a,-b] AT THE TIME OF DEFINITION. Once Q is undefined, W[a,b] becomes the inverse of W[-a,-b], but the rule is not defined a posteriori (you could do it by hand). That is why if you Undefine W and define it again, it works, because then the rule is defined together with W since W is the main metric.

Reply all
Reply to author
Forward
0 new messages