Skip to content

Commit

Permalink
Fixing all of the doctest failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
tscrim committed Jun 20, 2024
1 parent 3d399e9 commit 754a711
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
5 changes: 3 additions & 2 deletions src/sage/algebras/lie_algebras/bgg_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def module_order(self, i):
return []
return self._module_order[i]


@cached_function
def build_differentials(W):
r"""
Expand All @@ -164,10 +165,10 @@ def build_differentials(W):
EXAMPLES::
sage: from sage.algebras.lie_algebras.bgg_dual_module import build_differentials
sage: from sage.algebras.lie_algebras.bgg_resolution import build_differentials
sage: W = WeylGroup(['B', 2], prefix='s')
sage: D, O = build_differentials(W)
sage: unicode_art(D)
sage: D
{0: [],
1: [-1 1],
2: [1 1]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/lie_algebras/verma_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, vector_name='v'):
sage: from sage.algebras.lie_algebras.verma_module import ModulePrinting
sage: MP = ModulePrinting()
sage: TestSuite(MP).run()
sage: TestSuite(MP).run(skip="_test_pickling")
"""
self.__vector_name = vector_name

Expand Down
26 changes: 16 additions & 10 deletions src/sage/combinat/root_system/root_lattice_realizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3937,22 +3937,28 @@ def is_verma_dominant(self, positive=True):
sage: P = RootSystem(['A', 3]).weight_space()
sage: La = P.fundamental_weights()
sage: alphacheck = P.coroot_lattice().positive_roots()
sage: rho = P.rho()
sage: (La[1] + 2*La[2]).is_verma_dominant()
True
sage: (La[1] - 3/2*La[3]).is_verma_dominant()
True
sage: (La[1] - 3/2*La[3]).is_verma_dominant(positive=False)
sage: la = La[1] - 3/2*La[3] - rho
sage: la.is_verma_dominant()
True
sage: (1/2*La[1] - 3/2*La[3]).is_verma_dominant()
sage: la.is_verma_dominant(positive=False)
False
sage: alphacheck = P.coroot_lattice().positive_roots()
sage: [(1/2*La[1] - 3/2*La[3]).scalar(coroot) for coroot in alphacheck]
[1/2, 0, -3/2, 1/2, -3/2, -1]
sage: (1/2*La[1] - 3/2*La[3]).is_verma_dominant(positive=False)
sage: [(la+rho).scalar(coroot) for coroot in alphacheck]
[1, 0, -3/2, 1, -3/2, -1/2]
sage: mu = 1/2*La[1] - 3/2*La[3] - rho
sage: mu.is_verma_dominant()
False
sage: mu.is_verma_dominant(positive=False)
True
sage: [(mu+rho).scalar(coroot) for coroot in alphacheck]
[1/2, 0, -3/2, 1/2, -3/2, -1]
"""
alphacheck = self.parent().coroot_lattice().positive_roots()
wt = self + self.parent().rho()
P = self.parent()
alphacheck = P.coroot_lattice().positive_roots()
wt = self + P.rho()
if positive:
return not any((c := wt.scalar(ac)) in ZZ and c < 0 for ac in alphacheck)
return not any((c := wt.scalar(ac)) in ZZ and c > 0 for ac in alphacheck)
Expand Down
4 changes: 1 addition & 3 deletions src/sage/groups/indexed_free_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ def _element_constructor_(self, x=None):
sage: G({1: 3, -2: 12})
F[-2]^12*F[1]^3
sage: G(-5)
Traceback (most recent call last):
...
TypeError: unable to convert -5, use gen() instead
F[-5]
TESTS::
Expand Down

0 comments on commit 754a711

Please sign in to comment.