Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
673b705
first rough implementation
xcaruso Sep 19, 2024
88e602e
include in documentation
xcaruso Sep 19, 2024
4359a45
Merge branch 'pseudomorphism' into ore_module
xcaruso Sep 19, 2024
a45c749
morphisms between Ore modules
xcaruso Sep 23, 2024
c5ab4a7
add constructor
xcaruso Sep 23, 2024
8fa0c80
Merge branch 'pseudomorphism' into ore_module
xcaruso Sep 23, 2024
0b89061
implement span and quo
xcaruso Sep 24, 2024
8c7de01
improve printing
xcaruso Sep 24, 2024
98e5df8
documentation
xcaruso Sep 24, 2024
421d172
improve span and quo
xcaruso Sep 24, 2024
5071283
define action of Ore polynomials and improve morphisms
xcaruso Sep 25, 2024
d81d8d0
latex representation
xcaruso Sep 26, 2024
5a1e7ac
Merge branch 'pseudomorphism' into ore_module
xcaruso Sep 26, 2024
b030d3b
tutorial
xcaruso Sep 26, 2024
6f9d1f8
Merge branch 'pseudomorphism' into ore_module
xcaruso Sep 26, 2024
f2f20f2
doctest for the class OreModule
xcaruso Sep 27, 2024
3f68a67
Merge branch 'pseudomorphism' into ore_module
xcaruso Sep 27, 2024
5bae586
all doctests in ore_module.py
xcaruso Sep 27, 2024
fb2582f
add method rename_basis
xcaruso Sep 28, 2024
7781e06
construction from pseudomorphisms
xcaruso Sep 28, 2024
edfde43
tutorial for morphisms
xcaruso Sep 28, 2024
e0ef25b
addition of morphisms
xcaruso Sep 28, 2024
059e7ce
doctests in ore_module_element.py
xcaruso Sep 28, 2024
d418574
doctests in ore_module_homspace.py
xcaruso Sep 28, 2024
ca502b9
doctests for the methods quotient_module
xcaruso Sep 28, 2024
beb3834
doctests in categories/ore_modules.py
xcaruso Sep 29, 2024
535e697
fix lint
xcaruso Sep 29, 2024
3a843a8
minor corrections
xcaruso Sep 29, 2024
3e28678
doctests in ore_module_morphism.py
xcaruso Sep 29, 2024
1907bca
Merge branch 'develop' into ore_module
fchapoton Feb 10, 2025
e9928b0
Merge branch 'develop' into ore_module
xcaruso Feb 14, 2025
e7e85e8
Update src/sage/modules/ore_module.py
xcaruso Feb 14, 2025
03ae0d3
Update src/sage/modules/ore_module.py
xcaruso Feb 14, 2025
92c9e9f
Update src/sage/modules/ore_module.py
xcaruso Feb 14, 2025
ae489fb
Update src/sage/modules/ore_module.py
xcaruso Feb 14, 2025
f57da20
Update src/sage/modules/ore_module.py
xcaruso Feb 14, 2025
ce87119
Merge branch 'pseudomorphism' into ore_modules
Feb 14, 2025
5769792
documentation
Feb 14, 2025
7950a58
typos in documentation
Feb 14, 2025
0bc8d37
fix ::
Feb 14, 2025
47e9aaa
blank lines and typos
Feb 15, 2025
8148186
complete paths in references in documentation
Feb 15, 2025
f6505a1
Merge branch 'develop' into ore_module
xcaruso Mar 8, 2025
ae46616
use repr_lincomb
Mar 10, 2025
f1a7bbb
remove quotient_module in ore_polynomial_element
Mar 10, 2025
2bafcf9
fix ruff
Mar 10, 2025
db92f78
add details in the documentation of the method "span"
Mar 10, 2025
4404dea
reorganize documentation
Mar 11, 2025
a94c3c9
conftest.py
Mar 11, 2025
cd98ec4
meson
Mar 11, 2025
c7a800b
documentation
Mar 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/doc/en/reference/categories/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ Individual Categories
sage/categories/monoids
sage/categories/number_fields
sage/categories/objects
sage/categories/ore_modules
sage/categories/partially_ordered_monoids
sage/categories/permutation_groups
sage/categories/pointed_sets
Expand Down
1 change: 1 addition & 0 deletions src/doc/en/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Linear Algebra
* :doc:`Matrices and Spaces of Matrices <matrices/index>`
* :doc:`Vectors and Modules <modules/index>`
* :doc:`Tensors on Free Modules of Finite Rank <tensor_free_modules/index>`
* :doc:`Modules over Ore rings <oremodules/index>`

Calculus and Analysis
---------------------
Expand Down
1 change: 1 addition & 0 deletions src/doc/en/reference/oremodules/conf.py
56 changes: 56 additions & 0 deletions src/doc/en/reference/oremodules/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Modules over Ore rings
======================

