From b446ebb496d45c4408aa949f98f855f962d9388a Mon Sep 17 00:00:00 2001
From: Dima Pasechnik
Date: Tue, 18 Dec 2018 19:10:08 +0000
Subject: adjust doctests to accommodate more GAP methods

src/doc/en/constructions/groups.rst  2 +
src/doc/en/prep/Quickstarts/AbstractAlgebra.rst  12 ++++++
src/sage/graphs/generators/families.py  19 ++++++++++
.../homomorphsageexercises.py  3 +
.../books/judsonabstractalgebra/normalsage.py  2 +
5 files changed, 19 insertions(+), 19 deletions()
diff git a/src/doc/en/constructions/groups.rst b/src/doc/en/constructions/groups.rst
index 0bc278b..c771783 100644
 a/src/doc/en/constructions/groups.rst
+++ b/src/doc/en/constructions/groups.rst
@@ 181,7 +181,7 @@ Here's another way, working more directly with GAP::
[ Alt( [ 1 .. 5 ] ), Group(()) ]
sage: G = gap.new("DihedralGroup( 10 )")
sage: G.NormalSubgroups()
 [ Group( of ... ), Group( [ f2 ] ), Group( [ f1, f2 ] ) ]
+ [ Group( [ f1, f2 ] ), Group( [ f2 ] ), Group( of ... ) ]
sage: print(gap.eval("G := SymmetricGroup( 4 )"))
Sym( [ 1 .. 4 ] )
sage: print(gap.eval("normal := NormalSubgroups( G );"))
diff git a/src/doc/en/prep/Quickstarts/AbstractAlgebra.rst b/src/doc/en/prep/Quickstarts/AbstractAlgebra.rst
index 042b786..041d6f9 100644
 a/src/doc/en/prep/Quickstarts/AbstractAlgebra.rst
+++ b/src/doc/en/prep/Quickstarts/AbstractAlgebra.rst
@@ 85,13 +85,13 @@ rather than just a list of numbers. This can be very powerful.
sage: for K in D.normal_subgroups():
....: print(K)
 Subgroup of (Dihedral group of order 16 as a permutation group) generated by [()]
 Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(1,5)(2,6)(3,7)(4,8)]
 Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)]
 Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(1,2)(3,8)(4,7)(5,6), (1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)]
 Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(2,8)(3,7)(4,6), (1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)]
 Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(1,2,3,4,5,6,7,8), (1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)]
Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(1,2,3,4,5,6,7,8), (1,8)(2,7)(3,6)(4,5)]
+ Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(1,2,3,4,5,6,7,8), (1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)]
+ Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8), (1,8)(2,7)(3,6)(4,5)]
+ Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(2,8)(3,7)(4,6), (1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)]
+ Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)]
+ Subgroup of (Dihedral group of order 16 as a permutation group) generated by [(1,5)(2,6)(3,7)(4,8)]
+ Subgroup of (Dihedral group of order 16 as a permutation group) generated by [()]
We can access specific subgroups if we know the generators as a
permutation group.
diff git a/src/sage/graphs/generators/families.py b/src/sage/graphs/generators/families.py
index 8e24817..ac7ea93 100644
 a/src/sage/graphs/generators/families.py
+++ b/src/sage/graphs/generators/families.py
@@ 3177,15 +3177,16 @@ def MathonPseudocyclicStronglyRegularGraph(t, G=None, L=None):
sage: ff = list(map(lambda y: (y[0]1,y[1]1),
....: Permutation(map(lambda x: 1+r.index(x^1), r)).cycle_tuples()[1:]))
sage: L = sum(i*(r[a]r[b]) for i,(a,b) in zip(range(1,len(ff)+1), ff)); L
 [ 0 1 1 2 3 4 2 4 3]
 [ 1 0 1 4 2 3 3 2 4]
 [1 1 0 3 4 2 4 3 2]
 [ 2 4 3 0 1 1 2 3 4]
 [ 3 2 4 1 0 1 4 2 3]
 [ 4 3 2 1 1 0 3 4 2]
 [2 3 4 2 4 3 0 1 1]
 [4 2 3 3 2 4 1 0 1]
 [3 4 2 4 3 2 1 1 0]
+ [ 0 1 1 3 2 4 3 4 2]
+ [1 0 1 4 3 2 2 3 4]
+ [ 1 1 0 2 4 3 4 2 3]
+ [ 3 4 2 0 1 1 3 2 4]
+ [ 2 3 4 1 0 1 4 3 2]
+ [ 4 2 3 1 1 0 2 4 3]
+ [3 2 4 3 4 2 0 1 1]
+ [4 3 2 2 3 4 1 0 1]
+ [2 4 3 4 2 3 1 1 0]
+
sage: G.relabel()
sage: G3x3=graphs.MathonPseudocyclicStronglyRegularGraph(2,G=G,L=L)
sage: G3x3.is_strongly_regular(parameters=True)
diff git a/src/sage/tests/books/judsonabstractalgebra/homomorphsageexercises.py b/src/sage/tests/books/judsonabstractalgebra/homomorphsageexercises.py
index d5ebaa6..84ed100 100644
 a/src/sage/tests/books/judsonabstractalgebra/homomorphsageexercises.py
+++ b/src/sage/tests/books/judsonabstractalgebra/homomorphsageexercises.py
@@ 60,7 +60,6 @@ r"""
~~~~~~~~~~~~~~~~~~~~~~ ::
sage: G = DihedralGroup(20)
 sage: [H.order() for H in G.normal_subgroups()]
+ sage: l=[H.order() for H in G.normal_subgroups()]; l.sort(); l
[1, 2, 4, 5, 10, 20, 20, 20, 40]

"""
diff git a/src/sage/tests/books/judsonabstractalgebra/normalsage.py b/src/sage/tests/books/judsonabstractalgebra/normalsage.py
index 16119fd..3db475d 100644
 a/src/sage/tests/books/judsonabstractalgebra/normalsage.py
+++ b/src/sage/tests/books/judsonabstractalgebra/normalsage.py
@@ 128,7 +128,7 @@ r"""
sage: G = DihedralGroup(8)
sage: N = G.normal_subgroups()
 sage: [H.order() for H in N]
+ sage: l=[H.order() for H in N]; l.sort(); l
[1, 2, 4, 8, 8, 8, 16]
"""

cgit v1.01gd88e