Skip to content
physeduPublic

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

xPlorer

Explore one abstract theory across independent geometries.
A Wolfram Language research package for theoretical physics and general relativity, built on xAct.

Abstract coordinate grids and curved geometric surfaces representing independent spacetime backgrounds

Version 1.0.0-beta.1 GPL-3.0-or-later Wolfram Language 13.0 or later Experimental beta

Download beta · API guide · Report an issue


The idea

In a symbolic calculation, the abstract theory and the spacetime on which you evaluate it are different things. xPlorer helps keep them separate.

Register your xAct theory once, then create independent backgrounds with their own copied tensor objects, metric and field-component inputs. You can study the same equations on Minkowski, Schwarzschild, FLRW or other user-defined geometries in one Mathematica session, without rebuilding the abstract theory for every case.

One theory. Independent backgrounds. Native xAct mathematics.

xPlorer is a workflow and ownership layer around xAct, not a replacement tensor-algebra engine. Mathematica and xAct continue to perform the symbolic mathematics; xPlorer connects registered abstract objects to managed geometric backgrounds and component calculations.

What you can do

  • Reuse abstract theories. Register fields, parameters, connections, Lagrangians and expressions, then create background-specific snapshots.
  • Compare geometries. Work with independent metrics, coordinate charts and field configurations in the same kernel. There is no global active background.
  • Calculate components. Transport expressions to a selected background and use xCoba to obtain tensor components and native component objects.
  • Study perturbations. Use xPert for metric perturbations, including inverse-metric variations and their components.
  • Work with connections. Register supported independent affine connections and calculate their associated geometric quantities.
  • Keep control of a study. Inspect inputs, change profiles and notation, clear derived values, reconstruct a background or remove owned objects through explicit lifecycle operations.

Where xPlorer fits

Tool Main responsibility
Mathematica / Wolfram Language Symbolic evaluation, differentiation, simplification and notebooks
xTensor Abstract manifolds, tensor definitions and tensor algebra
xPert Perturbative expansions
xCoba Bases and tensor components
xPlorer Theory registration, independent background copies, managed inputs and the workflow between abstract expressions and components

The copied objects are native xAct objects. You can derive or manipulate equations on a background even before choosing coordinates, and continue to use supported native xAct operations on the copied objects.

Get started

1. Download the beta

Go to GitHub Releases and download xPlorer-1.0.0-beta.1.zip. The complete distribution contains:

  • xPlorer-1.0.0-beta.1.paclet — the installable paclet;
  • xPlorer.wl — the package source;
  • xPlorer_Install.nb — installation, verification and removal;
  • xPlorer_Workflow.nb — the main scientific walkthrough;
  • xPlorer_API_Examples.nb — advanced API examples;
  • README.md, LICENSE and CITATION.cff;
  • assets/xplorer-banner.svg — the project artwork used on this page.

2. Install the dependencies

Install xAct separately. It is not bundled with xPlorer and is not downloaded automatically.

The paclet declares Wolfram Language 13.0 or later. The current automated validation environment is Wolfram Language 15.0.1 with xAct 1.3.0; earlier kernel versions have not all been tested.

3. Install and open the walkthrough

  1. Extract the complete ZIP.
  2. Open xPlorer_Install.nb in Mathematica and follow its installation section.
  3. Restart the kernel after installation.
  4. Load the package with:
Needs["xPlorer`"]
  1. Open xPlorer_Workflow.nb and follow the worked examples.

If you prefer to work directly from source, evaluate Get on the included xPlorer.wl; this does not require paclet installation. Do not load two copies of xPlorer in the same kernel.

A first look: one equation, two spacetimes

Here is a compact example of the complete workflow, adapted from the scientific notebooks. Start in a fresh Mathematica kernel with xAct installed and xPlorer loaded (using either of the methods above).

1. Define the abstract theory with xAct

A massive real scalar field on an abstract Lorentzian manifold:

DefManifold[M, 4, {a,b,c,d,e,f,i,j}];
DefMetric[-1, g[-a,-b], CD];
DefTensor[phi[], M];
DefConstantSymbol[m];

L = -CD[-a][phi[]] CD[a][phi[]]/2 - m^2 phi[]^2/2;
kg = VarD[phi[], CD][L] // ContractMetric // ToCanonical;

The equation is the covariant Klein–Gordon equation. No coordinate chart or particular metric has been chosen yet.

2. Register the theory and create independent backgrounds

RegisterTheory["Metric", g];
RegisterTheory["CovD", CD];
RegisterTheory["Indices", {a,b,c,d,e,f,i,j}];
RegisterTheory["Field", phi];
RegisterTheory["Parameter", m];
RegisterTheory["Lagrangian", "Matter" -> L];
RegisterTheory["Expression", "KG" -> kg];

CreateBackground["Minkowski", SymbolSuffix -> "M"];
CreateBackground["FLRW", SymbolSuffix -> "FLRW"];

ShowBackground[]

Each call to CreateBackground creates an independent native xAct manifold and copies the registered geometry, fields and expressions. For example, gM, phiM and kgM belong to Minkowski, while gFLRW, phiFLRW and kgFLRW belong to FLRW. The parameter m remains shared. Backgrounds capture the registered theory at creation; later changes to the registry do not silently change existing studies.

