Skip to content

Commit 95a8ed3

Browse files
committed
Having is_submodule not error out for different ambient spaces.
1 parent af4eb55 commit 95a8ed3

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/sage/combinat/specht_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def frobenius_image(self):
8484
8585
EXAMPLES::
8686
87-
sage: s = SymmetricFunctions(QQ).s()
8887
sage: SM = Partition([2,2,1]).specht_module(QQ)
8988
sage: SM.frobenius_image()
9089
s[2, 2, 1]
@@ -99,6 +98,7 @@ def frobenius_image(self):
9998
sage: F = D.specht_module(QQ).frobenius_image(); F
10099
s[1, 1, 1, 1, 1] + 4*s[2, 1, 1, 1] + 5*s[2, 2, 1]
101100
+ 6*s[3, 1, 1] + 5*s[3, 2] + 4*s[4, 1] + s[5]
101+
sage: s = SymmetricFunctions(QQ).s()
102102
sage: F == sum(StandardTableaux(la).cardinality() * s[la]
103103
....: for la in Partitions(5))
104104
True

src/sage/modules/with_basis/subquotient.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,21 +394,19 @@ def is_submodule(self, other):
394394
sage: H.is_submodule(G)
395395
False
396396
397-
TESTS::
397+
Different ambient spaces::
398398
399399
sage: X = CombinatorialFreeModule(QQ, range(4)); x = X.basis()
400400
sage: F = X.submodule([x[0]-x[1], x[1]-x[2], x[2]-x[3]])
401401
sage: Y = CombinatorialFreeModule(QQ, range(6)); y = Y.basis()
402402
sage: G = Y.submodule([y[0]-y[1], y[1]-y[2], y[2]-y[3]])
403403
sage: F.is_submodule(G)
404-
Traceback (most recent call last):
405-
...
406-
ValueError: other (=...) should be a submodule of the same ambient space
404+
False
407405
"""
408406
if other is self._ambient:
409407
return True
410408
if not (isinstance(self, SubmoduleWithBasis) and self.ambient() is other.ambient()):
411-
raise ValueError("other (=%s) should be a submodule of the same ambient space" % other)
409+
return False # different ambient spaces
412410
if self not in ModulesWithBasis.FiniteDimensional:
413411
raise NotImplementedError("only implemented for finite dimensional submodules")
414412
if self.dimension() > other.dimension(): # quick dimension check

0 commit comments

Comments
 (0)