MakeRule with complex tensors

106 views
Skip to first unread message

Leo Stein

unread,
Aug 19, 2010, 3:15:36 PM8/19/10
to xAct Tensor Computer Algebra
Hello again,
  MakeRule allows for automatically generating rules by considering symmetries of a tensor; is it possible to allow for automatically generating rules for a tensor and its Dagger[] at the same time? I am imagining something along the lines of, e.g.

DefTensor[v[a],    M, Dagger->Complex]
DefTensor[w[a],    M, Dagger->Real]
DefTensor[P[a,b], M, Dagger->Complex]

MakeRule[{ P[a,b] , v[a] w[b]  }]
{HoldPattern[P[ a_Symbol?TangentM`Q , b_Symbol?TangentM`Q]] :> Module[{}, v[a] w[b]],
 HoldPattern[P\[Dagger][ a_Symbol?TangentM`Q, b_Symbol?TangentM`Q]] :> Module[{}, v\[Dagger][a] w[b]]}

As it stands, MakeRule will only emit a rule for P, but not P\[Dagger]. I could imagine not wanting the automatic rule generation (along the lines of what is in SpinorsDoc.nb -- to replace a tensor and its dagger with two different symbols). This could be controlled by an option in the same way as UseSymmetries controls if additional rules are generated under symmetries.

I recognize that this is not trivial, since some rules do not even make sense. The above example makes sense, since there is a complex tensor on each side. If you tried to make a rule where one side was identical under Dagger[] and the other side was not, this would not make sense (and checking for this may be hard).

Is this possible? Is it desirable?

Thanks,
Leo

TB

unread,
Aug 19, 2010, 5:07:43 PM8/19/10
to xAct Tensor Computer Algebra
Hi!

I usually don't use the MakeRule directly. I use equations, and
ApplyRule defined as

ApplyRule[expr_]:=MakeRule[Evaluate[List@@expr],MetricOn-
>All,ContractMetrics->True]

So for instance one begins by defining
equation1 = P[a,b] == v[a] w[b]

And use it with

%/.ApplyRule@equation1

If you also want to use the complex conjugate use

%/.ApplyRule@equation1/.ApplyRule@Dagger@equation1

You can use the same idea directly with MakeRule if you like.

Regards
Thomas

JMM

unread,
Aug 20, 2010, 12:26:28 PM8/20/10
to xAct Tensor Computer Algebra
Hi again,

>   MakeRule allows for automatically generating rules by considering
> symmetries of a tensor; is it possible to allow for automatically generating
> rules for a tensor and its Dagger[] at the same time?

No. MakeRule has been prepared for several tasks, but not for
daggering rules.

> I could imagine not wanting the automatic rule generation (along the lines of
> what is in SpinorsDoc.nb -- to replace a tensor and its dagger with two
> different symbols). This could be controlled by an option in the same way as
> UseSymmetries controls if additional rules are generated under symmetries.

Yes. If done, there must be an option to activate it.

> I recognize that this is not trivial, since some rules do not even make
> sense. The above example makes sense, since there is a complex tensor on
> each side. If you tried to make a rule where one side was identical under
> Dagger[] and the other side was not, this would not make sense (and checking
> for this may be hard).

I don't understand that comment. If an equation is correct, its
daggered form should be also correct, right?

Something that could be hard is that by daggering we might be changing
the space of the indices (think of the dotted indices of Spinors), and
hence other options like UseMetricOnVBundle could get desynchronized.

> Is this possible? Is it desirable?

Everything is possible with Mathematica, but it might take quite some
work to extend MakeRule properly. Currently I would recommend to
follow Thomas' advice and start by having the original equation {LHS,
RHS} and its daggered form {Dagger[LHS], Dagger[RHS]} and use MakeRule
independently on them, with respective appropriate options.

Cheers,
Jose.
Reply all
Reply to author
Forward
0 new messages