Opened 5 years ago
Closed 4 years ago
#22883 closed enhancement (fixed)
Implement Lie algebra (co)homology
Reported by:  tscrim  Owned by:  

Priority:  major  Milestone:  sage8.3 
Component:  algebra  Keywords:  lie algebras 
Cc:  darij, bsalisbury1  Merged in:  
Authors:  Travis Scrimshaw  Reviewers:  Darij Grinberg, Ben Salisbury 
Report Upstream:  N/A  Work issues:  
Branch:  28accb5 (Commits, GitHub, GitLab)  Commit:  28accb56804a4261fa377ed48000a24e2be46662 
Dependencies:  Stopgaps: 
Description
We implement the Lie algebra (co)homology for finite dimensional Lie algebras by constructing the ChevalleyEilenberg complex.
Change History (24)
comment:1 Changed 5 years ago by
 Branch set to public/lie_algebras/homology22883
 Commit set to 2f5a28f235a1b61cdb5c394bf5743d6c242afea6
 Status changed from new to needs_review
comment:2 Changed 5 years ago by
 Commit changed from 2f5a28f235a1b61cdb5c394bf5743d6c242afea6 to 6ef6f8c83c40af7fa483770f1b31bacbe6574b0e
comment:3 Changed 5 years ago by
 Commit changed from 6ef6f8c83c40af7fa483770f1b31bacbe6574b0e to 6bb566026c6a0974a4dade6f8bc0cc810b333ad1