Let `R` be a commutative ring, `\theta : K \to K` by a ring
endomorphism and `\partial : K \to K` be a `\theta`-derivation,
that is an additive map satisfying the following axiom

.. MATH::

\partial(x y) = \theta(x) \partial(y) + \partial(x) y

The Ore polynomial ring associated to these data is
`\mathcal S = R[X; \theta, \partial]`; its elements are the
usual polynomials over `R` but the multiplication is twisted
according to the rule

.. MATH::

\partial(x y) = \theta(x) \partial(y) + \partial(x) y

We refer to :mod:`sage.rings.polynomial.ore_polynomial_ring.OrePolynomial`
for more details.

A Ore module over `(R, \theta, \partial)` is by definition a
module over `\mathcal S`; it is the same than a `R`-module `M`
equipped with an additive `f : M \to M` such that

.. MATH::

f(a x) = \theta(a) f(x) + \partial(a) x

Such a map `f` is called a pseudomorphism
(see also :meth:`sage.modules.free_module.FreeModule_generic.pseudohom`).

SageMath provides support for creating and manipulating Ore
modules that are finite free over the base ring `R`.
This includes, in particular, Frobenius modules and modules
with connexions.

Modules, submodules and quotients
---------------------------------

.. toctree::
:maxdepth: 1

sage/modules/ore_module
sage/modules/ore_module_element

Morphisms
---------

.. toctree::
:maxdepth: 1

