how to define traceless second rank tensor from the word go?

235 views
Skip to first unread message

Comer Duncan

unread,
Oct 30, 2013, 11:00:58 AM10/30/13
to xa...@googlegroups.com
Hi,

I would like to define a symmetric second rank tensor which is also traceless.  The usual syntax that I use to define the symmetric tensor is of course

DefTensor[B[-i, -j], M3, Symmetric[{1, 2}]]

where M3 is in my case a flat 3-manifold with connection Cdflat and metric gflat.  What I  would really find useful is to be able to do it in the DefTensor line, say

DefTensor[B[-i,-j],M3,Symmetric[{1,2}], Traceless[{1,2}]]

but alas I don't seem to find the Traceless[] designator.  Note that I am using xTras.

Thanks for any help. I apologize if I have missed the Traceless property...

Comer

Jose

unread,
Oct 30, 2013, 11:35:04 AM10/30/13
to xa...@googlegroups.com
Hi Comer,

There is no Traceless head in xTensor, and as far as I know xTras does not declare a traceless tensor either.

The simplest thing to do would be something like

    B[i_, j_] := 0 /; PairQ[i, j]

If you know in advance that only a given configuration of indices will appear (because there is no metric, for instance) then you can use something like

    B[i_, -i_] := 0

I have thought about this sort of "generalized symmetry" in the past, but I see two issues:

1) The Traceless property can only be defined for general tensors if it involves an upper index and a lower index. Something like Traceless[{1, 2, 3}] would only make sense in the presence of a metric, and hence the correct syntax should be Traceless[{1, 2, 3}, g]. I'm not sure how to handle the general case with arbitrary non-first metric.

2) Canonicalization of traceless tensors does not follow the group-theoretical computations we currently have in xAct, and hence this needs an extension of some basic algorithms.

Something similar can be said of other "generalized symmetries", like being Hermitian.

Cheers,
Jose.

Leo Stein

unread,
Oct 30, 2013, 11:52:21 AM10/30/13
to Jose, xAct Tensor Computer Algebra
Hi Jose and Comer,

I would like to comment on Jose's point (1). I would think the right
syntax for a TraceFree or Traceless option would really be something
like
DefTensor[ T[a,-b,-c,D,LI[e]], ..., TraceFree:> { delta[-a,b],
firstmetric[b,c], metric2Inv[b,c] } ]
Here the points are:
1. You must ensure that two slots may be contracted. For example there
would be an error detected with metric1[c,-D] if c is in TangentM and
D is in some internal VBundle, because those indices don't match the
slots for metric1.
2. Some indices do not need a metric for contraction, which can be
specified with delta[-a,b].
3. You may choose which metric you use for some contraction, as Jose
pointed out. Maybe you want a different metric for contractions of
different slots. In the example above, the indices (+a,-b) may be
contracted without a metric. If there is a firstmetric on that Tangent
bundle then that index pair should also be TraceFree w.r.t. the
firstmetric on those same indices. Then the indices (-b,-c) are
declared to be TraceFree w.r.t. the firstmetric, which should also
declare that T[a,b,-b,D,LI[e]] vanishes. Maybe you have a conformally
related (frozen, not first) metric called metric2. Then you could
further declare that T[a,-b,-c,D,LI[e]] metric2Inv[b,c] also vanishes
(and expressions related through the firstmetric).

It's probably straightforward to turn these ideas into an xTension, if
there is a good idea on the syntax for the above.

Best
Leo
> --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.

Jose

unread,
Oct 30, 2013, 11:35:40 PM10/30/13
to xa...@googlegroups.com, Jose
Hi Leo,

Your suggestion seems like a good idea to handle the general case. It follows what the options OrthogonalTo and ProjectedWith do. I also agree that there should be definitions both for the case in which the indices are already staggered and for the case in which the metric factor is explicit.

However, this notation may become too complicated when there are many indices. Probably there should be a simpler notation for the standard case in which there is only the first-metric, which I think is what Comer was looking for. For instance TraceFree-> {1,2,3,4} could mean "traceless" in every contraction among those indices. With non-first metrics your notation would be needed. Both notations can easily coexist.

And yes, this would be a neat example of xTension.

Cheers,
Jose.

Comer Duncan

unread,
Oct 31, 2013, 8:42:57 AM10/31/13
to xa...@googlegroups.com, Jose
Hi Jose,

I think for practical purposes in my current case your first suggestion seems to work ok.  I appreciate the complexities of doing this in general.  Thanks for your replies and for Leo's good suggestions.

Comer

Leo Stein

unread,
Nov 12, 2013, 3:36:29 PM11/12/13
to Comer Duncan, xAct Tensor Computer Algebra, Jose
Hi Comer and all,

I finally had a chance to work on this a little bit and made an xTension to this end. The git repo is on github here: https://github.com/xAct-contrib/TraceFree . You can clone it via
  git clone git://github.com/xAct-contrib/TraceFree.git
or if you prefer you can grab the "release" zip or tarball from https://github.com/xAct-contrib/TraceFree/releases/tag/v0.1.0 . The idea is you put this directory inside your xAct/ directory so you have xAct/TraceFree/ and then you can write:
  Needs["xAct`TraceFree`"]
  DefTensor[T[a,b],M, TraceFree->{a,b}]
I tried to take into account no metric, multiple metrics including inverse metrics, and doing several indices and/or metrics at once. For example you could make a tensor tracefree on all pairs of {a,b,...,c}, or you could make the indices {a,b} tracefree with the metric met1 and the indices {c,d} tracefree with the metric met2, if you so desired, e.g.
  DefTensor[T[a,b,c,d],M, TraceFree-> {  {{a,b}, met1},   {{c,d}, met2}  }  ]
If you don't want to do this at define-time, there are also public functions TraceFreeRules to just give you the rules, and SetTraceFreeRules if you want to associated the rules with a tensor afterwards.

Please try it out and let me know if it's useful or if there are any bugs, etc ...

Best
Leo

Comer Duncan

unread,
Nov 16, 2013, 9:23:03 AM11/16/13
to xa...@googlegroups.com, Comer Duncan, Jose
Thanks Leo. It works great!

Comer
Reply all
Reply to author
Forward
0 new messages