-
-
Notifications
You must be signed in to change notification settings - Fork 654
Cohomology ring of a moment-angle complex #36227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
1adfbe4
to
c5a7fca
Compare
c5a7fca
to
ffb12b6
Compare
Documentation preview for this PR (built with commit ffb12b6; changes) is ready! 🎉 |
|
||
def one(self): | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def one(self): | |
""" | |
@cached_method | |
def one(self): | |
""" |
So we don't have to repeatedly recompute it as it can be called often.
Actually, this is always just a single element one_basis()
and return that index (0, 0)
. This seems to be an assumption of _to_cycle_on_basis
and product_on_basis
.
if self.is_one(): | ||
return self.parent()._complex.simplicial_complex().generated_subcomplex(set(), is_mutable=is_mutable) | ||
vertex_set = self.parent()._gens[self.leading_support()[0]][self.leading_support()[1]][0] | ||
return self.parent()._complex.simplicial_complex().generated_subcomplex(vertex_set, is_mutable=is_mutable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if self.is_one(): | |
return self.parent()._complex.simplicial_complex().generated_subcomplex(set(), is_mutable=is_mutable) | |
vertex_set = self.parent()._gens[self.leading_support()[0]][self.leading_support()[1]][0] | |
return self.parent()._complex.simplicial_complex().generated_subcomplex(vertex_set, is_mutable=is_mutable) | |
P = self.parent() | |
if self.is_one(): | |
return P._complex.simplicial_complex().generated_subcomplex(set(), is_mutable=is_mutable) | |
ls = self.leading_support() | |
vertex_set = P._gens[ls[0]][ls[1]][0] | |
return P._complex.simplicial_complex().generated_subcomplex(vertex_set, is_mutable=is_mutable) |
res = 1 | ||
for element in subcomplex.vertices(): | ||
res *= _eps(element, simplicial_complex) | ||
return res |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the need for the _eps
method. I would just put it inline here. This can also be simplified
res = 1 | |
for element in subcomplex.vertices(): | |
res *= _eps(element, simplicial_complex) | |
return res | |
return (-1) ** sum(simplicial_complex._vertex_to_index[element] | |
for element in subcomplex.vertices()) |
|
||
return res | ||
|
||
def cup_length(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def cup_length(self): | |
@cached_method | |
def cup_length(self, elements=False): |
It would be good to have an option to return the list of elements that give the cup length.
cochains_basis = subcomplex_union.n_chains(deg, cochains=True).basis() | ||
# If the resulting cochain exists, then we | ||
# add it to the result; otherwise, we add 0 | ||
if cochains_basis.has_key(Simplex(res_union)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if cochains_basis.has_key(Simplex(res_union)): | |
X = Simplex(res_union) | |
if X in cochains_basis: |
since cochains_basis
is a dict
, right? This way you don't have to recreate the Simplex
below either. Although I would do this as
if X not in cochains_basis:
continue
[rest of code]
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
This PR provides the
MomentAngleComplex
class with its own cohomology ring (similar to the one which is available for simplicial, cubical and delta complexes). It requires its own separate class because we do not wish to compute this space explicitly (for efficiency reasons), but rather use a certain isomorphism which allows us to compute the cohomology ring more efficiently. The added class (CohomologyRing
) is designed to mimic the already implemented class for cohomology rings by adding as many analogue methods as possible (most significant of which allows us to compute the cup product), but its structure differs fundamentally, and therefore must be a separate class.This is a part of #35640 (GSoC 2023).
📝 Checklist
⌛ Dependencies