What does cohomology_generators actually do?
I don't understand the output of the function "cohomology_generators" of commutative differential graded algebras. Look at this simple exmaple:
A.<x,y,z,t> = GradedCommutativeAlgebra(QQ, degrees = (2,2,1,2))
B = A.cdg_algebra({z:x-y})
B.cohomology_generators(5)
{2: [t, y, x]}
It's apparently telling me that t, x and y are all generators of the cohomology algebra in degree 2. But in cohomology, x = y, since dz = x - y!
Strictly speaking the documentation does not claim that the list is anyhow minimal. However the stated algorithm does suggest that this is attempted. Do you see anything wrong with the algorithm or its implementation (approx. 40 lines of code)?
The documentation is misleading then. It says explicitly (not "suggest") that the function it is finding a complement of the set of elements generated by lower-degree generators, as well as coboundaries.
I said "suggest" because the code obviously doesn't work, as you demonstrated.