Tensor defenition

11 views
Skip to first unread message

Petr Tretyakov

unread,
Feb 3, 2026, 9:57:18 AM (yesterday) Feb 3
to xAct Tensor Computer Algebra
Dear All,
I'm the novice user of xAct and many thing are clear, but some is not. Please help me understand it. 

Suppose I would like to define some tensor value, which is some combination of metric (and may be something else). I define Some tensor: DefTensor[R[-i, -k, -l, -m], M4] after that I write R[-i,-k,-l,-m]=f  where f is combination of metric tensors what I need. After that I would like to calculate some complicate product of this tensor R with some another one say h[-i,-k] defined before. Program give me result in the terms of tensor R but not metric.  How I can to see the result in the form of metric? 

I try different possibilities like // Simplification // ToCanonical // ContractMetric // ExpandAll and others -- nothing work. May be there exist some special command or may be I need to introduce my combined tensor R by another way?

Juan Margalef

unread,
1:34 PM (10 hours ago) 1:34 PM
to xAct Tensor Computer Algebra
To be able to help you, a bit more information is required. In any case, my educated guess is that your assigment:

R[-i,-k,-l,-m]=f

is not correct. If you use the standard Mathematica approach, the indices are not handled correctly. You have to use IndexSet or IndexSetDelayed, something like this:


DefTensor[R[-i, -k, -l, -m], M4] 
IndexSet[ R[i_, k_, l_, m_]  , B[i,l] C[k, m]

Let us know if that helps or give us a minimal working example.

Best!
Juan

Reply all
Reply to author
Forward
0 new messages