Roadmap¶
For: anyone deciding whether RelativisticPy will do what they need, and anyone who would like to help. You will learn: what is done, what is being done now, and what comes next.
RelativisticPy began with one idea: Einstein's equations should look exactly as they do
in papers, with an engine that can compute them. It grew into a language that reads
mathematics in general, as it is written. These are its plans, and where each stands.
What was left on purpose, and why, is in design/debt.md in the repository.
Done¶
- Mathematics as it is written. LaTeX, plain text and Unicode, mixed freely. Plain text and Unicode are read as the LaTeX they spell, or refused. An equation pasted from a paper runs as it is.
- The core: algebra; calculus, with derivatives in every notation, integrals,
limits, sums, products, series,
solveanddsolve; linear algebra; and index notation over any space, its rules checked before anything is computed. - Fields in their books' notation, each with a page: special functions, vectors and matrices, probability, signals, optimisation, number theory and combinatorics, and quantum mechanics, with Dirac's notation and operators.
- General Relativity: metrics from line elements; the Christoffel symbols and the Riemann, Ricci, Einstein and Weyl tensors; covariant and Lie derivatives; geodesics, symbolic and numerical; eight known spacetimes; and tensor equations solved as tensor equations, before there are components.
- Nothing guessed silently. A reading that could have been another carries a note,
and
explainshows how each statement was read. What cannot be read or decided is refused, saying where, why and what to write instead. What has no value, as 1/0 or an integral that never settles, is refused too, and a closed form that numbers refute is not given. - Data, and Python: indices over assets, days or the states of a qubit; data from
NumPy, pandas, SciPy and SymPy; JAX for gradients; and Python objects by name,
\texttt{name}. - Checking papers:
relativisticpy checkruns a paper's equations and says which hold. Sean Carroll's lecture notes are the benchmark: 98.6% of their equations parse, and the check finds three mistakes in them. - For agents: an MCP server, to compute, verify a step, check a paper and read the
documentation. Each value says whether it is a complete answer, and whether it is
approximate; each refusal says why. The habits of NumPy and MATLAB,
A @ B,A.Tandeig(A), and||x||_1typed in plain text, are read as they mean, with a note. - Tools: the command line, Markdown notebooks, Jupyter and marimo, and an editor
that computes as it is typed. The documentation is offline, in
relativisticpy help. - A pipeline with one job for each pass, from the lexer to the engines, and integrations to one pattern: every function a capability that a module declares, held to the pattern by a conformance suite, with no configuration.
- Known answers: a curriculum of 734 problems in 32 fields, and a notation matrix of 44 constructs of the core, each written every way books write it. Each answer is computed without RelativisticPy, and the tests keep what passes passing.
Now¶
- No silent wrong answer. A wrong answer known in the core, algebra, calculus,
linear algebra and index notation, is fixed before the next release, or refused with
what to write instead; those of other fields are fixed too, or listed in the notes of
the release. One is known as this is written that says nothing: units are
names, so \(\mathrm{Mpc}\,\mathrm{s}/(70\,\mathrm{Gyr}\,\mathrm{km})\) is not
converted (
design/debt.md). Two say so in a note, and are not computed as meant:j, which nothing defines, is a name in \(\left|\frac{1}{1 + j}\right|\), where an engineer means the imaginary unit (decision 24 ofdesign/notation.md); and a claim after equations that hold its names, as Mandelstam's \(s + t + u = \sum_i m_i^2\) after \(p_1 + p_2 = p_3 + p_4\) and \(p_i^2 = m_i^2\), is shown as an equation, not decided under them (decision 3).
No program known gives an internal error: not in the docs, the curriculum, the notation matrix, the tests, nor the seven papers the check is measured on.
uv run python benchmarks/curriculum.py --failures and
uv run python benchmarks/notations.py --failures list every wrong answer they find.
- Climbing the curriculum. What it refuses most, by cause, is in its own
roadmap.
Next¶
- A core with no SymPy in it: an IR of plain terms, one elaborator that ranks the readings of a form, and the notation of each field declared as data by its integration; then the core rebuilt in Rust.
- Results as terms, and other engines: SymPy's answers translated back into the IR, so that other engines can compute too, and two engines check each other.
- Derivatives in index notation: \(\nabla_\mu\) and \(\partial_\mu\) as part of the notation, with the Leibniz rule, metric compatibility and the contracted Bianchi identity \(\nabla^\mu G_{\mu\nu} = 0\), so that conservation laws can be derived rather than only checked.
- Abstract definitions:
T_{\mu\nu} := (\rho + p) u_\mu u_\nu + p g_{\mu\nu}with a velocity that has no components yet, kept as notation until it has. - More of physics' implicit conventions: \(x^\mu\) as the coordinates themselves, coordinates along a curve, \(x^\mu(\lambda)\), and \(\eta_{\mu\nu}\) as the Minkowski metric, so that more of a paper can be checked; and a field met with a path taken along it in the IR, in every sum.
- Premises in papers: a premise a derivation states in prose, as \(R_{\mu\nu} = 0\), and an identity that holds at a point, as in Riemann normal coordinates, so that neither reads as a mistake. An equation for the functions a metric is written with relates already.
- Equations a program means to solve: a design for which equations to solve unasked, and which only state; and a claim decided under the equations stated before it.
- What an agent reads: a note that carries its kind, which a value's
reasonsare read from, andcompute's claims judged asverifyjudges them. - Units: quantities with units, converted and checked for dimensions.
- Optimisation over a vector written with its index: minimise \(w^a \Sigma_{ab} w^b\) subject to constraints, with gradients from JAX.
- Coordinate transformations, with the Jacobian; energy-momentum tensors for perfect fluids and the electromagnetic field; and more spacetimes: Oppenheimer–Snyder collapse, Lemaître–Tolman–Bondi dust, Schwarzschild–de Sitter.
- A visual engine, with Manim: derivations that
animate step by step, orbits and light rays, light cones, embedding diagrams and
Penrose diagrams, behind an optional
relativisticpy[visual]extra. - Fields on grids, for numerical relativity and for pictures, and the ADM formalism.
- A language server, for highlighting, errors and "compute this" in editors; and pages that compute with no server, in the reader's browser.
- An evaluation: how a model does with the
verifytool and without it.
Someday¶
Hawking radiation and the Penrose process as worked modules; analysis of real data from gravitational-wave observatories; interactive tutorials for people new to the subject.
Ideas and contributions are welcome: open an issue.