diff --git a/src/sage/features/__init__.py b/src/sage/features/__init__.py
index ea8fd6bdb05..e0530c1b8d7 100644
--- a/src/sage/features/__init__.py
+++ b/src/sage/features/__init__.py
@@ -393,26 +393,13 @@ def unhide(self):
EXAMPLES:
- PolyCyclic is an optional GAP package. The following test
- fails if it is hidden, regardless of whether it is installed
- or not::
-
- sage: from sage.features.gap import GapPackage
- sage: Polycyclic = GapPackage("polycyclic", spkg="gap_packages")
- sage: Polycyclic.hide()
- sage: libgap(AbelianGroup(3, [0,3,4], names="abc")) # needs sage.libs.gap # optional - gap_packages_polycyclic
- Traceback (most recent call last):
- ...
- FeatureNotPresentError: gap_package_polycyclic is not available.
- Feature `gap_package_polycyclic` is hidden.
- Use method `unhide` to make it available again.
-
- After unhiding the feature, the test should pass again if PolyCyclic
- is installed and loaded::
-
- sage: Polycyclic.unhide()
- sage: libgap(AbelianGroup(3, [0,3,4], names="abc")) # needs sage.libs.gap # optional - gap_packages_polycyclic
- Pcp-group with orders [ 0, 3, 4 ]
+ sage: from sage.features.sagemath import sage__plot
+ sage: sage__plot().hide()
+ sage: sage__plot().is_present()
+ FeatureTestResult('sage.plot', False)
+ sage: sage__plot().unhide() # needs sage.plot
+ sage: sage__plot().is_present() # needs sage.plot
+ FeatureTestResult('sage.plot', True)
"""
self._hidden = False
diff --git a/src/sage/features/gap.py b/src/sage/features/gap.py
index df5545e9c07..13b365969e8 100644
--- a/src/sage/features/gap.py
+++ b/src/sage/features/gap.py
@@ -75,11 +75,9 @@ def _is_present(self):
def all_features():
- return [GapPackage("atlasrep", spkg="gap_packages"),
- GapPackage("design", spkg="gap_packages"),
+ return [GapPackage("design", spkg="gap_packages"),
GapPackage("grape", spkg="gap_packages"),
GapPackage("guava", spkg="gap_packages"),
GapPackage("hap", spkg="gap_packages"),
- GapPackage("polycyclic", spkg="gap_packages"),
GapPackage("qpa", spkg="gap_packages"),
GapPackage("quagroup", spkg="gap_packages")]
diff --git a/src/sage/graphs/generators/distance_regular.pyx b/src/sage/graphs/generators/distance_regular.pyx
index f05e4d714f7..6cdbb70540f 100644
--- a/src/sage/graphs/generators/distance_regular.pyx
+++ b/src/sage/graphs/generators/distance_regular.pyx
@@ -103,8 +103,8 @@ def locally_GQ42_distance_transitive_graph():
EXAMPLES::
- sage: G = graphs.locally_GQ42_distance_transitive_graph() # optional - internet gap_package_atlasrep
- sage: G.is_distance_regular(True) # optional - internet gap_package_atlasrep
+ sage: G = graphs.locally_GQ42_distance_transitive_graph() # optional - internet
+ sage: G.is_distance_regular(True) # optional - internet
([45, 32, 12, 1, None], [None, 1, 6, 32, 45])
REFERENCES:
@@ -217,8 +217,8 @@ def graph_3O73():
EXAMPLES::
- sage: G = graphs.graph_3O73() # optional - internet gap_package_atlasrep
- sage: G.is_distance_regular(True) # optional - internet gap_package_atlasrep
+ sage: G = graphs.graph_3O73() # optional - internet
+ sage: G.is_distance_regular(True) # optional - internet
([117, 80, 24, 1, None], [None, 1, 12, 80, 117])
REFERENCES:
@@ -272,8 +272,8 @@ def J2Graph():
EXAMPLES::
- sage: G = graphs.J2Graph() # optional - internet gap_package_atlasrep
- sage: G.is_distance_regular(True) # optional - internet gap_package_atlasrep
+ sage: G = graphs.J2Graph() # optional - internet
+ sage: G.is_distance_regular(True) # optional - internet
([10, 8, 8, 2, None], [None, 1, 1, 4, 5])
REFERENCES:
@@ -295,8 +295,8 @@ def IvanovIvanovFaradjevGraph():
EXAMPLES::
- sage: G = graphs.IvanovIvanovFaradjevGraph() # optional - internet gap_package_atlasrep
- sage: G.is_distance_regular(True) # optional - internet gap_package_atlasrep
+ sage: G = graphs.IvanovIvanovFaradjevGraph() # optional - internet
+ sage: G.is_distance_regular(True) # optional - internet
([7, 6, 4, 4, 4, 1, 1, 1, None], [None, 1, 1, 1, 2, 4, 4, 6, 7])
REFERENCES:
@@ -1314,7 +1314,7 @@ def GeneralisedDodecagonGraph(const int s, const int t):
EXAMPLES::
- sage: # optional - gap_package_atlasrep internet
+ sage: # optional - internet
sage: G = graphs.GeneralisedDodecagonGraph(1, 5)
sage: G.is_distance_regular(True)
([6, 5, 5, 5, 5, 5, None], [None, 1, 1, 1, 1, 1, 6])
@@ -1339,7 +1339,7 @@ def GeneralisedDodecagonGraph(const int s, const int t):
Test all graphs of order `(1, q)`::
- sage: # optional - gap_package_atlasrep internet
+ sage: # optional - internet
sage: G = graphs.GeneralisedDodecagonGraph(1, 4)
sage: G.is_distance_regular(True)
([5, 4, 4, 4, 4, 4, None], [None, 1, 1, 1, 1, 1, 5])
@@ -1355,7 +1355,7 @@ def GeneralisedDodecagonGraph(const int s, const int t):
Now test all graphs of order `(q, 1)`::
- sage: # optional - gap_package_atlasrep internet
+ sage: # optional - internet
sage: G = graphs.GeneralisedDodecagonGraph(4, 1)
sage: G.is_distance_regular(True)
([8, 4, 4, 4, 4, 4, None], [None, 1, 1, 1, 1, 1, 2])
@@ -1426,8 +1426,8 @@ def GeneralisedOctagonGraph(const int s, const int t):
sage: G = graphs.GeneralisedOctagonGraph(1, 4)
sage: G.is_distance_regular(True)
([5, 4, 4, 4, None], [None, 1, 1, 1, 5])
- sage: G = graphs.GeneralisedOctagonGraph(2, 4) # optional - gap_package_atlasrep internet
- sage: G.is_distance_regular(True) # optional - gap_package_atlasrep internet
+ sage: G = graphs.GeneralisedOctagonGraph(2, 4) # optional - internet
+ sage: G.is_distance_regular(True) # optional - internet
([10, 8, 8, 8, None], [None, 1, 1, 1, 5])
sage: G = graphs.GeneralisedOctagonGraph(5, 1)
sage: G.is_distance_regular(True)
@@ -1534,8 +1534,8 @@ def GeneralisedHexagonGraph(const int s, const int t):
EXAMPLES::
sage: # needs sage.libs.gap
- sage: G = graphs.GeneralisedHexagonGraph(5, 5) # optional - gap_package_atlasrep internet
- sage: G.is_distance_regular(True) # optional - gap_package_atlasrep internet
+ sage: G = graphs.GeneralisedHexagonGraph(5, 5) # optional - internet
+ sage: G.is_distance_regular(True) # optional - internet
([30, 25, 25, None], [None, 1, 1, 6])
sage: G = graphs.GeneralisedHexagonGraph(7, 1)
sage: G.is_distance_regular(True)
@@ -1556,7 +1556,7 @@ def GeneralisedHexagonGraph(const int s, const int t):
TESTS::
- sage: # optional - gap_package_atlasrep internet
+ sage: # optional - internet
sage: G = graphs.GeneralisedHexagonGraph(4, 4)
sage: G.is_distance_regular(True)
([20, 16, 16, None], [None, 1, 1, 5])
@@ -1765,9 +1765,9 @@ def _line_graph_generalised_polygon(H):
sage: H = _line_graph_generalised_polygon(G)
sage: H.is_distance_regular(True)
([16, 8, 8, None], [None, 1, 1, 2])
- sage: G = graphs.GeneralisedHexagonGraph(3, 3) # optional - gap_package_atlasrep internet
- sage: H = _line_graph_generalised_polygon(G) # optional - gap_package_atlasrep internet
- sage: G.is_isomorphic(H) # optional - gap_package_atlasrep internet
+ sage: G = graphs.GeneralisedHexagonGraph(3, 3) # optional - internet
+ sage: H = _line_graph_generalised_polygon(G) # optional - internet
+ sage: G.is_isomorphic(H) # optional - internet
True
REFERENCES:
@@ -2149,7 +2149,7 @@ def graph_with_classical_parameters(int d, int b, alpha_in, beta_in, int gamma):
Symplectic Dual Polar Graph DSp(6, 2): Graph on 135 vertices
sage: graph_with_classical_parameters(3, 2, 2, 14, 7) # long time # needs sage.symbolic
Grassmann graph J_2(6, 3): Graph on 1395 vertices
- sage: graph_with_classical_parameters(3, -2, -2, 6, 6) # optional - gap_package_atlasrep internet
+ sage: graph_with_classical_parameters(3, -2, -2, 6, 6) # optional - internet
Generalised hexagon of order (2, 8): Graph on 819 vertices
"""
from sage.rings.rational import Rational
@@ -2732,7 +2732,7 @@ def distance_regular_graph(list arr, existence=False, check=True):
sage: graphs.distance_regular_graph([3, 2, 2, 1, 2, 1, 1, 2, 2, 3],
....: existence=True)
False
- sage: graphs.distance_regular_graph([18, 16, 16, 1, 1, 9]) # optional - internet gap_package_atlasrep
+ sage: graphs.distance_regular_graph([18, 16, 16, 1, 1, 9]) # optional - internet
Generalised hexagon of order (2, 8): Graph on 819 vertices
sage: # needs sage.combinat
diff --git a/src/sage/groups/abelian_gps/abelian_aut.py b/src/sage/groups/abelian_gps/abelian_aut.py
index b27f9bdb220..a8b1186793f 100644
--- a/src/sage/groups/abelian_gps/abelian_aut.py
+++ b/src/sage/groups/abelian_gps/abelian_aut.py
@@ -55,8 +55,8 @@
Only automorphism groups of finite abelian groups are supported::
- sage: G = AbelianGroupGap([0,2]) # optional - gap_package_polycyclic
- sage: autG = G.aut() # optional - gap_package_polycyclic
+ sage: G = AbelianGroupGap([0,2])
+ sage: autG = G.aut()
Traceback (most recent call last):
...
ValueError: only finite abelian groups are supported
diff --git a/src/sage/groups/abelian_gps/abelian_group.py b/src/sage/groups/abelian_gps/abelian_group.py
index 43dcb946122..13eb30cd406 100644
--- a/src/sage/groups/abelian_gps/abelian_group.py
+++ b/src/sage/groups/abelian_gps/abelian_group.py
@@ -583,8 +583,8 @@ def is_subgroup(left, right):
sage: G.is_subgroup(G)
True
- sage: H = G.subgroup([G.1]) # needs sage.libs.gap # optional - gap_package_polycyclic
- sage: H.is_subgroup(G) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: H = G.subgroup([G.1]) # needs sage.libs.gap
+ sage: H.is_subgroup(G) # needs sage.libs.gap
True
sage: G. = AbelianGroup(2)
@@ -858,21 +858,14 @@ def _libgap_(self):
sage: libgap(G) is libgap(G) # needs sage.libs.gap
True
-
- Requires the optional ``gap_packages`` for infinite groups::
-
sage: G = AbelianGroup(3, [0,3,4], names="abc")
- sage: libgap(G) # optional - gap_package_polycyclic
+ sage: libgap(G)
Pcp-group with orders [ 0, 3, 4 ]
"""
from sage.libs.gap.libgap import libgap
if self.is_finite():
return libgap.AbelianGroup(self.gens_orders())
-
- # Make sure to LoadPackage("Polycyclic") in gap
- from sage.features.gap import GapPackage
- GapPackage("polycyclic", spkg="gap_packages").require()
return libgap.AbelianPcpGroup(self.gens_orders())
def _gap_init_(self):
@@ -886,20 +879,13 @@ def _gap_init_(self):
'AbelianGroup([2, 3, 9])'
sage: gap(G) # needs sage.libs.gap
Group( [ f1, f2, f3 ] )
-
- Requires the optional ``gap_packages`` for infinite groups::
-
sage: G = AbelianGroup(3,[0,3,4], names="abc"); G
Multiplicative Abelian group isomorphic to Z x C3 x C4
- sage: G._gap_init_() # optional - gap_package_polycyclic
+ sage: G._gap_init_()
'AbelianPcpGroup([0, 3, 4])'
"""
if self.is_finite():
return 'AbelianGroup(%s)' % list(self.gens_orders())
-
- from sage.features.gap import GapPackage
- # Make sure to LoadPackage("Polycyclic") in gap
- GapPackage("polycyclic", spkg="gap_packages").require()
return 'AbelianPcpGroup(%s)' % list(self.gens_orders())
def gen(self, i=0):
@@ -1213,7 +1199,7 @@ def subgroup(self, gensH, names="f"):
EXAMPLES::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G. = AbelianGroup(3, [2,3,4]); G
Multiplicative Abelian group isomorphic to C2 x C3 x C4
sage: H = G.subgroup([a*b,a]); H
@@ -1368,7 +1354,7 @@ def number_of_subgroups(self, order=None):
0
sage: AbelianGroup([1,3,1]).number_of_subgroups(order=2)
0
- sage: AbelianGroup([1,3,0,1]).number_of_subgroups(order=3) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: AbelianGroup([1,3,0,1]).number_of_subgroups(order=3) # needs sage.libs.gap
1
sage: AbelianGroup([1,3,1]).number_of_subgroups(order=-2)
Traceback (most recent call last):
@@ -1458,12 +1444,12 @@ def subgroups(self, check=False):
EXAMPLES::
- sage: AbelianGroup([2,3]).subgroups() # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: AbelianGroup([2,3]).subgroups() # needs sage.libs.gap
[Multiplicative Abelian subgroup isomorphic to C2 x C3 generated by {f0*f1^2},
Multiplicative Abelian subgroup isomorphic to C2 generated by {f0},
Multiplicative Abelian subgroup isomorphic to C3 generated by {f1},
Trivial Abelian subgroup]
- sage: len(AbelianGroup([2,4,8]).subgroups()) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: len(AbelianGroup([2,4,8]).subgroups()) # needs sage.libs.gap
81
TESTS::
@@ -1474,10 +1460,10 @@ def subgroups(self, check=False):
Check that :issue:`14196` is fixed::
sage: B = AbelianGroup([1,2])
- sage: B.subgroups() # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: B.subgroups() # needs sage.libs.gap
[Multiplicative Abelian subgroup isomorphic to C2 generated by {f1},
Trivial Abelian subgroup]
- sage: B.subgroups(check=True) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: B.subgroups(check=True) # needs sage.libs.gap
[Multiplicative Abelian subgroup isomorphic to C2 generated by {f1},
Trivial Abelian subgroup]
"""
@@ -1541,10 +1527,10 @@ def subgroup_reduced(self, elts, verbose=False):
EXAMPLES::
sage: G = AbelianGroup([4,4])
- sage: G.subgroup( [ G([1,0]), G([1,2]) ]) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: G.subgroup( [ G([1,0]), G([1,2]) ]) # needs sage.libs.gap
Multiplicative Abelian subgroup isomorphic to C2 x C4
generated by {f0, f0*f1^2}
- sage: AbelianGroup([4,4]).subgroup_reduced( [ [1,0], [1,2] ]) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: AbelianGroup([4,4]).subgroup_reduced( [ [1,0], [1,2] ]) # needs sage.libs.gap
Multiplicative Abelian subgroup isomorphic to C2 x C4
generated by {f0^2*f1^2, f0^3}
"""
@@ -1575,7 +1561,7 @@ def torsion_subgroup(self, n=None):
EXAMPLES::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G = AbelianGroup([2, 3])
sage: G.torsion_subgroup()
Multiplicative Abelian subgroup isomorphic to C2 x C3 generated
@@ -1594,7 +1580,7 @@ def torsion_subgroup(self, n=None):
::
sage: G = AbelianGroup([2, 2*3, 2*3*5, 0, 2*3*5*7, 2*3*5*7*11])
- sage: G.torsion_subgroup(5) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: G.torsion_subgroup(5) # needs sage.libs.gap
Multiplicative Abelian subgroup isomorphic to C5 x C5 x C5 generated by {f2^6, f4^42, f5^462}
"""
if n is None:
@@ -1627,7 +1613,7 @@ def __init__(self, ambient, gens, names="f", category=None):
"""
EXAMPLES::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: F = AbelianGroup(5, [30,64,729], names=list("abcde"))
sage: a,b,c,d,e = F.gens()
sage: F.subgroup([a^3,b])
@@ -1682,7 +1668,7 @@ def __init__(self, ambient, gens, names="f", category=None):
Infinite groups can also be handled::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G = AbelianGroup([3,4,0], names="abc")
sage: a,b,c = G.gens()
sage: F = G.subgroup([a, b^2, c]); F
@@ -1698,7 +1684,7 @@ def __init__(self, ambient, gens, names="f", category=None):
Testing issue :issue:`18863`::
sage: G = AbelianGroup(5,[2])
- sage: G.subgroup([prod(g^k for g,k in zip(G.gens(),[1,-2,3,-4,5]))]) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: G.subgroup([prod(g^k for g,k in zip(G.gens(),[1,-2,3,-4,5]))]) # needs sage.libs.gap
Multiplicative Abelian subgroup isomorphic to Z
generated by {f0*f1^-2*f2^3*f3^-4*f4}
"""
@@ -1736,7 +1722,7 @@ def __contains__(self, x):
EXAMPLES::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G. = AbelianGroup(2)
sage: A = G.subgroup([a])
sage: a in G
@@ -1748,7 +1734,7 @@ def __contains__(self, x):
Check that :issue:`32910` is fixed::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G. = AbelianGroup(2, [4, 576])
sage: Hgens = [a^2, a*b^2]
sage: H = G.subgroup(Hgens)
@@ -1757,7 +1743,7 @@ def __contains__(self, x):
Check that :issue:`31507` is fixed::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G = AbelianGroup(2, gens_orders=[16, 16])
sage: f0, f1 = G.gens()
sage: H = G.subgroup([f0*f1^3])
@@ -1766,8 +1752,8 @@ def __contains__(self, x):
sage: G. = AbelianGroup(2)
sage: Hgens = [a*b, a*b^-1]
- sage: H = G.subgroup(Hgens) # optional - gap_package_polycyclic
- sage: b^2 in H # optional - gap_package_polycyclic
+ sage: H = G.subgroup(Hgens)
+ sage: b^2 in H
True
"""
if not isinstance(x, AbelianGroupElement):
@@ -1795,7 +1781,7 @@ def ambient_group(self):
EXAMPLES::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G. = AbelianGroup([2,3,4])
sage: H = G.subgroup([a, b^2])
sage: H.ambient_group() is G
@@ -1820,7 +1806,7 @@ def equals(left, right):
EXAMPLES::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G = AbelianGroup(3, [2,3,4], names="abc"); G
Multiplicative Abelian group isomorphic to C2 x C3 x C4
sage: a,b,c = G.gens()
@@ -1862,8 +1848,8 @@ def _repr_(self):
sage: G. = AbelianGroup(2)
sage: G._repr_()
'Multiplicative Abelian group isomorphic to Z x Z'
- sage: A = G.subgroup([a]) # needs sage.libs.gap # optional - gap_package_polycyclic
- sage: A._repr_() # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: A = G.subgroup([a]) # needs sage.libs.gap
+ sage: A._repr_() # needs sage.libs.gap
'Multiplicative Abelian subgroup isomorphic to Z generated by {a}'
"""
eldv = self._abinvs
@@ -1885,7 +1871,7 @@ def gens(self) -> tuple:
EXAMPLES::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G. = AbelianGroup(2)
sage: A = G.subgroup([a])
sage: G.gens()
@@ -1901,7 +1887,7 @@ def gen(self, n):
EXAMPLES::
- sage: # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: # needs sage.libs.gap
sage: G. = AbelianGroup(2)
sage: A = G.subgroup([a])
sage: A.gen(0)
diff --git a/src/sage/groups/abelian_gps/abelian_group_gap.py b/src/sage/groups/abelian_gps/abelian_group_gap.py
index 9ce83a6e33c..4543eb45977 100644
--- a/src/sage/groups/abelian_gps/abelian_group_gap.py
+++ b/src/sage/groups/abelian_gps/abelian_group_gap.py
@@ -11,7 +11,7 @@
For infinite abelian groups we use the GAP package ``Polycyclic``::
- sage: AbelianGroupGap([3,0]) # optional - gap_package_polycyclic
+ sage: AbelianGroupGap([3,0])
Abelian group with gap, generator orders (3, 0)
AUTHORS:
@@ -183,9 +183,9 @@ def order(self):
sage: g = G.gens()[0]
sage: g.order()
4
- sage: G = AbelianGroupGap([0]) # optional - gap_package_polycyclic
- sage: g = G.gens()[0] # optional - gap_package_polycyclic
- sage: g.order() # optional - gap_package_polycyclic
+ sage: G = AbelianGroupGap([0])
+ sage: g = G.gens()[0]
+ sage: g.order()
+Infinity
"""
return self.gap().Order().sage()
@@ -197,8 +197,8 @@ class AbelianGroupElement_polycyclic(AbelianGroupElement_gap):
TESTS::
sage: from sage.groups.abelian_gps.abelian_group_gap import AbelianGroupGap
- sage: G = AbelianGroupGap([4,7,0]) # optional - gap_package_polycyclic
- sage: TestSuite(G.an_element()).run() # optional - gap_package_polycyclic
+ sage: G = AbelianGroupGap([4,7,0])
+ sage: TestSuite(G.an_element()).run()
"""
def exponents(self):
r"""
@@ -210,7 +210,6 @@ def exponents(self):
EXAMPLES::
- sage: # optional - gap_package_polycyclic
sage: from sage.groups.abelian_gps.abelian_group_gap import AbelianGroupGap
sage: G = AbelianGroupGap([4,7,0])
sage: gens = G.gens()
@@ -220,7 +219,6 @@ def exponents(self):
Efficiently handles very large groups::
- sage: # optional - gap_package_polycyclic
sage: G = AbelianGroupGap([2^30,5^30,0])
sage: f1, f2, f3 = G.gens()
sage: (f1^12345*f2^123456789).exponents()
@@ -616,7 +614,6 @@ def subgroup(self, gens):
sage: g * s
f2^2*f3*f5
- sage: # optional - gap_package_polycyclic
sage: G = AbelianGroupGap([3,4,0,2])
sage: gen = G.gens()[:2]
sage: S = G.subgroup(gen)
@@ -654,7 +651,7 @@ class AbelianGroupGap(AbelianGroup_gap):
Abelian group with gap, generator orders (3, 6)
sage: AbelianGroupGap([3,6,5])
Abelian group with gap, generator orders (3, 6, 5)
- sage: AbelianGroupGap([3,6,0]) # optional - gap_package_polycyclic
+ sage: AbelianGroupGap([3,6,0])
Abelian group with gap, generator orders (3, 6, 0)
.. WARNING::
@@ -781,7 +778,6 @@ def __init__(self, ambient, gens):
Check that we are in the correct category::
- sage: # optional - gap_package_polycyclic
sage: G = AbelianGroupGap([2,3,0])
sage: g = G.gens()
sage: H1 = G.subgroup([g[0],g[1]])
diff --git a/src/sage/groups/abelian_gps/abelian_group_morphism.py b/src/sage/groups/abelian_gps/abelian_group_morphism.py
index e4b7b82b42b..e56b1c68afd 100644
--- a/src/sage/groups/abelian_gps/abelian_group_morphism.py
+++ b/src/sage/groups/abelian_gps/abelian_group_morphism.py
@@ -59,14 +59,14 @@ class AbelianGroupMorphism(Morphism):
sage: x,y = H.gens()
sage: from sage.groups.abelian_gps.abelian_group_morphism import AbelianGroupMorphism
- sage: phi = AbelianGroupMorphism(H,G,[x,y],[a,b]) # optional - gap_package_polycyclic
+ sage: phi = AbelianGroupMorphism(H,G,[x,y],[a,b])
TESTS::
sage: G. = AbelianGroup(2,[2,3])
sage: H. = AbelianGroup(3,[2,3,4])
- sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b]) # optional - gap_package_polycyclic
- sage: Hom(G,H) == phi.parent() # optional - gap_package_polycyclic
+ sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b])
+ sage: Hom(G,H) == phi.parent()
True
AUTHORS:
@@ -126,11 +126,11 @@ def _libgap_(self):
sage: H = AbelianGroup(2,[2,3],names="xy"); H
Multiplicative Abelian group isomorphic to C2 x C3
sage: x,y = H.gens()
- sage: phi = AbelianGroupMorphism(H,G,[x,y],[a,b]) # optional - gap_package_polycyclic
- sage: libgap(phi) # optional - gap_package_polycyclic
+ sage: phi = AbelianGroupMorphism(H,G,[x,y],[a,b])
+ sage: libgap(phi)
[ f1, f2 ] -> [ f1, f2 ]
- sage: phi = AbelianGroupMorphism(H,G,[x,y],[a*c**2,b]) # optional - gap_package_polycyclic
- sage: libgap(phi) # optional - gap_package_polycyclic
+ sage: phi = AbelianGroupMorphism(H,G,[x,y],[a*c**2,b])
+ sage: libgap(phi)
[ f1, f2 ] -> [ f1*f4, f2 ]
"""
G = libgap(self.domain())
@@ -158,16 +158,16 @@ def kernel(self):
sage: G = AbelianGroup(2,[2,3],names="xy"); G
Multiplicative Abelian group isomorphic to C2 x C3
sage: x,y = G.gens()
- sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b]) # optional - gap_package_polycyclic
- sage: phi.kernel() # optional - gap_package_polycyclic
+ sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b])
+ sage: phi.kernel()
Group([ ])
sage: H = AbelianGroup(3,[2,2,2],names="abc")
sage: a,b,c = H.gens()
sage: G = AbelianGroup(2,[2,2],names="x")
sage: x,y = G.gens()
- sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,a]) # optional - gap_package_polycyclic
- sage: phi.kernel() # optional - gap_package_polycyclic
+ sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,a])
+ sage: phi.kernel()
Group([ f1*f2 ])
"""
return libgap(self).Kernel()
@@ -186,11 +186,11 @@ def image(self, S):
sage: G = AbelianGroup(2,[2,3],names="xy")
sage: x,y = G.gens()
- sage: subG = G.subgroup([x]) # optional - gap_package_polycyclic
+ sage: subG = G.subgroup([x])
sage: H = AbelianGroup(3,[2,3,4],names="abc")
sage: a,b,c = H.gens()
- sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b]) # optional - gap_package_polycyclic
- sage: phi.image(subG) # optional - gap_package_polycyclic
+ sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b])
+ sage: phi.image(subG)
Multiplicative Abelian subgroup isomorphic to C2 generated by {a}
"""
return self.codomain().subgroup([self(g) for g in S.gens()])
@@ -206,10 +206,10 @@ def _call_(self, g):
sage: a,b,c = H.gens()
sage: G = AbelianGroup(2, [2,3], names="xy")
sage: x,y = G.gens()
- sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b]) # optional - gap_package_polycyclic
- sage: phi(y*x) # optional - gap_package_polycyclic
+ sage: phi = AbelianGroupMorphism(G,H,[x,y],[a,b])
+ sage: phi(y*x)
a*b
- sage: phi(y^2) # optional - gap_package_polycyclic
+ sage: phi(y^2)
b^2
"""
# g.word_problem is faster in general than word_problem(g)
diff --git a/src/sage/groups/perm_gps/permgroup_named.py b/src/sage/groups/perm_gps/permgroup_named.py
index 20f2710a1ff..4ff30aa2124 100644
--- a/src/sage/groups/perm_gps/permgroup_named.py
+++ b/src/sage/groups/perm_gps/permgroup_named.py
@@ -1075,14 +1075,14 @@ def __init__(self, n):
EXAMPLES::
- sage: G = groups.permutation.Janko(1); G # optional - gap_package_atlasrep internet
+ sage: G = groups.permutation.Janko(1); G # optional - internet
Janko group J1 of order 175560 as a permutation group
TESTS::
- sage: G.category() # optional - gap_package_atlasrep internet
+ sage: G.category() # optional - internet
Category of finite enumerated permutation groups
- sage: TestSuite(G).run(skip=["_test_enumerated_set_contains", # optional - gap_package_atlasrep internet
+ sage: TestSuite(G).run(skip=["_test_enumerated_set_contains", # optional - internet
....: "_test_enumerated_set_iter_list"])
"""
if n not in [1, 2, 3]:
@@ -1096,7 +1096,7 @@ def _repr_(self):
"""
EXAMPLES::
- sage: G = groups.permutation.Janko(1); G # optional - gap_package_atlasrep internet
+ sage: G = groups.permutation.Janko(1); G # optional - internet
Janko group J1 of order 175560 as a permutation group
"""
return "Janko group J%s of order %s as a permutation group" % (self._n, self.order())
@@ -1109,14 +1109,14 @@ def __init__(self):
EXAMPLES::
- sage: G = groups.permutation.SuzukiSporadic(); G # optional - gap_package_atlasrep internet
+ sage: G = groups.permutation.SuzukiSporadic(); G # optional - internet
Sporadic Suzuki group acting on 1782 points
TESTS::
- sage: G.category() # optional - gap_package_atlasrep internet
+ sage: G.category() # optional - internet
Category of finite enumerated permutation groups
- sage: TestSuite(G).run(skip=["_test_enumerated_set_contains", # optional - gap_package_atlasrep internet
+ sage: TestSuite(G).run(skip=["_test_enumerated_set_contains", # optional - internet
....: "_test_enumerated_set_iter_list"])
"""
libgap.load_package("atlasrep")
@@ -1126,7 +1126,7 @@ def _repr_(self):
"""
EXAMPLES::
- sage: G = groups.permutation.SuzukiSporadic(); G # optional - gap_package_atlasrep internet
+ sage: G = groups.permutation.SuzukiSporadic(); G # optional - internet
Sporadic Suzuki group acting on 1782 points
"""
return "Sporadic Suzuki group acting on 1782 points"
diff --git a/src/sage/modular/arithgroup/congroup_gamma0.py b/src/sage/modular/arithgroup/congroup_gamma0.py
index aecf1582f98..5c57f12a511 100644
--- a/src/sage/modular/arithgroup/congroup_gamma0.py
+++ b/src/sage/modular/arithgroup/congroup_gamma0.py
@@ -390,13 +390,13 @@ def gamma_h_subgroups(self):
EXAMPLES::
sage: G = Gamma0(11)
- sage: G.gamma_h_subgroups() # optional - gap_package_polycyclic
+ sage: G.gamma_h_subgroups()
[Congruence Subgroup Gamma0(11),
Congruence Subgroup Gamma_H(11) with H generated by [3],
Congruence Subgroup Gamma_H(11) with H generated by [10],
Congruence Subgroup Gamma1(11)]
sage: G = Gamma0(12)
- sage: G.gamma_h_subgroups() # optional - gap_package_polycyclic
+ sage: G.gamma_h_subgroups()
[Congruence Subgroup Gamma0(12),
Congruence Subgroup Gamma_H(12) with H generated by [7],
Congruence Subgroup Gamma_H(12) with H generated by [11],
diff --git a/src/sage/modular/arithgroup/congroup_gammaH.py b/src/sage/modular/arithgroup/congroup_gammaH.py
index 0b97c83ecf7..1decdf69e92 100644
--- a/src/sage/modular/arithgroup/congroup_gammaH.py
+++ b/src/sage/modular/arithgroup/congroup_gammaH.py
@@ -352,7 +352,7 @@ def __richcmp__(self, other, op):
sage: Gamma0(2) == Gamma1(2)
True
- sage: [x._list_of_elements_in_H() for x in sorted(Gamma0(24).gamma_h_subgroups())] # optional - gap_package_polycyclic
+ sage: [x._list_of_elements_in_H() for x in sorted(Gamma0(24).gamma_h_subgroups())]
[[1],
[1, 5],
[1, 7],
@@ -1055,7 +1055,7 @@ def index(self):
EXAMPLES::
- sage: [G.index() for G in Gamma0(40).gamma_h_subgroups()] # optional - gap_package_polycyclic
+ sage: [G.index() for G in Gamma0(40).gamma_h_subgroups()]
[72, 144, 144, 144, 144, 288, 288, 288, 288, 144, 288, 288, 576, 576, 144, 288, 288, 576, 576, 144, 288, 288, 576, 576, 288, 576, 1152]
"""
from .all import Gamma1
@@ -1068,7 +1068,7 @@ def nu2(self):
EXAMPLES::
- sage: [H.nu2() for n in [1..10] for H in Gamma0(n).gamma_h_subgroups()] # optional - gap_package_polycyclic
+ sage: [H.nu2() for n in [1..10] for H in Gamma0(n).gamma_h_subgroups()]
[1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0]
sage: GammaH(33,[2]).nu2()
0
@@ -1095,7 +1095,7 @@ def nu3(self):
EXAMPLES::
- sage: [H.nu3() for n in [1..10] for H in Gamma0(n).gamma_h_subgroups()] # optional - gap_package_polycyclic
+ sage: [H.nu3() for n in [1..10] for H in Gamma0(n).gamma_h_subgroups()]
[1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
sage: GammaH(33,[2]).nu3()
0
@@ -1279,7 +1279,7 @@ def image_mod_n(self):
TESTS::
- sage: for n in [2..20]: # optional - gap_package_polycyclic
+ sage: for n in [2..20]:
....: for g in Gamma0(n).gamma_h_subgroups():
....: G = g.image_mod_n()
....: assert G.order() == Gamma(n).index() / g.index()
diff --git a/src/sage/rings/finite_rings/integer_mod_ring.py b/src/sage/rings/finite_rings/integer_mod_ring.py
index 177dd28460a..5c7aa77b237 100644
--- a/src/sage/rings/finite_rings/integer_mod_ring.py
+++ b/src/sage/rings/finite_rings/integer_mod_ring.py
@@ -617,7 +617,7 @@ def multiplicative_subgroups(self):
EXAMPLES::
- sage: # optional - gap_package_polycyclic, needs sage.groups
+ sage: # needs sage.groups
sage: Integers(5).multiplicative_subgroups()
((2,), (4,), ())
sage: Integers(15).multiplicative_subgroups()
@@ -633,7 +633,7 @@ def multiplicative_subgroups(self):
((),)
sage: IntegerModRing(2).multiplicative_subgroups() # needs sage.groups
((),)
- sage: IntegerModRing(3).multiplicative_subgroups() # optional - gap_package_polycyclic, needs sage.groups
+ sage: IntegerModRing(3).multiplicative_subgroups() # needs sage.groups
((2,), ())
"""
return tuple(tuple(g.value() for g in H.gens())
diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py
index b1f15191d3c..d0f293c9e17 100644
--- a/src/sage/rings/number_field/number_field.py
+++ b/src/sage/rings/number_field/number_field.py
@@ -3391,7 +3391,7 @@ def dirichlet_group(self):
sage: K. = NumberField(x^3 + x^2 - 36*x - 4)
sage: K.conductor()
109
- sage: K.dirichlet_group() # optional - gap_package_polycyclic
+ sage: K.dirichlet_group()
[Dirichlet character modulo 109 of conductor 1 mapping 6 |--> 1,
Dirichlet character modulo 109 of conductor 109 mapping 6 |--> zeta3,
Dirichlet character modulo 109 of conductor 109 mapping 6 |--> -zeta3 - 1]
@@ -3399,16 +3399,16 @@ def dirichlet_group(self):
sage: # needs sage.modular
sage: K = CyclotomicField(44)
sage: L = K.subfields(5)[0][0]
- sage: X = L.dirichlet_group(); X # optional - gap_package_polycyclic
+ sage: X = L.dirichlet_group(); X
[Dirichlet character modulo 11 of conductor 1 mapping 2 |--> 1,
Dirichlet character modulo 11 of conductor 11 mapping 2 |--> zeta5,
Dirichlet character modulo 11 of conductor 11 mapping 2 |--> zeta5^2,
Dirichlet character modulo 11 of conductor 11 mapping 2 |--> zeta5^3,
Dirichlet character modulo 11 of conductor 11
mapping 2 |--> -zeta5^3 - zeta5^2 - zeta5 - 1]
- sage: X[4]^2 # optional - gap_package_polycyclic
+ sage: X[4]^2
Dirichlet character modulo 11 of conductor 11 mapping 2 |--> zeta5^3
- sage: X[4]^2 in X # optional - gap_package_polycyclic
+ sage: X[4]^2 in X
True
"""
# todo : turn this into an abelian group rather than a list.
@@ -12735,12 +12735,12 @@ def _splitting_classes_gens_(K, m, d):
sage: L = K.subfields(20)[0][0]
sage: L.conductor() # needs sage.groups
101
- sage: _splitting_classes_gens_(L,101,20) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: _splitting_classes_gens_(L,101,20) # needs sage.libs.gap
[95]
sage: K = CyclotomicField(44)
sage: L = K.subfields(4)[0][0]
- sage: _splitting_classes_gens_(L,44,4) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: _splitting_classes_gens_(L,44,4) # needs sage.libs.gap
[37]
sage: K = CyclotomicField(44)
@@ -12752,7 +12752,7 @@ def _splitting_classes_gens_(K, m, d):
with zeta44_0 = 3.837971894457990?
sage: L.conductor() # needs sage.groups
11
- sage: _splitting_classes_gens_(L,11,5) # needs sage.libs.gap # optional - gap_package_polycyclic
+ sage: _splitting_classes_gens_(L,11,5) # needs sage.libs.gap
[10]
"""
diff --git a/src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py b/src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py
index 5f8cd284b52..e54352bafe9 100644
--- a/src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py
+++ b/src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py
@@ -252,19 +252,19 @@
~~~~~~~~~~~~~~~~~~~~~~ ::
- sage: H = G.subgroup([a^2]) # optional - gap_package_polycyclic
+ sage: H = G.subgroup([a^2])
sage: H.order()
7
~~~~~~~~~~~~~~~~~~~~~~ ::
- sage: K = G.subgroup([a^12]) # optional - gap_package_polycyclic
+ sage: K = G.subgroup([a^12])
sage: K.order()
7
~~~~~~~~~~~~~~~~~~~~~~ ::
- sage: allsg = G.subgroups(); allsg # optional - gap_package_polycyclic
+ sage: allsg = G.subgroups(); allsg
[Multiplicative Abelian subgroup isomorphic to C2 x C7 generated by {a},
Multiplicative Abelian subgroup isomorphic to C7 generated by {a^2},
Multiplicative Abelian subgroup isomorphic to C2 generated by {a^7},
@@ -272,8 +272,8 @@
~~~~~~~~~~~~~~~~~~~~~~ ::
- sage: sub = allsg[2] # optional - gap_package_polycyclic
- sage: sub.order() # optional - gap_package_polycyclic
+ sage: sub = allsg[2]
+ sage: sub.order()
2
~~~~~~~~~~~~~~~~~~~~~~ ::