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 thansage
. See the section benchmark for details.kohomology
has implementations of some specific rational models (of mapping spaces). For a 1-connected space , we can get , and easily. See this doc and tests in this directory. The Quilllen model of 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, inkohomology
, 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 of the free loop space . Since , they must be sorted as insage
. But we can sort as inkohomology
and this looks better. kohomology
is implemented by a statically typed languagekotlin
. 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 ofsage
. sage
has some features which are not implemented inkohomology
, including formality check and computation of minimal models. These may be implemented inkohomology
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
for .
The time grows very quickly for sage
.
Next, the following shows the time to compute 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 -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 -graded DGA, i.e. the differential also preserves -grading. Hence its cohomology is also -graded. See this doc for details. - Multi-graded DGA in
sage
is a -graded algebra equipped with a differential which only preserves the -grading given by the total degree (the sum of degrees). Hence its cohomology is only -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 ); 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 -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 --version
SageMath version 9.7, Release Date: 2022-09-19
$ sage --python --version
Python 3.8.10
$ ./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