Generalising rule to make it act on arbitrary scalar

27 views
Skip to first unread message

Sukruti

unread,
Sep 15, 2024, 12:54:30 PMSep 15
to xAct Tensor Computer Algebra
Hello,

I have defined a rule via MakeRule separately for the Ricci scalar and a scalar field \[Phi] defined explicitly in the notebook (the rules named boxrule1 and boxrule2 in the attached notebook).

I am wondering if it is possible to generalise the rule and define it such that it can work for any arbitrary scalar, such as CD[-\[Alpha]]@CD[\[Alpha]]@\[Phi], and not just the Ricci scalar and \[Phi].

Is it possible?

Cheers
Sukruti
MakeRule for arbitrary scalar.nb

Thomas Bäckdahl

unread,
Sep 15, 2024, 12:56:22 PMSep 15
to xa...@googlegroups.com
Hi!

Perhaps you can use your boxrule3 to construct a new rule. Try the following:
boxrule3 =  ReplacePart[#, 1 -> (#[[1]] /. \[Phi] -> \[Phi]_?ScalarQ)] & /@ (boxrule2 /. \[Phi][] -> \[Phi])

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/0fb092b5-c9ce-4fcf-97fe-576c84310622n%40googlegroups.com.

Sukruti

unread,
Sep 16, 2024, 1:26:13 PMSep 16
to xAct Tensor Computer Algebra
Great, thanks!

Cheers
Sukruti

Reply all
Reply to author
Forward
0 new messages