Proposal: allow commutative_dga package to include degree zero terms

127 views
Skip to first unread message

Benjamin McMillan

unread,
Aug 17, 2024, 4:27:20 AM8/17/24
to sage-devel
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.

mmarco

unread,
Aug 17, 2024, 11:27:31 AM8/17/24
to sage-devel
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.

Benjamin McMillan

unread,
Aug 18, 2024, 1:27:20 AM8/18/24
to sage-devel
Ah, it would make it harder to compute cohomology. I haven't run into that problem because I am not working in a context where you would want to do that.
(To set my context: I am working with differential forms, but without writing everything out in coordinates, as one might do on a Lie group with left invariant forms. The vector spaces are indeed infinite dimensional, and this is why one typically does not compute de Rham cohomology directly, rather using the de Rham theorem and a more computable version of homology.)

Bigrading is a very interesting solution. I take it that the differential should have degree (1,0).
Does the cdg_algebra package as implemented allow you to do bigradings like this to do calculations on cdga with "degree 0" terms?

mmarco

unread,
Aug 18, 2024, 6:35:21 AM8/18/24
to sage-devel
Yes, It allows to use bigradings and it works as you would expect. We have used that approach in some computations  we have done. You can see some examples in the documentation here:

Benjamin McMillan

unread,
Aug 18, 2024, 9:12:17 PM8/18/24
to sage-devel
Oh, that is very nice. Thank you for the solution to my issue!

I would still classify the workaround as Very Clever, and not a solution that an average user would come up with on their own.
Perhaps this could be stated more clearly in the documention.

mmarco

unread,
Aug 21, 2024, 6:45:37 PM8/21/24
to sage-devel
Bigrading is a very interesting solution. I take it that the differential should have degree (1,0).


Sorry I forgot to answer that. The differential must have total degree 1 (that is, bidegree (i,j) with i+j = 1). So in your case, just change every degree i to (i,2).
Reply all
Reply to author
Forward
0 new messages