XAct.jl Feature Completion Matrix

Status TL;DR for AI Agents

All core xAct modules ported: XPerm (canonicalization), XTensor (algebra, CovD, perturbation, IBP, VarD, Session isolation, TExpr typed expressions Stage 2), xCoba (coordinates, Christoffel), xTras (utilities), XInvar (Riemann invariant engine, all 11 phases). 1200+ Julia unit tests + 900+ Python tests passing. Architecture note: the engine still operates on strings rather than a native typed AST; the TExpr layer adds typed construction and typed integration at the API boundary, but serializes internally. Gaps: spinors, exterior calculus, LaTeX rendering.

This page tracks the implementation status of features ported from the Wolfram xAct suite to XAct.jl, and their verification status against the Wolfram Language implementation.


1. XPerm.jl — Permutation Group Engine

High-performance implementation of the Butler-Portugal tensor index canonicalization algorithm.

FeatureStatusNotes
Signed permutation representation (n+2 degree)DONEMatches xperm.c exactly
StrongGenSet & SchreierVector structuresDONECore group theory primitives
Schreier-Sims algorithmDONE
canonicalize_slots() APIDONEHigh-level entry point
Niehoff shortcut: Symmetric / AntisymmetricDONEO(k log k) optimization
Predefined Groups (Riemann, Young, etc.)DONE
double_coset_repDONEFull implementation replacing stub
Young TableauxDONEYoungTableau struct + 6 functions
WL Compatibility LayerDONECamelCase aliases for Wolfram parity

2. XTensor.jl — Tensor Algebra

Foundational tensor algebra and curvature operators.

Action / FeatureStatusNotes
DefManifold / DefVBundleDONE
DefMetricDONEAuto-creates Riemann/Ricci/RicciScalar/Einstein/Weyl/Christoffel
DefTensor (with symmetry)DONESymmetric, Antisymmetric, GradedSymmetric, Riemann, Young
ToCanonicalDONEFull parse → canonicalize → serialize pipeline
ContractDONEMetric-aware index contraction
SimplifyDONEIterative Contract → ToCanonical loop
CommuteCovDs / SortCovDsDONECovariant derivative commutation and canonical ordering with Riemann corrections
DefPerturbation / PerturbDONEMultinomial Leibniz expansion
PerturbCurvatureDONECurvature tensor perturbation rules
PerturbationOrder / PerturbationAtOrderDONEOrder extraction and filtering
IBP (Integration by Parts)DONE
TotalDerivativeQDONETotal derivative detection
VarD (Euler-Lagrange)DONEVariational derivative
EvaluateDONEExpression evaluation and binding
AssertDONESymbolic condition checking
Curvature Tensors (Riemann, Ricci, Weyl, etc.)DONEAuto-created by DefMetric
RegisterIdentity! / Multi-term identitiesDONEBianchi identities, custom identity framework
Session struct & reset_session!DONEIsolated mutable state; all def_*! / accessors accept session kwarg
reset_state!()DONEClean session state for testing
ValidateSymbolInSessionDONEChecks all registries for name collisions
TExpr typed expression layer (Stage 2)DONE@indices, tensor(), T[-a,-b] syntax; typed construction and integration over the current string engine.

3. xCoba — Coordinate Components

Coordinate bases, component arrays, and Christoffel symbols.

FeatureStatusNotes
DefBasis / DefChartDONEBasis and chart definitions
SetBasisChange / ChangeBasisDONECoordinate transforms with Jacobians
CTensor / SetComponents / GetComponentsDONEComponent arrays with auto-transform
ToBasis / FromBasis / TraceBasisDummyDONEAbstract ↔ component conversion
ChristoffelDONEΓ^a_{bc} from metric + derivatives

4. XInvar.jl — Riemann Invariant Engine

Classification and simplification of Riemann invariants using the Invar database. All 11 phases complete.

FeatureStatusNotes
RPerm / RInv / DualRInv typesDONECore invariant representations
InvarCases() / InvarDualCases()DONE48 non-dual + 15 dual cases through order 10-14
MaxIndex / MaxDualIndexDONE50 + 17 entries
RiemannToPerm / PermToRiemannDONEConversion with optional curvature relations
PermToInv / InvToPermDONEDB lookup with dispatch cache
Database parser (InvarDB.jl)DONEMaple + Mathematica format parsing
InvSimplifyDONE6-level pipeline: cyclic, Bianchi, CovD, dim-dep, dual
RiemannSimplifyDONEEnd-to-end user-facing simplification
SortCovDsDONECanonical CovD chain ordering with Riemann corrections
Dimension-dependent identitiesDONEPhase 9
Dual invariants / Levi-CivitaDONEPhase 10

5. xTras — Utilities

Extended tensor manipulation utilities.

FeatureStatusNotes
CollectTensorsDONEGroup like tensor terms
AllContractionsDONEEnumerate all possible contractions
SymmetryOfDONEExtract symmetry of expression
MakeTraceFreeDONETrace-free projection

6. Verification Layer

The sxact Python package provides a multi-tier verification suite.

