Put scalar not working on InertHead

55 views
Skip to first unread message

Aniket Khairnar

unread,
Sep 17, 2023, 1:45:29 PM9/17/23
to xAct Tensor Computer Algebra
Hi,  
   I am trying to work on some calculations. And I have to use InertHead for tensors as an intermediate step. I notice that if there is a contraction between two InertHead vectors, then applying PutScalar to it doesn't work. I would prefer PutScalar to work in the same way it operates on the tensors or vectors without the Inert head.

DefTensor[X[i], ST];
DefTensor[Y[i], ST];
DefInertHead[prime, LinearQ -> True, ContractThrough -> $Metrics];
In[18]:= PutScalar[prime[X[i]] prime[X[-i]]]
Out[18]= prime[X[-i]] prime[X[i]]

Also, a contraction between an InertHead and a vector without inert head gives an error.

In[20]:= PutScalar[prime[X[i]] Y[-i]]
During the evaluation of In[20]:= $IterationLimit::itlim: Iteration limit of 4096 exceeded.

Out[20]= xAct`xTensor`Private`makeScalar[
xAct`xTensor`IndexList[]] xAct`xTensor`Private`makeScalar[{
xAct`xTensor`Monomial[1,
xAct`xTensor`IndexList[]]}] xAct`xTensor`Private`makeScalar[
  TerminatedEvaluation[
   "IterationLimit"]] xAct`xTensor`Private`makeScalar[prime[
X[i]]  Y[-i]]

I have attached a sample notebook for the reference. I don't know whether it is a bug or how it can be fixed. Can you please help me with this?

Regards,
Aniket Khairnar
Bug_scritp.nb

Thomas Bäckdahl

unread,
Sep 18, 2023, 2:29:48 AM9/18/23
to xa...@googlegroups.com

Hi!

I traced the problem to IsIndexOf[prime[X[i]], i] gives False.

I think Jose should take a look at this, but the following seems to help

DefInertHead[prime, LinearQ -> True, ContractThrough -> {delta}];

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/e2ba5fb3-535f-4635-b709-a39151ee8241n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages