Skip to content

Commit

Permalink
Doing reviewer suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
tscrim committed Jun 20, 2024
1 parent 754a711 commit 7f1f610
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 34 deletions.
32 changes: 16 additions & 16 deletions src/sage/algebras/lie_algebras/bgg_dual_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
"""
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
"""
Expand Down Expand Up @@ -679,7 +679,7 @@ def _construct_next_level(self):
.. TODO::
Avoid unnecessary computations by using the corresponding
(combinastorial) crystal.
(combinatorial) crystal.
EXAMPLES::
Expand Down Expand Up @@ -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]))
<class 'sage.algebras.lie_algebras.bgg_dual_module.FiniteDimensionalSimpleModule_with_category'>
sage: type(g.simple_module(La[1]-La[2]))
sage: type(g.simple_module(La[1] - La[2]))
<class 'sage.algebras.lie_algebras.bgg_dual_module.SimpleModule_with_category'>
sage: type(g.simple_module(La[1]+3/2*La[2]))
sage: type(g.simple_module(La[1] + 3/2*La[2]))
<class 'sage.algebras.lie_algebras.bgg_dual_module.SimpleModule_with_category'>
"""
if weight.is_dominant_weight():
Expand All @@ -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
Expand Down Expand Up @@ -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
"""
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions src/sage/algebras/lie_algebras/bgg_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand All @@ -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()
"""
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
return differentials, module_order
11 changes: 10 additions & 1 deletion src/sage/algebras/lie_algebras/poincare_birkhoff_witt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
8 changes: 4 additions & 4 deletions src/sage/algebras/lie_algebras/verma_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from sage.rings.rational_field import QQ


class ModulePrinting(object):
class ModulePrinting:
"""
Helper mixin class for printing the module vectors.
"""
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/triangular_kac_moody_algebras.py
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/root_system/root_lattice_realizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/root_system/weight_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down Expand Up @@ -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::
Expand Down
6 changes: 3 additions & 3 deletions src/sage/monoids/indexed_free_monoid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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):
"""
Expand Down

0 comments on commit 7f1f610

Please sign in to comment.