ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 22 May 2019 19:03:33 +0200What does cohomology_generators actually do?https://ask.sagemath.org/question/46609/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!Tue, 21 May 2019 16:46:44 +0200https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/Comment by rburing for <p>I don't understand the output of the function "cohomology_generators" of commutative differential graded algebras. Look at this simple exmaple:</p>
<pre><code>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]}
</code></pre>
<p>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!</p>
https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46610#post-id-46610Strictly speaking the [documentation](http://doc.sagemath.org/html/en/reference/algebras/sage/algebras/commutative_dga.html#sage.algebras.commutative_dga.DifferentialGCAlgebra.cohomology_generators) 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](https://github.com/sagemath/sage/blob/9db4320e485ed0aeae56d2c9dfc91fabe14659b1/src/sage/algebras/commutative_dga.py#L2145) (approx. 40 lines of code)?Tue, 21 May 2019 19:46:39 +0200https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46610#post-id-46610Comment by wututut for <p>I don't understand the output of the function "cohomology_generators" of commutative differential graded algebras. Look at this simple exmaple:</p>
<pre><code>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]}
</code></pre>
<p>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!</p>
https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46619#post-id-46619The 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.Wed, 22 May 2019 09:32:05 +0200https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46619#post-id-46619Comment by rburing for <p>I don't understand the output of the function "cohomology_generators" of commutative differential graded algebras. Look at this simple exmaple:</p>
<pre><code>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]}
</code></pre>
<p>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!</p>
https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46620#post-id-46620I said "suggest" because the code obviously doesn't work, as you demonstrated.Wed, 22 May 2019 10:09:40 +0200https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46620#post-id-46620Answer by John Palmieri for <p>I don't understand the output of the function "cohomology_generators" of commutative differential graded algebras. Look at this simple exmaple:</p>
<pre><code>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]}
</code></pre>
<p>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!</p>
https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?answer=46617#post-id-46617This should be improved once the changes at https://trac.sagemath.org/ticket/27045 are merged into Sage.
Oh, and if you want to know "What does cohomology_generators actually do?", evaluate `B.cohomology_generators??` to read the source code.Wed, 22 May 2019 04:46:52 +0200https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?answer=46617#post-id-46617Comment by wututut for <p>This should be improved once the changes at <a href="https://trac.sagemath.org/ticket/27045">https://trac.sagemath.org/ticket/27045</a> are merged into Sage.</p>
<p>Oh, and if you want to know "What does cohomology_generators actually do?", evaluate <code>B.cohomology_generators??</code> to read the source code.</p>
https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46623#post-id-46623Wow. Reading this bug report convinced me I shouldn't use sage. If even the developers think it's okay to have wrong functions with undocumented bugs... Thank god I didn't include the results in an article before knowing this.Wed, 22 May 2019 15:33:35 +0200https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46623#post-id-46623Comment by John Palmieri for <p>This should be improved once the changes at <a href="https://trac.sagemath.org/ticket/27045">https://trac.sagemath.org/ticket/27045</a> are merged into Sage.</p>
<p>Oh, and if you want to know "What does cohomology_generators actually do?", evaluate <code>B.cohomology_generators??</code> to read the source code.</p>
https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46627#post-id-46627I don't understand your comment at all. Which parts indicate that developers think it's okay to have "wrong functions with undocumented bugs"? I see a discussion, with one person clarifying the changes they are proposing, and others critiquing and trying to improve those changes. Once it is made clear that there is a bug in the old code, no one argued about fixing it.Wed, 22 May 2019 19:03:33 +0200https://ask.sagemath.org/question/46609/what-does-cohomology_generators-actually-do/?comment=46627#post-id-46627