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,170 @@
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 6.5 Sage
39
+ ##
40
+ r"""
41
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
42
+
43
+ sage: G = SymmetricGroup(3)
44
+ sage: a = G("(1,2)")
45
+ sage: H = G.subgroup([a])
46
+ sage: rc = G.cosets(H, side='right'); rc
47
+ [[(), (1,2)], [(2,3), (1,3,2)], [(1,2,3), (1,3)]]
48
+
49
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
50
+
51
+ sage: lc = G.cosets(H, side='left'); lc
52
+ [[(), (1,2)], [(2,3), (1,2,3)], [(1,3,2), (1,3)]]
53
+
54
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
55
+
56
+ sage: G = SymmetricGroup(3)
57
+ sage: b = G("(1,2,3)")
58
+ sage: H = G.subgroup([b])
59
+ sage: rc = G.cosets(H, side='right'); rc
60
+ [[(), (1,2,3), (1,3,2)], [(2,3), (1,3), (1,2)]]
61
+
62
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
63
+
64
+ sage: lc = G.cosets(H, side='left'); lc
65
+ [[(), (1,2,3), (1,3,2)], [(2,3), (1,2), (1,3)]]
66
+
67
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
68
+
69
+ sage: rc == lc
70
+ False
71
+
72
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
73
+
74
+ sage: rc_sorted = sorted([sorted(coset) for coset in rc])
75
+ sage: rc_sorted
76
+ [[(), (1,2,3), (1,3,2)], [(2,3), (1,2), (1,3)]]
77
+
78
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
79
+
80
+ sage: lc_sorted = sorted([sorted(coset) for coset in lc])
81
+ sage: lc_sorted
82
+ [[(), (1,2,3), (1,3,2)], [(2,3), (1,2), (1,3)]]
83
+
84
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
85
+
86
+ sage: rc_sorted == lc_sorted
87
+ True
88
+
89
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
90
+
91
+ sage: G = SymmetricGroup(3)
92
+ sage: sg = G.subgroups(); sg
93
+ [Subgroup generated by [()] of (Symmetric group of order 3! as a permutation group),
94
+ Subgroup generated by [(2,3)] of (Symmetric group of order 3! as a permutation group),
95
+ Subgroup generated by [(1,2)] of (Symmetric group of order 3! as a permutation group),
96
+ Subgroup generated by [(1,3)] of (Symmetric group of order 3! as a permutation group),
97
+ Subgroup generated by [(1,2,3)] of (Symmetric group of order 3! as a permutation group),
98
+ Subgroup generated by [(1,2,3), (2,3)] of (Symmetric group of order 3! as a permutation group)]
99
+
100
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
101
+
102
+ sage: H = sg[4]; H
103
+ Subgroup generated by [(1,2,3)] of (Symmetric group of order 3! as a permutation group)
104
+
105
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
106
+
107
+ sage: H.order()
108
+ 3
109
+
110
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
111
+
112
+ sage: H.list()
113
+ [(), (1,2,3), (1,3,2)]
114
+
115
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
116
+
117
+ sage: H.is_cyclic()
118
+ True
119
+
120
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
121
+
122
+ sage: G = AlternatingGroup(4)
123
+ sage: sg = G.subgroups()
124
+ sage: [H.order() for H in sg]
125
+ [1, 2, 2, 2, 3, 3, 3, 3, 4, 12]
126
+
127
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
128
+
129
+ sage: G = SymmetricGroup(4)
130
+ sage: sg = G.subgroups()
131
+ sage: [H.order() for H in sg]
132
+ [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4,
133
+ 6, 6, 6, 6, 8, 8, 8, 12, 24]
134
+
135
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
136
+
137
+ sage: len(sg)
138
+ 30
139
+
140
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
141
+
142
+ sage: G = CyclicPermutationGroup(20)
143
+ sage: [H.order() for H in G.subgroups()]
144
+ [1, 2, 4, 5, 10, 20]
145
+
146
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
147
+
148
+ sage: G = CyclicPermutationGroup(19)
149
+ sage: [H.order() for H in G.subgroups()]
150
+ [1, 19]
151
+
152
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
153
+
154
+ sage: n = 8
155
+ sage: G = CyclicPermutationGroup(n)
156
+ sage: [H.order() for H in G.subgroups()]
157
+ [1, 2, 4, 8]
158
+
159
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
160
+
161
+ sage: euler_phi(345)
162
+ 176
163
+
164
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
165
+
166
+ sage: m = random_prime(10000)
167
+ sage: n = random_prime(10000)
168
+ sage: m, n, euler_phi(m*n) == euler_phi(m)*euler_phi(n) # random
169
+ (5881, 1277, True)
170
+ """
@@ -0,0 +1,151 @@
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 7.6 Sage
39
+ ##
40
+ r"""
41
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
42
+
43
+ sage: p_a = next_prime(10^10)
44
+ sage: q_a = next_prime(p_a)
45
+ sage: p_b = next_prime((3/2)*10^10)
46
+ sage: q_b = next_prime(p_b)
47
+ sage: n_a = p_a * q_a
48
+ sage: n_b = p_b * q_b
49
+ sage: n_a, n_b
50
+ (100000000520000000627, 225000000300000000091)
51
+
52
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
53
+
54
+ sage: m_a = euler_phi(n_a)
55
+ sage: m_b = euler_phi(n_b)
56
+ sage: m_a, m_b
57
+ (100000000500000000576, 225000000270000000072)
58
+
59
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
60
+
61
+ sage: factor(m_a)
62
+ 2^6 * 3 * 11 * 17 * 131 * 521 * 73259 * 557041
63
+
64
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
65
+
66
+ sage: E_a = 5*23
67
+ sage: D_a = inverse_mod(E_a, m_a)
68
+ sage: D_a
69
+ 20869565321739130555
70
+
71
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
72
+
73
+ sage: factor(m_b)
74
+ 2^3 * 3^4 * 107 * 1298027 * 2500000001
75
+
76
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
77
+
78
+ sage: E_b = 7*29
79
+ sage: D_b = inverse_mod(E_b, m_b)
80
+ sage: D_b
81
+ 24384236482463054195
82
+
83
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
84
+
85
+ sage: print("Alice's public key, n:", n_a, "E:", E_a)
86
+ Alice's public key, n: 100000000520000000627 E: 115
87
+
88
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
89
+
90
+ sage: print("Alice's private key, D:", D_a)
91
+ Alice's private key, D: 20869565321739130555
92
+
93
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
94
+
95
+ sage: print("Bob's public key, n:", n_b, "E:", E_b)
96
+ Bob's public key, n: 225000000300000000091 E: 203
97
+
98
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
99
+
100
+ sage: print("Bob's private key, D:", D_b)
101
+ Bob's private key, D: 24384236482463054195
102
+
103
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
104
+
105
+ sage: word = 'Sage'
106
+ sage: digits = [ord(letter) for letter in word]
107
+ sage: digits
108
+ [83, 97, 103, 101]
109
+
110
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
111
+
112
+ sage: message = ZZ(digits, 128)
113
+ sage: message
114
+ 213512403
115
+
116
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
117
+
118
+ sage: signed = power_mod(message, D_a, n_a)
119
+ sage: signed
120
+ 47838774644892618423
121
+
122
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
123
+
124
+ sage: encrypted = power_mod(signed, E_b, n_b)
125
+ sage: encrypted
126
+ 111866209291209840488
127
+
128
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
129
+
130
+ sage: decrypted = power_mod(encrypted, D_b, n_b)
131
+ sage: decrypted
132
+ 47838774644892618423
133
+
134
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
135
+
136
+ sage: received = power_mod(decrypted, E_a, n_a)
137
+ sage: received
138
+ 213512403
139
+
140
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
141
+
142
+ sage: digits = received.digits(base=128)
143
+ sage: letters = [chr(ascii) for ascii in digits]
144
+ sage: letters
145
+ ['S', 'a', 'g', 'e']
146
+
147
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
148
+
149
+ sage: ''.join(letters)
150
+ 'Sage'
151
+ """