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