From 2305dd1953ccfc00a4b3a2976f651c7199656503 Mon Sep 17 00:00:00 2001 From: Xavier Caruso Date: Fri, 15 Nov 2024 08:00:43 +0100 Subject: [PATCH] formatting --- .../modules/free_module_pseudohomspace.py | 22 +++++++++++++------ .../modules/free_module_pseudomorphism.py | 10 +++++---- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/sage/modules/free_module_pseudohomspace.py b/src/sage/modules/free_module_pseudohomspace.py index fc6705f8f0b..2d1df9c99d8 100644 --- a/src/sage/modules/free_module_pseudohomspace.py +++ b/src/sage/modules/free_module_pseudohomspace.py @@ -106,7 +106,8 @@ def __init__(self, domain, codomain, ore): sage: Frob = F.frobenius_endomorphism() sage: M = F^2 sage: M.pseudoHom(Frob) - Set of Pseudoendomorphisms (twisted by z3 |--> z3^5) of Vector space of dimension 2 over Finite Field in z3 of size 5^3 + Set of Pseudoendomorphisms (twisted by z3 |--> z3^5) of + Vector space of dimension 2 over Finite Field in z3 of size 5^3 """ self._domain = domain self._codomain = codomain @@ -168,12 +169,15 @@ def _repr_(self): sage: Frob = Fq.frobenius_endomorphism() sage: V = Fq^2 sage: V.pseudoHom(Frob) # indirect doctest - Set of Pseudoendomorphisms (twisted by z3 |--> z3^7) of Vector space of dimension 2 over Finite Field in z3 of size 7^3 + Set of Pseudoendomorphisms (twisted by z3 |--> z3^7) of + Vector space of dimension 2 over Finite Field in z3 of size 7^3 :: sage: V.pseudoHom(Frob, codomain=Fq^3) # indirect doctest - Set of Pseudomorphism (twisted by z3 |--> z3^7) from Vector space of dimension 2 over Finite Field in z3 of size 7^3 to Vector space of dimension 3 over Finite Field in z3 of size 7^3 + Set of Pseudomorphism (twisted by z3 |--> z3^7) + from Vector space of dimension 2 over Finite Field in z3 of size 7^3 + to Vector space of dimension 3 over Finite Field in z3 of size 7^3 :: @@ -181,7 +185,8 @@ def _repr_(self): sage: d = A.derivation() sage: M = A^3 sage: M.pseudoHom(d) - Set of Pseudoendomorphisms (twisted by d/dt) of Ambient free module of rank 3 over the principal ideal domain Univariate Polynomial Ring in t over Rational Field + Set of Pseudoendomorphisms (twisted by d/dt) of Ambient free module of rank 3 over + the principal ideal domain Univariate Polynomial Ring in t over Rational Field """ twist = self._ore._repr_twist() if self.domain() is self.codomain(): @@ -245,15 +250,18 @@ def basis(self, side="left"): [1 0] [0 0] Domain: Vector space of dimension 2 over Finite Field in z3 of size 7^3 - Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3, Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix + Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3, + Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix [0 1] [0 0] Domain: Vector space of dimension 2 over Finite Field in z3 of size 7^3 - Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3, Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix + Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3, + Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix [0 0] [1 0] Domain: Vector space of dimension 2 over Finite Field in z3 of size 7^3 - Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3, Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix + Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3, + Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix [0 0] [0 1] Domain: Vector space of dimension 2 over Finite Field in z3 of size 7^3 diff --git a/src/sage/modules/free_module_pseudomorphism.py b/src/sage/modules/free_module_pseudomorphism.py index a830f422eb2..72b9f6de3b3 100644 --- a/src/sage/modules/free_module_pseudomorphism.py +++ b/src/sage/modules/free_module_pseudomorphism.py @@ -19,7 +19,7 @@ # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ -#################################################################################### +# **************************************************************************** from sage.categories.morphism import Morphism from sage.structure.richcmp import rich_to_bool, richcmp @@ -32,13 +32,13 @@ class FreeModulePseudoMorphism(Morphism): ring homomorphism, and `\delta: R \to R` a `\theta`-derivation, which is a map such that: - .. MATH: + .. MATH:: \delta(xy) = \theta(x)\delta(y) + \delta(x)y. A pseudomorphism `f : M \to M` is an additive map such that - .. MATH: + .. MATH:: f(\lambda x) = \theta(\lambda)f(x) + \delta(\lambda) x @@ -258,7 +258,7 @@ def matrix(self): Return the underlying matrix of this pseudomorphism. It is defined as the matrix `M` whose lines (resp. columns if - ``side`` is ``right``) are the coordinates of the images of + ``side`` is ``"right"``) are the coordinates of the images of the distinguished basis of the domain. EXAMPLES:: @@ -272,6 +272,8 @@ def matrix(self): [ 0 1 z^2] [z + 1 1 1] + :: + sage: e1, e2, e3 = M.basis() sage: f(e1) (1, z, 3)