SymbolSuffix controls readable names, not printed mathematical labels. By default RegisterTheory["Field", phi] gives the key "phi" and the copied field phiM with suffix "M". If instead you register it with Name -> "matter", the key becomes "matter" and the copied field becomes matterM. SymbolBase is only needed when the key and typed base should differ; PrintAs is display-only. The naming guide explains all options.

You can already work with abstract expressions and apply physical limits to a single study, without changing the others:

kgM
kgFLRW
AddRules["Minkowski", {m -> 0}];
UseExpression["Minkowski", "KG"]
ClearRules["Minkowski"];

3. Assign metrics and field profiles

Minkowski — flat spacetime with a general scalar profile:

DefineChart["Minkowski", {t[],x[],y[],z[]}];
MetricInBasis[gM, DiagonalMatrix[{-1,1,1,1}]];

DefScalarFunction[v];
ComponentValue[phiM[], v[tM[],xM[],yM[],zM[]]];

Spatially flat FLRW — an expanding background with a homogeneous scalar:

DefineChart["FLRW", {t[],x[],y[],z[]}];
DefScalarFunction[s];
DefScalarFunction[q];

MetricInBasis[gFLRW,
  DiagonalMatrix[{-1,s[tFLRW[]]^2,s[tFLRW[]]^2,s[tFLRW[]]^2}],
  Assumptions -> s[tFLRW[]] > 0
];
ComponentValue[phiFLRW[], q[tFLRW[]]];

MetricInBasis and ComponentValue are native xCoba operations; the supported short forms use the managed primary chart.

4. Evaluate the same abstract equation on both backgrounds

eqM = kgM // ToComponents;
eqF = kgFLRW // ToComponents;

eqM == 0
eqF == 0

The expected component equations (written with an overall sign chosen for readability) are:

Minkowski Spatially flat FLRW
$\partial_t^2 v - \nabla^2 v + m^2v = 0$ $\ddot q + 3\frac{\dot s}{s}\dot q + m^2q = 0$

Here $s(t)$ is the scale factor. The expansion term appears on FLRW without rederiving the abstract field equation. The supplied profiles are trial fields, not assumed to be solutions.

Both backgrounds remain available in the same kernel:

ShowBackground["Minkowski"]
ShowBackground["FLRW", "Fields"]
BackgroundValue["FLRW", "MetricMatrix"]

The longer Workflow notebook develops this approach further, including Schwarzschild, tensor fields, perturbations, profiles and coordinate transformations. For a new source observable use PortExpression[tag, expr]; to explore new field profiles on one geometry use RegisterProfile and ActivateProfile. To inspect or recover a study use ShowBackground, ReconstructionData and RecreateBackground. See the API guide for examples and the managed/native boundaries.

The notebooks

Notebook Purpose
xPlorer_Install.nb Install, verify or uninstall the supplied paclet
xPlorer_Workflow.nb The principal tutorial: an Einstein–scalar theory, test fields, gravitational waves on Minkowski and FLRW, and a quadratic wave-energy example
xPlorer_API_Examples.nb Advanced examples and a practical API reference

For contributors working from a Git checkout, xPlorer_Development.nb covers local source testing, building and installing a development paclet. It is not included in the release ZIP.

The longer-form API guide documents the current interface, supported options and important boundaries.

Supported scope and boundaries

The beta focuses on a real metric and its tangent bundle: scalar, vector and fixed-rank tensor fields, a metric perturbation, the managed primary chart, additional registered output charts, and supported independent affine connections.

A few important boundaries are deliberate:

  • xPlorer does not replace xAct's tensor algebra and does not solve field equations or boundary-value problems automatically.
  • General spinors, arbitrary extra bundles, density fields and unrestricted external-basis synchronization are outside the current supported scope.
  • Supply metric components as explicit expressions of coordinates and parameters. Evaluate tensor profiles before assigning them when necessary; metric inputs are not live links to tensor component rules.
  • State the intended Assumptions domain for managed geometry. Ambient session assumptions do not silently specialize cached background results.
  • Unknown components are not assumed to vanish.
  • Arbitrary direct edits to native caches are not part of the managed workflow. Native xAct remains available, but managed operations only track the documented mutation paths.

See API_GUIDE.md for the detailed contract and limitations.

Feedback and contributions

xPlorer is experimental research software, and concrete feedback from people using it in real calculations is especially valuable.

Please open an issue with:

  • xPlorer, Mathematica and xAct versions;
  • operating system;
  • the smallest reproducible input;
  • expected and actual output;
  • a screenshot if the problem concerns notebook presentation.

A fresh kernel makes reproductions much easier. Please do not attach private research files unless they are necessary to reproduce the issue.

Citation and license

If xPlorer contributes to your research, cite the exact version using the included CITATION.cff. Please cite xAct independently as well.

Author: Eduardo Sanz-Romero · PhysEdu
License: GPL-3.0-or-later

xPlorer is distributed without warranty. This is the first public beta; APIs and supported workflows may change in later releases.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages