Cohomology of Sullivan algebras
In this section, we explain a way to compute cohomology of a Sullivan algebra.
Define a Sullivan algebra
Consider the minimal Sullivan model of the -dimensional sphere. Explicitly it is written as where the degrees are given by and , and the differential is given by and . You can define it as follows:
SphereModel.kt
val n = 2
// Declare an indeterminate (generator) for the free commutative graded algebra Λ(x,y)
val indeterminateList = listOf(
Indeterminate("x", 2 * n),
Indeterminate("y", 4 * n - 1),
)
val matrixSpace = SparseMatrixSpaceOverRational
// Sullivan algebra can be defined by using the function FreeDGAlgebra.fromMap.
// The last argument is a function
// which receives the list of generators and returns the map representing the differential.
val sphere = FreeDGAlgebra.fromMap(matrixSpace, indeterminateList) { (x, y) ->
mapOf(
y to x.pow(2), // x.pow(2) represents x^2
)
// If you want, you can write dx = 0 explicitly in the code
// by using zeroGVector, a special element that represents zero in any degree.
// mapOf(
// x to zeroGVector,
// y to x.pow(2),
// )
}
Note that FreeDGAlgebra
is the class for Sullivan algebras.
It is because, ignoring differentials, Sullivan algebras are free as commutative graded algebras.
Compute cohomology
The cohomology of a FreeDGAlgebra
can be accessed from the member cohomology
.
SphereModel.kt
for (degree in 0 until 10) {
val basis = sphere.cohomology.getBasis(degree)
println("H^$degree(S^${2 * n}) = Q$basis")
}
DGA operations
DGA operations (e.g. sum, multiplication, differential) can be applied within context.run
.
SphereModel.kt
val (x, y) = sphere.generatorList
// You can't write DGA operations here.
sphere.context.run {
// You can write DGA operations in "context.run"
println("d(x * y) = ${d(x * y)}")
println(d(x).isZero())
println(x.cohomologyClass())
println(x.pow(2).cohomologyClass())
}