passagemath-repl 10.5.28__py3-none-any.whl → 10.5.30__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. passagemath_repl-10.5.30.data/data/share/jupyter/kernels/sagemath/kernel.json +1 -0
  2. passagemath_repl-10.5.30.data/data/share/jupyter/kernels/sagemath/logo-64x64.png +0 -0
  3. passagemath_repl-10.5.30.data/data/share/jupyter/kernels/sagemath/logo.svg +352 -0
  4. {passagemath_repl-10.5.28.dist-info → passagemath_repl-10.5.30.dist-info}/METADATA +3 -3
  5. {passagemath_repl-10.5.28.dist-info → passagemath_repl-10.5.30.dist-info}/RECORD +95 -24
  6. {passagemath_repl-10.5.28.dist-info → passagemath_repl-10.5.30.dist-info}/top_level.txt +1 -0
  7. sage/ext_data/all__sagemath_repl.py +1 -0
  8. sage/interfaces/all__sagemath_repl.py +1 -0
  9. sage/repl/ipython_kernel/install.py +6 -8
  10. sage/tests/books/__init__.py +2 -0
  11. sage/tests/books/computational-mathematics-with-sagemath/__init__.py +1 -0
  12. sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py +550 -0
  13. sage/tests/books/computational-mathematics-with-sagemath/combinat_doctest.py +1054 -0
  14. sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py +444 -0
  15. sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py +478 -0
  16. sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py +255 -0
  17. sage/tests/books/computational-mathematics-with-sagemath/graphtheory_doctest.py +419 -0
  18. sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py +291 -0
  19. sage/tests/books/computational-mathematics-with-sagemath/linalg_doctest.py +455 -0
  20. sage/tests/books/computational-mathematics-with-sagemath/linsolve_doctest.py +422 -0
  21. sage/tests/books/computational-mathematics-with-sagemath/lp_doctest.py +235 -0
  22. sage/tests/books/computational-mathematics-with-sagemath/mpoly_doctest.py +561 -0
  23. sage/tests/books/computational-mathematics-with-sagemath/nonlinear_doctest.py +491 -0
  24. sage/tests/books/computational-mathematics-with-sagemath/numbertheory_doctest.py +156 -0
  25. sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py +406 -0
  26. sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py +181 -0
  27. sage/tests/books/computational-mathematics-with-sagemath/programmation_doctest.py +663 -0
  28. sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py +393 -0
  29. sage/tests/books/computational-mathematics-with-sagemath/sol/__init__.py +1 -0
  30. sage/tests/books/computational-mathematics-with-sagemath/sol/calculus_doctest.py +265 -0
  31. sage/tests/books/computational-mathematics-with-sagemath/sol/combinat_doctest.py +218 -0
  32. sage/tests/books/computational-mathematics-with-sagemath/sol/domaines_doctest.py +60 -0
  33. sage/tests/books/computational-mathematics-with-sagemath/sol/float_doctest.py +142 -0
  34. sage/tests/books/computational-mathematics-with-sagemath/sol/graphique_doctest.py +106 -0
  35. sage/tests/books/computational-mathematics-with-sagemath/sol/graphtheory_doctest.py +54 -0
  36. sage/tests/books/computational-mathematics-with-sagemath/sol/integration_doctest.py +57 -0
  37. sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py +57 -0
  38. sage/tests/books/computational-mathematics-with-sagemath/sol/linsolve_doctest.py +26 -0
  39. sage/tests/books/computational-mathematics-with-sagemath/sol/lp_doctest.py +48 -0
  40. sage/tests/books/computational-mathematics-with-sagemath/sol/mpoly_doctest.py +116 -0
  41. sage/tests/books/computational-mathematics-with-sagemath/sol/nonlinear_doctest.py +112 -0
  42. sage/tests/books/computational-mathematics-with-sagemath/sol/numbertheory_doctest.py +168 -0
  43. sage/tests/books/computational-mathematics-with-sagemath/sol/polynomes_doctest.py +108 -0
  44. sage/tests/books/computational-mathematics-with-sagemath/sol/recequadiff_doctest.py +59 -0
  45. sage/tests/books/judson-abstract-algebra/__init__.py +1 -0
  46. sage/tests/books/judson-abstract-algebra/actions-sage-exercises.py +52 -0
  47. sage/tests/books/judson-abstract-algebra/actions-sage.py +174 -0
  48. sage/tests/books/judson-abstract-algebra/algcodes-sage.py +131 -0
  49. sage/tests/books/judson-abstract-algebra/boolean-sage.py +270 -0
  50. sage/tests/books/judson-abstract-algebra/cosets-sage-exercises.py +88 -0
  51. sage/tests/books/judson-abstract-algebra/cosets-sage.py +171 -0
  52. sage/tests/books/judson-abstract-algebra/crypt-sage.py +152 -0
  53. sage/tests/books/judson-abstract-algebra/cyclic-sage.py +451 -0
  54. sage/tests/books/judson-abstract-algebra/domains-sage.py +164 -0
  55. sage/tests/books/judson-abstract-algebra/fields-sage.py +300 -0
  56. sage/tests/books/judson-abstract-algebra/finite-sage.py +109 -0
  57. sage/tests/books/judson-abstract-algebra/galois-sage.py +485 -0
  58. sage/tests/books/judson-abstract-algebra/groups-sage.py +281 -0
  59. sage/tests/books/judson-abstract-algebra/homomorph-sage-exercises.py +66 -0
  60. sage/tests/books/judson-abstract-algebra/homomorph-sage.py +201 -0
  61. sage/tests/books/judson-abstract-algebra/integers-sage.py +198 -0
  62. sage/tests/books/judson-abstract-algebra/isomorph-sage.py +173 -0
  63. sage/tests/books/judson-abstract-algebra/normal-sage.py +134 -0
  64. sage/tests/books/judson-abstract-algebra/permute-sage.py +320 -0
  65. sage/tests/books/judson-abstract-algebra/poly-sage.py +301 -0
  66. sage/tests/books/judson-abstract-algebra/rings-sage.py +414 -0
  67. sage/tests/books/judson-abstract-algebra/sets-sage.py +164 -0
  68. sage/tests/books/judson-abstract-algebra/struct-sage.py +64 -0
  69. sage/tests/books/judson-abstract-algebra/sylow-sage.py +251 -0
  70. sage/tests/books/judson-abstract-algebra/vect-sage-exercises.py +49 -0
  71. sage/tests/books/judson-abstract-algebra/vect-sage.py +212 -0
  72. sage/tests/memcheck/__init__.py +1 -0
  73. sage/tests/memcheck/run_tests.py +25 -0
  74. sage/tests/memcheck/run_tests_in_valgrind.py +36 -0
  75. sage/tests/memcheck/symbolic_expression.py +12 -0
  76. sage/tests/memcheck/verify_no_leak.py +28 -0
  77. sage/tests/all.py +0 -0
  78. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-cachegrind +0 -0
  79. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-callgrind +0 -0
  80. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-cleaner +0 -0
  81. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-coverage +0 -0
  82. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-eval +0 -0
  83. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-fixdoctests +0 -0
  84. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-inline-fortran +0 -0
  85. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-ipynb2rst +0 -0
  86. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-ipython +0 -0
  87. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-massif +0 -0
  88. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-notebook +0 -0
  89. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-omega +0 -0
  90. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-preparse +0 -0
  91. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-run +0 -0
  92. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-run-cython +0 -0
  93. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-runtests +0 -0
  94. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-startuptime.py +0 -0
  95. {passagemath_repl-10.5.28.data → passagemath_repl-10.5.30.data}/scripts/sage-valgrind +0 -0
  96. {passagemath_repl-10.5.28.dist-info → passagemath_repl-10.5.30.dist-info}/WHEEL +0 -0
