From a theorem to a computation: configuration-space homology with uconf
- Published
- Published . AI-assisted
- Links
- arXiv:2606.26802.Source.
There is often quite a gap between proving that two objects are equivalent in an infinity-category and getting an actual matrix out of a computer.
In recent joint work with Victor Roca i Lucio, we start from a theorem of Ben Knudsen and construct explicit chain complexes computing the homology of configuration spaces over an arbitrary field.
We also implemented those complexes in uconf, a SageMath package.
In this article, I’ll explain the chain complex, work through a small computation, and describe the software’s current limitations.
Why direct computation is difficult
For a manifold , the ordered configuration space of points is
To make the points indistinguishable, we divide by the symmetric group:
The definition is elementary; the homology is not. A direct computation would begin with the product , remove every collision diagonal , and then account for the action of . The dimension grows with , the diagonals intersect, and the number of collision patterns proliferates. Even a good finite cell model quickly becomes unfathomable.
There is an additional problem in characteristic . Over a characteristic-zero field, one can average over a finite group: division by makes invariants and coinvariants well behaved. If divides , that averaging operator no longer exists. Derived coinvariants retain higher information from the symmetric-group action, and the higher operations on cochains can no longer be replaced harmlessly by a strictly commutative product. We need operations which carry essential characteristic- information.
Turning Knudsen’s theorem into a chain complex
Knudsen describes configuration spaces using factorization homology and free spectral Lie algebras. That description is powerful, but an equivalence in a derived or infinity-categorical setting does not automatically give us a basis, signs, a differential, or a terminating program.
Our first step is a point-set version. If is a parallelizable -manifold of finite type, is any field, and is a chain complex of labels, we construct a zig-zag of quasi-isomorphisms whose left-hand side is
Taking one trivial label recovers unordered configurations. Other choices recover ordered configurations and intermediate kinds of labels.
The right-hand side is an operadic bar construction built from three ingredients:
- the reduced cochains on the one-point compactification of ;
- a bar-cobar model for the free spectral Lie algebra on the shifted labels;
- the full -algebra structure on those cochains, not merely their cup product.
For computation, we replace the Barratt–Eccles operad by the smaller surjection operad . A basis element of is represented by a surjective word such as or , with no two consecutive entries equal. Its differential deletes entries, with the appropriate signs. These finite words are much easier to enumerate than strings of permutations, but still retain the higher operations that disappear from a commutative model.
After fixing the particle number—called the weight in the program—and a finite range of homological degrees, the construction becomes finite. Basis vectors are decorated rooted trees. Their decorations record Lie operations, surjection words, cochains on , and labels. The differential is assembled from four kinds of terms: the bar differential, the cobar differential, the internal differential on cochains, and a twisting term coupling the manifold cochains to the spectral-Lie part.
The computation then reduces to ordinary linear algebra: enumerate bases, apply the differential to every basis vector, assemble sparse matrices, and compute kernels modulo images.
A small reproducible computation
Let us compute
The installation instructions require Python 3.12 or later and SageMath 10.9 or later. The shortest installation is with Docker:
docker run --rm -it sagemath/sagemath:10.9 bash
sage -pip install uconf-operads
The distribution is named uconf-operads, while the import is simply uconf. The following uses the public Python API rather than the repository’s more version-sensitive benchmark scripts:
from sage.all import GF
from uconf import euclidean_unordered_configuration_model
from uconf.homology import compute_chain_complex
F2 = GF(2)
model = euclidean_unordered_configuration_model(F2, 2)
C = compute_chain_complex(
model.module,
degrees=range(3),
weight=2,
n_jobs=1,
progress=True,
)
betti = C.betti()
print({degree: betti[degree] for degree in range(3)})
The relevant output is
{0: 1, 1: 1, 2: 0}
The number 2 plays three roles here: it is the characteristic of the coefficient field, the dimension of the ambient Euclidean space, and the number of indistinguishable points specified by weight=2.
There is a simple geometric check. A pair of distinct points in the plane is determined by its centre of mass, its positive distance, and the direction of the line joining them. Because the points are unordered, that direction is defined up to sign. Thus
We therefore expect one class in degrees zero and one, and none above. The computation agrees.
Here degrees=range(3) requests correct homology in degrees zero through two. The chain-complex builder automatically constructs the adjacent degrees needed to include the incoming and outgoing differentials. The API documentation spells out this truncation convention; the extra top degree in the returned complex may have inflated homology and should not be interpreted.
If Betti numbers are not enough, compute_homology_representatives extracts explicit cycles. In this example the degree-zero class involves the surjection word , while the degree-one class involves . The latter is the first genuinely higher operation in the surjection operad. These expressions are algebraic representatives in a tree complex, not a pleasant parametrization of the geometric loop. They are useful when one wants to compare operations or follow a class through a map, but they require learning the notation.
For example, continuing the same session:
from uconf.homology import compute_homology_representatives
degree_one = compute_homology_representatives(model.module, 1, 2, C, algorithm="fast")
print(len(degree_one))
print(degree_one[0])
The first line of output is 1; the second is the corresponding decorated-tree cycle. There are two representative algorithms. The default fast method performs the kernel/image linear algebra directly. The sage method delegates to SageMath’s generator machinery and may give more canonical-looking coefficients, but is generally slower.
Implementation
uconf implements the mathematical construction directly. Among other things, it contains Hall-basis models for the Lie operad, the Barratt–Eccles and surjection operads, bar and cobar constructions, shifted and Hadamard-product wrappers, simplicial chains and cochains, and the comodule map that couples the different layers.
Several implementation choices matter mathematically, especially in positive characteristic.
First, bases are represented by immutable rooted trees with cached structural data. Connectedness assumptions ensure that the bar and cobar bases in a fixed arity and degree are finite. Second, the differential matrices are sparse. This is essential: the basis may be large, but the boundary of an individual tree usually contains few terms.
Third, the program enumerates planar representatives of symmetric-group coinvariants rather than constructing complete orbit sums. This removes a dominant combinatorial cost. One has to be careful here: when a tensor has repeated factors, an orbit sum and a planar representative differ by the size of a stabilizer, and that scalar may vanish in characteristic . The implemented normalization gives a chain-isomorphic planar complex.
Finally, matrix assembly can use several processes. The parallel path currently relies on POSIX fork, so n_jobs=1 is the portable choice; Linux or WSL users can increase it. The repository’s end-to-end scripts can also save Sage objects, graded bases, Betti-number CSV files, and differentials in Matrix Market format. The latter is useful when the matrices outgrow the linear algebra one wants to perform inside Sage.
For a reproducible research run, I recommend recording at least the uconf version or Git commit, Python and SageMath versions, coefficient field, manifold model, weight, degree range, and the command or script that assembled the matrices. The software has an archived Zenodo release; a paper should cite that record rather than only a Git tag.
For Euclidean spaces, these computations verify known results rather than produce new homology calculations. Reproducing the classical mod- answer checks operadic suspensions, symmetric actions, table reduction, tree normalization, and signs in the twisting differential. We also test directly that , and the codebase has regression tests for the individual operadic constructions.
The torus is a more interesting experimental target. Over the graded dimensions are known, but not at odd primes. We compared low-weight output with the Chen–Zhang range and used the model to verify that has no -power torsion.
Current limits
The end-to-end models currently provided are for Euclidean spaces and the torus. Other manifolds require an explicit surjection-algebra model for , and constructing one is a separate mathematical problem. The theorem also assumes a parallelizable manifold of finite type.
The size grows rapidly with both weight and degree. Computations are currently practical only in low weights and degrees, mainly for testing cases, comparing characteristics, inspecting differentials, and formulating conjectures.
The input is an algebraic model of the ambient manifold, rather than a point cloud or distance matrix. The points in a configuration space are variables moving in a manifold, not sampled data, so uconf is unrelated to persistent-homology software.
Likewise, a calculation over returns dimensions over . Comparing them with rational dimensions can reveal the presence of integral -torsion, but it does not automatically identify its exponent or produce an integral torsion class. Our computations for the torus verified known low-weight results and suggested where to look; the proof of our later odd-primary torsion theorem required additional geometric and representation-theoretic arguments.
A conjectural refinement
The proved result is an equivalence of chain complexes. That is already enough to compute homology.
We conjecture something stronger: for simply connected parallelizable manifolds, the equivalence should lift to an equivalence of twisted -coalgebras in an appropriate category of right spectral-Lie modules. We also expect a further enhancement to right -modules. Combined with a suitable detwist construction, it would imply that the -homotopy type of the collection of configuration spaces, over an algebraically closed field of characteristic , is a homotopy invariant of the ambient -manifold.
The conjecture is proved in characteristic zero and has some supporting evidence, but remains conjectural in positive characteristic. The value of an explicit model is that it gives us somewhere concrete to examine the missing structures, test low-weight cases, and discover which coherences a proof would have to preserve.
For me, the point of the explicit model is that it makes the theorem computable.