VBundle Has No Metric

27 views
Skip to first unread message

Kid A

unread,
Aug 31, 2026, 7:16:37 AMAug 31
to xAct Tensor Computer Algebra
Hello everyone,
I have a little to none-knowledge to xAct and I'm a grad student starting to use it

I was trying to define the gauge-covariant derivative of an abelian higgs field, but it fails to take the derivative and CovDToChristoffel because there's no metric in U1, and if I try to define a metric using DefMetric I'd get that it cannot have a covariant derivative

In[12]:= DefManifold[M, 4, greekExcept];

In[13]:=
DefMetric[-1, metric[-\[Alpha], -\[Beta]], CD, {";", "\[Del]"},
  PrintAs -> "g", FlatMetric -> True];

DefVBundle[U1, M, 1, {i, j, k, l, m, n}, Dagger -> Complex];
DefCovD[DD[-\[Alpha]], U1, {";", "D"}, ExtendedFrom -> CD,
  FromMetric -> metric];

In[18]:= DefTensor[A[-\[Alpha]], M, PrintAs -> "A"];
DefConstantSymbol[e, PrintAs -> "e"];

In[20]:=
DefTensor[\[Phi][i], M, Dagger -> Complex, PrintAs -> "\[Phi]"];

In[21]:=
AChristoffelDD[i_, -\[Mu]_, -j_] := -I e A[-\[Mu]] delta[i, -j];

In[22]:= AChristoffelDD[i, -\[Mu], -j] // Validate

Out[22]= -I e  A[-\[Mu]]   xAct`xTensor`delta[i, -j]

In[23]:= DD[-\[Mu]][\[Phi][i]] // Validate
DD[-\[Mu]][\[Phi][i]] // CovDToChristoffel

Out[23]= DD[-\[Mu]][
\[Phi][i]]

During evaluation of In[23]:= MetricsOfVBundle::missing: There is no metric in U1.

During evaluation of In[23]:= Throw::nocatch: Uncaught Throw[Null] returned to top level.

Out[24]= Hold[Throw[Null]]

Markus B. Fröb

unread,
Aug 31, 2026, 7:52:35 AMAug 31
to xa...@googlegroups.com
Dear Kid A,

you could use the function DefVBundleWithMetric from the FieldsX
package, see https://arxiv.org/abs/2008.12422 for an example. The
newest version of FieldsX can always be found at
https://github.com/mfroeb/FieldsX .

All the best,
Markus


Zitat von Kid A <thisisuc...@gmail.com>:
> --
> 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/e54b7254-47ad-40b3-80fc-54d94c919e17n%40googlegroups.com.



Juan Margalef

unread,
Aug 31, 2026, 5:05:30 PMAug 31
to xAct Tensor Computer Algebra
The problem is that delta has the structure of index-down,index-up:

In[24]:= SlotsOfTensor@delta
Out[24]= {-All, All}

So instead of writing delta[i, -j] you have to write delta[-j, i]. delta[i, -j] needs a metric to raise the first index and lower the second, that is why you obtain an error.

On another note, you might want to consider

MakeRule[{AChristoffelDD[i, -\[Mu], -j], -I e A[-\[Mu]] delta[-j, i]},  MetricOn -> {\[Mu]}]

or 

AutomaticRules[AChristoffelDD, MakeRule[{AChristoffelDD[i, -\[Mu], -j], -I e A[-\[Mu]] delta[-j, i]},  MetricOn -> {\[Mu]}]]

instead of AChristoffelDD[i_, -\[Mu]_, -j_] = -I e A[-\[Mu]] delta[-j, i].

This handles the index mu better since you have a metric that can be used for that index:

In[17]:= AChristoffelDD[i, \[Mu], -j] // ContractMetric
Out[17]= -I e  A[\[Mu]]   xAct`xTensor`delta[-j, i]
Reply all
Reply to author
Forward
0 new messages