a field-theory motivated approach to computer algebra

# Theoretical background

Let $M$ be a manifold, and $g$ a (semi)Riemannian metric defined on $M$. Then the line element for the metric $g$ is \begin{equation*} \mathrm{d}{s}^2(g) = g_{\mu\nu} \mathrm{d}{x}^\mu \otimes \mathrm{d}{x}^\nu. \end{equation*} Nonetheless, the information about the metric structure of the manifold can be translated to the language of frames, \begin{equation*} \begin{split} \mathrm{d}{s}^2(g) & = g_{\mu\nu} \mathrm{d}{x}^\mu \otimes \mathrm{d}{x}^\nu \\ & = \eta_{ab} \; e^{a}_{\mu}(x) \, e^{b}_{\nu}(x) \; \mathrm{d}{x}^\mu \otimes \mathrm{d}{x}^\nu \\ & = \eta_{ab} \; \mathrm{e}^{a} \otimes \mathrm{e}^{b}. \end{split} \end{equation*} Therefore, the vielbein 1-form, $\mathrm{e}^{a} \equiv e^{a}_{\mu}(x) \mathrm{d}{x}^\mu$, encodes the information of the metric tensor. In order to complete the structure, one needs information about the transport of geometrical objects lying on bundles based on $M$. That information is encoded on the spin connection 1-form, $\omega^{a}{}_{b}$. Using these quantities one finds the generalisation of the structure equations of Cartan, \begin{align} \mathrm{d}{\mathrm{e}^{a}} + \omega^{a}{}_{b} \wedge \mathrm{e}^{b} & = \mathrm{T}^{a}, \label{firstSE}\\ \mathrm{d}{\omega^{a}{}_{c}} + \omega^{a}{}_{b} \wedge \omega^{b}{}_{c} & = \mathrm{R}^{a}{}_{c} \label{secondSE}. \end{align} The torsion 2-form, $\mathrm{T}^{a}$, and the curvature 2-form, $\mathrm{R}^{a}{}_{c}$, measure the impossibility of endowing $M$ with an Euclidean structure.

# Manipulation of the structural equations

## Definitions

