Skip to content

Commit 397882f

Browse files
committed
2 parents 57b159c + 4c7620a commit 397882f

File tree

4 files changed

+38
-15
lines changed

4 files changed

+38
-15
lines changed

src/sage/features/sagemath.py

+23
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,28 @@ def __init__(self):
7474
[PythonModule('sage.graphs.graph')])
7575

7676

77+
class sage__groups(JoinFeature):
78+
r"""
79+
A :class:`sage.features.Feature` describing the presence of ``sage.groups``.
80+
81+
EXAMPLES::
82+
83+
sage: from sage.features.sagemath import sage__groups
84+
sage: sage__groups().is_present() # optional - sage.groups
85+
FeatureTestResult('sage.groups', True)
86+
"""
87+
def __init__(self):
88+
r"""
89+
TESTS::
90+
91+
sage: from sage.features.sagemath import sage__groups
92+
sage: isinstance(sage__groups(), sage__groups)
93+
True
94+
"""
95+
JoinFeature.__init__(self, 'sage.groups',
96+
[PythonModule('sage.groups.perm_gps.permgroup')])
97+
98+
7799
class sage__plot(JoinFeature):
78100
r"""
79101
A :class:`sage.features.Feature` describing the presence of ``sage.plot``.
@@ -186,6 +208,7 @@ def all_features():
186208
return [sage__combinat(),
187209
sage__geometry__polyhedron(),
188210
sage__graphs(),
211+
sage__groups(),
189212
sage__plot(),
190213
sage__rings__number_field(),
191214
sage__rings__real_double(),

src/sage/structure/coerce.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1085,8 +1085,8 @@ cdef class CoercionModel:
10851085
sage: Zmod100 = Integers(100)
10861086
sage: cm.division_parent(Zmod100)
10871087
Ring of integers modulo 100
1088-
sage: S5 = SymmetricGroup(5)
1089-
sage: cm.division_parent(S5)
1088+
sage: S5 = SymmetricGroup(5) # optional - sage.groups
1089+
sage: cm.division_parent(S5) # optional - sage.groups
10901090
Symmetric group of order 5! as a permutation group
10911091
"""
10921092
try:

src/sage/structure/coerce_actions.pyx

+10-10
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ cdef class GenericAction(Action):
9797
sage: A.codomain()
9898
Set P^1(QQ) of all cusps
9999
100-
sage: S3 = SymmetricGroup(3)
101-
sage: QQxyz = QQ['x,y,z']
102-
sage: A = sage.structure.coerce_actions.ActOnAction(S3, QQxyz, False)
103-
sage: A.codomain()
100+
sage: S3 = SymmetricGroup(3) # optional - sage.groups
101+
sage: QQxyz = QQ['x,y,z'] # optional - sage.groups
102+
sage: A = sage.structure.coerce_actions.ActOnAction(S3, QQxyz, False) # optional - sage.groups
103+
sage: A.codomain() # optional - sage.groups
104104
Multivariate Polynomial Ring in x, y, z over Rational Field
105105
106106
"""
@@ -118,15 +118,15 @@ cdef class ActOnAction(GenericAction):
118118
"""
119119
TESTS::
120120
121-
sage: G = SymmetricGroup(3)
122-
sage: R.<x,y,z> = QQ[]
123-
sage: A = sage.structure.coerce_actions.ActOnAction(G, R, False)
124-
sage: A(x^2 + y - z, G((1,2)))
121+
sage: G = SymmetricGroup(3) # optional - sage.groups
122+
sage: R.<x,y,z> = QQ[] # optional - sage.groups
123+
sage: A = sage.structure.coerce_actions.ActOnAction(G, R, False) # optional - sage.groups
124+
sage: A(x^2 + y - z, G((1,2))) # optional - sage.groups
125125
y^2 + x - z
126-
sage: A(x+2*y+3*z, G((1,3,2)))
126+
sage: A(x+2*y+3*z, G((1,3,2))) # optional - sage.groups
127127
2*x + 3*y + z
128128
129-
sage: type(A)
129+
sage: type(A) # optional - sage.groups
130130
<... 'sage.structure.coerce_actions.ActOnAction'>
131131
"""
132132
return (<Element>g)._act_on_(x, self._is_left)

src/sage/structure/element.pyx

+3-3
Original file line numberDiff line numberDiff line change
@@ -2549,9 +2549,9 @@ cdef class MonoidElement(Element):
25492549
25502550
EXAMPLES::
25512551
2552-
sage: G = SymmetricGroup(4)
2553-
sage: g = G([2, 3, 4, 1])
2554-
sage: g.powers(4)
2552+
sage: G = SymmetricGroup(4) # optional - sage.groups
2553+
sage: g = G([2, 3, 4, 1]) # optional - sage.groups
2554+
sage: g.powers(4) # optional - sage.groups
25552555
[(), (1,2,3,4), (1,3)(2,4), (1,4,3,2)]
25562556
"""
25572557
if n < 0:

0 commit comments

Comments
 (0)