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,414 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ # sage.doctest: needs sage.rings.finite_rings sage.rings.number_field
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 16.9 Sage
40
+ ##
41
+ r"""
42
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
43
+
44
+ sage: F = QuadraticField(7)
45
+ sage: F
46
+ Number Field in a with defining polynomial x^2 - 7 with a = 2.645751311064591?
47
+
48
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
49
+
50
+ sage: root = F.gen(0)
51
+ sage: root^2
52
+ 7
53
+
54
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
55
+
56
+ sage: root
57
+ a
58
+
59
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
60
+
61
+ sage: (2*root)^3
62
+ 56*a
63
+
64
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
65
+
66
+ sage: F.<b> = QuadraticField(7)
67
+ sage: F
68
+ Number Field in b with defining polynomial x^2 - 7 with b = 2.645751311064591?
69
+
70
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
71
+
72
+ sage: b^2
73
+ 7
74
+
75
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
76
+
77
+ sage: (2*b)^3
78
+ 56*b
79
+
80
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
81
+
82
+ sage: C.<t> = CyclotomicField(8)
83
+ sage: C.random_element() # random
84
+ -2/11*t^2 + t - 1
85
+
86
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
87
+
88
+ sage: Z7 = Integers(7)
89
+ sage: Z9 = Integers(9)
90
+ sage: Q = QuadraticField(-11)
91
+ sage: F.<a> = FiniteField(3^2)
92
+ sage: P.<x> = Z7[]
93
+ sage: S.<f,g,h> = QuaternionAlgebra(-7, 3)
94
+
95
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
96
+
97
+ sage: QQ.is_exact()
98
+ True
99
+
100
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
101
+
102
+ sage: RR.is_exact()
103
+ False
104
+
105
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
106
+
107
+ sage: Z7.is_finite()
108
+ True
109
+
110
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
111
+
112
+ sage: Z7.is_finite()
113
+ True
114
+
115
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
116
+
117
+ sage: Z7.is_integral_domain()
118
+ True
119
+
120
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
121
+
122
+ sage: Z9.is_integral_domain()
123
+ False
124
+
125
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
126
+
127
+ sage: Z9.is_field()
128
+ False
129
+
130
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
131
+
132
+ sage: F.is_field()
133
+ True
134
+
135
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
136
+
137
+ sage: Q.is_field()
138
+ True
139
+
140
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
141
+
142
+ sage: Q.is_commutative()
143
+ True
144
+
145
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
146
+
147
+ sage: S.is_commutative()
148
+ False
149
+
150
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
151
+
152
+ sage: Z7.characteristic()
153
+ 7
154
+
155
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
156
+
157
+ sage: Z9.characteristic()
158
+ 9
159
+
160
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
161
+
162
+ sage: Q.characteristic()
163
+ 0
164
+
165
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
166
+
167
+ sage: F.characteristic()
168
+ 3
169
+
170
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
171
+
172
+ sage: P.characteristic()
173
+ 7
174
+
175
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
176
+
177
+ sage: S.characteristic()
178
+ 0
179
+
180
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
181
+
182
+ sage: b = Z9.zero(); b
183
+ 0
184
+
185
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
186
+
187
+ sage: b.parent()
188
+ Ring of integers modulo 9
189
+
190
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
191
+
192
+ sage: c = Q.zero(); c
193
+ 0
194
+
195
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
196
+
197
+ sage: c.parent()
198
+ Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I
199
+
200
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
201
+
202
+ sage: b == c
203
+ False
204
+
205
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
206
+
207
+ sage: d = Z9.one(); d
208
+ 1
209
+
210
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
211
+
212
+ sage: d.parent()
213
+ Ring of integers modulo 9
214
+
215
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
216
+
217
+ sage: e = Q.one(); e
218
+ 1
219
+
220
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
221
+
222
+ sage: e.parent()
223
+ Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I
224
+
225
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
226
+
227
+ sage: d == e
228
+ False
229
+
230
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
231
+
232
+ sage: QQ.is_subring(Q)
233
+ True
234
+
235
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
236
+
237
+ sage: QQ.is_subring(S)
238
+ True
239
+
240
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
241
+
242
+ sage: QQ.is_subring(F)
243
+ False
244
+
245
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
246
+
247
+ sage: three = Z9(3)
248
+ sage: three.is_unit()
249
+ False
250
+
251
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
252
+
253
+ sage: three*three
254
+ 0
255
+
256
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
257
+
258
+ sage: four = Z9(4)
259
+ sage: four.is_unit()
260
+ True
261
+
262
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
263
+
264
+ sage: g = four^-1; g
265
+ 7
266
+
267
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
268
+
269
+ sage: four*g
270
+ 1
271
+
272
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
273
+
274
+ sage: I1 = ZZ.ideal(4)
275
+ sage: I2 = 4*ZZ
276
+ sage: I3 = (-4)*ZZ
277
+ sage: I1 == I2
278
+ True
279
+
280
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
281
+
282
+ sage: I2 == I3
283
+ True
284
+
285
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
286
+
287
+ sage: Q = ZZ.quotient(I1); Q
288
+ Ring of integers modulo 4
289
+
290
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
291
+
292
+ sage: Q == Integers(4)
293
+ True
294
+
295
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
296
+
297
+ sage: Z7 = Integers(7)
298
+ sage: P.<y> = Z7[]
299
+ sage: M = P.ideal(y^2+4)
300
+ sage: Q = P.quotient(M)
301
+ sage: Q
302
+ Univariate Quotient Polynomial Ring in ybar over
303
+ Ring of integers modulo 7 with modulus y^2 + 4
304
+
305
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
306
+
307
+ sage: Q.random_element() # random
308
+ 2*ybar + 6
309
+
310
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
311
+
312
+ sage: Q.order()
313
+ 49
314
+
315
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
316
+
317
+ sage: Q.is_field()
318
+ True
319
+
320
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
321
+
322
+ sage: Q.<t> = P.quotient(M); Q
323
+ Univariate Quotient Polynomial Ring in t over
324
+ Ring of integers modulo 7 with modulus y^2 + 4
325
+
326
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
327
+
328
+ sage: Q.random_element() # random
329
+ 4*t + 6
330
+
331
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
332
+
333
+ sage: Z7 = Integers(7)
334
+ sage: P.<y> = Z7[]
335
+ sage: M = P.ideal(y^2+3)
336
+ sage: Q.<t> = P.quotient(M)
337
+ sage: Q
338
+ Univariate Quotient Polynomial Ring in t over
339
+ Ring of integers modulo 7 with modulus y^2 + 3
340
+
341
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
342
+
343
+ sage: Q.random_element() # random
344
+ 3*t + 1
345
+
346
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
347
+
348
+ sage: Q.order()
349
+ 49
350
+
351
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
352
+
353
+ sage: Q.is_field()
354
+ False
355
+
356
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
357
+
358
+ sage: Z7 = Integers(7)
359
+ sage: P.<y> = Z7[]
360
+ sage: M = P.ideal(y^2+4)
361
+ sage: N = P.ideal(y^2+3)
362
+ sage: M.is_maximal()
363
+ True
364
+
365
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
366
+
367
+ sage: N.is_maximal()
368
+ False
369
+
370
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
371
+
372
+ sage: M.is_prime()
373
+ True
374
+
375
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
376
+
377
+ sage: N.is_prime()
378
+ False
379
+
380
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
381
+
382
+ sage: H = Hom(ZZ, QQ)
383
+ sage: phi = H([1])
384
+ sage: phi
385
+ Ring morphism:
386
+ From: Integer Ring
387
+ To: Rational Field
388
+ Defn: 1 |--> 1
389
+
390
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
391
+
392
+ sage: phi.parent()
393
+ Set of Homomorphisms from Integer Ring to Rational Field
394
+
395
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
396
+
397
+ sage: a = 3; a
398
+ 3
399
+
400
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
401
+
402
+ sage: a.parent()
403
+ Integer Ring
404
+
405
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
406
+
407
+ sage: b = phi(3); b
408
+ 3
409
+
410
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
411
+
412
+ sage: b.parent()
413
+ Rational Field
414
+ """
@@ -0,0 +1,164 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ # sage.doctest: needs numpy sage.modules
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 1.5 Sage
40
+ ##
41
+ r"""
42
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
43
+
44
+
45
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
46
+
47
+
48
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
49
+
50
+ sage: a = 10
51
+ sage: b = 6
52
+ sage: b = b - 10
53
+ sage: a = a + 20
54
+ sage: a
55
+ 30
56
+
57
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
58
+
59
+ sage: b = b + 50
60
+
61
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
62
+
63
+ sage: b + 20
64
+ 66
65
+
66
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
67
+
68
+ sage: A = matrix([[3, 1], [5,2]]); A
69
+ [3 1]
70
+ [5 2]
71
+
72
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
73
+
74
+ sage: print(A); print(); print(A.inverse())
75
+ [3 1]
76
+ [5 2]
77
+ <BLANKLINE>
78
+ [ 2 -1]
79
+ [-5 3]
80
+
81
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
82
+
83
+ sage: A. # not tested
84
+
85
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
86
+
87
+ sage: A.inverse? # not tested
88
+
89
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
90
+
91
+ sage: A.inverse?? # not tested
92
+
93
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
94
+
95
+ sage: B = matrix([[2, 20], [5, 50]])
96
+ sage: B.inverse()
97
+ Traceback (most recent call last):
98
+ ...
99
+ ZeroDivisionError: matrix must be nonsingular
100
+
101
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
102
+
103
+
104
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
105
+
106
+ sage: zoo = ['snake', 'parrot', 'elephant', 'baboon', 'beetle']
107
+ sage: zoo
108
+ ['snake', 'parrot', 'elephant', 'baboon', 'beetle']
109
+
110
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
111
+
112
+ sage: zoo[2]
113
+ 'elephant'
114
+
115
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
116
+
117
+ sage: zoo.append('ostrich'); zoo
118
+ ['snake', 'parrot', 'elephant', 'baboon', 'beetle', 'ostrich']
119
+
120
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
121
+
122
+ sage: zoo.remove('parrot')
123
+ sage: zoo
124
+ ['snake', 'elephant', 'baboon', 'beetle', 'ostrich']
125
+
126
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
127
+
128
+ sage: mammals = zoo[1:3]
129
+ sage: mammals
130
+ ['elephant', 'baboon']
131
+
132
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
133
+
134
+ sage: newzoo = sorted(zoo)
135
+ sage: newzoo
136
+ ['baboon', 'beetle', 'elephant', 'ostrich', 'snake']
137
+
138
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
139
+
140
+ sage: zoo.sort()
141
+ sage: zoo
142
+ ['baboon', 'beetle', 'elephant', 'ostrich', 'snake']
143
+
144
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
145
+
146
+ sage: plurality_zoo = [animal+'s' for animal in zoo]
147
+ sage: plurality_zoo
148
+ ['baboons', 'beetles', 'elephants', 'ostrichs', 'snakes']
149
+
150
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
151
+
152
+ sage: dozen = srange(12); dozen
153
+ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
154
+
155
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
156
+
157
+ sage: teens = srange(13, 20); teens
158
+ [13, 14, 15, 16, 17, 18, 19]
159
+
160
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
161
+
162
+ sage: decades = srange(1900, 2000, 10); decades
163
+ [1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990]
164
+ """
@@ -0,0 +1,64 @@
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 13.6 Sage
40
+ ##
41
+ r"""
42
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
43
+
44
+ sage: S = SymmetricGroup(3)
45
+ sage: D = DihedralGroup(3)
46
+ sage: S.is_isomorphic(D)
47
+ True
48
+
49
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
50
+
51
+ sage: C3 = CyclicPermutationGroup(3)
52
+ sage: C5 = CyclicPermutationGroup(5)
53
+ sage: DP = direct_product_permgroups([C3, C5])
54
+ sage: C = CyclicPermutationGroup(15)
55
+ sage: DP.is_isomorphic(C)
56
+ True
57
+
58
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
59
+
60
+ sage: Q = QuaternionGroup()
61
+ sage: DI = DiCyclicGroup(2)
62
+ sage: Q.is_isomorphic(DI)
63
+ True
64
+ """