How to apply first Bianchi identity?

1,171 views
Skip to first unread message

Ben M.

unread,
Apr 1, 2011, 1:40:00 AM4/1/11
to xAct Tensor Computer Algebra
Greetings,

I'd like to use xAct to help verify some of my tensor computations.
At one point I need to use the first Bianchi identity. For example,
if I have the expression

Riemanncd[-a, -b, -c, -d] + Riemanncd[-b, -c, -a, -d] +
Riemanncd[-c, -a, -b, -d]

what is the easiest way for xAct to simplify this to zero?

I feel bad for asking such an elementary question, but I couldn't find
a good answer after spending a fair amount of time searching the
documentation. Probably I missed something obvious.

I noticed that "Invar" states:

> There is no known efficient algorithm to handle the cyclic and Bianchi symmetries of Riemann

I was hoping that RiemannSimplify might help, but that appears to only
work on scalars?

Thanks!
-Ben


P.S. Hi Leo! :)

Leo Stein

unread,
Apr 1, 2011, 9:21:32 AM4/1/11
to Ben M., xAct Tensor Computer Algebra
Hi, Ben! How are your Vafa-Witten invariants going?

Unless I'm mistaken, you have to write a rule yourself, but
Mathematica is not guaranteed to actually be able to match the pattern
-- especially if you have the cyclic sum of Riemann contracted with
another tensor expression, all multiplied out.

