From 361a36b2980bdd54b7d102ddb01bfd51f8bcb2b4 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Tue, 28 May 2024 17:03:08 +0900 Subject: [PATCH] Reviewer changes. --- src/sage/categories/modules_with_basis.py | 17 +++++++++-------- .../combinat/symmetric_group_representations.py | 6 +++--- src/sage/modules/with_basis/representation.py | 15 ++++++++++----- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index e0f8545b853..5429a47a0d0 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -729,7 +729,7 @@ def echelon_form(self, elements, row_reduced=False, order=None): def submodule(self, gens, check=True, already_echelonized=False, unitriangular=False, support_order=None, category=None, - parent_class=None, *args, **opts): + submodule_class=None, *args, **opts): r""" The submodule spanned by a finite set of elements. @@ -746,7 +746,8 @@ def submodule(self, gens, check=True, already_echelonized=False, - ``support_order`` -- (optional) either something that can be converted into a tuple or a key function - ``category`` -- (optional) the category of the submodule - - ``parent_class`` -- (optional) the class of the parent to return + - ``submodule_class`` -- (optional) the class of the submodule + to return If ``already_echelonized`` is ``False``, then the generators are put in reduced echelon form using @@ -909,12 +910,12 @@ def submodule(self, gens, check=True, already_echelonized=False, if not already_echelonized: gens = self.echelon_form(gens, unitriangular, order=support_order) - if parent_class is None: - from sage.modules.with_basis.subquotient import SubmoduleWithBasis as parent_class - return parent_class(gens, ambient=self, - support_order=support_order, - unitriangular=unitriangular, - category=category, *args, **opts) + if submodule_class is None: + from sage.modules.with_basis.subquotient import SubmoduleWithBasis as submodule_class + return submodule_class(gens, ambient=self, + support_order=support_order, + unitriangular=unitriangular, + category=category, *args, **opts) def quotient_module(self, submodule, check=True, already_echelonized=False, category=None): r""" diff --git a/src/sage/combinat/symmetric_group_representations.py b/src/sage/combinat/symmetric_group_representations.py index eac238c79f7..6efc2f50414 100644 --- a/src/sage/combinat/symmetric_group_representations.py +++ b/src/sage/combinat/symmetric_group_representations.py @@ -1464,11 +1464,11 @@ def _acted_upon_(self, scalar, self_on_left=True): -gp1 - gp2 - gp3 sage: g = SGA.group().an_element(); g [4, 1, 2, 3] - sage: g * v + sage: g * v # indirect doctest gp3 - sage: x * v + sage: x * v # indirect doctest gp3 - sage: 2 * v + sage: 2 * v # indirect doctest gp1 + gp2 + gp3 """ P = self.parent() diff --git a/src/sage/modules/with_basis/representation.py b/src/sage/modules/with_basis/representation.py index f2cc0d24cf3..261d5379fef 100644 --- a/src/sage/modules/with_basis/representation.py +++ b/src/sage/modules/with_basis/representation.py @@ -33,7 +33,10 @@ class Representation_abstract: INPUT: - ``semigroup`` -- a semigroup - - ``base_ring`` -- a commutative ring + - ``side`` -- (default: ``"left"``) whether this is a + ``"left"`` or ``"right"`` representation + - ``algebra`` -- (default: ``semigroup.algebra(self.base_ring())``) + the semigroup algebra .. NOTE:: @@ -50,7 +53,7 @@ def __init__(self, semigroup, side, algebra=None): sage: T = G.trivial_representation() sage: TestSuite(T).run() - Verify that the dynamic mixin classes works:: + Verify that the dynamic mixin classes work:: sage: SGA = SymmetricGroupAlgebra(QQ, 3) sage: S21 = SGA.specht_module([2,1]) @@ -652,7 +655,9 @@ def subrepresentation(self, gens, check=True, already_echelonized=False, - ``gens`` -- the generators of the submodule - ``check`` -- ignored - - ``already_echelonized`` -- + - ``already_echelonized`` -- (default: ``False``) whether + the elements of ``gens`` are already in (not necessarily + reduced) echelon form - ``is_closed`` -- (keyword only; default: ``False``) whether ``gens`` already spans the subspace closed under the semigroup action @@ -780,8 +785,8 @@ def _composition_series_data(self): S_basis = [self.element_class(self, linear_combination((V._basis[i]._monomial_coefficients, coeff) for i, coeff in b._monomial_coefficients.items())) for b in S._basis] - # Lift the basis of W', which is W as a subrepr of ``self `` - # This is equivanlent to [b.lift() for b in series[cur+1].basis()] + # Lift the basis of W', which is W as a subrepresentation of ``self`` + # This is equivalent to [b.lift() for b in series[cur+1].basis()] Wp_basis = list(series[cur+1]._basis) Wp = self.subrepresentation(S_basis + Wp_basis, is_closed=True) series.insert(cur+1, Wp)