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
Meta-ticket: Modules with basis: We need to separate ABC from implementation #19346
Comments
comment:1
I think a good part of this is taken care of by #18066, but there will probably be some remaining things related to filtered/graded modules that we will need to address. |
Dependencies: #18066 |
comment:2
Is this ticket still relevant? |
comment:3
Yes, I think it is. It is still quite difficult to implement a module with basis without inheriting from |
comment:4
So what's missing is a few abstract methods and perhaps |
comment:5
Yes. And to resolve some conflicts in the current API; e.g. what idiom to use to iterate over pairs (indicies, coefficients), etc. |
comment:6
For a package of mine, I needed these uniform accessors that would work over various kinds https://github.com/nthiery/harmonic-modules/ See: utilitiles.py, matrix_of_vectors.py and subspace.py there. With Darij, we made an attempt at extracting a dedicated package out of it, https://github.com/darijgr/sage-subspace/blob/master/vectors.pyx |
comment:9
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
comment:10
Setting a new milestone for this ticket based on a cursory review. |
comment:11
Stalled in |
From what I recall from the discussion at https://groups.google.com/forum/#!topic/sage-combinat-devel/_dtk67RaTFA , the
ModulesWithBasis
andCombinatorialFreeModule
classes are supposed to be an ABC (abstract base class) and a concrete implementation, respectively. However, in practice, the former provides too little abstract interface to be useful, and so a lot of code that uses a module-with-basis as input (explicitly or implicitly) expects to be given aCombinatorialFreeModule
instead. Usually this kind of code fails when being passed aModulesWithBasis
instance.I am posting this here right now because #17096 got positive review, and in that review some issues have been left aside. These issues are essentially a natural second step after cleaning up the
ModulesWithBasis
-vs-CombinatorialFreeModule
mess, andFilteredModulesWithBasis
objects. Is aCombinatorialFreeModule
with adegree_on_basis
method enough? Or isbasis
still needed? (See theFIXME in
src/sage/categories/examples/filtered_modules_with_basis.py
.)integer. This has always been broken.
About why I think
FilteredModulesWithBasis
needs a contract:Here are the methods on
F
that are used in the implementations of themethods of
FilteredModulesWithBasis
whenF
is cast as aFilteredModulesWithBasis
:I hear the quacking of a
CombinatorialFreeModule
duck here (except fordegree_on_basis
which should be explicitly required). Are there anymore general categories which offer these methods?
Depends on #18066
CC: @tscrim @nthiery @sagetrac-sage-combinat
Component: categories
Keywords: combinatorial free module, basis, vectors, modules, sage-combinat
Issue created by migration from https://trac.sagemath.org/ticket/19346
The text was updated successfully, but these errors were encountered: