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

Implementation of Ore modules #38703

Open
wants to merge 54 commits into
base: develop
Choose a base branch
from
Open

Conversation

xcaruso
Copy link
Contributor

@xcaruso xcaruso commented Sep 23, 2024

This PR implements modules over Ore polynomial rings.

More precisely, if $A[X;\theta,\partial]$ is a Ore polynomial ring, we propose an implementation of finite free modules $M$ over $A$ equipped with a map $f : M \to M$ such that $f(ax) = \theta(a) f(x) + \partial(a) x$ for all $a \in R$ and $x \in M$.
Such a map is called pseudolinear and it endows M with a structure of module over $A[X;\theta,\partial]$ (the map $f$ corresponding to the multiplication by $X$).

This PR includes:

  • an implementation of the category of Ore modules
  • an implementation of Ore modules, their submodules and their quotients (with an option to give chosen names to elements in a distinguished basis)
  • a constructor to create quotients of the form $A[X;\theta,\partial] / A[X;\theta,\partial]P$
  • an implementation of morphisms between Ore modules, including methods for computing kernels, cokernels, images and coimages

This is the second step (after PR #38650) towards the implemetation of Anderson motives.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

#38650: pseudomorphisms

@xcaruso xcaruso requested a review from kryzar September 23, 2024 16:36
@kryzar
Copy link
Contributor

kryzar commented Sep 24, 2024

Quick question: why is it necessary that $M$ is free and finite (or just free with finite rank?)?

Also: love that you're creating these intermediate facilities that can be relevant in their own right, instead of just putting all of this in the implementation of Anderson motives.

@xcaruso
Copy link
Contributor Author

xcaruso commented Sep 24, 2024

Quick question: why is it necessary that M is free and finite (or just free with finite rank?)?

Well, it is not for the definition. But for the implementation, it is really useful as we want to represent the map $f$ by its matrix.

@xcaruso
Copy link
Contributor Author

xcaruso commented Sep 30, 2024

I think that the ticket is more or less ready for a first round of reviews!
Please comment it!

@mantepse
Copy link
Collaborator

@xcaruso
Copy link
Contributor Author

xcaruso commented Oct 17, 2024

Thanks!
If I'm correct, the project was not chosen at this session, is it correct?

@mantepse
Copy link
Collaborator

Thanks! If I'm correct, the project was not chosen at this session, is it correct?

Yes, that's correct.

@tscrim
Copy link
Collaborator

tscrim commented Oct 18, 2024

Let me right now just give a brief comparison of CombinatorialFreeModule (CFM) versus FreeModule. I will give a proper review soon if you don't decide to change the base implementation. Ideally these could be merged together, in particular, for the finite dimensional cases (as per the GSoC project), but I am very worried that this will be quite delicate. Some of these things @xcaruso you noted on #38767.

CFM stores data as sparse vectors, but things are not fixed in a particular order. So if the indexing set is more "interesting", it can take longer to do certain comparisons needed for linear algebra (e.g., leading terms). Most of the actual linear algebra computations is farmed out to the usual FreeModule implementation by fixing some basis element ordering. The submodules and quotient modules are fairly well-implemented, but are not nearly as feature complete as the FreeModule version. It also works well with linear algebra abstraction such as tensor products and algebra structures.

On the other hand FreeModule is built for computational speed and based on a fixed basis ordering indexed by \{0, \ldots, n-1\}. This makes a lot of computations more "canonical" (not used here in a rigorous way), in particular doing representations/computations with matrices. This also allows for dense representations, which is often much faster (or at least has specialized implementations).

My opinion is if you plan to work in the infinite dimensional setting, then it might be good to change over to CFM sooner than later. I take a look at this PR soon.

@xcaruso
Copy link
Contributor Author

xcaruso commented Oct 18, 2024

Thanks Travis for your detailed analysis.

I do not plan to support infinite dimensional Ore modules; I think it is not the priority as I can't imagine a concrete example where they show up naturally. (In contrast, torsion Ore modules over rings are much more important and, maybe at some point, I would like to have support for them.)

On the other hand:

  • it could probably be interesting (for performance) to support sparse Ore modules at some point (but I'm not sure that CombinatorialFreeModule is better for this)
  • I would like in a forthcoming PR to implement direct sums, tensor products and duality

Since I am currently working with finite basis and matrices in my implementation, I think I prefer keeping my choice and deriving from FreeModule. But I would be happy to reconsider my opinion if you have strong arguments for switching.

@xcaruso xcaruso mentioned this pull request Nov 14, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants