passagemath-repl 10.5.27__py3-none-any.whl → 10.5.29__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.29.data/data/share/jupyter/kernels/sagemath/kernel.json +1 -0
  2. passagemath_repl-10.5.29.data/data/share/jupyter/kernels/sagemath/logo-64x64.png +0 -0
  3. passagemath_repl-10.5.29.data/data/share/jupyter/kernels/sagemath/logo.svg +352 -0
  4. {passagemath_repl-10.5.27.dist-info → passagemath_repl-10.5.29.dist-info}/METADATA +38 -13
  5. {passagemath_repl-10.5.27.dist-info → passagemath_repl-10.5.29.dist-info}/RECORD +95 -24
  6. {passagemath_repl-10.5.27.dist-info → passagemath_repl-10.5.29.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 +549 -0
  13. sage/tests/books/computational-mathematics-with-sagemath/combinat_doctest.py +1053 -0
  14. sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py +443 -0
  15. sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py +477 -0
  16. sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py +254 -0
  17. sage/tests/books/computational-mathematics-with-sagemath/graphtheory_doctest.py +418 -0
  18. sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py +290 -0
  19. sage/tests/books/computational-mathematics-with-sagemath/linalg_doctest.py +454 -0
  20. sage/tests/books/computational-mathematics-with-sagemath/linsolve_doctest.py +421 -0
  21. sage/tests/books/computational-mathematics-with-sagemath/lp_doctest.py +234 -0
  22. sage/tests/books/computational-mathematics-with-sagemath/mpoly_doctest.py +560 -0
  23. sage/tests/books/computational-mathematics-with-sagemath/nonlinear_doctest.py +490 -0
  24. sage/tests/books/computational-mathematics-with-sagemath/numbertheory_doctest.py +155 -0
  25. sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py +405 -0
  26. sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py +180 -0
  27. sage/tests/books/computational-mathematics-with-sagemath/programmation_doctest.py +662 -0
  28. sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py +392 -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 +264 -0
  31. sage/tests/books/computational-mathematics-with-sagemath/sol/combinat_doctest.py +217 -0
  32. sage/tests/books/computational-mathematics-with-sagemath/sol/domaines_doctest.py +59 -0
  33. sage/tests/books/computational-mathematics-with-sagemath/sol/float_doctest.py +141 -0
  34. sage/tests/books/computational-mathematics-with-sagemath/sol/graphique_doctest.py +105 -0
  35. sage/tests/books/computational-mathematics-with-sagemath/sol/graphtheory_doctest.py +53 -0
  36. sage/tests/books/computational-mathematics-with-sagemath/sol/integration_doctest.py +56 -0
  37. sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py +56 -0
  38. sage/tests/books/computational-mathematics-with-sagemath/sol/linsolve_doctest.py +25 -0
  39. sage/tests/books/computational-mathematics-with-sagemath/sol/lp_doctest.py +47 -0
  40. sage/tests/books/computational-mathematics-with-sagemath/sol/mpoly_doctest.py +115 -0
  41. sage/tests/books/computational-mathematics-with-sagemath/sol/nonlinear_doctest.py +111 -0
  42. sage/tests/books/computational-mathematics-with-sagemath/sol/numbertheory_doctest.py +167 -0
  43. sage/tests/books/computational-mathematics-with-sagemath/sol/polynomes_doctest.py +107 -0
  44. sage/tests/books/computational-mathematics-with-sagemath/sol/recequadiff_doctest.py +58 -0
  45. sage/tests/books/judson-abstract-algebra/__init__.py +1 -0
  46. sage/tests/books/judson-abstract-algebra/actions-sage-exercises.py +51 -0
  47. sage/tests/books/judson-abstract-algebra/actions-sage.py +173 -0
  48. sage/tests/books/judson-abstract-algebra/algcodes-sage.py +130 -0
  49. sage/tests/books/judson-abstract-algebra/boolean-sage.py +269 -0
  50. sage/tests/books/judson-abstract-algebra/cosets-sage-exercises.py +87 -0
  51. sage/tests/books/judson-abstract-algebra/cosets-sage.py +170 -0
  52. sage/tests/books/judson-abstract-algebra/crypt-sage.py +151 -0
  53. sage/tests/books/judson-abstract-algebra/cyclic-sage.py +450 -0
  54. sage/tests/books/judson-abstract-algebra/domains-sage.py +163 -0
  55. sage/tests/books/judson-abstract-algebra/fields-sage.py +299 -0
  56. sage/tests/books/judson-abstract-algebra/finite-sage.py +108 -0
  57. sage/tests/books/judson-abstract-algebra/galois-sage.py +484 -0
  58. sage/tests/books/judson-abstract-algebra/groups-sage.py +280 -0
  59. sage/tests/books/judson-abstract-algebra/homomorph-sage-exercises.py +65 -0
  60. sage/tests/books/judson-abstract-algebra/homomorph-sage.py +200 -0
  61. sage/tests/books/judson-abstract-algebra/integers-sage.py +197 -0
  62. sage/tests/books/judson-abstract-algebra/isomorph-sage.py +172 -0
  63. sage/tests/books/judson-abstract-algebra/normal-sage.py +133 -0
  64. sage/tests/books/judson-abstract-algebra/permute-sage.py +319 -0
  65. sage/tests/books/judson-abstract-algebra/poly-sage.py +300 -0
  66. sage/tests/books/judson-abstract-algebra/rings-sage.py +413 -0
  67. sage/tests/books/judson-abstract-algebra/sets-sage.py +163 -0
  68. sage/tests/books/judson-abstract-algebra/struct-sage.py +63 -0
  69. sage/tests/books/judson-abstract-algebra/sylow-sage.py +250 -0
  70. sage/tests/books/judson-abstract-algebra/vect-sage-exercises.py +48 -0
  71. sage/tests/books/judson-abstract-algebra/vect-sage.py +211 -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.27.data → passagemath_repl-10.5.29.data}/scripts/sage-cachegrind +0 -0
  79. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-callgrind +0 -0
  80. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-cleaner +0 -0
  81. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-coverage +0 -0
  82. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-eval +0 -0
  83. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-fixdoctests +0 -0
  84. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-inline-fortran +0 -0
  85. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-ipynb2rst +0 -0
  86. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-ipython +0 -0
  87. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-massif +0 -0
  88. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-notebook +0 -0
  89. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-omega +0 -0
  90. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-preparse +0 -0
  91. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-run +0 -0
  92. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-run-cython +0 -0
  93. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-runtests +0 -0
  94. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-startuptime.py +0 -0
  95. {passagemath_repl-10.5.27.data → passagemath_repl-10.5.29.data}/scripts/sage-valgrind +0 -0
  96. {passagemath_repl-10.5.27.dist-info → passagemath_repl-10.5.29.dist-info}/WHEEL +0 -0
@@ -0,0 +1,413 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ ## Sage Doctest File ##
3
+ #**************************************#
4
+ #* Generated from PreTeXt source *#
5
+ #* on 2017-08-24T11:43:34-07:00 *#
6
+ #* *#
7
+ #* http://mathbook.pugetsound.edu *#
8
+ #* *#
9
+ #**************************************#
10
+ ##
11
+ """
12
+ Please contact Rob Beezer (beezer@ups.edu) with
13
+ any test failures here that need to be changed
14
+ as a result of changes accepted into Sage. You
15
+ may edit/change this file in any sensible way, so
16
+ that development work may procede. Your changes
17
+ may later be replaced by the authors of "Abstract
18
+ Algebra: Theory and Applications" when the text is
19
+ updated, and a replacement of this file is proposed
20
+ for review.
21
+ """
22
+ ##
23
+ ## To execute doctests in these files, run
24
+ ## $ $SAGE_ROOT/sage -t <directory-of-these-files>
25
+ ## or
26
+ ## $ $SAGE_ROOT/sage -t <a-single-file>
27
+ ##
28
+ ## Replace -t by "-tp n" for parallel testing,
29
+ ## "-tp 0" will use a sensible number of threads
30
+ ##
31
+ ## See: http://www.sagemath.org/doc/developer/doctesting.html
32
+ ## or run $ $SAGE_ROOT/sage --advanced for brief help
33
+ ##
34
+ ## Generated at 2017-08-24T11:43:34-07:00
35
+ ## From "Abstract Algebra"
36
+ ## At commit 26d3cac0b4047f4b8d6f737542be455606e2c4b4
37
+ ##
38
+ ## Section 16.9 Sage
39
+ ##
40
+ r"""
41
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
42
+
43
+ sage: F = QuadraticField(7)
44
+ sage: F
45
+ Number Field in a with defining polynomial x^2 - 7 with a = 2.645751311064591?
46
+
47
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
48
+
49
+ sage: root = F.gen(0)
50
+ sage: root^2
51
+ 7
52
+
53
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
54
+
55
+ sage: root
56
+ a
57
+
58
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
59
+
60
+ sage: (2*root)^3
61
+ 56*a
62
+
63
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
64
+
65
+ sage: F.<b> = QuadraticField(7)
66
+ sage: F
67
+ Number Field in b with defining polynomial x^2 - 7 with b = 2.645751311064591?
68
+
69
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
70
+
71
+ sage: b^2
72
+ 7
73
+
74
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
75
+
76
+ sage: (2*b)^3
77
+ 56*b
78
+
79
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
80
+
81
+ sage: C.<t> = CyclotomicField(8)
82
+ sage: C.random_element() # random
83
+ -2/11*t^2 + t - 1
84
+
85
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
86
+
87
+ sage: Z7 = Integers(7)
88
+ sage: Z9 = Integers(9)
89
+ sage: Q = QuadraticField(-11)
90
+ sage: F.<a> = FiniteField(3^2)
91
+ sage: P.<x> = Z7[]
92
+ sage: S.<f,g,h> = QuaternionAlgebra(-7, 3)
93
+
94
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
95
+
96
+ sage: QQ.is_exact()
97
+ True
98
+
99
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
100
+
101
+ sage: RR.is_exact()
102
+ False
103
+
104
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
105
+
106
+ sage: Z7.is_finite()
107
+ True
108
+
109
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
110
+
111
+ sage: Z7.is_finite()
112
+ True
113
+
114
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
115
+
116
+ sage: Z7.is_integral_domain()
117
+ True
118
+
119
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
120
+
121
+ sage: Z9.is_integral_domain()
122
+ False
123
+
124
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
125
+
126
+ sage: Z9.is_field()
127
+ False
128
+
129
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
130
+
131
+ sage: F.is_field()
132
+ True
133
+
134
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
135
+
136
+ sage: Q.is_field()
137
+ True
138
+
139
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
140
+
141
+ sage: Q.is_commutative()
142
+ True
143
+
144
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
145
+
146
+ sage: S.is_commutative()
147
+ False
148
+
149
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
150
+
151
+ sage: Z7.characteristic()
152
+ 7
153
+
154
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
155
+
156
+ sage: Z9.characteristic()
157
+ 9
158
+
159
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
160
+
161
+ sage: Q.characteristic()
162
+ 0
163
+
164
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
165
+
166
+ sage: F.characteristic()
167
+ 3
168
+
169
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
170
+
171
+ sage: P.characteristic()
172
+ 7
173
+
174
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
175
+
176
+ sage: S.characteristic()
177
+ 0
178
+
179
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
180
+
181
+ sage: b = Z9.zero(); b
182
+ 0
183
+
184
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
185
+
186
+ sage: b.parent()
187
+ Ring of integers modulo 9
188
+
189
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
190
+
191
+ sage: c = Q.zero(); c
192
+ 0
193
+
194
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
195
+
196
+ sage: c.parent()
197
+ Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I
198
+
199
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
200
+
201
+ sage: b == c
202
+ False
203
+
204
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
205
+
206
+ sage: d = Z9.one(); d
207
+ 1
208
+
209
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
210
+
211
+ sage: d.parent()
212
+ Ring of integers modulo 9
213
+
214
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
215
+
216
+ sage: e = Q.one(); e
217
+ 1
218
+
219
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
220
+
221
+ sage: e.parent()
222
+ Number Field in a with defining polynomial x^2 + 11 with a = 3.316624790355400?*I
223
+
224
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
225
+
226
+ sage: d == e
227
+ False
228
+
229
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
230
+
231
+ sage: QQ.is_subring(Q)
232
+ True
233
+
234
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
235
+
236
+ sage: QQ.is_subring(S)
237
+ True
238
+
239
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
240
+
241
+ sage: QQ.is_subring(F)
242
+ False
243
+
244
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
245
+
246
+ sage: three = Z9(3)
247
+ sage: three.is_unit()
248
+ False
249
+
250
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
251
+
252
+ sage: three*three
253
+ 0
254
+
255
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
256
+
257
+ sage: four = Z9(4)
258
+ sage: four.is_unit()
259
+ True
260
+
261
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
262
+
263
+ sage: g = four^-1; g
264
+ 7
265
+
266
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
267
+
268
+ sage: four*g
269
+ 1
270
+
271
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
272
+
273
+ sage: I1 = ZZ.ideal(4)
274
+ sage: I2 = 4*ZZ
275
+ sage: I3 = (-4)*ZZ
276
+ sage: I1 == I2
277
+ True
278
+
279
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
280
+
281
+ sage: I2 == I3
282
+ True
283
+
284
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
285
+
286
+ sage: Q = ZZ.quotient(I1); Q
287
+ Ring of integers modulo 4
288
+
289
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
290
+
291
+ sage: Q == Integers(4)
292
+ True
293
+
294
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
295
+
296
+ sage: Z7 = Integers(7)
297
+ sage: P.<y> = Z7[]
298
+ sage: M = P.ideal(y^2+4)
299
+ sage: Q = P.quotient(M)
300
+ sage: Q
301
+ Univariate Quotient Polynomial Ring in ybar over
302
+ Ring of integers modulo 7 with modulus y^2 + 4
303
+
304
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
305
+
306
+ sage: Q.random_element() # random
307
+ 2*ybar + 6
308
+
309
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
310
+
311
+ sage: Q.order()
312
+ 49
313
+
314
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
315
+
316
+ sage: Q.is_field()
317
+ True
318
+
319
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
320
+
321
+ sage: Q.<t> = P.quotient(M); Q
322
+ Univariate Quotient Polynomial Ring in t over
323
+ Ring of integers modulo 7 with modulus y^2 + 4
324
+
325
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
326
+
327
+ sage: Q.random_element() # random
328
+ 4*t + 6
329
+
330
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
331
+
332
+ sage: Z7 = Integers(7)
333
+ sage: P.<y> = Z7[]
334
+ sage: M = P.ideal(y^2+3)
335
+ sage: Q.<t> = P.quotient(M)
336
+ sage: Q
337
+ Univariate Quotient Polynomial Ring in t over
338
+ Ring of integers modulo 7 with modulus y^2 + 3
339
+
340
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
341
+
342
+ sage: Q.random_element() # random
343
+ 3*t + 1
344
+
345
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
346
+
347
+ sage: Q.order()
348
+ 49
349
+
350
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
351
+
352
+ sage: Q.is_field()
353
+ False
354
+
355
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
356
+
357
+ sage: Z7 = Integers(7)
358
+ sage: P.<y> = Z7[]
359
+ sage: M = P.ideal(y^2+4)
360
+ sage: N = P.ideal(y^2+3)
361
+ sage: M.is_maximal()
362
+ True
363
+
364
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
365
+
366
+ sage: N.is_maximal()
367
+ False
368
+
369
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
370
+
371
+ sage: M.is_prime()
372
+ True
373
+
374
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
375
+
376
+ sage: N.is_prime()
377
+ False
378
+
379
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
380
+
381
+ sage: H = Hom(ZZ, QQ)
382
+ sage: phi = H([1])
383
+ sage: phi
384
+ Ring morphism:
385
+ From: Integer Ring
386
+ To: Rational Field
387
+ Defn: 1 |--> 1
388
+
389
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
390
+
391
+ sage: phi.parent()
392
+ Set of Homomorphisms from Integer Ring to Rational Field
393
+
394
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
395
+
396
+ sage: a = 3; a
397
+ 3
398
+
399
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
400
+
401
+ sage: a.parent()
402
+ Integer Ring
403
+
404
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
405
+
406
+ sage: b = phi(3); b
407
+ 3
408
+
409
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
410
+
411
+ sage: b.parent()
412
+ Rational Field
413
+ """
@@ -0,0 +1,163 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ ## Sage Doctest File ##
3
+ #**************************************#
4
+ #* Generated from PreTeXt source *#
5
+ #* on 2017-08-24T11:43:34-07:00 *#
6
+ #* *#
7
+ #* http://mathbook.pugetsound.edu *#
8
+ #* *#
9
+ #**************************************#
10
+ ##
11
+ """
12
+ Please contact Rob Beezer (beezer@ups.edu) with
13
+ any test failures here that need to be changed
14
+ as a result of changes accepted into Sage. You
15
+ may edit/change this file in any sensible way, so
16
+ that development work may procede. Your changes
17
+ may later be replaced by the authors of "Abstract
18
+ Algebra: Theory and Applications" when the text is
19
+ updated, and a replacement of this file is proposed
20
+ for review.
21
+ """
22
+ ##
23
+ ## To execute doctests in these files, run
24
+ ## $ $SAGE_ROOT/sage -t <directory-of-these-files>
25
+ ## or
26
+ ## $ $SAGE_ROOT/sage -t <a-single-file>
27
+ ##
28
+ ## Replace -t by "-tp n" for parallel testing,
29
+ ## "-tp 0" will use a sensible number of threads
30
+ ##
31
+ ## See: http://www.sagemath.org/doc/developer/doctesting.html
32
+ ## or run $ $SAGE_ROOT/sage --advanced for brief help
33
+ ##
34
+ ## Generated at 2017-08-24T11:43:34-07:00
35
+ ## From "Abstract Algebra"
36
+ ## At commit 26d3cac0b4047f4b8d6f737542be455606e2c4b4
37
+ ##
38
+ ## Section 1.5 Sage
39
+ ##
40
+ r"""
41
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
42
+
43
+
44
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
45
+
46
+
47
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
48
+
49
+ sage: a = 10
50
+ sage: b = 6
51
+ sage: b = b - 10
52
+ sage: a = a + 20
53
+ sage: a
54
+ 30
55
+
56
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
57
+
58
+ sage: b = b + 50
59
+
60
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
61
+
62
+ sage: b + 20
63
+ 66
64
+
65
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
66
+
67
+ sage: A = matrix([[3, 1], [5,2]]); A
68
+ [3 1]
69
+ [5 2]
70
+
71
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
72
+
73
+ sage: print(A); print(); print(A.inverse())
74
+ [3 1]
75
+ [5 2]
76
+ <BLANKLINE>
77
+ [ 2 -1]
78
+ [-5 3]
79
+
80
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
81
+
82
+ sage: A. # not tested
83
+
84
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
85
+
86
+ sage: A.inverse? # not tested
87
+
88
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
89
+
90
+ sage: A.inverse?? # not tested
91
+
92
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
93
+
94
+ sage: B = matrix([[2, 20], [5, 50]])
95
+ sage: B.inverse()
96
+ Traceback (most recent call last):
97
+ ...
98
+ ZeroDivisionError: matrix must be nonsingular
99
+
100
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
101
+
102
+
103
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
104
+
105
+ sage: zoo = ['snake', 'parrot', 'elephant', 'baboon', 'beetle']
106
+ sage: zoo
107
+ ['snake', 'parrot', 'elephant', 'baboon', 'beetle']
108
+
109
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
110
+
111
+ sage: zoo[2]
112
+ 'elephant'
113
+
114
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
115
+
116
+ sage: zoo.append('ostrich'); zoo
117
+ ['snake', 'parrot', 'elephant', 'baboon', 'beetle', 'ostrich']
118
+
119
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
120
+
121
+ sage: zoo.remove('parrot')
122
+ sage: zoo
123
+ ['snake', 'elephant', 'baboon', 'beetle', 'ostrich']
124
+
125
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
126
+
127
+ sage: mammals = zoo[1:3]
128
+ sage: mammals
129
+ ['elephant', 'baboon']
130
+
131
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
132
+
133
+ sage: newzoo = sorted(zoo)
134
+ sage: newzoo
135
+ ['baboon', 'beetle', 'elephant', 'ostrich', 'snake']
136
+
137
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
138
+
139
+ sage: zoo.sort()
140
+ sage: zoo
141
+ ['baboon', 'beetle', 'elephant', 'ostrich', 'snake']
142
+
143
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
144
+
145
+ sage: plurality_zoo = [animal+'s' for animal in zoo]
146
+ sage: plurality_zoo
147
+ ['baboons', 'beetles', 'elephants', 'ostrichs', 'snakes']
148
+
149
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
150
+
151
+ sage: dozen = srange(12); dozen
152
+ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
153
+
154
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
155
+
156
+ sage: teens = srange(13, 20); teens
157
+ [13, 14, 15, 16, 17, 18, 19]
158
+
159
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
160
+
161
+ sage: decades = srange(1900, 2000, 10); decades
162
+ [1900, 1910, 1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990]
163
+ """
@@ -0,0 +1,63 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ ## Sage Doctest File ##
3
+ #**************************************#
4
+ #* Generated from PreTeXt source *#
5
+ #* on 2017-08-24T11:43:34-07:00 *#
6
+ #* *#
7
+ #* http://mathbook.pugetsound.edu *#
8
+ #* *#
9
+ #**************************************#
10
+ ##
11
+ """
12
+ Please contact Rob Beezer (beezer@ups.edu) with
13
+ any test failures here that need to be changed
14
+ as a result of changes accepted into Sage. You
15
+ may edit/change this file in any sensible way, so
16
+ that development work may procede. Your changes
17
+ may later be replaced by the authors of "Abstract
18
+ Algebra: Theory and Applications" when the text is
19
+ updated, and a replacement of this file is proposed
20
+ for review.
21
+ """
22
+ ##
23
+ ## To execute doctests in these files, run
24
+ ## $ $SAGE_ROOT/sage -t <directory-of-these-files>
25
+ ## or
26
+ ## $ $SAGE_ROOT/sage -t <a-single-file>
27
+ ##
28
+ ## Replace -t by "-tp n" for parallel testing,
29
+ ## "-tp 0" will use a sensible number of threads
30
+ ##
31
+ ## See: http://www.sagemath.org/doc/developer/doctesting.html
32
+ ## or run $ $SAGE_ROOT/sage --advanced for brief help
33
+ ##
34
+ ## Generated at 2017-08-24T11:43:34-07:00
35
+ ## From "Abstract Algebra"
36
+ ## At commit 26d3cac0b4047f4b8d6f737542be455606e2c4b4
37
+ ##
38
+ ## Section 13.6 Sage
39
+ ##
40
+ r"""
41
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
42
+
43
+ sage: S = SymmetricGroup(3)
44
+ sage: D = DihedralGroup(3)
45
+ sage: S.is_isomorphic(D)
46
+ True
47
+
48
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
49
+
50
+ sage: C3 = CyclicPermutationGroup(3)
51
+ sage: C5 = CyclicPermutationGroup(5)
52
+ sage: DP = direct_product_permgroups([C3, C5])
53
+ sage: C = CyclicPermutationGroup(15)
54
+ sage: DP.is_isomorphic(C)
55
+ True
56
+
57
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
58
+
59
+ sage: Q = QuaternionGroup()
60
+ sage: DI = DiCyclicGroup(2)
61
+ sage: Q.is_isomorphic(DI)
62
+ True
63
+ """