Plugging in explicit values for tensors in xCoba

37 views
Skip to first unread message

Conor Evans

unread,
Oct 9, 2025, 3:50:10 PMOct 9
to xAct Tensor Computer Algebra
I have been working on a project that involves calculating long expressions of tensors and I have finally reached the point where I want to plug in values to these arbitrary expressions but I cannot seem to get the covariant tensors to load at all, even when given over 10 minutes for something that should be as simple as a diagonal 4x4 matrix.

I have attached a notebook that expresses the issue I am having in my project. I will also note that I am unable to begin with CTensors or a CMetric from the start as I need to calculate long expressions in xPert in order to gauge fix and simplify before any actual calculations occur so I must have it resolved in a similar fashion to how I attempted it, but of course I would appreciate if you let me know if there is a more efficient way to do this.

Thank you in advance! I am still quite new to xAct and I have been struggling with this final part of my project.
Help_Request.nb

Juan Margalef

unread,
Oct 14, 2025, 3:49:47 PMOct 14
to xAct Tensor Computer Algebra
First notice that  //. rules apply "rules" repeatedly until there are no more possible replacements. However, that produces an infinite loop. You can easily check with this:

Q[-a, -b] /. rules
Q[-a, -b] /. rules /. rules

I am not sure what you want to achieve, but maybe you should take a look at SetCMetric (and maybe MetricInBasis), to make sure that your metric is stored as a metric.
Reply all
Reply to author
Forward
0 new messages