Skip to main content

Comparison with other tools

SageMath can also handle Sullivan algebras, as documented in this page. In this document, we compare it with kohomology.

Advantages of kohomology

  • kohomology is much faster than sage. See the section benchmark for details.
  • kohomology has implementations of some specific rational models (of mapping spaces). For a 1-connected space MM, we can get LMLM, ES1×S1LMES^1\times_{S^1}LM and Map([0,1],M)\operatorname{Map}([0,1], M) easily. See this doc and tests in this directory. The Quilllen model of Baut1(M)B\operatorname{aut}_1(M) can be computed as in this test.
  • In sage, the generators of a Sullivan algebra must be sorted by their degrees. On the other hand, in kohomology, they can be sorted in any order as long as along the order is compatible with the differential of the Sullivan algebra. For example, consider the Sullivan model Λ(x,y,sx,sy)\Lambda(x, y, sx, sy) of the free loop space LS2nLS^{2n}. Since degsx<degx<degsy<degy\deg{sx} < \deg{x} < \deg{sy} < \deg{y}, they must be sorted as (sx,x,sy,y)(sx, x, sy, y) in sage. But we can sort as (x,y,sx,sy)(x, y, sx, sy) in kohomology and this looks better.
  • kohomology is implemented by a statically typed language kotlin. So you get much assistance from development tools.

Advantages of sage

  • Since computation of Sullivan algebras is a implemented as a part of huge system sage, we can use it together with other parts of sage.
  • sage has some features which are not implemented in kohomology, including formality check and computation of minimal models. These may be implemented in kohomology in some future (your contributions are welcome!).

Benchmark result

Here we give benchmark results of kohomology and sage. Note that the source code can be read here.

The following chart shows the time to compute Hk(LS2)H^k(LS^{2}) for 0kn0\leq k\leq n. The time grows very quickly for sage.

Next, the following shows the time to compute Hk(LS2)H^k(LS^{2}) with multi-grading. The time for sage is the same as the above, but the time for kohomology is much faster than the above.

Multi-grading is the same as Zm\Z^m-grading, but its precise definition is different between kohomology and sage. Its mathematical definition is given as follows:

  • Multi-graded DGA in kohomology is nothing but a Zm\Z^m-graded DGA, i.e. the differential also preserves Zm\Z^m-grading. Hence its cohomology is also Zm\Z^m-graded. See this doc for details.
  • Multi-graded DGA in sage is a Zm\Z^m-graded algebra equipped with a differential which only preserves the Z\Z-grading given by the total degree (the sum of degrees). Hence its cohomology is only Z\Z-graded. This is documented in the first paragraph of this page:

    These algebras can be graded over the integers or they can be multi-graded (i.e., graded over a finite rank free abelian group Zm\Z^m); if multi-graded, the total degree is used in the Koszul sign convention, and the differential must have total degree 1.

In kohomology, the computation becomes faster with multi-grading since Zm\Z^m-grading gives a finer decomposition of vector spaces and matrices. Of course, this is not the case for sage.

Version info

The following versions are used in the above benchmark.

sage
$ sage --version
SageMath version 9.7, Release Date: 2022-09-19
$ sage --python --version
Python 3.8.10
kohomology
$ ./gradlew --version

------------------------------------------------------------
Gradle 6.6.1
------------------------------------------------------------

Build time: 2020-08-25 16:29:12 UTC
Revision: f2d1fb54a951d8b11d25748e4711bec8d128d7e3

Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 1.8.0_282 (Azul Systems, Inc. 25.282-b08)
OS: Linux 5.15.0-56-generic amd64

$ ./gradlew dependencyInsight --dependency com.github.shwaka.kohomology:kohomology | grep "^com.github.shwaka.kohomology" | sort | uniq
com.github.shwaka.kohomology:kohomology-jvm:0.10
com.github.shwaka.kohomology:kohomology:0.10