sage/modules/ore_module_homspace
sage/modules/ore_module_morphism
1 change: 1 addition & 0 deletions src/sage/categories/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ py.install_sources(
'noetherian_rings.py',
'number_fields.py',
'objects.py',
'ore_modules.py',
'partially_ordered_monoids.py',
'permutation_groups.py',
'pointed_sets.py',
Expand Down
177 changes: 177 additions & 0 deletions src/sage/categories/ore_modules.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
from sage.misc.lazy_attribute import lazy_attribute

from sage.categories.modules import Modules
from sage.categories.category_types import Category_over_base_ring
from sage.categories.homsets import Homsets
from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing


class OreModules(Category_over_base_ring):
r"""
Category of Ore modules.
"""
@staticmethod
def __classcall_private__(cls, ring, twist):
r"""
Normalize the input and call the init function.

INPUT:

- ``ring`` -- a commutative ring, the base ring of
the Ore modules

- ``twist`` -- a twisting morphism/derivation or a
Ore polynomial ring

TESTS::

sage: from sage.categories.ore_modules import OreModules
sage: K.<a> = GF(5^3)
sage: Frob = K.frobenius_endomorphism()
sage: cat = OreModules(K, Frob)
sage: cat
Category of Ore modules over Finite Field in a of size 5^3 twisted by a |--> a^5

sage: S = cat.ore_ring('y')
sage: cat is OreModules(K, S)
True
"""
if isinstance(twist, OrePolynomialRing):
ore = twist.change_var('x')
if ore.base_ring() is not ring:
raise ValueError("base rings do not match")

Check warning on line 42 in src/sage/categories/ore_modules.py

View check run for this annotation

Codecov / codecov/patch

src/sage/categories/ore_modules.py#L42

Added line #L42 was not covered by tests
else:
ore = OrePolynomialRing(ring, twist, names='x', polcast=False)
return cls.__classcall__(cls, ore)

def __init__(self, ore):
r"""
Initialize this category.

TESTS::

sage: from sage.categories.ore_modules import OreModules
sage: K.<a> = GF(5^3)
sage: Frob = K.frobenius_endomorphism()
sage: cat = OreModules(K, Frob)

sage: TestSuite(cat).run()
"""
base = ore.base_ring()
Category_over_base_ring.__init__(self, base)
self._ore = ore

def __reduce__(self):
r"""
Return the arguments which were used to create this instance.

This method is needed for pickling.

TESTS::

sage: from sage.categories.ore_modules import OreModules
sage: K.<a> = GF(5^3)
sage: Frob = K.frobenius_endomorphism()
sage: cat = OreModules(K, Frob)
sage: cat2 = loads(dumps(cat)) # indirect doctest
sage: cat is cat2
True
"""
return OreModules, (self.base_ring(), self._ore)

def super_categories(self):
r"""
Return the immediate super categories of this category.

EXAMPLES::

sage: from sage.categories.ore_modules import OreModules
sage: K.<a> = GF(5^3)
sage: Frob = K.frobenius_endomorphism()
sage: cat = OreModules(K, Frob)
sage: cat.super_categories()
[Category of vector spaces over Finite Field in a of size 5^3]
"""
return [Modules(self.base())]

def _repr_object_names(self):
r"""
Return a string representation naming the objects
in this category.

EXAMPLES::

sage: from sage.categories.ore_modules import OreModules
sage: K.<a> = GF(5^3)
sage: Frob = K.frobenius_endomorphism()
sage: cat = OreModules(K, Frob)
sage: cat._repr_object_names()
'Ore modules over Finite Field in a of size 5^3 twisted by a |--> a^5'
"""
return "Ore modules over %s %s" % (self.base_ring(), self._ore._repr_twist())

def ore_ring(self, var='x'):
r"""
Return the underlying Ore polynomial ring.

INPUT:

- ``var`` (default; ``x``) -- the variable name

EXAMPLES::

sage: from sage.categories.ore_modules import OreModules
sage: K.<a> = GF(5^3)
sage: Frob = K.frobenius_endomorphism()
sage: cat = OreModules(K, Frob)
sage: cat.ore_ring()
Ore Polynomial Ring in x over Finite Field in a of size 5^3 twisted by a |--> a^5

sage: cat.ore_ring('y')
Ore Polynomial Ring in y over Finite Field in a of size 5^3 twisted by a |--> a^5
"""
return self._ore.change_var(var)

def twisting_morphism(self):
r"""
Return the underlying twisting morphism.

EXAMPLES::

sage: from sage.categories.ore_modules import OreModules
sage: K.<a> = GF(5^3)
sage: Frob = K.frobenius_endomorphism()
sage: cat = OreModules(K, Frob)
sage: cat.twisting_morphism()
Frobenius endomorphism a |--> a^5 on Finite Field in a of size 5^3

If the twising morphism is the identity, nothing is returned::

sage: R.<t> = QQ[]
sage: d = R.derivation()
sage: cat = OreModules(R, d)
sage: cat.twisting_morphism()
"""
return self._ore.twisting_morphism()

def twisting_derivation(self):
r"""
Return the underlying twisting derivation.

EXAMPLES::

sage: from sage.categories.ore_modules import OreModules
sage: R.<t> = QQ[]
sage: d = R.derivation()
sage: cat = OreModules(R, d)
sage: cat.twisting_derivation()
d/dt

If the twising derivation is zero, nothing is returned::

sage: K.<a> = GF(5^3)
sage: Frob = K.frobenius_endomorphism()
sage: cat = OreModules(K, Frob)
sage: cat.twisting_derivation()
"""
return self._ore.twisting_derivation()
65 changes: 65 additions & 0 deletions src/sage/modules/free_module_pseudomorphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,5 +500,70 @@ def __eq__(self, other):
if isinstance(other, FreeModulePseudoMorphism):
return self.parent() is other.parent() and self._matrix == other._matrix

def ore_module(self, names=None):
r"""
Return the Ore module over which the Ore variable acts
through this pseudomorphism.

INPUT:

- ``names`` -- a string, a list of strings or ``None``,
the names of the vector of the canonical basis of the
Ore module; if ``None``, elements are represented as
vectors in `K^d` (where `K` is the base ring)

EXAMPLES::

sage: Fq.<z> = GF(7^3)
sage: Frob = Fq.frobenius_endomorphism()
sage: V = Fq^2
sage: mat = matrix(2, [1, z, z^2, z^3])
sage: f = V.pseudohom(mat, Frob)

sage: M = f.ore_module()
sage: M
Ore module of rank 2 over Finite Field in z of size 7^3 twisted by z |--> z^7

Here `M` is a module over the Ore ring `\mathbb F_q[X; \text{Frob}]`
and the variable `X` acts on `M` through `f`::

sage: S.<X> = M.ore_ring()
sage: S
Ore Polynomial Ring in X over Finite Field in z of size 7^3 twisted by z |--> z^7
sage: v = M((1,0))
sage: X*v
(1, z)

The argument ``names`` can be used to give chosen names
to the vectors in the canonical basis::

sage: M = f.ore_module(names=('v', 'w'))
sage: M.basis()
[v, w]

or even::

sage: M = f.ore_module(names='e')
sage: M.basis()
[e0, e1]

Note that the bracket construction also works::

sage: M.<v,w> = f.ore_module()
sage: M.basis()
[v, w]
sage: v + w
v + w

We refer to :mod:`sage.modules.ore_module` for a
tutorial on Ore modules in SageMath.

.. SEEALSO::

:mod:`sage.modules.ore_module`
"""
from sage.modules.ore_module import OreModule
return OreModule(self._matrix, self.parent()._ore, names)

def _test_nonzero_equal(self, tester):
pass
4 changes: 4 additions & 0 deletions src/sage/modules/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ py.install_sources(
'module_functors.py',
'multi_filtered_vector_space.py',
'numpy_util.pxd',
'ore_module.py',
'ore_module_element.py',
'ore_module_homspace.py',
'ore_module_morphism.py',
'quotient_module.py',
'real_double_vector.py',
'submodule.py',
Expand Down
Loading
Loading