MultiDegree
Using MultiDegree
, you can efficiently compute cohomology of some Sullivan algebras.
Mathematical explanation
Usually, Sullivan algebras are -graded. But, in some case, the grading can be extended to a larger group.
For example, the Sullivan model of the even dimensional sphere can be -graded since it has as a "parameter". More precisely, the degrees and can be considered as elements of (i.e. is the basis of ).
kohomology
supports computation of cohomology with
-grading (or -grading),
which is faster than the usual one.
Usage
First you need to define degreeGroup
.
val sphereDim = 2
val degreeGroup = MultiDegreeGroup(
listOf(
DegreeIndeterminate("n", sphereDim / 2),
DegreeIndeterminate("m", sphereDim / 2),
)
)
val (n, m) = degreeGroup.generatorList
Then you can define a Sullivan algebra using the above degreeGroup
.
val indeterminateList = degreeGroup.context.run {
listOf(
Indeterminate("x", 2 * n),
Indeterminate("y", 4 * n - 1),
Indeterminate("a", 2 * m),
Indeterminate("b", 4 * m - 1),
)
}
val matrixSpace = SparseMatrixSpaceOverRational
val sphere = FreeDGAlgebra.fromMap(matrixSpace, degreeGroup, indeterminateList) { (x, y, a, b) ->
mapOf(
y to x.pow(2),
b to a.pow(2),
)
}
Its cohomology can be computed as follows:
degreeGroup.context.run {
println(sphere.cohomology.getBasis(0))
println(sphere.cohomology.getBasis(2 * n))
println(sphere.cohomology.getBasis(2 * m))
println(sphere.cohomology.getBasisForAugmentedDegree(sphereDim))
}
Performance
If applicable, computations with MultiDegree
are much faster than those with IntDegree
(usual -grading).
This page contains benchmark for the case of the free loop space of .