To Canonical on scalars in denominators

101 views
Skip to first unread message

Ahmed Youssef

unread,
Mar 21, 2013, 9:03:49 AM3/21/13
to xAct Tensor Computer Algebra
Dear all,

I have a question concerning ToCanonical applied to expressions like (Scalar[k[-a]p[a]]+Scalar[k[a]p[-a]])^(-1) (please see attached nb). I found a topic called "Scalars and Denominators" in the discussion group but I can't find any answer in it.

Best regards,
Ahmed Youssef
ayous...@gmail.com

AhmedQuestion2.nb

Jose

unread,
Mar 21, 2013, 2:07:08 PM3/21/13
to xAct Tensor Computer Algebra
Thanks Ahmed.

That's a bug due to a missing definition. This code will add it:

Begin["xAct`xTensor`Private`"];
ToObject[n_Integer object_Object] := ToObject[TensorTimes[Identify[n],
object]];
End[];

Cheers,
Jose.
> ayousse...@gmail.com
>
>  AhmedQuestion2.nb
> 30KViewDownload
>
>

Ahmed Youssef

unread,
Mar 21, 2013, 4:18:44 PM3/21/13
to Jose, xAct Tensor Computer Algebra
It works perfectly. Thank you Jose.

Ahmed
> --
> 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.
>
>

Ahmed Youssef
ayous...@gmail.com



Jose

unread,
Mar 25, 2013, 9:26:48 AM3/25/13
to xAct Tensor Computer Algebra
Hi again,

The fact that NoScalar does not act on denominators is an explicit
decision. I think it would be dangerous because if you have
Scalar[w[a]*v[-a]]/Scalar[v[a]*v[-a]] then things will go very wrong
if we remove the Scalar head of the denominator as well.

Concerning ContractMetric, I have a similar feeling, because if you
need ContractMetric in the denominator then it means that you should
have Scalar wrapping the whole expression to be contracted. Then the
question is whether we want ContractMetric to act inside Scalar
objects, or the arguments of scalar functions. I have doubts. In any
case, you can always force it with the rule Scalar[expr_] :>
Scalar[ContractMetric[expr]] .

Cheers,
Jose.

On Mar 23, 7:13 am, Filippo <guarnieri.fili...@gmail.com> wrote:
> Hi,
> I dont want to go off-topic, but I would like to underline that also
> functions like NoScalar or
> ContractMetric are not working for denominators.
>
> Cheers,
> Filippo
> > an email to xact+uns...@googlegroups.com <javascript:>.
> > > For more options, visithttps://groups.google.com/groups/opt_out.
>
> > Ahmed Youssef
> > ayous...@gmail.com <javascript:>

Sam Gralla

unread,
Aug 29, 2018, 5:40:43 PM8/29/18
to xAct Tensor Computer Algebra
It might be useful to mention in the NoScalar documentation that it ignores denominators (and what else?).  I'm getting back into xAct and I found it confusing.  Luckily I was able to find this post in the google group.  (You guys are great.)

Jose

unread,
Oct 23, 2018, 1:01:20 AM10/23/18
to xAct Tensor Computer Algebra

Hi,


The code of NoScalar is fairly simple, so it may be useful to read it in order to understand what it does exactly. NoScalar basically looks for Scalar[_] objects and uses ReplaceDummies on them:


(* Thread over Plus and Times *)

NoScalar[expr_Plus:= NoScalar /@ expr;

NoScalar[expr_Times:= NoScalar /@ expr;

(* Remove Scalar head from positive powers *)

NoScalar[Power[expr_n_Integer?Positive]] := Apply[Times, Table[NoScalar[expr], {n}]];

NoScalar[Scalar[expr_]] := ReplaceDummies[expr];

(* Skip inert heads *)

NoScalar[ih_?InertHeadQ[expr_z___]] := ih[NoScalar[expr], z];

NoScalar[expr_?ProductQ[___]] := NoScalar /@ expr;

(* Derivatives *)

NoScalar[der_?FirstDerQ[expr_]] := der[NoScalar[expr]];

(* Do nothing on other cases *)

NoScalar[expr_:= expr;


So we see that NoScalar can only act on bases of positive integer powers. This excludes roots and denominators.


NoScalar should be probably generalized to enter CTensor objects.


Cheers,

Jose.

Reply all
Reply to author
Forward
0 new messages