Can't raise index on a partial derivative of a vector

184 views
Skip to first unread message

Sashwat Tanay

unread,
Nov 15, 2023, 10:44:26 AM11/15/23
to xAct Tensor Computer Algebra
Hi everybody,

My understanding of upper-index partial derivative is as per this definition.
Screenshot 2023-11-15 at 4.36.51 PM.png
This is exactly what I want to do using xAct -- raise/lower indices on partial derivatives.

I can lower the indices with ContractMetric; ToCanonical is useless (does nothing). But I can't raise the indices: ContractMetric does nothing, and ToCanonical produces the right result, plus some extra Christoffel terms which should not be there.  

See the pic below. Any help is appreciated. The notebook is attached.



Screenshot 2023-11-15 at 4.39.56 PM.png


lower_raise_index.nb

Thomas Bäckdahl

unread,
Nov 15, 2023, 11:09:57 AM11/15/23
to xa...@googlegroups.com
Hi!

Canonicalizing expressions with partial derivatives is often slightly problematic because the derivative does not commute with the metric.

ContractMetric does by default not allow upper derivatives. This can be changed with
SetOptions[ContractMetric, AllowUpperDerivatives -> True]

If you have metrics in your expression I would in general recommend
expr// ContractMetric // ToCanonical
instead of just one of them.

In your last example the result is not wrong, but not properly canonicalized due to a symmetry of the Christoffel symbol. You can canonicalize twice to get rid of it.
You could also try
SetOptions[ToCanonical, Method -> {ChangeCovD, "ExpandChristoffel" -> True}]

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/affd2ba3-3d63-4c06-b8e8-7270911dcda9n%40googlegroups.com.

Sashwat Tanay

unread,
Nov 15, 2023, 12:25:49 PM11/15/23
to xAct Tensor Computer Algebra
Hi Thomas,

This solves the problem. Thanks a lot. Now I have stumbled upon some xAct documentation issues.

Here is what the documentation for AllowUpperDerivatives says

AllowUpperDerivatives: "AllowUpperDerivatives is a Boolean option for ContractMetric. If True, an inverse metric can be contracted with a covariant derivative givien a derivative with a contravariant index. If False, that cannot be done."

In the example above, you showed me how to contract with a partial (not covariant) derivative with a covariant (not contravariant) index. Also "givien" is a typo.

So, is the documentation incomplete/wrong?

Jose

unread,
Nov 15, 2023, 3:44:51 PM11/15/23
to xAct Tensor Computer Algebra
Hi,

In xAct the partial derivative PD is just a special case of covariant derivative. It is the "ordinary derivative" of Wald, a covariant derivative with zero curvature and zero torsion. Therefore we have:

In[2]:= CovDQ[PD]
Out[2]= True

The zero torsion and zero curvature conditions imply locally the existence of a coordinate system on which the derivative can be constructed as partial differentiation with respect to the coordinates. PD in xTensor is a "fiducial derivative" defined with respect to some generic, unspecified, coordinate system.

The AllowUpperDerivatives option of ContractMetric applies to all covariant derivatives. For example take

In[3]:= DefManifold[M, 3, {a, b, c}]
In[4]:= DefMetric[-1, g[-a, -b], cd]
In[5]:= DefTensor[v[a], M]

Then this does not work by default:

In[6]:= ContractMetric[g[c, a] cd[-a][v[b]]]
Out[6]= g[c, a]  cd[-a][v[b]]

If you really want to contract that derivative then you need this:

In[7]:= ContractMetric[g[c, a] cd[-a][v[b]], AllowUpperDerivatives -> True]
Out[7]= cd[c][v[b]]

So in this sense the documentation is correct. Thanks for pointing out the typo: the "givien" should be "giving".

Cheers,
Jose.

Reply all
Reply to author
Forward
0 new messages