diff --git a/src/sage/algebras/lie_algebras/bgg_dual_module.py b/src/sage/algebras/lie_algebras/bgg_dual_module.py index 55c51bb7bce..01517c4e51f 100644 --- a/src/sage/algebras/lie_algebras/bgg_dual_module.py +++ b/src/sage/algebras/lie_algebras/bgg_dual_module.py @@ -106,11 +106,11 @@ def __init__(self, module): sage: g = LieAlgebra(QQ, cartan_type=['B', 2]) sage: La = g.cartan_type().root_system().weight_space().fundamental_weights() - sage: M = g.verma_module(2*La[1]+La[2]) + sage: M = g.verma_module(2*La[1] + La[2]) sage: Mc = M.dual() sage: TestSuite(Mc).run() - sage: M = g.verma_module(2/3*La[1]-3/5*La[2]) + sage: M = g.verma_module(2/3*La[1] - 3/5*La[2]) sage: Mc = M.dual() sage: TestSuite(Mc).run() """ @@ -449,7 +449,7 @@ def __classcall__(cls, simple, prefix='f', **kwds): sage: g = LieAlgebra(QQ, cartan_type=['E', 6]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(La[1]+La[3]) + sage: L = g.simple_module(La[1] + La[3]) sage: from sage.algebras.lie_algebras.bgg_dual_module import SimpleModuleIndices sage: SimpleModuleIndices(L) is L._indices True @@ -464,10 +464,10 @@ def __init__(self, simple, prefix, category=None, **kwds): sage: g = LieAlgebra(QQ, cartan_type=['A', 2]) sage: La = g.cartan_type().root_system().weight_space().fundamental_weights() - sage: I = g.simple_module(2*La[1]+La[2]).indices() + sage: I = g.simple_module(2*La[1] + La[2]).indices() sage: TestSuite(I).run() - sage: I = g.simple_module(2*La[1]-1/3*La[2]).indices() + sage: I = g.simple_module(2*La[1] - 1/3*La[2]).indices() sage: TestSuite(I).run(max_runs=150) # long time """ self._simple = simple @@ -509,7 +509,7 @@ def _an_element_(self): sage: g = LieAlgebra(QQ, cartan_type=['E', 6]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: I = g.simple_module(2*La[1]+La[2]).indices() + sage: I = g.simple_module(2*La[1] + La[2]).indices() sage: I._an_element_() 1 """ @@ -679,7 +679,7 @@ def _construct_next_level(self): .. TODO:: Avoid unnecessary computations by using the corresponding - (combinastorial) crystal. + (combinatorial) crystal. EXAMPLES:: @@ -800,11 +800,11 @@ def __classcall_private__(cls, g, weight, *args, **kwds): sage: g = LieAlgebra(QQ, cartan_type=['E', 6]) sage: La = g.cartan_type().root_system().weight_space().fundamental_weights() - sage: type(g.simple_module(La[1]+La[2])) + sage: type(g.simple_module(La[1] + La[2])) - sage: type(g.simple_module(La[1]-La[2])) + sage: type(g.simple_module(La[1] - La[2])) - sage: type(g.simple_module(La[1]+3/2*La[2])) + sage: type(g.simple_module(La[1] + 3/2*La[2])) """ if weight.is_dominant_weight(): @@ -819,12 +819,12 @@ def __init__(self, g, weight, prefix='f', basis_key=None, **kwds): sage: g = LieAlgebra(QQ, cartan_type=['G', 2]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(La[1]+La[2]) + sage: L = g.simple_module(La[1] + La[2]) sage: TestSuite(L).run() sage: g = LieAlgebra(QQ, cartan_type=['A', 2]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(La[1]-La[2]) + sage: L = g.simple_module(La[1] - La[2]) sage: TestSuite(L).run() """ self._g = g @@ -988,7 +988,7 @@ def dual(self): sage: g = LieAlgebra(QQ, cartan_type=['B', 4]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(2*La[1]+3*La[4]) + sage: L = g.simple_module(2*La[1] + 3*La[4]) sage: L.dual() is L True """ @@ -1064,7 +1064,7 @@ def homogeneous_component_basis(self, mu): sage: g = LieAlgebra(QQ, cartan_type=['A', 2]) sage: P = g.cartan_type().root_system().weight_lattice() sage: La = P.fundamental_weights() - sage: la = La[1]+La[2] + sage: la = La[1] + La[2] sage: L = g.simple_module(la) sage: from itertools import product sage: al = P.simple_roots() @@ -1118,7 +1118,7 @@ def _acted_upon_(self, scalar, self_on_left=True): sage: g = LieAlgebra(QQ, cartan_type=['A', 2]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(La[1]+La[2]) + sage: L = g.simple_module(La[1] + La[2]) sage: v = L.highest_weight_vector(); v u[Lambda[1] + Lambda[2]] sage: f1, f2 = g.pbw_basis().f() @@ -1165,7 +1165,7 @@ def bgg_resolution(self): sage: g = LieAlgebra(QQ, cartan_type=['A', 2]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(La[1]+La[2]) + sage: L = g.simple_module(La[1] + La[2]) sage: L.bgg_resolution() BGG resolution of Simple module with highest weight Lambda[1] + Lambda[2] of Lie algebra of ['A', 2] in the Chevalley basis diff --git a/src/sage/algebras/lie_algebras/bgg_resolution.py b/src/sage/algebras/lie_algebras/bgg_resolution.py index 53bb9ce86da..89ccb3d2079 100644 --- a/src/sage/algebras/lie_algebras/bgg_resolution.py +++ b/src/sage/algebras/lie_algebras/bgg_resolution.py @@ -48,7 +48,7 @@ class BGGResolution(UniqueRepresentation, ChainComplex_class): sage: g = LieAlgebra(QQ, cartan_type=['A', 2]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(La[1]+4*La[2]) + sage: L = g.simple_module(La[1] + 4*La[2]) sage: res = L.bgg_resolution() sage: ascii_art(res) [ 1 -1] [1] @@ -57,7 +57,7 @@ class BGGResolution(UniqueRepresentation, ChainComplex_class): sage: g = LieAlgebra(QQ, cartan_type=['D', 4]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(La[1]+La[2]+3*La[3]) + sage: L = g.simple_module(La[1] + La[2] + 3*La[3]) sage: res = L.bgg_resolution() sage: w0 = WeylGroup(g.cartan_type(), prefix='s').long_element() sage: all(res.differential(i) * res.differential(i+1) == 0 @@ -72,7 +72,7 @@ def __init__(self, L): sage: g = LieAlgebra(QQ, cartan_type=['B', 2]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(La[1]+La[2]) + sage: L = g.simple_module(La[1] + La[2]) sage: res = L.bgg_resolution() sage: TestSuite(res).run() """ @@ -113,7 +113,7 @@ def simple_module(self): sage: g = LieAlgebra(QQ, cartan_type=['C', 2]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: L = g.simple_module(La[1]+La[2]) + sage: L = g.simple_module(La[1] + La[2]) sage: res = L.bgg_resolution() sage: res.simple_module() is L True @@ -226,4 +226,4 @@ def build_differentials(W): prev_mat = mat differentials[0] = matrix.zero(ZZ, 0, 1) differentials[maxlen+1] = matrix.zero(ZZ, 1, 0) - return differentials, module_order \ No newline at end of file + return differentials, module_order diff --git a/src/sage/algebras/lie_algebras/poincare_birkhoff_witt.py b/src/sage/algebras/lie_algebras/poincare_birkhoff_witt.py index 56be8304681..813a5a45293 100644 --- a/src/sage/algebras/lie_algebras/poincare_birkhoff_witt.py +++ b/src/sage/algebras/lie_algebras/poincare_birkhoff_witt.py @@ -657,7 +657,7 @@ def __init__(self, g, basis_key=None, *args, **kwds): sage: PBW = L.pbw_basis() sage: E, F, H = PBW.algebra_generators() sage: TestSuite(PBW).run(elements=[E, F, H]) - sage: TestSuite(PBW).run(elements=[E, F, H, E*F + H]) # long time + sage: TestSuite(PBW).run(elements=[E, F, H, E*F + H]) # long time """ super().__init__(g, basis_key, *args, **kwds) if self._basis_key == self._g._triangular_key: @@ -801,5 +801,14 @@ def transpose(self): EXAMPLES:: sage: g = LieAlgebra(QQ, cartan_type=['D', 4]) + sage: U = g.pbw_basis() + sage: e = U.e() + sage: f = U.f() + sage: elts = [e[1], e[1]*e[2], e[3]+e[4], e[1]*e[3]*e[4] + e[2], + ....: f[1], f[1]*f[2], f[3]+f[4], e[1]*e[3]*e[4] + e[2], + ....: e[1]*f[1], f[1]*e[1], (e[2]*f[2] - f[2]*e[2])^2] + sage: all((b*bp).transpose() == bp.transpose() * b.transpose() + ....: for b in elts for bp in elts) + True """ return self.parent().transpose(self) diff --git a/src/sage/algebras/lie_algebras/verma_module.py b/src/sage/algebras/lie_algebras/verma_module.py index ac5d0ceb113..f772e8bdce6 100644 --- a/src/sage/algebras/lie_algebras/verma_module.py +++ b/src/sage/algebras/lie_algebras/verma_module.py @@ -35,7 +35,7 @@ from sage.rings.rational_field import QQ -class ModulePrinting(object): +class ModulePrinting: """ Helper mixin class for printing the module vectors. """ @@ -1158,8 +1158,8 @@ def image(self): sage: g = LieAlgebra(QQ, cartan_type=['B', 2]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: M = g.verma_module(La[1]+2*La[2]) - sage: Mp = g.verma_module(La[1]+3*La[2]) + sage: M = g.verma_module(La[1] + 2*La[2]) + sage: Mp = g.verma_module(La[1] + 3*La[2]) sage: phi = Hom(M, Mp).natural_map() sage: phi.image() Free module generated by {} over Rational Field @@ -1302,7 +1302,7 @@ def highest_weight_image(self): sage: g = LieAlgebra(QQ, cartan_type=['C', 3]) sage: La = g.cartan_type().root_system().weight_lattice().fundamental_weights() - sage: M = g.verma_module(La[1]+2*La[3]) + sage: M = g.verma_module(La[1] + 2*La[3]) sage: Mc = M.dual() sage: H = Hom(M, Mc) sage: H.highest_weight_image() diff --git a/src/sage/categories/triangular_kac_moody_algebras.py b/src/sage/categories/triangular_kac_moody_algebras.py index 40c382c8a9b..677b20e06f4 100644 --- a/src/sage/categories/triangular_kac_moody_algebras.py +++ b/src/sage/categories/triangular_kac_moody_algebras.py @@ -422,7 +422,7 @@ def transpose(self): The transpose `\tau` is the map that sends the root basis elements `e_{\alpha} \leftrightarrow e_{-\alpha}` and fixes the Cartan subalgebra `h_{\alpha}`. It is an anti-involution - in the sense `[\tau(a), \tau(b)] = \tau([a, b])`. + in the sense `[\tau(a), \tau(b)] = \tau([b, a])`. EXAMPLES:: diff --git a/src/sage/combinat/root_system/root_lattice_realizations.py b/src/sage/combinat/root_system/root_lattice_realizations.py index 2687aa8b1c4..435c2fcfc65 100644 --- a/src/sage/combinat/root_system/root_lattice_realizations.py +++ b/src/sage/combinat/root_system/root_lattice_realizations.py @@ -3922,8 +3922,8 @@ def is_verma_dominant(self, positive=True): \langle \lambda + \rho, \alpha^{\vee} \rangle \notin \ZZ_{<0} - for all positive roots `\alpha`. Note that this does *not* - imply that `\langle \lambda + \rho, \alpha^{\vee} \rangle \geq 0` + for all positive roots `\alpha`. Note that begin Verma dominant does + *not* imply that `\langle \lambda+\rho, \alpha^{\vee} \rangle \geq 0` for any positive root `\alpha`. This is used to determine if a Verma module is simple or projective. diff --git a/src/sage/combinat/root_system/weight_space.py b/src/sage/combinat/root_system/weight_space.py index fc30553fdec..fce5f57f94d 100644 --- a/src/sage/combinat/root_system/weight_space.py +++ b/src/sage/combinat/root_system/weight_space.py @@ -530,7 +530,7 @@ def is_dominant(self): sage: w.is_dominant() False - In the extended affine weight lattice, 'delta' is orthogonal to + In the extended affine weight lattice, ``'delta'`` is orthogonal to the positive coroots, so adding or subtracting it should not affect dominance:: @@ -563,7 +563,7 @@ def is_dominant_weight(self): sage: w.is_dominant_weight() False - In the extended affine weight lattice, 'delta' is orthogonal to + In the extended affine weight lattice, ``'delta'`` is orthogonal to the positive coroots, so adding or subtracting it should not affect dominance:: diff --git a/src/sage/monoids/indexed_free_monoid.py b/src/sage/monoids/indexed_free_monoid.py index 5ec7e0777eb..a50aa7cdf12 100644 --- a/src/sage/monoids/indexed_free_monoid.py +++ b/src/sage/monoids/indexed_free_monoid.py @@ -291,7 +291,7 @@ def support(self): try: return sorted(supp, key=print_options['sorting_key'], reverse=print_options['sorting_reverse']) - except Exception: # Sorting the output is a plus, but if we can't, no big deal + except Exception: # Sorting the output is a plus, but if we can't, no big deal return list(supp) def leading_support(self): @@ -527,7 +527,7 @@ def _sorted_items(self): try: v.sort(key=print_options['sorting_key'], reverse=print_options['sorting_reverse']) - except Exception: # Sorting the output is a plus, but if we can't, no big deal + except Exception: # Sorting the output is a plus, but if we can't, no big deal pass return v @@ -967,7 +967,7 @@ class IndexedFreeAbelianMonoid(IndexedMonoid): .. TODO:: Implement a subclass when the index sets is finite that utilizes - vectors or the polydict monomials with the index order is fixed. + vectors or the polydict monomials with the index order fixed. """ def _repr_(self): """