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, 21 Mar 2018 19:14:57 +0100Finite generated algebra cohomologyhttps://ask.sagemath.org/question/41661/finite-generated-algebra-cohomology/ I have an algebra and a differential over this algebra. I want to construct cohomology ring and find the annihilators of some elements. How could I do that with sage?
My algebra looks like:
variables = ', '.join(['u{}'.format(i+1) for i in range(n)] + ['v{}'.format(j+1) for j in range(n)])
F = FreeAlgebra(ZZ, n+n, variables)
gens = F.gens()
u = gens[:n]
v = gens[n:]
print u
print v
I = []
# Koszul
for i in range(5):
for j in range(i+1, 5):
I.append(u[i]*u[j] - u[j]*u[i])
# Stanley-Raysner
for i in range(5):
for j in range(i+1, 5):
if j - i != 1 and j-i != 4:
I.append(v[i]*v[j])
A = F.quotient(F * I * F)
Tue, 20 Mar 2018 21:16:16 +0100https://ask.sagemath.org/question/41661/finite-generated-algebra-cohomology/Comment by dan_fulea for <p>I have an algebra and a differential over this algebra. I want to construct cohomology ring and find the annihilators of some elements. How could I do that with sage?</p>
<p>My algebra looks like:</p>
<pre><code>variables = ', '.join(['u{}'.format(i+1) for i in range(n)] + ['v{}'.format(j+1) for j in range(n)])
F = FreeAlgebra(ZZ, n+n, variables)
gens = F.gens()
u = gens[:n]
v = gens[n:]
print u
print v
I = []
# Koszul
for i in range(5):
for j in range(i+1, 5):
I.append(u[i]*u[j] - u[j]*u[i])
# Stanley-Raysner
for i in range(5):
for j in range(i+1, 5):
if j - i != 1 and j-i != 4:
I.append(v[i]*v[j])
A = F.quotient(F * I * F)
</code></pre>
https://ask.sagemath.org/question/41661/finite-generated-algebra-cohomology/?comment=41695#post-id-41695So in the first line above, `n=5`, to avoid the immediate crash. One can also define `F` over
B.<u1,u2,u3,u4,u5> = PolynomialRing(ZZ)
then add freely the `v`-variables. Now we only need to know the graded pieces (the weighting of the variables) and the differential to isolate the $\mathbb Z$-modules in each degree. (Sage may do the job only for some first degrees.)Wed, 21 Mar 2018 19:14:57 +0100https://ask.sagemath.org/question/41661/finite-generated-algebra-cohomology/?comment=41695#post-id-41695