A Kenzo Interface for Algebraic Topology Computations in SageMath

Julián Cuevas, Jose Divasón, Miguel Marco-Buzunáriz and Ana Romero

MEGA - Madrid, June 20th, 2019

This is a work in progress!!

What is Kenzo?

  • Kenzo is a Symbolic Computation system for Constructive Algebraic Topology
  • Developed by Francis Sergeraert
  • The first version was launched in 1990 (it was called EAT)
  • Written in Common Lisp

What is Kenzo?

  • It has made it possible to determine homology and homotopy groups of complicated spaces

Example:

X=\Omega(\Omega(\Omega(P^\infty\mathbb{R}/P^3\mathbb{R})\cup_4D^4)\cup_2D^2)

\begin{aligned} H_5 (X) & = (\mathbb{Z}/2)^{23} \oplus \mathbb{Z}/{8} \oplus \mathbb{Z}/{16} \\ H_6(X) & = (\mathbb{Z}/2)^{52} \oplus (\mathbb{Z}/4)^3 \oplus \mathbb{Z}^3 \\ H_7(X) & = (\mathbb{Z}/2)^{113} \oplus \mathbb{Z}/4 \oplus (\mathbb{Z}/8)^3 \oplus \mathbb{Z}/{16} \oplus \mathbb{Z}/{32} \oplus \mathbb{Z} \end{aligned}

  • X is complicated
  • Indeed X is not of finite type

What is Kenzo?

  • The Kenzo program can deal with infinite objects are coded by means of functional programming
  • Indeed, it is the only program that permits computations in algebraic topology over (some kind of) infinite structures

How does Kenzo compute the homology groups of an infinite simplicial set functionally coded?

\color{red}{Effective\ Homology}\ = Solution for Algebraic Topology

Combining infinite objects and finite objects

Object = \fbox{{Inf-part} \(\Leftarrow\hspace{-9pt}\Leftarrow\hspace{-5pt}\Rightarrow\hspace{-9pt}\Rightarrow\) {Fin-part}}

What is effective homology?

  • If a topological space X has finite nature, then its homology groups can be determined by means of elementary operations on matrices
  • If X is of infinite type, then Kenzo should be able to find a homotopy equivalence between a chain complex canonically associated with X, C_∗(X), and a chain complex E_∗ of finite type, whose homology groups can be determined
    • This particular homotopy equivalence (which must satisfy some special properties) makes it possible to determine the homology groups of X by means of those of E_∗
    • It also permits to compute their generators

Computation of homotopy groups

Let X be a 1-reduced simplicial set. In order to compute its homotopy groups, Kenzo uses the Whitehead tower method, which consists in constructing a tower of fibrations:

such that each X_n is (n-1)-reduced and X_n satisfies \pi_n(X_n)\cong H_n(X_n) \cong \pi_n(X)

In this way, one can determine the homotopy group \pi_n(X) as the homology group H_n(X_n). If the space X_n is not of finite type, the effective homology method is used

What is Kenzo?

There are numerous modules and extensions for the Kenzo system:

  • Spectral sequences of filtered complexes (A. Romero, J. Rubio, F. Sergeraert, 2006)
    • Computing in particular Serre and Eilenberg-Moore spectral sequences of fibrations of spaces with effective homology
  • Homology of groups (A. Romero, J. Rubio, 2009)
    • In the paper: R. Mikhailov and J. Wu, On homotopy groups of the suspended classifying spaces. Algebraic and Geometric Topology, 2010, vol. 10, pp. 565-625 the authors state in Theorem 5.4:
      • Let A_4 be the 4-th alternating group. Then \pi_4(\Sigma K(A_4,1)) = \mathbb{Z}_4
    • Kenzo produced a different result (Kenzo was right):
      • \pi_4(\Sigma K(A_4,1)) = \mathbb{Z}_{12}

What is Kenzo?

  • Discrete Vector Fields (F. Sergeraert, 2010)
  • Persistent homology (A. Romero, J. Rubio, F. Sergeraert, 2010)
  • Effective homotopy (A. Romero, J. Rubio, F. Sergeraert, 2015)
  • Generalized spectral sequences (A. Guidolin, A. Romero, 2017)
  • Multipersistence (A. Guidolin, J. Divasón, F. Vaccarino, 2019)

What is Kenzo? A summary

It allows in particular the computation of homology and homotopy groups of complicated spaces, such as:

  • Iterated loop spaces of a loop space modified by a cell attachment
  • Components of complex Postnikov towers

which were not known before!!

To sum up

The main goal of Kenzo is to deal with topological spaces of infinite nature; homology and homotopy groups of these spaces are then computed by means of the effective homology method

Problems

  • Many people do not know the capabilities of the Kenzo system
  • Indeed, many people do not know the existence of this program
  • Kenzo can be difficult to install and use
    • In fact, some users end up asking the developers to run the computations

Solution

  • We aim to integrate (a significant subset of) Kenzo in SageMath
  • This would increase the features of SageMath when dealing with some infinite structures in algebraic topology

SageMath

  • System for Algebra and Geometry Experimentation
  • The stated mission of Sage is to be viable free open source alternative to Magma, Maple, Mathematica, and Matlab
  • Volunteer based project
  • The principle programming languages of SageMath are Python and Cython
  • New versions are released every few months, with bugfixes and new functionalities

Sage was not written from scratch!!

  • Integrates over 90 packages into a common interface
  • On top of these packages is the Sage library, which consists of over 700,000 lines of new Python and Cython code

