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,450 @@
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 4.7 Sage
39
+ ##
40
+ r"""
41
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
42
+
43
+ sage: G = 3*ZZ
44
+ sage: -12 in G
45
+ True
46
+
47
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
48
+
49
+ sage: 37 in G
50
+ False
51
+
52
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
53
+
54
+ sage: G.gen()
55
+ 3
56
+
57
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
58
+
59
+ sage: G = AdditiveAbelianGroup([14])
60
+ sage: G.order()
61
+ 14
62
+
63
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
64
+
65
+ sage: G.list()
66
+ [(0), (1), (2), (3), (4), (5), (6), (7),
67
+ (8), (9), (10), (11), (12), (13)]
68
+
69
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
70
+
71
+ sage: a = G.gen(0)
72
+ sage: a
73
+ (1)
74
+
75
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
76
+
77
+ sage: a + a
78
+ (2)
79
+
80
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
81
+
82
+ sage: a + a + a + a
83
+ (4)
84
+
85
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
86
+
87
+ sage: 4*a
88
+ (4)
89
+
90
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
91
+
92
+ sage: 37*a
93
+ (9)
94
+
95
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
96
+
97
+ sage: G([2])
98
+ (2)
99
+
100
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
101
+
102
+ sage: b = G([2]); b
103
+ (2)
104
+
105
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
106
+
107
+ sage: b + b
108
+ (4)
109
+
110
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
111
+
112
+ sage: 2*b == 4*a
113
+ True
114
+
115
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
116
+
117
+ sage: 7*b
118
+ (0)
119
+
120
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
121
+
122
+ sage: b.order()
123
+ 7
124
+
125
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
126
+
127
+ sage: c = a - 6*b; c
128
+ (3)
129
+
130
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
131
+
132
+ sage: c + c + c + c
133
+ (12)
134
+
135
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
136
+
137
+ sage: c.order()
138
+ 14
139
+
140
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
141
+
142
+ sage: H = G.submodule([b]); H
143
+ Additive abelian group isomorphic to Z/7
144
+
145
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
146
+
147
+ sage: H.list()
148
+ [(0), (2), (4), (6), (8), (10), (12)]
149
+
150
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
151
+
152
+ sage: H.order()
153
+ 7
154
+
155
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
156
+
157
+ sage: e = H.gen(0); e
158
+ (2)
159
+
160
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
161
+
162
+ sage: 3*e
163
+ (6)
164
+
165
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
166
+
167
+ sage: e.order()
168
+ 7
169
+
170
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
171
+
172
+ sage: f = 12*a; f
173
+ (12)
174
+
175
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
176
+
177
+ sage: f.order()
178
+ 7
179
+
180
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
181
+
182
+ sage: K = G.submodule([f]); K
183
+ Additive abelian group isomorphic to Z/7
184
+
185
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
186
+
187
+ sage: K.order()
188
+ 7
189
+
190
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
191
+
192
+ sage: K.list()
193
+ [(0), (2), (4), (6), (8), (10), (12)]
194
+
195
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
196
+
197
+ sage: K.gen(0)
198
+ (2)
199
+
200
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
201
+
202
+ sage: H == K
203
+ True
204
+
205
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
206
+
207
+ sage: G.<a> = AbelianGroup([14])
208
+ sage: G.order()
209
+ 14
210
+
211
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
212
+
213
+ sage: G.list()
214
+ (1, a, a^2, a^3, a^4, a^5, a^6, a^7, a^8, a^9, a^10, a^11, a^12, a^13)
215
+
216
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
217
+
218
+ sage: a.order()
219
+ 14
220
+
221
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
222
+
223
+ sage: b = a^2
224
+ sage: b.order()
225
+ 7
226
+
227
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
228
+
229
+ sage: b*b*b
230
+ a^6
231
+
232
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
233
+
234
+ sage: c = a^7
235
+ sage: c.order()
236
+ 2
237
+
238
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
239
+
240
+ sage: c^2
241
+ 1
242
+
243
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
244
+
245
+ sage: b*c
246
+ a^9
247
+
248
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
249
+
250
+ sage: b^37*c^42
251
+ a^4
252
+
253
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
254
+
255
+ sage: H = G.subgroup([a^2]) # optional - gap_package_polycyclic
256
+ sage: H.order()
257
+ 7
258
+
259
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
260
+
261
+ sage: K = G.subgroup([a^12]) # optional - gap_package_polycyclic
262
+ sage: K.order()
263
+ 7
264
+
265
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
266
+
267
+ sage: allsg = G.subgroups(); allsg # optional - gap_package_polycyclic
268
+ [Multiplicative Abelian subgroup isomorphic to C2 x C7 generated by {a},
269
+ Multiplicative Abelian subgroup isomorphic to C7 generated by {a^2},
270
+ Multiplicative Abelian subgroup isomorphic to C2 generated by {a^7},
271
+ Trivial Abelian subgroup]
272
+
273
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
274
+
275
+ sage: sub = allsg[2] # optional - gap_package_polycyclic
276
+ sage: sub.order() # optional - gap_package_polycyclic
277
+ 2
278
+
279
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
280
+
281
+ sage: G=CyclicPermutationGroup(14)
282
+ sage: a = G.gen(0); a
283
+ (1,2,3,4,5,6,7,8,9,10,11,12,13,14)
284
+
285
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
286
+
287
+ sage: b = a^2
288
+ sage: b = a^2; b
289
+ (1,3,5,7,9,11,13)(2,4,6,8,10,12,14)
290
+
291
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
292
+
293
+ sage: b.order()
294
+ 7
295
+
296
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
297
+
298
+ sage: a*a*b*b*b
299
+ (1,9,3,11,5,13,7)(2,10,4,12,6,14,8)
300
+
301
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
302
+
303
+ sage: c = a^37*b^26; c
304
+ (1,6,11,2,7,12,3,8,13,4,9,14,5,10)
305
+
306
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
307
+
308
+ sage: c.order()
309
+ 14
310
+
311
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
312
+
313
+ sage: H = G.subgroup([a^2])
314
+ sage: H.order()
315
+ 7
316
+
317
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
318
+
319
+ sage: H.gen(0)
320
+ (1,3,5,7,9,11,13)(2,4,6,8,10,12,14)
321
+
322
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
323
+
324
+ sage: H.list()
325
+ [(),
326
+ (1,3,5,7,9,11,13)(2,4,6,8,10,12,14),
327
+ (1,5,9,13,3,7,11)(2,6,10,14,4,8,12),
328
+ (1,7,13,5,11,3,9)(2,8,14,6,12,4,10),
329
+ (1,9,3,11,5,13,7)(2,10,4,12,6,14,8),
330
+ (1,11,7,3,13,9,5)(2,12,8,4,14,10,6),
331
+ (1,13,11,9,7,5,3)(2,14,12,10,8,6,4)]
332
+
333
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
334
+
335
+ sage: G.<a> = AbelianGroup([14])
336
+ sage: G.cayley_table()
337
+ * a b c d e f g h i j k l m n
338
+ +----------------------------
339
+ a| a b c d e f g h i j k l m n
340
+ b| b c d e f g h i j k l m n a
341
+ c| c d e f g h i j k l m n a b
342
+ d| d e f g h i j k l m n a b c
343
+ e| e f g h i j k l m n a b c d
344
+ f| f g h i j k l m n a b c d e
345
+ g| g h i j k l m n a b c d e f
346
+ h| h i j k l m n a b c d e f g
347
+ i| i j k l m n a b c d e f g h
348
+ j| j k l m n a b c d e f g h i
349
+ k| k l m n a b c d e f g h i j
350
+ l| l m n a b c d e f g h i j k
351
+ m| m n a b c d e f g h i j k l
352
+ n| n a b c d e f g h i j k l m
353
+
354
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
355
+
356
+ sage: K.<b> = AbelianGroup([10])
357
+ sage: K.cayley_table(names='elements')
358
+ * 1 b b^2 b^3 b^4 b^5 b^6 b^7 b^8 b^9
359
+ +----------------------------------------
360
+ 1| 1 b b^2 b^3 b^4 b^5 b^6 b^7 b^8 b^9
361
+ b| b b^2 b^3 b^4 b^5 b^6 b^7 b^8 b^9 1
362
+ b^2| b^2 b^3 b^4 b^5 b^6 b^7 b^8 b^9 1 b
363
+ b^3| b^3 b^4 b^5 b^6 b^7 b^8 b^9 1 b b^2
364
+ b^4| b^4 b^5 b^6 b^7 b^8 b^9 1 b b^2 b^3
365
+ b^5| b^5 b^6 b^7 b^8 b^9 1 b b^2 b^3 b^4
366
+ b^6| b^6 b^7 b^8 b^9 1 b b^2 b^3 b^4 b^5
367
+ b^7| b^7 b^8 b^9 1 b b^2 b^3 b^4 b^5 b^6
368
+ b^8| b^8 b^9 1 b b^2 b^3 b^4 b^5 b^6 b^7
369
+ b^9| b^9 1 b b^2 b^3 b^4 b^5 b^6 b^7 b^8
370
+
371
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
372
+
373
+ sage: G = CyclotomicField(14)
374
+ sage: w = G.gen(0); w
375
+ zeta14
376
+
377
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
378
+
379
+ sage: wc = CDF(w)
380
+ sage: wc.abs()
381
+ 1.0
382
+
383
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
384
+
385
+ sage: wc.arg()/N(2*pi/14)
386
+ 1.0
387
+
388
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
389
+
390
+ sage: b = w^2
391
+ sage: b.multiplicative_order()
392
+ 7
393
+
394
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
395
+
396
+ sage: bc = CDF(b); bc
397
+ 0.62348980185... + 0.781831482468...*I
398
+
399
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
400
+
401
+ sage: bc.abs()
402
+ 1.0
403
+
404
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
405
+
406
+ sage: bc.arg()/N(2*pi/14)
407
+ 2.0
408
+
409
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
410
+
411
+ sage: sg = [b^i for i in range(7)]; sg
412
+ [1, zeta14^2, zeta14^4,
413
+ zeta14^5 - zeta14^4 + zeta14^3 - zeta14^2 + zeta14 - 1,
414
+ -zeta14, -zeta14^3, -zeta14^5]
415
+
416
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
417
+
418
+ sage: c = sg[3]; d = sg[5]
419
+ sage: c*d
420
+ zeta14^2
421
+
422
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
423
+
424
+ sage: c = sg[3]; d = sg[6]
425
+ sage: c*d in sg
426
+ True
427
+
428
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
429
+
430
+ sage: c*d == sg[2]
431
+ True
432
+
433
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
434
+
435
+ sage: sg[5]*sg[6] == sg[4]
436
+ True
437
+
438
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
439
+
440
+ sage: G.multiplication_table(elements=sg)
441
+ * a b c d e f g
442
+ +--------------
443
+ a| a b c d e f g
444
+ b| b c d e f g a
445
+ c| c d e f g a b
446
+ d| d e f g a b c
447
+ e| e f g a b c d
448
+ f| f g a b c d e
449
+ g| g a b c d e f
450
+ """
@@ -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 18.5 Sage
39
+ ##
40
+ r"""
41
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
42
+
43
+ sage: Q = ZZ.fraction_field(); Q
44
+ Rational Field
45
+
46
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
47
+
48
+ sage: Q == QQ
49
+ True
50
+
51
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
52
+
53
+ sage: R.<x> = ZZ[]
54
+ sage: P = R.fraction_field();P
55
+ Fraction Field of Univariate Polynomial Ring in x over Integer Ring
56
+
57
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
58
+
59
+ sage: f = P((x^2+3)/(7*x+4))
60
+ sage: g = P((4*x^2)/(3*x^2-5*x+4))
61
+ sage: h = P((-2*x^3+4*x^2+3)/(x^2+1))
62
+ sage: ((f+g)/h).numerator()
63
+ 3*x^6 + 23*x^5 + 32*x^4 + 8*x^3 + 41*x^2 - 15*x + 12
64
+
65
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
66
+
67
+ sage: ((f+g)/h).denominator()
68
+ -42*x^6 + 130*x^5 - 108*x^4 + 63*x^3 - 5*x^2 + 24*x + 48
69
+
70
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
71
+
72
+ sage: F.<c> = FiniteField(3^5)
73
+ sage: F.characteristic()
74
+ 3
75
+
76
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
77
+
78
+ sage: G = F.prime_subfield(); G
79
+ Finite Field of size 3
80
+
81
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
82
+
83
+ sage: G.list()
84
+ [0, 1, 2]
85
+
86
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
87
+
88
+ sage: K.<y>=QuadraticField(-7); K
89
+ Number Field in y with defining polynomial x^2 + 7 with y = 2.645751311064591?*I
90
+
91
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
92
+
93
+ sage: K.prime_subfield()
94
+ Rational Field
95
+
96
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
97
+
98
+ sage: K.<x> = ZZ[sqrt(-3)]; K
99
+ Order of conductor 2 generated by a in Number Field in a
100
+ with defining polynomial x^2 + 3 with a = 0.?e-18 + 1.732050807568878?*I
101
+
102
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
103
+
104
+ sage: K.is_integral_domain()
105
+ True
106
+
107
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
108
+
109
+ sage: K.basis()
110
+ [1, a]
111
+
112
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
113
+
114
+ sage: x
115
+ a
116
+
117
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
118
+
119
+ sage: (1+x)*(1-x) == 2*2
120
+ True
121
+
122
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
123
+
124
+ sage: four = K(4)
125
+ sage: four.is_unit()
126
+ False
127
+
128
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
129
+
130
+ sage: four^-1
131
+ 1/4
132
+
133
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
134
+
135
+ sage: T.<x>=ZZ[]
136
+ sage: T.is_integral_domain()
137
+ True
138
+
139
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
140
+
141
+ sage: J = T.ideal(5, x); J
142
+ Ideal (5, x) of Univariate Polynomial Ring in x over Integer Ring
143
+
144
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
145
+
146
+ sage: Q = T.quotient(J); Q
147
+ Quotient of Univariate Polynomial Ring in x over
148
+ Integer Ring by the ideal (5, x)
149
+
150
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
151
+
152
+ sage: J.is_principal()
153
+ Traceback (most recent call last):
154
+ ...
155
+ NotImplementedError
156
+
157
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
158
+
159
+ sage: Q.is_field()
160
+ Traceback (most recent call last):
161
+ ...
162
+ NotImplementedError
163
+ """