The problem with that approach is that, if there are degree zero generators, the homogeneous part of each degree becomes an infinite dimensional vector space. And hence, we can't compute a matrix representing the differential operator in a given degree (which is needed to compute cohomology).
One way to workaround this problem is to use a bigraded CDGA: for the generators that usually would be of degree i>0, use the degree (i,0). For the generators of degree 0, use the degree (0,2) (we want a 2 so they are considered even). This way, we can still have finite dimensional spaces in each bigrade (and hence we can compute the bigraded cohomology), but the algebra structure would be the one you expect, and if you ignore the second index in the grading, you get the grading you expect. El sábado, 17 de agosto de 2024 a las 10:27:20 UTC+2, Benjamin McMillan escribió: > I would like to propose a simple but large improvement to the > commutative_dga package. > In short, one currently cannot use the package to create graded > commutative algebras that include non-closed degree 0 terms. > (For example, this exclude the package from being used for the algebra of > differential forms on a manifold, because any non-constant function is > non-closed.) > > For my purposes, this can be fixed easily, changing 1 line of code. > However, I am unclear if this breaks parts of the module that I don't use. > > As I understand it, the only reason that degree 0 doesn't work is in the > constructor for a new CDGA. > If you pass a degree 0 generator, then the call in the constructor to > create a g_algebra (line 1010) uses a TermOrder weighted by degree. But the > TermOrder package assumes a polynomial ring with generators of positive > weight, and so throws an error when you pass weight = degree = 0 generators. > This can be fixed by using weight = degree + 1, but I worry that this > might break some non-obvious assumption elsewhere. (It will also maybe mean > that your monomials are ordered slightly differently than expected.) > > I can submit a pull request, but I read in the developer guide that it is > best to start a discussion here first. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/cc90ce3e-1aa9-42cf-859e-aa4800a910d6n%40googlegroups.com.