I think you have to give Mathematica some guidance in this case. I
would define the rule
Bianch1Rule = MakeRule[{ Riemanncd[-a, -b, -c, -d] , -Riemanncd[-b,
-c, -a, -d] - Riemanncd[-c, -a, -b, -d] }];
If you apply this rule to your whole expression, you will simply
double the number of Riemann terms without making any progress. But if
you apply this rule to a specific part of your expression, you can
make the cyclic combination vanish. For example, an expression like
expr = Texp[a,b] Riemanncd[-a, -b, -c, -d] + Texp[a,b] Riemanncd[-b,
-c, -a, -d] + Texp[a,b] Riemanncd[-c, -a, -b, -d];
should vanish, with Texp[a,b] any tensor expression. If you apply the
rule just to one of the terms, you will introduce -(other two terms),
e.g.
MapAt[ Replace[ #, Bianchi1Rule ] &, expr , 1 ] // ToCanonical
> 0

I have been lucky enough to only have to implement the first Bianchi
identity in the form of
MakeRule[ { Riemanncd[-a, -b, -c, -d] epsilonmet[ a, b, c, e] , 0 } ]
which is much simpler to deal with.

Does anybody have more wisdom about multiterm symmetries?

Good luck,
Leo

Cyril Pitrou

unread,
Apr 1, 2011, 3:55:31 AM4/1/11
to xa...@googlegroups.com
Hi,

Quickly I would say that you need to go to Christoffels.

expr=Riemanncd[-a, -b, -c, -d] + Riemanncd[-b, -c, -a, -d] + Riemanncd[-c, -a, -b, -d]

%//RiemannToChristoffel

%//ToCanonical

If you are afraid of the warnings of ToCanonical which is dealing with partial derivative (but is happy to do so) you can do

ChangeCovD[%%,PD,cd]

%//ToCanonical

All in one this gives

ToCanonical[ ChangeCovD[ RiemannToChristoffel[expr], PD, CD] ]

Best regards,

Cyril



to express you rpexpression in terms of partial derivatives of Chirstoffels and products of Ch

Guillaume Faye

unread,
Apr 1, 2011, 11:34:00 AM4/1/11
to Ben M., xAct Tensor Computer Algebra

Dear Ben,

>
> I'd like to use xAct to help verify some of my tensor computations.
> At one point I need to use the first Bianchi identity. For example,
> if I have the expression
>
> Riemanncd[-a, -b, -c, -d] + Riemanncd[-b, -c, -a, -d] +
> Riemanncd[-c, -a, -b, -d]
>
> what is the easiest way for xAct to simplify this to zero?
>
> I feel bad for asking such an elementary question, but I couldn't find
> a good answer after spending a fair amount of time searching the
> documentation. Probably I missed something obvious.
>
> I noticed that "Invar" states:
>
>> There is no known efficient algorithm to handle the cyclic and Bianchi symmetries of Riemann
>

Noticing that

1/12 a1 a2 R_a1b1a2b3 = R_a1b1a2b3
b1 b2

where a1 a2 is a Young symmetrizer,
b1 b2

you can replace the Riemann's entering a Bianchi-type sum by the combination
of Riemann's resulting from applying explicitly the above projector. I believe
this yields an expression that vanishes identically. But this is really a
brute force solution...

See the following link
http://www.qgf.uni-jena.de/gk_quantenmedia/Texte/schoebel100112-p-97.pdf
for a clear and short introduction to this type of approach.
I don't know much myself about it and perhaps some of you are more familiar
than me with representations theory of Sn and GL(N).

Yours,
Guillaume.

TB

unread,
Apr 1, 2011, 11:41:41 AM4/1/11
to xAct Tensor Computer Algebra
Hi!

The problem of canonicalizing expressions with multi-term symmetries
like this one is in general difficult.

Here I have some thoughts about these problems:
The main part of the problem is to find a good notion of what is a
canonical form of an expression with multi-term symmetries.
If you only deal with mono-term symmetries (as ToCanonical does at the
moment) you can canonicalize termwize.
This means that the resulting number of terms will be the same unless
several terms are canonicalized to the same thing.
Hence, the canonicalized expression is always of the same length or
shorter.
If one would use multiterm symmetries, one term would have to be
rewritten as several terms.
Therefore, we can not guarantee that the result should be shorter.
More importantly it is difficult to know which possible equivalent
expressions we should use in the canonical form.
With mono-terms symmetries all possible equivalent expressions are the
same, except for the ordering of the indices.
These orderings of the indices can be compared lexicographically, and
the least one can be chosen.
With multi-term symmetries it is not clear to me how to define the
canonical form of a term.

It might be possible to find out a way to do this by considering your
example.

You want to canonicalize
Riemanncd[-a, -b, -c, -d] + Riemanncd[-b, -c, -a, -d] + Riemanncd[-c, -
a, -b, -d]
to 0.

We can see the multitems symmetry as the equation
Riemanncd[-a, -b, -c, -d] + Riemanncd[-b, -c, -a, -d] + Riemanncd[-c, -
a, -b, -d]==0

I suppose it is still best to try to canonicalize term by term.
The term Riemanncd[-a, -b, -c, -d] has all indices in lexicographical
order, hence, it is probably best to keep it as it is.

The term
Riemanncd[-b, -c, -a, -d]
can be rewritten as
Riemanncd[-b, -c, -a, -d] -> - Riemanncd[-a, -b, -c, -d] - Riemanncd[-
c, -a, -b, -d]
but this is probably not good because the last term has a
lexicographical ordering of the indices [-c, -a, -b, -d] that is
greater than the original [-b, -c, -a, -d].

We can do the same thing with the term
Riemanncd[-c, -a, -b, -d]
That is
Riemanncd[-c, -a, -b, -d]-> - Riemanncd[-a, -b, -c, -d] - Riemanncd[-
b, -c, -a, -d]
Here, we have better lexocographical odering of the indices on all
terms, hence it is probably a good idea to use this rule.

This idea could possibly work. However, one would need to take case of
the mono-term symmetries too, before the multiterm symmetries are
used.

That is we need to use
Riemanncd[-a, -b, -c, -d] - Riemanncd[-a, -c, -b, -d] + Riemanncd[-a, -
d, -b, -c]==0
instead.

If we want to find all multi-term rules that we can use in the general
situation when the indiexes can be any permutation of {-a,-b,-c,-d},
we have to do the following:

First we define a funciton that can generate a rule of the kind we
want:

FirstBianchiRule[a_, d_, b_, c_] :=
Riemanncd[a, d, b, c] -> - Riemanncd[a, b, c, d] +
Riemanncd[a, c, b, d]

Next we need to find a list of all possible expressions Riemanncd can
be canonicalized to:

PermuteList[Riemanncd[-a,-b,-c,-d],#]&/
@LeftTransversal[SymmetryGroupOfTensor@Riemanncd,4]

(Please correct me if this is wrong.)

Next we compute what these terms can be rewritten as:

ToCanonical[%/.Riemanncd->FirstBianchiRule]

This results in
{Riemanncd[-a, -b, -c, -d] -> -Riemanncd[-a, -c, -d, -b] + Riemanncd[-
a, -d, -c, -b],
Riemanncd[-a, -c, -b, -d] -> -Riemanncd[-a, -b, -d, -c] + Riemanncd[-
a, -d, -b, -c],
Riemanncd[-a, -d, -b, -c] -> -Riemanncd[-a, -b, -c, -d] + Riemanncd[-
a, -c, -b, -d]}

Observe that all terms are in canonical form and all canonical
representations are present.
As we see only the last rule should be used, because the other ones
produces terms wich are greater when compared lexicographically.
I have not figured out exactly how to write a code that that removes
the other rules from the list, but this can be done.

In the end, what needs to be done is the following:
Let your original expression be expr.

* Execute ToCanonical[expr]
* Take the sets of indices for the Riemanncd expressions. Call these
IndexSets. (Sets can be represented as sorted lists.) In the example
IndexSets={{-a,-b,-c,-d}}.
* For every set S in IndexSets, compute the rules
ToCanonical[(PermuteList[Riemanncd@@S,#]&/
@LeftTransversal[SymmetryGroupOfTensor@Riemanncd,4])/.Riemanncd-
>FirstBianchiRule]
In the example this is
{Riemanncd[-a, -b, -c, -d] -> -Riemanncd[-a, -c, -d, -b] + Riemanncd[-
a, -d, -c, -b],
Riemanncd[-a, -c, -b, -d] -> -Riemanncd[-a, -b, -d, -c] + Riemanncd[-
a, -d, -b, -c],
Riemanncd[-a, -d, -b, -c] -> -Riemanncd[-a, -b, -c, -d] + Riemanncd[-
a, -c, -b, -d]}
* Remove all rules that produces terms that are larger
lexicographically.
In the example this means that we are left with the rule
FinalListOfRules={Riemanncd[-a, -d, -b, -c] -> -Riemanncd[-a, -b, -c, -
d] + Riemanncd[-a, -c, -b, -d]}
* Apply this rule to expr:
expr/.FinalListOfRules

I will see if I can write an implementation of this.

Regards
Thomas Bäckdahl


On Apr 1, 9:55 am, Cyril Pitrou <cyril.pit...@gmail.com> wrote:
> Hi,
>
> Quickly I would say that you need to go to Christoffels.
>
> expr=Riemanncd[-a, -b, -c, -d] + Riemanncd[-b, -c, -a, -d] + Riemanncd[-c,
> -a, -b, -d]
>
> %//RiemannToChristoffel
>
> %//ToCanonical
>
> If you are afraid of the warnings of ToCanonical which is dealing with
> partial derivative (but is happy to do so) you can do
>
> ChangeCovD[%%,PD,cd]
>
> %//ToCanonical
>
> All in one this gives
>
> ToCanonical[ ChangeCovD[ RiemannToChristoffel[expr], PD, CD] ]
>
> Best regards,
>
> Cyril
>
> to express you rpexpression in terms of partial derivatives of Chirstoffels
> and products of Ch
>

Kasper Peeters

unread,
Apr 1, 2011, 11:53:44 AM4/1/11
to Guillaume Faye, xAct Tensor Computer Algebra
> > I'd like to use xAct to help verify some of my tensor computations.
> > At one point I need to use the first Bianchi identity. For example,
> > if I have the expression
> >
> > Riemanncd[-a, -b, -c, -d] + Riemanncd[-b, -c, -a, -d] +
> > Riemanncd[-c, -a, -b, -d]
> >
> > what is the easiest way for xAct to simplify this to zero?
>
>
> you can replace the Riemann's entering a Bianchi-type sum by the
> combination of Riemann's resulting from applying explicitly the above
> projector. I believe this yields an expression that vanishes
> identically. But this is really a brute force solution...

Yes, that's one (the only one?) systematic method that you can use to
eliminate multi-term symmetries. In more general situations, the idea
is that you can use young projectors to construct a basis of tensor
monomials, after which any monomial with the same tensors can be
written on that basis.

(shameless plug: see appendix A of http://arxiv.org/pdf/hep-th/0506161
for some more info).

Cheers,
Kasper

TB

unread,
Apr 3, 2011, 2:52:29 PM4/3/11
to xAct Tensor Computer Algebra
Hi!

As I don't yet know how to implement Young symmetrizers I wrote a code
for the idea I described ealier.

The idea was to define a rule like
FirstBianchiRule[a_, d_, b_, c_]:=Riemanncd[a, d, b, c]->-
Riemanncd[a, b, c, d] + Riemanncd[a, c, b, d]
but only to apply it to terms where the resulting canonicalized right
hand side has index configurations that are less compared to the left
hand side in lexicographical sense.
I don't know if it solves the entire problem as the Young symmetrizers
should do, but I hope it still does correct things.

The code is:

FirstGreaterQ[list_]:=And@@(OrderedQ[{#,First@list}]&/@Rest@list)
ExtractTensors[expr_,TT_]:=Part[expr,Sequence@@#]&/@(Drop[#,-1]&/
@Position[expr,TT])
TransversalTensor[TT_,inds_List]:=PermuteList[TT@@inds,#]&/
@LeftTransversal[SymmetryGroupOfTensor@TT,Length@inds]
UseTensorRule1[expr_,TT_,TTRule_]:=Module[{TTIndices=Union[Sort/
@List@@@ExtractTensors[expr,TT]],
TTRule2,TTRules},
TTRule2[inds___]:=ToCanonical[TransversalTensor[TT,{inds}]/.TT-
>TTRule];
TTRules=Flatten[Select[TTRule2@@#,FirstGreaterQ@ExtractTensors[#,Riemanncd]&]&/
@TTIndices];
expr/.TTRules]
FirstBianchiRule[a_, d_, b_, c_]:=Riemanncd[a, d, b, c]->-
Riemanncd[a, b, c, d] + Riemanncd[a, c, b, d]
UseFirstBianchiRule[expr_]:=UseTensorRule1[ToCanonical@expr,Riemanncd,FirstBianchiRule]

If you want to use it for some other replacement rule, change the last
two lines accordingly.

One can use it like this:

Riemanncd[-a,-b,-c,-d]+Riemanncd[-b,-c,-a,-d]+Riemanncd[-c,-a,-b,-d]

UseFirstBianchiRule@%

I hope you find it useful.

Regards
Thomas Bäckdahl
> (shameless plug: see appendix A ofhttp://arxiv.org/pdf/hep-th/0506161

Ben M.

unread,
Apr 18, 2011, 12:01:11 AM4/18/11
to xAct Tensor Computer Algebra
Wow, thank you everyone for the great responses! It's really helpful
for me to see all these different ways of going about this problem.

Leo: Thanks for the MakeRule tutorial! I never thought to use the
MapAt command. I'm currently trying to use xAct to perform
computations with the Vafa-Witten equations.

Cyril: This is a great idea for my purposes. I already know the
supposed answer for most of my computations, so I mainly need to
verify that LHS - RHS = 0. (I'm mainly concerned with sign errors.)
Zero-checking sounds possibly easier than canonicalizing, and it seems
like the Christoffel symbols do this nicely. I really appreciate your
suggestion for converting PD->CD, since I didn't understand that
error: "Detected metric-incompatible derivatives"

Guillaume: Those slides were very informative. I didn't realize that
Riemann curvature was irreducible as a representation of GL(N).

I'm most interested in representations of SO(4). Since SO(4) is a
quotient of SU(2)xSU(2), the large N theory doesn't apply well. Does
anyone have ideas for implementing projectors for these
representations?

Kasper: Thanks for sharing about the Garnir symmetries. That looks
like an incredibly useful technique!

Thomas: Thanks for your implementation. It's really useful to see how
you did that.

Thanks once again for all your help!

Sincerely,
Ben

Teake Nutma

unread,
Jan 9, 2012, 2:46:55 PM1/9/12
to xa...@googlegroups.com
Hi all,

I'm sorry to revive this old thread, but I wrote some code on this
subject that others might also find useful. Basically, it's Thomas'
idea but the code is a bit shorter. Here it is:

bianchi1Rule =
RiemannCD[a_, b_, c_, d_] /; (Ordering[{b, c, d}] === {2, 3, 1}) ->
RiemannCD[a, c, b, d] - RiemannCD[a, d, b, c]

bianchi2Rule =
CD[a_]@RiemannCD[b_, c_, d__] /; (Ordering[{a, b, c}] === {2, 3, 1}) -
>
CD[b]@RiemannCD[a, c, d] - CD[c]@RiemannCD[a, b, d]

You could put these two rules in a convenience function, like so:

ApplyBianchi[expr_] :=
ToCanonical[expr] //. bianchi1Rule //. bianchi2Rule // ToCanonical

I haven't tested it thoroughly, but it appears to work :).
Cheers,


Teake Nutma

Shubham

unread,
Dec 5, 2018, 12:35:47 AM12/5/18
to xAct Tensor Computer Algebra
Hi Teake,

Thanks for the short and nice code. I stumbled upon a problem when verifying it. Suppose you want to verify the second (differential) Bianchi identity: expr = CD[-a] RiemannCD[-b,-c,-d,-e] must be zero, where antisymmetrization has been imposed on -a,-b,-c. Imposing bianchi2Rule on expr gives me 0. If, however, I use ApplyBianchi on expr, I don't get 0, but an expression containing a sum of covariant derivatives acting on Riemann tensors. In order to get zero, I have to further apply bianchi1Rule on the last expression, which changes the expression by applying the first Bianchi identity. This, finally, gives zero. Things work well if, in your definition of ApplyBianchi, ToCanonical is used each time after applying bianchi1Rule and/or bianchi2Rule. That is:

ApplyBianchi[expr_] :=
ToCanonical[ [ToCanonical[ToCanonical[expr] /. bianchi1Rule] /. bianchi2Rule] /. bianchi1Rule]


Hopefully, this should work, though I haven't tested it thoroughly either.


Reply all
Reply to author
Forward
0 new messages