Ask Your Question
0

Tensor manipulation with sagemath

asked 2026-11-10 11:11:26 +0100

antrock1999 gravatar image

Hello everyone, I am new to SageMath and would like to use it to verify a series of relations in quantum field theory. In particular, I would like to know how well Sage handles tensors and the verification of identities. The identity is as follows. I have a tensor $N$ defined like this: $$ \begin{aligned} N^{\mu \nu}=\left[g^{\mu \alpha}(p+k)^\rho+\right. & \left.g^{\alpha \rho}(p-2 k)^\mu+g^{\rho \mu}(k-2 p)^\alpha\right] g^{\alpha \beta} g^{\rho \sigma} \ & \times\left[g^{\nu \beta}(p+k)^\sigma-g^{\beta \sigma}(2 k-p)^\nu-g^{\sigma \nu}(2 p-k)^\beta\right] . \end{aligned} $$ I make the transformation: $$ k^\mu \rightarrow k^\mu+x p^\mu $$ Then supposing g is a Lorentz metric (+---), and to be in dimension d, so as as to have $g^{\mu \mu}=d$. I'm wondering if sagemath can verify is after the subsitution and this identity, the result is: $$ \begin{aligned} N^{\mu \nu}=2 k^2 g^{\mu \nu} & -(6-4 d) k^\mu k^\nu \ - & {\left[6\left(x^2-x+1\right)-d(1-2 x)^2\right] p^\mu p^\nu+\left(2 x^2-2 x+5\right) p^2 g^{\mu \nu} } \ & -(2-4 x) g^{\mu \nu}(k \cdot p)+(2 d-3)(2 x-1)\left(k^\mu p^\nu+k^\nu p^\mu\right) . \end{aligned} $$

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2026-11-13 10:36:40 +0100

eric_g gravatar image

Currently, the manifold implementation in SagMath does not allow for an abstract dimension $d$. The dimension has to be specified to an actual integer, e.g. $d=4$ or $d=10$ (it can be arbitrary). If you do so, then you can check the identity you are considering for a specific metric (the metric has to be specified as well).

edit flag offensive delete link more

Comments

Thank you for your answer. Can you help me me to verify the identity say for d=4, and metric of signature (1.-1-1-1) ? Consider , I'm totally new to Sagemath.

antrock1999 gravatar imageantrock1999 ( 2026-11-14 15:50:30 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2026-11-10 11:11:26 +0100

Seen: 128 times

Last updated: Nov 13