Simplifying Expressions

92 views
Skip to first unread message

olse barn

unread,
Sep 20, 2022, 3:06:52 AM9/20/22
to xAct Tensor Computer Algebra
Hello everyone, 
I am completely new to xAct and was wondering if it is possible to tell xAct how to simplify expressions.
Is there, for example, a way (e.g. in form of a supplied rule) to automatically simplify Maxwell equations given as

CD[-b][CD[-a][A[b]]] - CD[-b][CD[b][A[-a]]]

to 

CD[-a]@F[a, b]

where 

F[a_, b_] := CD[a][A[b]] - CD[b][A[a]] ?

Any help is appreciated.

Thomas Bäckdahl

unread,
Sep 20, 2022, 9:12:05 AM9/20/22
to xa...@googlegroups.com
Hi!

I would work with equations and do it like this.

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/ccd1625d-9b45-4ed7-95b9-b4aa15d63277n%40googlegroups.com.

MaxwellExample.nb

Jose

unread,
Sep 20, 2022, 10:41:41 AM9/20/22
to xAct Tensor Computer Algebra
Hi,

I'd like to stress the fact that Thomas used equations and rules, but not assignments like F[a_, b_] := ... because then trying to insert F[a, b] in the computations would immediately use that assignment.

Thomas' idea is to replace CD[a][A[b]] by a sum of its antisymmetric part (i.e. F[a, b]) and its symmetric part. Another possibility is to define a rule of the form:

   rule = CD[a_][A[b_]] :> F[a, b] + CD[b][A[a]] /; IndexOrderedQ[{a, b}]

Then you also have

In[ ]:= CD[-b][CD[-a][A[b]]] - CD[-b][CD[b][A[-a]]] /. rule
Out[ ]= CD[-b][F[-a, b]]

Cheers,
Jose.

olse barn

unread,
Sep 21, 2022, 7:40:24 AM9/21/22
to xAct Tensor Computer Algebra
Thank you both for the fast and informative reply!

best


Reply all
Reply to author
Forward
0 new messages