Prime is a python package that allows to derive the weak field Lagrangians of any geometry by the gravitational closure mechanism.
- Easy to use setup for any input geometry
- Complete automation from the geometry to the output
- Modern technologies: Python 3 + Kubernetes for distributed computing
Note: Prime is in VERY early development stage. Its API and design is still fluctuating quantum style and its results are as trustable as from string theory.
- Reading of the input files
- Calculation of the remaining input coefficients (E, F)
- Perturbative expansion of the input coefficients
- Generation of a list of all perturbative output coefficients
- Generation of the basis terms of the perturbative output coefficients
- Collecting all perturbative output coefficients into the polynomial in the degrees of freedom
- Writing classes for all closure equations
- Plugging all coefficients into the closure equations
- Solving them
- Fancy output of the whole Lagrangian
$ git clone https://github.com/florianwolz/prime
$ cd prime
$ pip install -r requirements.txt
$ pip install .
$ prime solve examples/metric.py
Prime ships with a command line interface. With the solve
command you can solve an
input script for a specific geometry.
Prime is configured with the help of a Python input script. Before explaining the several steps, let's start with an example:
import prime
from sympy import sqrt
# Setup the list of the six degrees of freedom
phis = prime.phis(6)
# Setup the (pulled-back) metric
g = prime.Field([[-1 + phis[0], phis[1], phis[2]],
[phis[1], -1 + phis[3], phis[4]],
[phis[2], phis[4], -1 + phis[5]]], [1, 1])
# Setup the parametrization
param = prime.Parametrization(fields=[g])
# Setup the kinematical coefficient
P = prime.Kinematical(param, components=g.components, degP=2)
# Solve
prime.solve(
parametrization=param,
kinematical_coefficient=P,
# Linear equations of motion
order=1
)
Executing this script will give the perturbative expansion of the Einstein-Hilbert action to second order.
All input scripts have more or less the same structure. It starts with the inclusion
of the prime module and then one uses prime.phis(N)
to get an array with the degrees
of freedom properly setup.
This is followed by the geometric fields in terms of the degrees of freedom, either by
using the prime.Field
class - or for complicated parametrizations in functional form
with the help of the prime.field
decorator. Then the parametrization can be setup.
Lastly, one enters the kinematical coefficient P and the normal deformation coefficient M
and starts the solving process by calling prime.solve
.
For further examples take a look into the examples/
directory, where the input scripts for
a bi-metric theory and an area metric are provided.
Gravitational closure is a theoretical mechanism that allows to calculate the Lagrangian of a geometry by solving a system of linear homogeneous partial differential equations. These equations encode the requirement that matter theories that is coupled to this geometry can be formulated on common initial data surfaces -- i.e. allow a consistent predictive physical theory.
Solving this system is practically quite complicated -- and fortunately practically often not even required. Instead one can already use a perturbative expansion around some constant background. This turns the system of partial differential equations into a huge linear algebra problem.
Prime tackles this problem by completely automating the process between the input data and the final Lagrangian.
Prime is released under the Apache 2.0 licence. See LICENSE
Crafted with ❤️ and lots of ☕ as part of my PhD thesis.