{a,b,c,l,m,n}::Indices. d{#}::ExteriorDerivative;. d{#}::LaTeXForm("\mathrm{d}"). T{#}::LaTeXForm("\mathrm{T}"). R{#}::LaTeXForm("\mathrm{R}"). {e^{a}, \omega^{a}_{b}}::DifferentialForm(degree=1); {T^{a}, R^{a}_{b}}::DifferentialForm(degree=2);
$$\displaystyle{}\text{Attached property DifferentialForm to }\left[e^{a}, \omega^{a}\,_{b}\right].$$
$$\displaystyle{}\text{Attached property DifferentialForm to }\left[\mathrm{T}^{a}, \mathrm{R}^{a}\,_{b}\right].$$

## Cartan structural equations

struc1 := d{e^{a}} + \omega^{a}_{b} ^ e^{b} - T^{a} = 0;
$$\displaystyle{}\mathrm{d}{e^{a}}+\omega^{a}\,_{b}\wedge e^{b}-\mathrm{T}^{a} = 0$$
d(e^{a}) + \omega^{a}_{b} ^ e^{b}-T^{a} = 0
struc2 := d{\omega^{a}_{b}} + \omega^{a}_{m} ^ \omega^{m}_{b} - R^{a}_{b} = 0;
$$\displaystyle{}\mathrm{d}{\omega^{a}\,_{b}}+\omega^{a}\,_{m}\wedge \omega^{m}\,_{b}-\mathrm{R}^{a}\,_{b} = 0$$
d(\omega^{a}_{b}) + \omega^{a}_{m} ^ \omega^{m}_{b}-R^{a}_{b} = 0
In the following, we will also use the structural equations as definitions of the exterior derivatives of the vielbein and spin connection 1-forms. Therefore, we shall utilise the isolate algorithm---from the cdb.core.manip library---to define substitution rules.
from cdb.core.manip import * de:= @(struc1): isolate(de, $d{e^{a}}$);
$$\displaystyle{}\mathrm{d}{e^{a}} = -\omega^{a}\,_{b}\wedge e^{b}+\mathrm{T}^{a}$$
d(e^{a}) = -\omega^{a}_{b} ^ e^{b} + T^{a}
domega := @(struc2): isolate(domega, $d{\omega^{a}_{b}}$);
$$\displaystyle{}\mathrm{d}{\omega^{a}\,_{b}} = -\omega^{a}\,_{m}\wedge \omega^{m}\,_{b}+\mathrm{R}^{a}\,_{b}$$
d(\omega^{a}_{b}) = -\omega^{a}_{m} ^ \omega^{m}_{b} + R^{a}_{b}

# Bianchi identities

The bianchi identities are obtained by applying the exterior derivative to the structural equations.

## First Bianchi identity

Bianchi1 := d{ @(struc1) };
$$\displaystyle{}\mathrm{d}\left(\mathrm{d}{e^{a}}+\omega^{a}\,_{b}\wedge e^{b}-\mathrm{T}^{a}\right) = 0$$
d(d(e^{a}) + \omega^{a}_{b} ^ e^{b}-T^{a}) = 0
distribute(Bianchi1) product_rule(_);
$$\displaystyle{}\mathrm{d}{\omega^{a}\,_{b}}\wedge e^{b}-\omega^{a}\,_{b}\wedge \mathrm{d}{e^{b}}-\mathrm{d}{\mathrm{T}^{a}} = 0$$
d(\omega^{a}_{b}) ^ e^{b}-\omega^{a}_{b} ^ d(e^{b})-d(T^{a}) = 0
substitute(Bianchi1, de, repeat=True) substitute(Bianchi1, domega, repeat=True) distribute(_);
$$\displaystyle{}-\omega^{a}\,_{m}\wedge \omega^{m}\,_{b}\wedge e^{b}+\mathrm{R}^{a}\,_{b}\wedge e^{b}+\omega^{a}\,_{b}\wedge \omega^{b}\,_{c}\wedge e^{c}-\omega^{a}\,_{b}\wedge \mathrm{T}^{b}-\mathrm{d}{\mathrm{T}^{a}} = 0$$
-\omega^{a}_{m} ^ \omega^{m}_{b} ^ e^{b} + R^{a}_{b} ^ e^{b} + \omega^{a}_{b} ^ \omega^{b}_{c} ^ e^{c}-\omega^{a}_{b} ^ T^{b}-d(T^{a}) = 0
rename_dummies(Bianchi1);
$$\displaystyle{}\mathrm{R}^{a}\,_{b}\wedge e^{b}-\omega^{a}\,_{b}\wedge \mathrm{T}^{b}-\mathrm{d}{\mathrm{T}^{a}} = 0$$
R^{a}_{b} ^ e^{b}-\omega^{a}_{b} ^ T^{b}-d(T^{a}) = 0
In the absence of torsion, the above expression is the well-known algebraic Bianchi identity \begin{equation*} R^\mu{}_{\nu\lambda\rho} + R^\mu{}_{\lambda\rho\nu} + R^\mu{}_{\rho\nu\lambda} = 0. \end{equation*}

## Second Bianchi identity

Bianchi2 := d{ @(struc2) };
$$\displaystyle{}\mathrm{d}\left(\mathrm{d}{\omega^{a}\,_{b}}+\omega^{a}\,_{m}\wedge \omega^{m}\,_{b}-\mathrm{R}^{a}\,_{b}\right) = 0$$
d(d(\omega^{a}_{b}) + \omega^{a}_{m} ^ \omega^{m}_{b}-R^{a}_{b}) = 0
distribute(Bianchi2) product_rule(_);
$$\displaystyle{}\mathrm{d}{\omega^{a}\,_{m}}\wedge \omega^{m}\,_{b}-\omega^{a}\,_{m}\wedge \mathrm{d}{\omega^{m}\,_{b}}-\mathrm{d}{\mathrm{R}^{a}\,_{b}} = 0$$
d(\omega^{a}_{m}) ^ \omega^{m}_{b}-\omega^{a}_{m} ^ d(\omega^{m}_{b})-d(R^{a}_{b}) = 0
substitute(Bianchi2, domega, repeat=True) distribute(_) rename_dummies(_);
$$\displaystyle{}\mathrm{R}^{a}\,_{c}\wedge \omega^{c}\,_{b}-\omega^{a}\,_{c}\wedge \mathrm{R}^{c}\,_{b}-\mathrm{d}{\mathrm{R}^{a}\,_{b}} = 0$$
R^{a}_{c} ^ \omega^{c}_{b}-\omega^{a}_{c} ^ R^{c}_{b}-d(R^{a}_{b}) = 0
The above result, when written in tensorial components, is the well-known differential Bianchi identity: \begin{equation*} R^\mu{}_{\nu\lambda\rho;\sigma} + R^\mu{}_{\nu\sigma\lambda;\rho} + R^\mu{}_{\nu\rho\sigma;\lambda} = 0. \end{equation*}