-
Notifications
You must be signed in to change notification settings - Fork 257
New package simplicial modules #3949
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
Open
kellerlv
wants to merge
4
commits into
Macaulay2:development
Choose a base branch
from
kellerlv:SimplicialModules
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -288,3 +288,4 @@ AllMarkovBases | |
Tableaux | ||
CpMackeyFunctors | ||
JSONRPC | ||
SimplicialModules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
newPackage( | ||
"SimplicialModules", | ||
AuxiliaryFiles => true, | ||
Version => "0.1", | ||
Date => "September 27, 2023", | ||
Authors => { | ||
{Name => "Keller VandeBogert", Email => "kvandebo@nd.edu", HomePage => "https://sites.google.com/view/kellervandebogert/home"}, | ||
{Name => "Michael DeBellevue", Email => "", HomePage => ""}}, | ||
Headline => "methods for working in the category of simplicial modules", | ||
Keywords => {"Homological Algebra", "Commutative Algebra"}, | ||
PackageExports => {"Complexes", "SchurFunctors"}, | ||
PackageImports => {"Complexes"} | ||
) | ||
|
||
export {"SimplicialModule", | ||
"SimplicialModuleMap", | ||
"simplicialModule", | ||
--"combineSFactors", | ||
"forgetComplex", | ||
"forgetDegeneracy", | ||
"isSimplicialModule", | ||
"isSimplicialMorphism", | ||
"randomSimplicialMap", | ||
"tensorwithComponents", | ||
"topDegree", | ||
"exteriorInclusion", | ||
"extPower", | ||
"naiveNorm", | ||
"normalize", | ||
"schurMap", | ||
"simplicialTensor", | ||
"symmetricQuotient", | ||
"tensorLES", | ||
--"CheckMap", | ||
"CheckComplex", | ||
"RememberSummands", | ||
"Degeneracy", | ||
"TopDegree", | ||
"ss", | ||
"complexLength", | ||
"CheckSum", | ||
"complexMap", | ||
"summandSurjection" | ||
} | ||
|
||
|
||
|
||
|
||
------------------------------------------------------------------------------ | ||
------------------------------------------------------------------------------ | ||
-- **CODE** -- | ||
------------------------------------------------------------------------------ | ||
------------------------------------------------------------------------------ | ||
|
||
load "./SimplicialModules/SimplicialMapUtilities_Modified.m2" | ||
load "./SimplicialModules/SimplicialModule.m2" | ||
load "./SimplicialModules/Normalization.m2" | ||
|
||
|
||
|
||
----------------------------------------------------------------------------- | ||
-- Documentation | ||
----------------------------------------------------------------------------- | ||
|
||
beginDocumentation() | ||
|
||
load "./SimplicialModules/SimplicialModuleDOC.m2" | ||
|
||
|
||
|
||
----------------------------------------------------------------------------- | ||
-- Tests | ||
----------------------------------------------------------------------------- | ||
|
||
load "./SimplicialModules/SimplicialModuleTESTS1.m2" | ||
|
||
|
||
|
||
----------------------------------------------------------------------------- | ||
-- Development | ||
----------------------------------------------------------------------------- | ||
|
||
end-- | ||
|
||
uninstallPackage "SimplicialModules" | ||
restart | ||
debug installPackage "SimplicialModules" | ||
debug loadPackage("SimplicialModules", LoadDocumentation => true, Reload => true) | ||
debug needsPackage "SimplicialModules" | ||
check SimplicialModules | ||
viewHelp SimplicialModules | ||
|
||
Q = QQ[x_1..x_3]; | ||
K = koszulComplex vars Q; | ||
isWellDefined simplicialModule(K, 4) --no degeneracy here | ||
S = simplicialModule(K,4, Degeneracy => true) | ||
S.dd**Q^1 | ||
isWellDefined S | ||
Sdegen = simplicialModule(K,4,Degeneracy => true) | ||
S.dd | ||
--S.ss --should return error, no such key | ||
Sdegen.ss --this is the version that actually has degeneracy maps cached | ||
simplicialModule(K, 5) | ||
C = complex(Q^1, Base => 1) | ||
simplicialModule(C, 3) | ||
isWellDefined oo | ||
simplicialModule(complex(Q^2, Base => 2), 6, Degeneracy => true) | ||
isWellDefined oo --nice, now we can be confident the objects we are messing with actually make any sense | ||
oo.ss | ||
id_S | ||
phi = exteriorInclusion(S); | ||
prune phi | ||
prune coker phi | ||
K = koszulComplex {x_1,x_2} | ||
Sn = simplicialModule(K, 4, Degeneracy => true) | ||
phi = exteriorInclusion(K) | ||
isCommutative phi | ||
isWellDefined phi | ||
isCommutative prune phi | ||
isWellDefined prune phi | ||
sphi = exteriorInclusion(Sn); | ||
psphi = prune sphi; | ||
isWellDefined (source psphi).cache.pruningMap | ||
isCommutative (source psphi).cache.pruningMap | ||
isSimplicialMorphism (source psphi).cache.pruningMap --pruningMaps are well-defined morphisms | ||
|
||
S = simplicialModule(K,6) | ||
|
||
|
||
p = randomComplexMap(K, K, Degree => 1, InternalDegree => 1) | ||
sp = simplicialModule p | ||
isWellDefined sp | ||
isCommutative sp | ||
normalize(sp, CheckComplex => false) | ||
prune oo ---reobtain p | ||
p' = randomComplexMap(K, K, Degree => -1) | ||
sp' = simplicialModule p' | ||
isWellDefined sp' | ||
isCommutative sp' | ||
normalize(sp', CheckComplex => false) | ||
prune oo --reobtain p' | ||
p = randomComplexMap(K, K, Degree => 1, Cycle => true, InternalDegree => 2) | ||
sp = simplicialModule p | ||
isWellDefined sp | ||
isCommutative sp | ||
normalize(sp, CheckComplex => false) | ||
prune oo ---reobtain p | ||
diffs = simplicialModule K.dd | ||
isWellDefined diffs | ||
isCommutative diffs | ||
|
||
image(id_S) == S | ||
simplicialModule(id_K, 6) == id_S | ||
isSimplicialMorphism id_S | ||
simplicialModule(complex(Q^0), 6, Degeneracy => true) -- should be able to input 0 and get a well-defined output | ||
isWellDefined oo | ||
phi = randomSimplicialMap(S, S, Cycle => true, InternalDegree => 1) | ||
isWellDefined phi | ||
isCommutative phi | ||
|
||
bS = basis(0, forgetComplex S) | ||
prune bS.dd | ||
isWellDefined bS | ||
isWellDefined prune bS | ||
bid = basis(0, id_(forgetComplex S)) | ||
isWellDefined bid | ||
isCommutative bid | ||
isWellDefined prune bid | ||
isCommutative prune bid | ||
|
||
fS = forgetComplex S | ||
fS.?ss | ||
|
||
bS = basis(1, forgetComplex S) | ||
isWellDefined bS | ||
prune bS.dd | ||
isWellDefined oo | ||
prune bS.ss | ||
isWellDefined oo | ||
normalize bS | ||
prune oo | ||
prune basis(1, K) | ||
|
||
bS = basis(3, forgetComplex S) | ||
isWellDefined bS | ||
prune bS.dd; | ||
isWellDefined oo | ||
prune bS.ss; | ||
isWellDefined oo | ||
normalize bS | ||
prune oo | ||
prune basis(3, koszulComplex vars Q) | ||
|
||
tS = truncate(1, S) | ||
isWellDefined tS | ||
prune tS | ||
isWellDefined prune tS | ||
tS = truncate(1, fS) | ||
isWellDefined tS | ||
prune tS | ||
isWellDefined prune tS | ||
isCommutative truncate(2, id_S) | ||
isCommutative truncate(2, id_fS) | ||
|
||
K = koszulComplex {x_1,x_2} | ||
isWellDefined (Sc = schurMap({1,1}, K)) | ||
prune ext(2, K) | ||
prune schurMap({2,1}, K, TopDegree => 4) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Having Complexes in both PackageImports and PackageExports is redundant
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.
What's the preferred threshold for test lengths? These tests took about half as long as those times on my computer, but I acknowledge 35 seconds is quite long. One issue with this is that simplicial objects are generally very big and computationally cumbersome, so it's hard to build nontrivial examples that also run quickly. I kind of knew the example sizes would be an issue here but wasn't sure what was considered acceptable.
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.
What's the main bottleneck? Have you profiled the test?
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.
No, I haven't profiled it mostly because I don't know how. For all of the slow tests it generally stems not from this package's constructors themselves, but the general slowness of applying Schur functors/exterior powers to large matrices (which are functions from other packages).