sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

Finitely presented graded modules over graded connected algebras #32505

Closed jhpalmieri closed 2 years ago

jhpalmieri commented 3 years ago

This is a precursor to #30680, laying out the framework for finitely presented modules over graded connected algebras. #30680 will focus on the case of the Steenrod algebra, with specific applications in mind.

CC: @sverre320 @sagetrac-kvanwoerden @jhpalmieri @tscrim @rrbruner @cnassau

Component: algebra

Author: Bob Bruner, Michael Catanzaro, Sverre Lunøe-Nielsen, Koen van Woerden, John Palmieri, Travis Scrimshaw

Branch/Commit: a1a9467

Reviewer: John Palmieri, Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/32505

jhpalmieri commented 2 years ago
comment:71

This now allows for the possibility of the terms in the resolution being instances of FreeGradedModuleMorphism (except for the initial map, which has codomain the original module). I've also added a (slow) method which will compute the top dimension of a finite-dimensional algebra, for use in determining when to stop computing the resolution. I've also added a computation of a free resolution of a trivial module over an exterior algebra.

jhpalmieri commented 2 years ago
comment:72

So maybe the choice for resolution was because the initial map has codomain M which is likely not free. With the new as_free=True option, the later maps are all converted to type FreeGradedModuleMorphism, and you could just omit the 0th term to get an honest (graded) free resolution out of it.

Maybe now we're done?

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

6c1ab8dtrac 32505: more fixes
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 11b3725 to 6c1ab8d

jhpalmieri commented 2 years ago
comment:74

Fixed a few more things: the free_graded_module method for algebras with basis wasn't handling the names argument correctly, and a few doctests were failing. I changed some of the documentation, too.

tscrim commented 2 years ago
comment:75

I was just running into that problem in comment:74 and about to fix it. Thanks. I will be pushing a bunch of changes shortly too.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 6c1ab8d to 5074464

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

72e455eWe do not require the base algebra's base ring to be a field.
fcce24dMerge branch 'public/modules/free_graded_modules-32505' of git://trac.sagemath.org/sage into public/modules/free_graded_modules-32505
2e0518fUsing free modules where possible and improved compatibility.
6cf6d14Merge branch 'public/modules/free_graded_modules-32505' of git://trac.sagemath.org/sage into public/modules/free_graded_modules-32505
5074464Some last fixes and removing redundancy.
tscrim commented 2 years ago
comment:77

I took this a bit further and made everything in the resolution a FreeGradedModule. As I suspected, there were some compatibility issues to sort out, but I took care of all of the ones that came up in doctests (and a few others I saw along the way). There might be a few others (which will show up as missing methods), but we can fix them as we come across them.

Towards this, I made the free module morphism/homspace a subclass of the respective non-free version. This required some slight workaround, but the code is much cleaner IMO because there are no duplicated methods and the subclassing makes mathematical sense.

I tweaked the documentation to say "free module" basically everywhere we use "vector space" because we are not using the field properties AFAICS.

As of right now, I am happy with the code. Please check my changes. If they are good, then go ahead and set a positive review.

jhpalmieri commented 2 years ago
comment:78

I saw that you replaced PlusInfinity() with infinity, so I made the same change a few other places. I also removed a "todo" about dealing with finite dimensionality rather than just finiteness, handling it the same way we did elsewhere in the code. If someone gets motivated (on another ticket), they can try to handle the case where self.base_ring().dimension() is not defined.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

ffe7179trac 32505: replace "PlusInfinity()" with "infinity"
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from 5074464 to ffe7179

jhpalmieri commented 2 years ago

Changed author from Bob Bruner, Michael Catanzaro, Sverre Lunøe-Nielsen, Koen van Woerden, John Palmieri to Bob Bruner, Michael Catanzaro, Sverre Lunøe-Nielsen, Koen van Woerden, John Palmieri, Travis Scrimshaw

tscrim commented 2 years ago
comment:81

Replying to @jhpalmieri:

I saw that you replaced PlusInfinity() with infinity, so I made the same change a few other places.

Indeed, this is a micro-optimization since they are the same object, but infinity is already created (and nailed in memory).

I also removed a "todo" about dealing with finite dimensionality rather than just finiteness, handling it the same way we did elsewhere in the code.

Thank you. I had made that note for myself, but I forgot about it.

If someone gets motivated (on another ticket), they can try to handle the case where self.base_ring().dimension() is not defined.

I concur.

Thank you.

sverre320 commented 2 years ago
comment:82

Good question. Comments from the original authors? Why not just use free modules in resolution?

In the original version, the free module class was not intended for public use.

vbraun commented 2 years ago
comment:83
[sagemath_doc_html-none] [modules  ] The inventory files are in local/share/doc/sage/inventory/en/reference/modules.
[sagemath_doc_html-none] Error building the documentation.
[sagemath_doc_html-none] Traceback (most recent call last):
[sagemath_doc_html-none]   File "/home/release/Sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
[sagemath_doc_html-none]     return _run_code(code, main_globals, None,
[sagemath_doc_html-none]   File "/home/release/Sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/runpy.py", line 87, in _run_code
[sagemath_doc_html-none]     exec(code, run_globals)
[sagemath_doc_html-none]   File "/home/release/Sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__main__.py", line 2, in <module>
[sagemath_doc_html-none]     main()
[sagemath_doc_html-none]   File "/home/release/Sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 1731, in main
[sagemath_doc_html-none]     builder()
[sagemath_doc_html-none]   File "/home/release/Sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 776, in _wrapper
[sagemath_doc_html-none]     getattr(DocBuilder, build_type)(self, *args, **kwds)
[sagemath_doc_html-none]   File "/home/release/Sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/__init__.py", line 136, in f
[sagemath_doc_html-none]     runsphinx()
[sagemath_doc_html-none]   File "/home/release/Sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/sphinxbuild.py", line 323, in runsphinx
[sagemath_doc_html-none]     sys.stderr.raise_errors()
[sagemath_doc_html-none]   File "/home/release/Sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage_docbuild/sphinxbuild.py", line 258, in raise_errors
[sagemath_doc_html-none]     raise OSError(self._error)
[sagemath_doc_html-none] OSError: /home/release/Sage/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/modules/fp_graded/free_homspace.py:docstring of sage.modules.fp_graded.free_homspace.FreeGradedModuleHomspace.identity:4: WARNING: Literal block expected; none found.
[sagemath_doc_html-none] 
[sagemath_doc_html-none]     Note: incremental documentation builds sometimes cause spurious
[sagemath_doc_html-none]     error messages. To be certain that these are real errors, run
[sagemath_doc_html-none]     "make doc-clean doc-uninstall" first and try again.
jhpalmieri commented 2 years ago
comment:84

Travis, was your intention to delete the identity method from free_homspace? Perhaps also remove zero?

tscrim commented 2 years ago
comment:85

Replying to @jhpalmieri:

Travis, was your intention to delete the identity method from free_homspace? Perhaps also remove zero?

Yes it was. They are now inherited as they had (effectively) the same code as the not-necessarily-free homspace.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Changed commit from ffe7179 to a1a9467

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 2 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

a1a9467trac 32505: remove redundant "zero" and "identity" methods
tscrim commented 2 years ago
comment:88

Thank you.

jhpalmieri commented 2 years ago
comment:89

Followup in #33275.

vbraun commented 2 years ago

Changed branch from public/modules/free_graded_modules-32505 to a1a9467