@@ -478,7 +478,7 @@ def __classcall_private__(cls, m, p, n):
478
478
return ColoredPermutations (m , n )
479
479
return super ().__classcall__ (cls , m , p , n )
480
480
481
- def __init__ (self , m , p , n ):
481
+ def __init__ (self , m , p , n ) -> None :
482
482
r"""
483
483
Initialize ``self``.
484
484
@@ -509,9 +509,7 @@ def __init__(self, m, p, n):
509
509
self ._C = IntegerModRing (self ._m )
510
510
self ._P = Permutations (self ._n )
511
511
512
- if (self ._p == 1 and (self ._m == 1 or self ._m == 2 )
513
- or (self ._p == 2 and self ._m == 2 )
514
- or (self ._n == 2 and self ._p == self ._m )):
512
+ if self ._p <= self ._m <= 2 or (self ._n == 2 and self ._p == self ._m ):
515
513
from sage .categories .finite_coxeter_groups import FiniteCoxeterGroups
516
514
category = FiniteCoxeterGroups ()
517
515
if not (self ._n == self ._m == self ._p == 2 ): # special case of type D_2
@@ -523,7 +521,7 @@ def __init__(self, m, p, n):
523
521
category = category .WellGenerated ()
524
522
Parent .__init__ (self , category = category )
525
523
526
- def _repr_ (self ):
524
+ def _repr_ (self ) -> str :
527
525
"""
528
526
Return a string representation of ``self``.
529
527
@@ -2922,7 +2920,7 @@ class SimpleModule(Representation_abstract, QuotientModuleWithBasis):
2922
2920
[0 0 0 0 0 0 1 0]
2923
2921
[0 0 0 0 0 0 0 1]
2924
2922
"""
2925
- def __init__ (self , specht_module ):
2923
+ def __init__ (self , specht_module ) -> None :
2926
2924
r"""
2927
2925
Initialize ``self``.
2928
2926
@@ -2932,18 +2930,19 @@ def __init__(self, specht_module):
2932
2930
sage: D = B4.simple_module([[2,1], [1]], GF(3))
2933
2931
sage: TestSuite(D).run()
2934
2932
"""
2935
- self ._diagram = specht_module ._diagram
2936
2933
p = specht_module .base_ring ().characteristic ()
2937
- if ( not all ( la . is_regular ( p ) for la in specht_module ._diagram )
2938
- or (p == 2 and specht_module . _diagram [0 ])):
2934
+ d = self . _diagram = specht_module ._diagram
2935
+ if (p == 2 and d [0 ]) or not all ( la . is_regular ( p ) for la in d ):
2939
2936
raise ValueError (f"the partition must be { p } -regular" )
2940
- Representation_abstract .__init__ (self , specht_module ._semigroup , specht_module ._side ,
2937
+ Representation_abstract .__init__ (self , specht_module ._semigroup ,
2938
+ specht_module ._side ,
2941
2939
algebra = specht_module ._semigroup_algebra )
2942
2940
cat = specht_module .category ()
2943
- QuotientModuleWithBasis .__init__ (self , specht_module .maximal_submodule (),
2941
+ QuotientModuleWithBasis .__init__ (self ,
2942
+ specht_module .maximal_submodule (),
2944
2943
cat , prefix = 'D' , bracket = '' )
2945
2944
2946
- def _repr_ (self ):
2945
+ def _repr_ (self ) -> str :
2947
2946
r"""
2948
2947
Return a string representation of ``self``.
2949
2948
@@ -2955,7 +2954,7 @@ def _repr_(self):
2955
2954
"""
2956
2955
return f"Simple module of { self ._diagram } over { self .base_ring ()} "
2957
2956
2958
- def _latex_ (self ):
2957
+ def _latex_ (self ) -> str :
2959
2958
r"""
2960
2959
Return a latex representation of ``self``.
2961
2960
0 commit comments