Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a02472b
Added pseudomorphism
ymusleh Jan 30, 2024
e1232f1
Adding pseudohomspace
ymusleh Jan 31, 2024
90d8365
Improve documentation for pseudomorphism
ymusleh Jan 31, 2024
eab0a12
Finishing documentation
ymusleh Feb 1, 2024
0af5e3b
finishing docs
ymusleh Feb 1, 2024
b15fa05
fixed pseudo action
ymusleh Feb 1, 2024
1dbb2b7
Added examples for all pseudomorphism methods
ymusleh Feb 1, 2024
120d7a1
Completed documentation for pseudomorphism and pseudohomspace
ymusleh Feb 1, 2024
957e414
Wrap identity/zero morphism
ymusleh Feb 1, 2024
051b0f3
Removed intermediate morphism
ymusleh Feb 1, 2024
11dd611
Improve documentation
ymusleh Feb 1, 2024
0d72c58
Improved doctests
ymusleh Feb 21, 2024
f275125
Removed extraneous code from free module pseudomorphism methods
ymusleh Feb 21, 2024
1134baa
refactor pseudomorphism constructor
ymusleh Feb 21, 2024
5802930
Merge branch 'pseudomorphism' of github:ymusleh/sage into pseudomorphism
xcaruso Sep 4, 2024
3eb4935
rewrite some methods, add documentation
xcaruso Sep 12, 2024
133b35c
remove useless import
xcaruso Sep 12, 2024
1cbbc0b
include doctests in documentation
xcaruso Sep 19, 2024
4b88e00
colon missing
xcaruso Sep 19, 2024
db5ae0a
move repr_twist to OrePolynomialRing
xcaruso Sep 23, 2024
0dd14fe
fix lint and doctest
xcaruso Sep 23, 2024
fe44f43
apply derivation after coercion
xcaruso Sep 26, 2024
438c8c4
fix lint
xcaruso Sep 26, 2024
abe978d
PseudoHom -> pseudoHom
xcaruso Sep 26, 2024
27a7e4d
minor fixes
xcaruso Sep 27, 2024
32103e4
format docstring
xcaruso Nov 14, 2024
aa0b713
fix doctest
xcaruso Nov 14, 2024
2305dd1
formatting
xcaruso Nov 15, 2024
4d3be55
TestSuite
xcaruso Nov 17, 2024
65ab9e4
remove method `quotient`
xcaruso Nov 17, 2024
8ef1982
Merge branch 'develop' into pseudomorphism
kwankyu Nov 17, 2024
81cde25
typos
xcaruso Dec 12, 2024
c06a143
uncapitalize pseudomorphisms
xcaruso Dec 12, 2024
1a65521
Merge branch 'develop' into pseudomorphism
xcaruso Feb 11, 2025
ce094d1
add details in documentation
Feb 12, 2025
a3f602e
Update src/sage/modules/free_module_pseudohomspace.py
xcaruso Feb 13, 2025
90b7ca8
Update src/sage/modules/free_module_pseudomorphism.py
xcaruso Feb 13, 2025
048009b
Update src/sage/modules/free_module.py
xcaruso Feb 13, 2025
941e26f
Update src/sage/modules/free_module_pseudohomspace.py
xcaruso Feb 13, 2025
a342fbe
improve documentation
Feb 13, 2025
1db04c2
grammar
Feb 13, 2025
76b71cf
add new files in meson + add a small comment in documentation
Feb 14, 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
9 changes: 9 additions & 0 deletions src/doc/en/reference/modules/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ Morphisms

sage/modules/matrix_morphism

Pseudomorphisms
---------------

.. toctree::
:maxdepth: 1

sage/modules/free_module_pseudohomspace
sage/modules/free_module_pseudomorphism

Vectors
-------

Expand Down
125 changes: 125 additions & 0 deletions src/sage/modules/free_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -3113,6 +3113,131 @@ def hom(self, im_gens, codomain=None, **kwds):
codomain = R**n
return super().hom(im_gens, codomain, **kwds)