comment:4 followup: ↓ 11 Changed 5 years ago by
The doc of ChainComplex? ( http://doc.sagemath.org/html/en/reference/homology/sage/homology/chain_complex.html ) says that the syntax you're invoking ChainComplex? with ("a list/tuple/iterable of the form [d0,d1,d2,...] where each di is a matrix") only makes sense if degree is 1; but your degree is 1. Are you sure that this is legit? (I don't know ChainComplex? well, so this is just a question.)
The doc for cohomology uses left gmodules, whereas you have defined the ChevalleyEilenberg complex for right gmodules. Of course, g being a Lie algebra, there is a 1to1 correspondence between those, but signs may get messed up. This is not a problem when the module is trivial, but it's worth checking that we aren't making something that will be a pain to deprecate.
Another reference: 10.1.310.1.6 of Loday's Cyclic Homology. He uses the opposite signs, though. Convention differences?
comment:5 Changed 5 years ago by
 Commit changed from 6bb566026c6a0974a4dade6f8bc0cc810b333ad1 to 8c424dc42c1f2345688ccb5693b85e3b02efab3d
Branch pushed to git repo; I updated commit sha1. New commits:
8c424dc  review changes to Lie algebra cohomology

comment:6 Changed 5 years ago by
The module case is waiting for a framework for Lie algebra modules, or do we have that already?
Apart from my previous comments, by the way, the patch is fine with me.
comment:7 Changed 5 years ago by
 Reviewers set to Darij Grinberg
comment:8 followup: ↓ 12 Changed 5 years ago by
PS. Do you know of an example where the Betti numbers aren't symmetric around the middle? I'm a bit paranoid about the degree; such an example would help ensure that we aren't secretly computing the dual complex and getting our homology and cohomology mixed up...
comment:9 followup: ↓ 13 Changed 5 years ago by
Do not use .iteritems, please (for python3 compatibility).
comment:10 Changed 5 years ago by
 Commit changed from 8c424dc42c1f2345688ccb5693b85e3b02efab3d to 2adfffc48848ea67dfb064df66c49119624b2d5a
comment:11 in reply to: ↑ 4 Changed 5 years ago by
Replying to darij:
The doc of ChainComplex? ( http://doc.sagemath.org/html/en/reference/homology/sage/homology/chain_complex.html ) says that the syntax you're invoking ChainComplex? with ("a list/tuple/iterable of the form [d0,d1,d2,...] where each di is a matrix") only makes sense if degree is 1; but your degree is 1. Are you sure that this is legit? (I don't know ChainComplex? well, so this is just a question.)
I am not doing that. chain_data
is a dict
.
The doc for cohomology uses left gmodules, whereas you have defined the ChevalleyEilenberg complex for right gmodules. Of course, g being a Lie algebra, there is a 1to1 correspondence between those, but signs may get messed up. This is not a problem when the module is trivial, but it's worth checking that we aren't making something that will be a pain to deprecate.
Since we do not currently support anything but the trivial module, this won't be a problem to change at a later point. However, there is a slight technical issue of left vs. right in that the cohomology should be a left gmodule, but the homology is a right gmodule. This would be something that would eventually be taken care of when general coefficient modules are implemented.
I added options to compute using sparse matrices (as I believe the matrices for the chain complex will generally be sparse) and to do the differential computation in parallel.
Another reference: 10.1.310.1.6 of Loday's Cyclic Homology. He uses the opposite signs, though. Convention differences?
Convention difference. The differential can always be multiplied by any (invertible) scalar as d(d(ax)) = d(a(dx)) = a d(d(x)) = 0
and scaling by a constant is homotopic to the identity map on chain complex (i.e., the resulting homology groups are isomorphic).
comment:12 in reply to: ↑ 8 Changed 5 years ago by
Replying to darij:
PS. Do you know of an example where the Betti numbers aren't symmetric around the middle? I'm a bit paranoid about the degree; such an example would help ensure that we aren't secretly computing the dual complex and getting our homology and cohomology mixed up...
I do not, but I will try to construct such an example.
comment:13 in reply to: ↑ 9 Changed 5 years ago by
Replying to chapoton:
Do not use .iteritems, please (for python3 compatibility).
That is for a vector
instance (and not a dict
), so it is a welldefined method (for now).
comment:14 Changed 5 years ago by
one failing doctest, see bot
comment:15 Changed 5 years ago by
 Commit changed from 2adfffc48848ea67dfb064df66c49119624b2d5a to 5c2ce780fca0bb68fc623900c366164e47e203bc
comment:16 Changed 5 years ago by
Green patchbot.
@darij I could not construct an example that was not symmetric. However, I think we are okay. The left/right difference comes from the fact that we should be taking a dual module, but we don't see that for the trivial representation. So the care will have to be taken when that implementation is done, but I don't think we have to (or even can) worry about that here.
comment:17 Changed 5 years ago by
 Milestone changed from sage8.0 to sage8.1
comment:18 Changed 5 years ago by
From https://mathoverflow.net/questions/184590/poincaredualityforcohomologyofliealgebras, a 2dimensional Lie algebra for which the integral betti numbers do not satisfy \beta_k = \beta_{2k}
:
sage: d = {('x', 'y'): {'y': 2}} sage: L.<x,y> = LieAlgebra(ZZ, d) sage: L.cohomology() {0: Z, 1: Z, 2: C2}
comment:19 Changed 4 years ago by
 Cc bsalisbury1 added
comment:20 Changed 4 years ago by
 Commit changed from 5c2ce780fca0bb68fc623900c366164e47e203bc to 660a2367579ebd1509c86fd042cbb37c905bca4c
comment:21 Changed 4 years ago by
I've added John's example from comment:18 (and its homology).
comment:22 Changed 4 years ago by
 Commit changed from 660a2367579ebd1509c86fd042cbb37c905bca4c to 28accb56804a4261fa377ed48000a24e2be46662
Branch pushed to git repo; I updated commit sha1. New commits:
28accb5  words added to documentation

comment:23 Changed 4 years ago by
 Milestone changed from sage8.1 to sage8.3
 Reviewers changed from Darij Grinberg to Darij Grinberg, Ben Salisbury
 Status changed from needs_review to positive_review
comment:24 Changed 4 years ago by
 Branch changed from public/lie_algebras/homology22883 to 28accb56804a4261fa377ed48000a24e2be46662
 Resolution set to fixed
 Status changed from positive_review to closed
Branch pushed to git repo; I updated commit sha1. New commits:
Implement Lie algebra (co)homology.