FeatureStatusNotes
JuliaAdapterDONERoutes actions to XTensor.jl
WolframAdapter (Oracle)DONEConnects to Dockerized Wolfram Engine
Normalization PipelineDONEWhitespace and dummy index canonicalization
Three-tier Comparison EngineDONEString, Symbolic, and Numeric verification
Oracle Snapshot ModeDONEDeterministic hash-based regression testing
Property-based TestingDONE29 properties across 3 suites; 27/29 pass Julia, 2 skip (not exposed)
Performance BenchmarkingPARTIALBaseline tracking for core operations

7. Test Suites

SuiteCountStatusNotes
XPerm Julia Unit Tests156PASSPermutation group, Schreier-Sims, Young tableaux
XTensor Julia Unit Tests567PASSTensor algebra, xCoba, xTras, perturbation, Session
TExpr Julia Unit Tests238PASSTyped expression layer
XInvar Julia Unit Tests648,825PASSRiemann invariant phases 2-11
Python Runner Tests909PASSAdapter, normalization, CLI, TExpr
Property Tests (Layer 2)29PASSRiemann symmetries, tensor algebra, xCore laws (27 pass, 2 skip)

Maturity & Known Limitations

Early adopter stage

XAct.jl has been developed and tested by a single author. It has not yet been used in production research by the broader community. We encourage early adopters to try it on real problems and report issues — that is the most valuable contribution at this stage.

Architecture: string-based engine

The current engine (ToCanonical, Contract, Simplify, etc.) operates on string representations of tensor expressions. Every call parses the input string into an internal coefficient map, performs the operation, and serializes back to a string. This mirrors the original Wolfram xAct design but is not idiomatic Julia — it prevents type dispatch, compiler optimizations, and zero-allocation workflows.

The TExpr typed expression layer (Stage 2, complete) provides a typed front-end (@indices, tensor(), T[-a,-b] syntax) that validates at construction time, but currently serializes to strings before calling the engine. A future refactor will make TExpr the native representation throughout the pipeline, eliminating the parse/serialize round-trips.

Python wrapper

The xact-py package provides a Pythonic API backed by the Julia engine via juliacall. It makes XAct.jl accessible to researchers who prefer Python without sacrificing the Julia engine's performance.


Roadmap

Coverage of the original xAct suite

The table below maps the original Wolfram xAct packages (by José M. Martín-García et al.) to their XAct.jl status.

Wolfram xAct packageXAct.jl moduleStatusNotes
xCoreXCore.jlPortedSymbol registry, utility layer
xPermXPerm.jlPortedButler-Portugal canonicalization, Schreier-Sims, Young tableaux
xTensorXTensor.jlPortedAbstract tensor algebra, CovD, perturbation, IBP, VarD
xCobaXTensor/Coba.jlPortedCoordinate bases, Christoffel, component arrays
InvarXInvar.jlPortedAll 11 phases — Riemann invariant classification and simplification
xPert(in XTensor.jl)Partialperturb(), PerturbCurvature done; high-order gauge not yet
xTras(in XTensor.jl)PartialCollectTensors, AllContractions, SymmetryOf, MakeTraceFree
Spinors / SpinFramesNot startedRequires spinor index type
xTeriorNot startedExterior calculus (forms, wedge, Hodge, d)
HarmonicsNot startedTensor spherical harmonics
TexActNot startedLaTeX rendering
xPrintNot startedFormatted input interface
SymManipulatorNot startedSymmetrized expressions
Other packages (xPand, FieldsX, xPPN, etc.)Not plannedDomain-specific; community contributions welcome

Planned work (prioritized)

Near-term — internal quality

  1. TExpr as native engine representation: Eliminate the string parse/serialize round-trip. Make TExpr the internal representation that ToCanonical, Contract, and Simplify operate on directly. This is the single most impactful architectural improvement.
  2. Session isolation completion: Reader functions (ToCanonical, Contract, Simplify) still access some global state; migrate remaining references to the Session struct.
  3. Rich display (TExpr Stage 3): Unicode REPL output and LaTeX rendering for Jupyter/Pluto notebooks.

Medium-term — new capabilities

  1. Spinors / NP / GHP: Spinor index type, Newman-Penrose and Geroch-Held-Penrose formalisms.
  2. xTerior: Exterior calculus — differential forms, wedge product, Hodge star, exterior derivative.
  3. DifferentialEquations.jl integration: Geodesic equations, numerical integration of component ODEs from xCoba output.

Long-term — ecosystem

  1. Harmonics: Tensor spherical harmonic decomposition for cosmological perturbation theory.
  2. TexAct: Publication-quality LaTeX output.
  3. TExpr Stage 4: Introspection API — free_indices(), rank(), terms(), pattern matching.

How to contribute

The most impactful contributions right now:

  • Use it and file issues. The library has parity-level test coverage against the Wolfram engine, but edge cases in real research workflows are the best way to find gaps.
  • Report confusing APIs. If something feels un-Julian or the error messages are unhelpful, that's a bug.
  • Benchmark against Wolfram. Performance comparisons on real-world expressions help prioritize optimization work.