@@ -0,0 +1,281 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ # sage.doctest: needs sage.modules sage.groups sage.symbolics
3
+ ## Sage Doctest File ##
4
+ #**************************************#
5
+ #* Generated from PreTeXt source *#
6
+ #* on 2017-08-24T11:43:34-07:00 *#
7
+ #* *#
8
+ #* http://mathbook.pugetsound.edu *#
9
+ #* *#
10
+ #**************************************#
11
+ ##
12
+ """
13
+ Please contact Rob Beezer (beezer@ups.edu) with
14
+ any test failures here that need to be changed
15
+ as a result of changes accepted into Sage. You
16
+ may edit/change this file in any sensible way, so
17
+ that development work may procede. Your changes
18
+ may later be replaced by the authors of "Abstract
19
+ Algebra: Theory and Applications" when the text is
20
+ updated, and a replacement of this file is proposed
21
+ for review.
22
+ """
23
+ ##
24
+ ## To execute doctests in these files, run
25
+ ## $ $SAGE_ROOT/sage -t <directory-of-these-files>
26
+ ## or
27
+ ## $ $SAGE_ROOT/sage -t <a-single-file>
28
+ ##
29
+ ## Replace -t by "-tp n" for parallel testing,
30
+ ## "-tp 0" will use a sensible number of threads
31
+ ##
32
+ ## See: http://www.sagemath.org/doc/developer/doctesting.html
33
+ ## or run $ $SAGE_ROOT/sage --advanced for brief help
34
+ ##
35
+ ## Generated at 2017-08-24T11:43:34-07:00
36
+ ## From "Abstract Algebra"
37
+ ## At commit 26d3cac0b4047f4b8d6f737542be455606e2c4b4
38
+ ##
39
+ ## Section 3.7 Sage
40
+ ##
41
+ r"""
42
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
43
+
44
+ sage: Z8 = Integers(8)
45
+ sage: Z8
46
+ Ring of integers modulo 8
47
+
48
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
49
+
50
+ sage: Z8.list()
51
+ [0, 1, 2, 3, 4, 5, 6, 7]
52
+
53
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
54
+
55
+ sage: a = Z8.an_element(); a
56
+ 0
57
+
58
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
59
+
60
+ sage: a.parent()
61
+ Ring of integers modulo 8
62
+
63
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
64
+
65
+ sage: a = 6
66
+ sage: a
67
+ 6
68
+
69
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
70
+
71
+ sage: a.parent()
72
+ Integer Ring
73
+
74
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
75
+
76
+ sage: b = 7
77
+ sage: c = a + b; c
78
+ 13
79
+
80
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
81
+
82
+ sage: d = Z8(6)
83
+ sage: d
84
+ 6
85
+
86
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
87
+
88
+ sage: d.parent()
89
+ Ring of integers modulo 8
90
+
91
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
92
+
93
+ sage: e = Z8(7)
94
+ sage: f = d+e; f
95
+ 5
96
+
97
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
98
+
99
+ sage: g = Z8(85); g
100
+ 5
101
+
102
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
103
+
104
+ sage: f == g
105
+ True
106
+
107
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
108
+
109
+ sage: Z8.addition_table(names='elements')
110
+ + 0 1 2 3 4 5 6 7
111
+ +----------------
112
+ 0| 0 1 2 3 4 5 6 7
113
+ 1| 1 2 3 4 5 6 7 0
114
+ 2| 2 3 4 5 6 7 0 1
115
+ 3| 3 4 5 6 7 0 1 2
116
+ 4| 4 5 6 7 0 1 2 3
117
+ 5| 5 6 7 0 1 2 3 4
118
+ 6| 6 7 0 1 2 3 4 5
119
+ 7| 7 0 1 2 3 4 5 6
120
+
121
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
122
+
123
+ sage: triangle = SymmetricGroup(3)
124
+ sage: rho2 = triangle([3,1,2])
125
+ sage: rho2
126
+ (1,3,2)
127
+
128
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
129
+
130
+ sage: [rho2(x) for x in triangle.domain()]
131
+ [3, 1, 2]
132
+
133
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
134
+
135
+ sage: [[a(x) for x in triangle.domain()] for a in triangle]
136
+ [[1, 2, 3], [3, 1, 2], [2, 3, 1], [1, 3, 2], [3, 2, 1], [2, 1, 3]]
137
+
138
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
139
+
140
+ sage: mu1 = triangle([1,3,2])
141
+ sage: mu2 = triangle([3,2,1])
142
+ sage: mu3 = triangle([2,1,3])
143
+ sage: rho1 = triangle([2,3,1])
144
+ sage: product = rho1*mu1
145
+ sage: product == mu2
146
+ True
147
+
148
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
149
+
150
+ sage: [product(x) for x in triangle.domain()]
151
+ [3, 2, 1]
152
+
153
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
154
+
155
+ sage: rho1*mu1 == mu1*rho1
156
+ False
157
+
158
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
159
+
160
+ sage: mu1*rho1 == mu3
161
+ True
162
+
163
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
164
+
165
+ sage: triangle.cayley_table()
166
+ * a b c d e f
167
+ +------------
168
+ a| a b c d e f
169
+ b| b a d c f e
170
+ c| c e a f b d
171
+ d| d f b e a c
172
+ e| e c f a d b
173
+ f| f d e b c a
174
+
175
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
176
+
177
+ sage: triangle.cayley_table(names='elements')
178
+ * () (2,3) (1,2) (1,2,3) (1,3,2) (1,3)
179
+ +------------------------------------------------
180
+ ()| () (2,3) (1,2) (1,2,3) (1,3,2) (1,3)
181
+ (2,3)| (2,3) () (1,2,3) (1,2) (1,3) (1,3,2)
182
+ (1,2)| (1,2) (1,3,2) () (1,3) (2,3) (1,2,3)
183
+ (1,2,3)| (1,2,3) (1,3) (2,3) (1,3,2) () (1,2)
184
+ (1,3,2)| (1,3,2) (1,2) (1,3) () (1,2,3) (2,3)
185
+ (1,3)| (1,3) (1,2,3) (1,3,2) (2,3) (1,2) ()
186
+
187
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
188
+
189
+ sage: triangle.cayley_table(names=['id','u1','u3','r1','r2','u2'])
190
+ * id u1 u3 r1 r2 u2
191
+ +------------------
192
+ id| id u1 u3 r1 r2 u2
193
+ u1| u1 id r1 u3 u2 r2
194
+ u3| u3 r2 id u2 u1 r1
195
+ r1| r1 u2 u1 r2 id u3
196
+ r2| r2 u3 u2 id r1 u1
197
+ u2| u2 r1 r2 u1 u3 id
198
+
199
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
200
+
201
+ sage: Q = QuaternionGroup()
202
+ sage: [[a(x) for x in Q.domain()] for a in Q]
203
+ [[1, 2, 3, 4, 5, 6, 7, 8],
204
+ [3, 4, 1, 2, 7, 8, 5, 6],
205
+ [4, 1, 2, 3, 8, 5, 6, 7],
206
+ [2, 3, 4, 1, 6, 7, 8, 5],
207
+ [7, 6, 5, 8, 1, 4, 3, 2],
208
+ [5, 8, 7, 6, 3, 2, 1, 4],
209
+ [8, 7, 6, 5, 2, 1, 4, 3],
210
+ [6, 5, 8, 7, 4, 3, 2, 1]]
211
+
212
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
213
+
214
+ sage: Q.cayley_table()
215
+ * a b c d e f g h
216
+ +----------------
217
+ a| a b c d e f g h
218
+ b| b c d a h e f g
219
+ c| c d a b g h e f
220
+ d| d a b c f g h e
221
+ e| e f g h c d a b
222
+ f| f g h e b c d a
223
+ g| g h e f a b c d
224
+ h| h e f g d a b c
225
+
226
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
227
+
228
+ sage: id = Q.identity()
229
+ sage: [id(x) for x in Q.domain()]
230
+ [1, 2, 3, 4, 5, 6, 7, 8]
231
+
232
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
233
+
234
+ sage: minus_one = Q([3, 4, 1, 2, 7, 8, 5, 6])
235
+ sage: minus_one*minus_one == Q.identity()
236
+ True
237
+
238
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
239
+
240
+ sage: Q.is_finite()
241
+ True
242
+
243
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
244
+
245
+ sage: Q.order()
246
+ 8
247
+
248
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
249
+
250
+ sage: Q.is_abelian()
251
+ False
252
+
253
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
254
+
255
+ sage: S8 = SymmetricGroup(8)
256
+ sage: a = S8.random_element()
257
+ sage: [a(x) for x in S8.domain()] # random
258
+ [5, 2, 6, 4, 1, 8, 3, 7]
259
+
260
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
261
+
262
+ sage: S8.order()
263
+ 40320
264
+
265
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
266
+
267
+ sage: Q.is_subgroup(S8)
268
+ True
269
+
270
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
271
+
272
+ sage: H = [CC(1), CC(-1), CC(I), CC(-I)]
273
+ sage: CC.multiplication_table(elements=H,
274
+ ....: names=['1', '-1', 'i', '-i'])
275
+ * 1 -1 i -i
276
+ +------------
277
+ 1| 1 -1 i -i
278
+ -1| -1 1 -i i
279
+ i| i -i -1 1
280
+ -i| -i i 1 -1
281
+ """
@@ -0,0 +1,66 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ # sage.doctest: needs sage.groups
3
+ ## Sage Doctest File ##
4
+ #**************************************#
5
+ #* Generated from PreTeXt source *#
6
+ #* on 2017-08-24T11:43:34-07:00 *#
7
+ #* *#
8
+ #* http://mathbook.pugetsound.edu *#
9
+ #* *#
10
+ #**************************************#
11
+ ##
12
+ """
13
+ Please contact Rob Beezer (beezer@ups.edu) with
14
+ any test failures here that need to be changed
15
+ as a result of changes accepted into Sage. You
16
+ may edit/change this file in any sensible way, so
17
+ that development work may procede. Your changes
18
+ may later be replaced by the authors of "Abstract
19
+ Algebra: Theory and Applications" when the text is
20
+ updated, and a replacement of this file is proposed
21
+ for review.
22
+ """
23
+ ##
24
+ ## To execute doctests in these files, run
25
+ ## $ $SAGE_ROOT/sage -t <directory-of-these-files>
26
+ ## or
27
+ ## $ $SAGE_ROOT/sage -t <a-single-file>
28
+ ##
29
+ ## Replace -t by "-tp n" for parallel testing,
30
+ ## "-tp 0" will use a sensible number of threads
31
+ ##
32
+ ## See: http://www.sagemath.org/doc/developer/doctesting.html
33
+ ## or run $ $SAGE_ROOT/sage --advanced for brief help
34
+ ##
35
+ ## Generated at 2017-08-24T11:43:34-07:00
36
+ ## From "Abstract Algebra"
37
+ ## At commit 26d3cac0b4047f4b8d6f737542be455606e2c4b4
38
+ ##
39
+ ## Exercises 11.6 Sage Exercises
40
+ ##
41
+ r"""
42
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
43
+
44
+ sage: G = CyclicPermutationGroup(3)
45
+ sage: H = DihedralGroup(4)
46
+ sage: results = G.direct_product(H)
47
+ sage: phi = results[2]
48
+ sage: H.gens()
49
+ ((1,2,3,4), (1,4)(2,3))
50
+
51
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
52
+
53
+ sage: a = H.gen(0); a
54
+ (1,2,3,4)
55
+
56
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
57
+
58
+ sage: phi(a)
59
+ (4,5,6,7)
60
+
61
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
62
+
63
+ sage: G = DihedralGroup(20)
64
+ sage: l=[H.order() for H in G.normal_subgroups()]; l.sort(); l
65
+ [1, 2, 4, 5, 10, 20, 20, 20, 40]
66
+ """
@@ -0,0 +1,201 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ # sage.doctest: needs sage.groups
3
+ ## Sage Doctest File ##
4
+ #**************************************#
5
+ #* Generated from PreTeXt source *#
6
+ #* on 2017-08-24T11:43:34-07:00 *#
7
+ #* *#
8
+ #* http://mathbook.pugetsound.edu *#
9
+ #* *#
10
+ #**************************************#
11
+ ##
12
+ """
13
+ Please contact Rob Beezer (beezer@ups.edu) with
14
+ any test failures here that need to be changed
15
+ as a result of changes accepted into Sage. You
16
+ may edit/change this file in any sensible way, so
17
+ that development work may procede. Your changes
18
+ may later be replaced by the authors of "Abstract
19
+ Algebra: Theory and Applications" when the text is
20
+ updated, and a replacement of this file is proposed
21
+ for review.
22
+ """
23
+ ##
24
+ ## To execute doctests in these files, run
25
+ ## $ $SAGE_ROOT/sage -t <directory-of-these-files>
26
+ ## or
27
+ ## $ $SAGE_ROOT/sage -t <a-single-file>
28
+ ##
29
+ ## Replace -t by "-tp n" for parallel testing,
30
+ ## "-tp 0" will use a sensible number of threads
31
+ ##
32
+ ## See: http://www.sagemath.org/doc/developer/doctesting.html
33
+ ## or run $ $SAGE_ROOT/sage --advanced for brief help
34
+ ##
35
+ ## Generated at 2017-08-24T11:43:34-07:00
36
+ ## From "Abstract Algebra"
37
+ ## At commit 26d3cac0b4047f4b8d6f737542be455606e2c4b4
38
+ ##
39
+ ## Section 11.5 Sage
40
+ ##
41
+ r"""
42
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
43
+
44
+ sage: C12 = CyclicPermutationGroup(12)
45
+ sage: C20 = CyclicPermutationGroup(20)
46
+ sage: domain_gens = C12.gens()
47
+ sage: [g.order() for g in domain_gens]
48
+ [12]
49
+
50
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
51
+
52
+ sage: x = C20.gen(0)
53
+ sage: y = x^5
54
+ sage: y.order()
55
+ 4
56
+
57
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
58
+
59
+ sage: phi = PermutationGroupMorphism(C12, C20, [y])
60
+ sage: phi
61
+ Permutation group morphism:
62
+ From: Cyclic group of order 12 as a permutation group
63
+ To: Cyclic group of order 20 as a permutation group
64
+ Defn: [(1,2,3,4,5,6,7,8,9,10,11,12)] ->
65
+ [(1,6,11,16)(2,7,12,17)(3,8,13,18)(4,9,14,19)(5,10,15,20)]
66
+
67
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
68
+
69
+ sage: a = C12("(1,6,11,4,9,2,7,12,5,10,3,8)")
70
+ sage: phi(a)
71
+ (1,6,11,16)(2,7,12,17)(3,8,13,18)(4,9,14,19)(5,10,15,20)
72
+
73
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
74
+
75
+ sage: b = C12("(1,3,5,7,9,11)(2,4,6,8,10,12)")
76
+ sage: phi(b)
77
+ (1,11)(2,12)(3,13)(4,14)(5,15)(6,16)(7,17)(8,18)(9,19)(10,20)
78
+
79
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
80
+
81
+ sage: c = C12("(1,9,5)(2,10,6)(3,11,7)(4,12,8)")
82
+ sage: phi(c)
83
+ ()
84
+
85
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
86
+
87
+ sage: K = phi.kernel(); K
88
+ Subgroup generated by [(1,5,9)(2,6,10)(3,7,11)(4,8,12)]
89
+ of (Cyclic group of order 12 as a permutation group)
90
+
91
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
92
+
93
+ sage: Im = phi.image(C12); Im
94
+ Subgroup generated by
95
+ [(1,6,11,16)(2,7,12,17)(3,8,13,18)(4,9,14,19)(5,10,15,20)]
96
+ of (Cyclic group of order 20 as a permutation group)
97
+
98
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
99
+
100
+ sage: Im.is_isomorphic(C12.quotient(K))
101
+ True
102
+
103
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
104
+
105
+ sage: G = DihedralGroup(5)
106
+ sage: H = DihedralGroup(20)
107
+ sage: G.gens()
108
+ ((1,2,3,4,5), (1,5)(2,4))
109
+
110
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
111
+
112
+ sage: H.gens()
113
+ ((1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20),
114
+ (1,20)(2,19)(3,18)(4,17)(5,16)(6,15)(7,14)(8,13)(9,12)(10,11))
115
+
116
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
117
+
118
+ sage: x = H.gen(0)^4
119
+ sage: y = H.gen(1)
120
+ sage: rho = PermutationGroupMorphism(G, H, [x, y])
121
+ sage: rho.kernel()
122
+ Subgroup generated by
123
+ [()] of (Dihedral group of order 10 as a permutation group)
124
+
125
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
126
+
127
+ sage: Im = rho.image(G); Im
128
+ Subgroup generated by
129
+ [(1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20),
130
+ (1,20)(2,19)(3,18)(4,17)(5,16)(6,15)(7,14)(8,13)(9,12)(10,11)]
131
+ of (Dihedral group of order 40 as a permutation group)
132
+
133
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
134
+
135
+ sage: Im.is_subgroup(H)
136
+ True
137
+
138
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
139
+
140
+ sage: Im.is_isomorphic(G)
141
+ True
142
+
143
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
144
+
145
+ sage: G = CyclicPermutationGroup(7)
146
+ sage: H = CyclicPermutationGroup(4)
147
+ sage: tau = PermutationGroupMorphism_im_gens(G, H, H.gens())
148
+ sage: tau
149
+ Permutation group morphism:
150
+ From: Cyclic group of order 7 as a permutation group
151
+ To: Cyclic group of order 4 as a permutation group
152
+ Defn: [(1,2,3,4,5,6,7)] -> [(1,2,3,4)]
153
+
154
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
155
+
156
+ sage: tau.kernel()
157
+ Traceback (most recent call last):
158
+ ...
159
+ sage.libs.gap.util.GAPError: Error, no method found! Error, no 1st choice method found for `Kernel' on 1 arguments
160
+ The 1st argument is 'fail' which might point to an earlier problem
161
+
162
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
163
+
164
+ sage: G = CyclicPermutationGroup(3)
165
+ sage: H = DihedralGroup(4)
166
+ sage: results = G.direct_product(H)
167
+ sage: results[0]
168
+ Permutation Group with generators [(1,2,3), (4,5,6,7), (4,7)(5,6)]
169
+
170
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
171
+
172
+ sage: results[1]
173
+ Permutation group morphism:
174
+ From: Cyclic group of order 3 as a permutation group
175
+ To: Permutation Group with generators [(1,2,3), (4,5,6,7), (4,7)(5,6)]
176
+ Defn: Embedding( Group( [ (1,2,3), (4,5,6,7), (4,7)(5,6) ] ), 1 )
177
+
178
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
179
+
180
+ sage: results[2]
181
+ Permutation group morphism:
182
+ From: Dihedral group of order 8 as a permutation group
183
+ To: Permutation Group with generators [(1,2,3), (4,5,6,7), (4,7)(5,6)]
184
+ Defn: Embedding( Group( [ (1,2,3), (4,5,6,7), (4,7)(5,6) ] ), 2 )
185
+
186
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
187
+
188
+ sage: results[3]
189
+ Permutation group morphism:
190
+ From: Permutation Group with generators [(1,2,3), (4,5,6,7), (4,7)(5,6)]
191
+ To: Cyclic group of order 3 as a permutation group
192
+ Defn: Projection( Group( [ (1,2,3), (4,5,6,7), (4,7)(5,6) ] ), 1 )
193
+
194
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
195
+
196
+ sage: results[4]
197
+ Permutation group morphism:
198
+ From: Permutation Group with generators [(1,2,3), (4,5,6,7), (4,7)(5,6)]
199
+ To: Dihedral group of order 8 as a permutation group
200
+ Defn: Projection( Group( [ (1,2,3), (4,5,6,7), (4,7)(5,6) ] ), 2 )
201
+ """