SageMath

  • Its philosophy is to use existing open-source libraries wherever they exist
Branch Libraries
Algebra GAP, Singular, FLINT
Algebraic geometry Singular
Arbitrary precision arithmetic MPIR, MPFR, MPFI, NTL, mpmath, Arb
Arithmetic geometry PARI/GP, NTL, mwrank, ECM
Calculus Maxima, SymPy, GiNaC, Giac, FriCAS
Combinatorics Symmetrica, Sage-Combinat
Linear algebra ATLAS, BLAS, LAPACK, NumPy, LinBox, IML, GSL
Graph theory NetworkX
Group theory GAP
Numerical computation GSL, SciPy, NumPy, ATLAS
Number theory PARI/GP, FLINT, NTL
Statistical computing R, SciPy

SageMath and Algebraic Topology

SageMath already includes modules for:

  • simplicial complexes
  • ∆-complexes
  • cubical complexes
  • simplicial sets
  • other topological objects of different nature, such as knots and braids

It can compute invariants such as the homology of these objects, both by using custom written code and by leveraging an interface to CHomP (a “Computation Homology Program”)

Sadly, for the moment SageMath only supports objects of finite type

Our work, more concretely

An optional Kenzo package for SageMath and an interface between SageMath and Kenzo

The main advantage is that Kenzo can deal with general simplicial sets

Features:

  1. It allows to install and use Kenzo within SageMath, making it easy to use Kenzo as part of a wider workflow
  2. This interface is a first step towards an extension of SageMath capabilities around simplicial sets

How?

  1. SageMath provides a library interface to Embeddable Common Lisp (ECL)

How?

  1. G. Heber and F. Sergeraert developed a Kenzo version easily loadable and compatible with any Common Lisp system

Installing Kenzo in SageMath

We can install the Kenzo optional package in SageMath by running:

sage -i kenzo
  • This will download the source code of a fork of Kenzo that we maintain for this specific purpose, compile it inside the embedded Common Lisp interpreter that SageMath includes, and install it
  • This is an easy way to install Kenzo even if one just plan to use it as a standalone program
  • Kenzo is installed as a package inside the Embeddable Common Lisp library

Example of computations in Kenzo via SageMath and ECL

<ECL: [K25 Abelian-Simplicial-Group]>

Interface between Kenzo and SageMath

In the previous example, the execution is carried out in Kenzo via ECL, but there is no proper connection to SageMath classes

Thus, we developed an interface to communicate both systems

  • The communication between the two systems is done via a C-library interface (low overhead)
  • The interface provides functions to create Kenzo objects, and wrappers around them that allow to create new objects (with the corresponding wrapper) and call functions on them

Examples of computations in SageMath via Kenzo

[0, C2, Z, C4, C2 x C2 x C2, C2, C2 x C2 x C3 x C4]

Let us observe that the space E is of infinite nature, but Kenzo is able to compute its homology groups

Examples of computations in SageMath via Kenzo

In particular, the interface exposes functions to create the following spaces:

  • Spheres
  • Eilenberg–MacLane spaces
  • Moore spaces

From these spaces, it allows the following constructions:

  • Cartesian products
  • Classifying spaces
  • Loop spaces
  • Suspensions
  • Tensor products

We can construct the corresponding homology groups via the homology() method

More examples of computations

[K484 Chain-Complex]
[K486 Chain-Complex]

Features of the interface

  • We included the Kenzo functions for computing homotopy groups of simplicial sets (via the Whitehead tower method)
  • We developed methods for translating objects (chain complexes, simplicial sets) both from SageMath to Kenzo and vice versa
  • This permits to build simplicial objects in SageMath (via a package by J. Palmieri), translate them into Kenzo and compute their homology and homotopy groups

Examples of computations involving both systems

This example shows how to compute the homology of a wedge of the spheres S^3 and S^4

[0, Z, Z, 0, 0, 0]

Note that:

  • The wedge product of the spheres is computed by means of a function that is available in SageMath (but not in Kenzo)
  • The computation of the homology is carried out via Kenzo (SageMath cannot deal with that computation)

Computation of homotopy groups

This example shows how to compute the homotopy groups of the sphere S^3

[Trivial Abelian group,
 Multiplicative Abelian group isomorphic to Z,
 Multiplicative Abelian group isomorphic to C2,
 Multiplicative Abelian group isomorphic to C2,
 Multiplicative Abelian group isomorphic to C12]

Computation of homotopy groups

The homotopy groups of a wedge of the spheres S^3 and S^4

[Trivial Abelian group,
 Multiplicative Abelian group isomorphic to Z,
 Multiplicative Abelian group isomorphic to Z x C2,
 Multiplicative Abelian group isomorphic to C2 x C2]

Conclusions

We have presented an interface between SageMath and Kenzo together with an optional Kenzo package

The first version includes some basic functionalities of algebraic topology computations and extends SageMath capabilites to deal with infinite objects

We developed wrappers of functions, so that the computations can be carried out in Kenzo and the result returned as a SageMath object

On-going work

  • Integration of the extended modules of Kenzo in SageMath
  • Spectral sequences, discrete vector fields and finite topological spaces
  • This requires to adapt the Kenzo Common Lisp code to the Embeddable Common Lisp library
  • Develop the corresponding wrappers and necessary functions

Trac in the SageMath Development Organization Page

https://trac.sagemath.org/ticket/27880

Thanks