def pseudoHom(self, twist, codomain=None):
r"""
Return the pseudo-Hom space corresponding to given data.

INPUT:

- ``twist`` -- the twisting morphism or the twisting derivation

- ``codomain`` -- (default: ``None``) the codomain of the pseudo
morphisms; if ``None``, the codomain is the same as the domain

EXAMPLES::

sage: F = GF(25)
sage: Frob = F.frobenius_endomorphism()
sage: M = F^2
sage: M.pseudoHom(Frob)
Set of Pseudoendomorphisms (twisted by z2 |--> z2^5) of Vector space of dimension 2 over Finite Field in z2 of size 5^2

.. SEEALSO::

:meth:`pseudohom`
"""
from sage.modules.free_module_pseudohomspace import FreeModulePseudoHomspace
if codomain is None:
codomain = self
return FreeModulePseudoHomspace(self, codomain, twist)

def pseudohom(self, f, twist, codomain=None, side="left"):
r"""
Return the pseudohomomorphism corresponding to the given data.

We recall that, given two `R`-modules `M` and `M'` together with
a ring homomorphism `\theta: R \to R` and a `\theta`-derivation,
`\delta: R \to R` (that is, a map such that
`\delta(xy) = \theta(x)\delta(y) + \delta(x)y`), a
pseudomorphism `f : M \to M'` is an additive map such that

.. MATH::

f(\lambda x) = \theta(\lambda) f(x) + \delta(\lambda) x

When `\delta` is nonzero, this requires that `M` coerces into `M'`.

.. NOTE::

Internally, pseudomorphisms are represented by matrices with
coefficient in the base ring `R`. See class
:class:`sage.modules.free_module_pseudomorphism.FreeModulePseudoMorphism`
for details.

INPUT:

- ``f`` -- a matrix (or any other data) defining the
pseudomorphism

- ``twist`` -- the twisting morphism or the twisting derivation
(if a derivation is given, the corresponding morphism `\theta`
is automatically infered;
see also :class:`sage.rings.polynomial.ore_polynomial_ring.OrePolynomialRing`)

- ``codomain`` -- (default: ``None``) the codomain of the pseudo
morphisms; if ``None``, the codomain is the same than the domain

- ``side`` -- (default: ``left``) side of the vectors acted on by
the matrix

EXAMPLES::

sage: K.<z> = GF(5^5)
sage: Frob = K.frobenius_endomorphism()
sage: V = K^2; W = K^3
sage: f = V.pseudohom([[1, z, z^2], [1, z^2, z^4]], Frob, codomain=W)
sage: f
Free module pseudomorphism (twisted by z |--> z^5) defined by the matrix
[ 1 z z^2]
[ 1 z^2 z^4]
Domain: Vector space of dimension 2 over Finite Field in z of size 5^5
Codomain: Vector space of dimension 3 over Finite Field in z of size 5^5

We check that `f` is indeed semi-linear::

sage: v = V([z+1, z+2])
sage: f(z*v)
(2*z^2 + z + 4, z^4 + 2*z^3 + 3*z^2 + z, 4*z^4 + 2*z^2 + 3*z + 2)
sage: z^5 * f(v)
(2*z^2 + z + 4, z^4 + 2*z^3 + 3*z^2 + z, 4*z^4 + 2*z^2 + 3*z + 2)

An example with a derivation::

sage: R.<t> = ZZ[]
sage: d = R.derivation()
sage: M = R^2
sage: Nabla = M.pseudohom([[1, t], [t^2, t^3]], d, side='right')
sage: Nabla
Free module pseudomorphism (twisted by d/dt) defined as left-multiplication by the matrix
[ 1 t]
[t^2 t^3]
Domain: Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in t over Integer Ring
Codomain: Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in t over Integer Ring

sage: v = M([1,1])
sage: Nabla(v)
(t + 1, t^3 + t^2)
sage: Nabla(t*v)
(t^2 + t + 1, t^4 + t^3 + 1)
sage: Nabla(t*v) == t * Nabla(v) + v
True

If the twisting derivation is not zero, the domain must
coerce into the codomain::

sage: N = R^3
sage: M.pseudohom([[1, t, t^2], [1, t^2, t^4]], d, codomain=N)
Traceback (most recent call last):
...
ValueError: the domain does not coerce into the codomain

.. SEEALSO::

:meth:`pseudoHom`
"""
H = self.pseudoHom(twist, codomain)
return H(f, side)

def inner_product_matrix(self):
"""
Return the default identity inner product matrix associated to this
Expand Down
Loading
Loading