Redberry is an open source computer algebra system designed for algebraic manipulations with tensors. Redberry is a computer algebra system which considers both tensors and indexless expressions in a common way.

Key features:

- Programming language with internal support of symbolic algebra
- Tensor symmetries, multiple index types, dummy indices handling, $\LaTeX$-style I/O, mappings of tensor indices
- A wide range of tensor-specific transformations and simplification routines
- Tools for calculations in High Energy Physics: Feynman diagrams and one-loop counterterms
- Extensive API for developers

Example:

*one-loop counterterms*
This code calcultes one-loop counterterms of the minimal second order operator:
\[
D_i{}^j\,=\,\delta_i{}^j\,\Box + W_i{}^j
\]

import cc.redberry.groovy.Redberry
import static cc.redberry.groovy.RedberryPhysics*
import static cc.redberry.groovy.RedberryStatic.*
/*
* One-loop counterterms for minimal second order operator
*/
use(Redberry) {
def iK = 'iK_a^b = d^b_a'.t
def K = 'K^lm_a^b = d^b_a*g^{lm}'.t
def S = 'S^lab = 0'.t
def W = 'W_a^b = W_a^b'.t
def F = 'F_lmab = F_lmab'.t
def div = RedberryPhysics.oneloopdiv2(iK, K, S, W, F)
def counterterms = EliminateDueSymmetries >> div.counterterms
println counterterms
}

Multiplying the produced result by $1\left/16\pi(d-4)\right.$ and integrating over the space-time
volume gives:
\[
\Gamma^{(1)}_{\infty} = \frac{1}{16\pi(d-4)} \int d^4 x \sqrt{-g} \left(
\frac{1}{30} R^2 +\frac{1}{12} F_{\nu\beta }{}^{\epsilon}{}_{\rho} F^{\nu\beta\rho}{}{\epsilon }+\frac{1}{15} R_{\delta \nu } R^{\delta \nu }+\frac{1}{2} W^{\alpha }{}_{\rho} W^{\rho}_{\alpha}+\frac{1}{6} R W^{\beta }{}_{\beta}\right),
\]
where $F_{\mu\nu\alpha\beta}$ is a curvature tensor with respect to the principal bundle, $R_{\mu\nu}$ is a Ricci tensor and $R$ is a Riemann scalar curvature.