Skip to content
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

Complexes PR #2: changes to a first set of packages #3479

Merged
merged 9 commits into from
Sep 30, 2024

Conversation

mikestillman
Copy link
Member

Minor changes to Posets, InvolutiveBases, SimplicialComplexes, CellularResolutions, and ReactionNetworks to get these working with the new Complexes package.

@jkyang92 @OlaSobieska: Please look over the minor changes to CellularResolutions.

@smapes @gwynwhieldon: Please look over the minor changes to Posets.

@sashahbc: Please look over the minor changes to SimplicialComplexes

@antonleykin @timduff35 @CvetelinaHill @klee669 @alexandru-iosif @MikeAdamer : Please look over the minor changes to ReactionNetworks. (I think all we did was to make one unused function local).

@@ -42,8 +42,8 @@ export {--types
"CellDimension",
"InferLabels",
"LabelRing",
"Reduced",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pedantically speaking, removing the comma here is not necessary since export silently ignores null entries.

@@ -27,10 +27,10 @@ assert(l1=!=l2);
assert(dim l1==1);
assert(dim l2==1);
C = cellComplex(QQ,{l1,l2});
CchainComplex = chainComplex C;
Copy link
Member

@mahrud mahrud Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor point: I think some of the changed lines here aren't necessary since CchainComplex is just a variable, and since C is a (cell) complex having "chain" in the variable name doesn't hurt.

if opts.Labels === {} then C[1]
else C
)
)

homology(ZZ, SimplicialComplex, Ring) := Module => opts -> (i, Delta, R) -> (
homology(i, chainComplex Delta ** R)
homology(i, (complex Delta) ** R)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the parenthesis necessary here or is it just for clarity?

@@ -3035,7 +3035,7 @@ doc ///
prune homology Γ
prune homology(Γ, QQ)
prune homology(Γ, ZZ/2)
assert(prune homology(Γ, ZZ/2) == gradedModule((ZZ/2)^2[-1] ++ (ZZ/2)^1[-2]))
assert(prune homology(Γ, ZZ/2) == (complex (ZZ/2)^2)[-1] ++ (complex (ZZ/2)^1)[-2])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the plan is to entirely remove gradedModule, and change M[n] to return a Complex, this would just become (ZZ/2)^2[-1] ++ (ZZ/2)^1[-2], correct?

@sashahbc
Copy link
Contributor

The changes to SimplicialComplexes look fine to me.

@timduff35
Copy link
Contributor

ReactionNetworks change looks ok to me -- in fact, that function should probably be deleted.

@mahrud
Copy link
Member

mahrud commented Sep 30, 2024

@mikestillman do you want to go ahead and merge this, or wait for @jkyang92 or @OlaSobieska and @smapes or @gwynwhieldon to respond first?

You can also open the next pull request on top of this (i.e. these commits will also be included in the next one, but you can at least see if there are any tests that need fixing).

@mikestillman
Copy link
Member Author

@ggsmith and I meet this afternooon, we will discuss how to handle that.

@mikestillman
Copy link
Member Author

I will merge this pull request. @mahrud @d-torrance I'm still fuzzy about the following: if I do the "rebase and merge" button on github, can I still use same branch for PR's later?

@d-torrance
Copy link
Member

if I do the "rebase and merge" button on github, can I still use same branch for PR's later?

Yup! The commits that end up on the development branch will have different hashes than the ones in this branch, but git will still be able to figure everything out when it's time to merge the next PR.

@mikestillman mikestillman merged commit f6a9d70 into Macaulay2:development Sep 30, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants