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,454 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ """
3
+ This file (./linalg_doctest.sage) was *autogenerated* from ./linalg.tex,
4
+ with sagetex.sty version 2011/05/27 v2.3.1.
5
+ It contains the contents of all the sageexample environments from this file.
6
+ You should be able to doctest this file with:
7
+ sage -t ./linalg_doctest.sage
8
+ It is always safe to delete this file; it is not used in typesetting your
9
+ document.
10
+
11
+ Sage example in ./linalg.tex, line 168::
12
+
13
+ sage: MS = MatrixSpace(ZZ,2,3); MS
14
+ Full MatrixSpace of 2 by 3 dense matrices over Integer Ring
15
+ sage: VS = VectorSpace(GF(3^2,'x'),3); VS
16
+ Vector space of dimension 3 over Finite Field in x of size 3^2
17
+
18
+ Sage example in ./linalg.tex, line 184::
19
+
20
+ sage: B = MatrixSpace(ZZ,2,3).basis()
21
+ sage: list(B)
22
+ [
23
+ [1 0 0] [0 1 0] [0 0 1] [0 0 0] [0 0 0] [0 0 0]
24
+ [0 0 0], [0 0 0], [0 0 0], [1 0 0], [0 1 0], [0 0 1]
25
+ ]
26
+
27
+ Sage example in ./linalg.tex, line 220::
28
+
29
+ sage: B[1,2]
30
+ [0 0 0]
31
+ [0 0 1]
32
+
33
+ Sage example in ./linalg.tex, line 260::
34
+
35
+ sage: A = matrix(GF(11), 2, 2, [1,0,0,2])
36
+ sage: B = matrix(GF(11), 2, 2, [0,1,1,0])
37
+ sage: MG = MatrixGroup([A,B])
38
+ sage: MG.cardinality()
39
+ 200
40
+ sage: identity_matrix(GF(11),2) in MG
41
+ True
42
+
43
+ Sage example in ./linalg.tex, line 292::
44
+
45
+ sage: MS = MatrixSpace(ZZ,2,3); A = MS([1,2,3,4,5,6]); A
46
+ [1 2 3]
47
+ [4 5 6]
48
+
49
+ Sage example in ./linalg.tex, line 323::
50
+
51
+ sage: a = matrix(); a.parent()
52
+ Full MatrixSpace of 0 by 0 dense matrices over Integer Ring
53
+
54
+ Sage example in ./linalg.tex, line 341::
55
+
56
+ sage: a = matrix(GF(8,'x'),3,4); a.parent()
57
+ Full MatrixSpace of 3 by 4 dense matrices over Finite Field
58
+ in x of size 2^3
59
+
60
+ Sage example in ./linalg.tex, line 356::
61
+
62
+ sage: g = graphs.PetersenGraph()
63
+ sage: m = matrix(g); m; m.parent()
64
+ [0 1 0 0 1 1 0 0 0 0]
65
+ [1 0 1 0 0 0 1 0 0 0]
66
+ [0 1 0 1 0 0 0 1 0 0]
67
+ [0 0 1 0 1 0 0 0 1 0]
68
+ [1 0 0 1 0 0 0 0 0 1]
69
+ [1 0 0 0 0 0 0 1 1 0]
70
+ [0 1 0 0 0 0 0 0 1 1]
71
+ [0 0 1 0 0 1 0 0 0 1]
72
+ [0 0 0 1 0 1 1 0 0 0]
73
+ [0 0 0 0 1 0 1 1 0 0]
74
+ Full MatrixSpace of 10 by 10 dense matrices over Integer Ring
75
+
76
+ Sage example in ./linalg.tex, line 380::
77
+
78
+ sage: A = matrix([[1,2],[3,4]])
79
+ sage: block_matrix([[A,-A],[2*A, A^2]])
80
+ [ 1 2|-1 -2]
81
+ [ 3 4|-3 -4]
82
+ [-----+-----]
83
+ [ 2 4| 7 10]
84
+ [ 6 8|15 22]
85
+
86
+ Sage example in ./linalg.tex, line 413::
87
+
88
+ sage: A = matrix([[1,2,3],[4,5,6]])
89
+ sage: block_matrix([1,A,0,0,-A,2], ncols=3)
90
+ [ 1 0| 1 2 3| 0 0]
91
+ [ 0 1| 4 5 6| 0 0]
92
+ [-----+--------+-----]
93
+ [ 0 0|-1 -2 -3| 2 0]
94
+ [ 0 0|-4 -5 -6| 0 2]
95
+
96
+ Sage example in ./linalg.tex, line 443::
97
+
98
+ sage: A = matrix([[1,2,3],[0,1,0]])
99
+ sage: block_diagonal_matrix(A, A.transpose())
100
+ [1 2 3|0 0]
101
+ [0 1 0|0 0]
102
+ [-----+---]
103
+ [0 0 0|1 0]
104
+ [0 0 0|2 1]
105
+ [0 0 0|3 0]
106
+
107
+ Sage example in ./linalg.tex, line 517::
108
+
109
+ sage: A = matrix(3,3,range(9))
110
+ sage: A[:,1] = vector([1,1,1]); A
111
+ [0 1 2]
112
+ [3 1 5]
113
+ [6 1 8]
114
+
115
+ Sage example in ./linalg.tex, line 535::
116
+
117
+ sage: A[::-1], A[:,::-1], A[::2,-1]
118
+ (
119
+ [6 1 8] [2 1 0]
120
+ [3 1 5] [5 1 3] [2]
121
+ [0 1 2], [8 1 6], [8]
122
+ )
123
+
124
+ Sage example in ./linalg.tex, line 571::
125
+
126
+ sage: A = matrix(ZZ,4,4,range(16)); A
127
+ [ 0 1 2 3]
128
+ [ 4 5 6 7]
129
+ [ 8 9 10 11]
130
+ [12 13 14 15]
131
+
132
+
133
+ Sage example in ./linalg.tex, line 587::
134
+
135
+ sage: A.matrix_from_rows_and_columns([0,2,3],[1,2])
136
+ [ 1 2]
137
+ [ 9 10]
138
+ [13 14]
139
+
140
+ Sage example in ./linalg.tex, line 639::
141
+
142
+ sage: MS = MatrixSpace(GF(3),2,3)
143
+ sage: MS.base_extend(GF(9,'x'))
144
+ Full MatrixSpace of 2 by 3 dense matrices over Finite Field
145
+ in x of size 3^2
146
+ sage: MS = MatrixSpace(ZZ,2,3)
147
+ sage: MS.change_ring(GF(3))
148
+ Full MatrixSpace of 2 by 3 dense matrices over Finite Field of size 3
149
+
150
+ Sage example in ./linalg.tex, line 1167::
151
+
152
+ sage: a = matrix(GF(7),4,3,[6,2,2,5,4,4,6,4,5,5,1,3]); a
153
+ [6 2 2]
154
+ [5 4 4]
155
+ [6 4 5]
156
+ [5 1 3]
157
+
158
+ Sage example in ./linalg.tex, line 1181::
159
+
160
+ sage: u = copy(identity_matrix(GF(7),4)); u[1:,0] = -a[1:,0]/a[0,0]
161
+ sage: u, u*a
162
+ (
163
+ [1 0 0 0] [6 2 2]
164
+ [5 1 0 0] [0 0 0]
165
+ [6 0 1 0] [0 2 3]
166
+ [5 0 0 1], [0 4 6]
167
+ )
168
+
169
+ Sage example in ./linalg.tex, line 1203::
170
+
171
+ sage: v = copy(identity_matrix(GF(7),4)); v.swap_rows(1,2)
172
+ sage: b = v*u*a; v, b
173
+ (
174
+ [1 0 0 0] [6 2 2]
175
+ [0 0 1 0] [0 2 3]
176
+ [0 1 0 0] [0 0 0]
177
+ [0 0 0 1], [0 4 6]
178
+ )
179
+
180
+ Sage example in ./linalg.tex, line 1225::
181
+
182
+ sage: w = copy(identity_matrix(GF(7),4))
183
+ sage: w[2:,1] = -b[2:,1]/b[1,1]; w, w*b
184
+ (
185
+ [1 0 0 0] [6 2 2]
186
+ [0 1 0 0] [0 2 3]
187
+ [0 0 1 0] [0 0 0]
188
+ [0 5 0 1], [0 0 0]
189
+ )
190
+
191
+ Sage example in ./linalg.tex, line 1325::
192
+
193
+ sage: A = matrix(GF(7),4,5,[4,4,0,2,4,5,1,6,5,4,1,1,0,1,0,5,1,6,6,2])
194
+ sage: A, A.echelon_form()
195
+ (
196
+ [4 4 0 2 4] [1 0 5 0 3]
197
+ [5 1 6 5 4] [0 1 2 0 6]
198
+ [1 1 0 1 0] [0 0 0 1 5]
199
+ [5 1 6 6 2], [0 0 0 0 0]
200
+ )
201
+
202
+ Sage example in ./linalg.tex, line 1512::
203
+
204
+ sage: a = matrix(ZZ, 4, 6, [2,1,2,2,2,-1,1,2,-1,2,1,-1,2,1,-1,\
205
+ ....: -1,2,2,2,1,1,-1,-1,-1]); a.echelon_form()
206
+ [ 1 2 0 5 4 -1]
207
+ [ 0 3 0 2 -6 -7]
208
+ [ 0 0 1 3 3 0]
209
+ [ 0 0 0 6 9 3]
210
+
211
+ Sage example in ./linalg.tex, line 1528::
212
+
213
+ sage: a.base_extend(QQ).echelon_form()
214
+ [ 1 0 0 0 5/2 11/6]
215
+ [ 0 1 0 0 -3 -8/3]
216
+ [ 0 0 1 0 -3/2 -3/2]
217
+ [ 0 0 0 1 3/2 1/2]
218
+
219
+ Sage example in ./linalg.tex, line 1561::
220
+
221
+ sage: A = matrix(ZZ,4,5,[4,4,0,2,4,5,1,6,5,4,1,1,0,1,0,5,1,6,6,2])
222
+ sage: H, U = A.echelon_form(transformation=True); H, U
223
+ (
224
+ [ 1 1 0 0 2] [ 0 1 1 -1]
225
+ [ 0 4 -6 0 -4] [ 0 -1 5 0]
226
+ [ 0 0 0 1 -2] [ 0 -1 0 1]
227
+ [ 0 0 0 0 0], [ 1 -2 -4 2]
228
+ )
229
+
230
+ Sage example in ./linalg.tex, line 1640::
231
+
232
+ sage: A = matrix(ZZ, 4, 5,\
233
+ ....: [-1,-1,-1,-2,-2,-2,1,1,-1,2,2,2,2,2,-1,2,2,2,2,2])
234
+ sage: S,U,V = A.smith_form(); S,U,V
235
+ (
236
+ [ 3 1 2 -1 0]
237
+ [1 0 0 0 0] [ 0 0 1 0] [ 0 0 0 0 1]
238
+ [0 1 0 0 0] [ 0 1 0 0] [ 1 1 1 1 -1]
239
+ [0 0 3 0 0] [ 1 -2 -4 1] [-3 -2 -3 -1 0]
240
+ [0 0 0 6 0], [ 0 0 4 -1], [ 1 0 0 -2 0]
241
+ )
242
+
243
+ Sage example in ./linalg.tex, line 1674::
244
+
245
+ sage: A.elementary_divisors()
246
+ [1, 1, 3, 6]
247
+ sage: S == U*A*V
248
+ True
249
+
250
+ Sage example in ./linalg.tex, line 1746::
251
+
252
+ sage: B = matrix(GF(7),5,4,[4,5,1,5,4,1,1,1,0,6,0,6,2,5,1,6,4,4,0,2])
253
+ sage: B.transpose().echelon_form()
254
+ [1 0 5 0 3]
255
+ [0 1 2 0 6]
256
+ [0 0 0 1 5]
257
+ [0 0 0 0 0]
258
+
259
+ Sage example in ./linalg.tex, line 1761::
260
+
261
+ sage: B.pivot_rows()
262
+ (0, 1, 3)
263
+ sage: B.transpose().pivots() == B.pivot_rows()
264
+ True
265
+
266
+ Sage example in ./linalg.tex, line 1818::
267
+
268
+ sage: R.<x> = PolynomialRing(GF(5),'x')
269
+ sage: A = random_matrix(R,2,3); A # random
270
+ [ 3*x^2 + x x^2 + 2*x 2*x^2 + 2]
271
+ [ x^2 + x + 2 2*x^2 + 4*x + 3 x^2 + 4*x + 3]
272
+ sage: while A.rank() < 2:
273
+ ....: A = random_matrix(R,2,3)
274
+
275
+ Sage example in ./linalg.tex, line 1830::
276
+
277
+ sage: b = random_matrix(R,2,1); b # random
278
+ [ 4*x^2 + 1]
279
+ [3*x^2 + 2*x]
280
+
281
+ Sage example in ./linalg.tex, line 1841::
282
+
283
+ sage: A.solve_right(b) # random
284
+ [(4*x^3 + 2*x + 4)/(3*x^3 + 2*x^2 + 2*x)]
285
+ [ (3*x^2 + 4*x + 3)/(x^3 + 4*x^2 + 4*x)]
286
+ [ 0]
287
+
288
+ Sage example in ./linalg.tex, line 1855::
289
+
290
+ sage: A.solve_right(b) == A\b
291
+ doctest:...: DeprecationWarning: the backslash operator has been deprecated; use A.solve_right(B) instead
292
+ See https://github.com/sagemath/sage/issues/36394 for details.
293
+ True
294
+
295
+ Sage example in ./linalg.tex, line 1910::
296
+
297
+ sage: a = matrix(QQ,3,5,[2,2,-1,-2,-1,2,-1,1,2,-1/2,2,-2,-1,2,-1/2])
298
+ sage: a.image()
299
+ Vector space of degree 5 and dimension 3 over Rational Field
300
+ Basis matrix:
301
+ [ 1 0 0 1/4 -11/32]
302
+ [ 0 1 0 -1 -1/8]
303
+ [ 0 0 1 1/2 1/16]
304
+ sage: a.right_kernel()
305
+ Vector space of degree 5 and dimension 2 over Rational Field
306
+ Basis matrix:
307
+ [ 1 0 0 -1/3 8/3]
308
+ [ 0 1 -1/2 11/12 2/3]
309
+
310
+ Sage example in ./linalg.tex, line 1941::
311
+
312
+ sage: a = matrix(ZZ,5,3,[1,1,122,-1,-2,1,-188,2,1,1,-10,1,-1,-1,-1])
313
+ sage: a.kernel()
314
+ Free module of degree 5 and rank 2 over Integer Ring
315
+ Echelon basis matrix:
316
+ [ 1 979 -11 -279 811]
317
+ [ 0 2079 -22 -569 1488]
318
+ sage: b = a.base_extend(QQ)
319
+ sage: b.kernel()
320
+ Vector space of degree 5 and dimension 2 over Rational Field
321
+ Basis matrix:
322
+ [ 1 0 -121/189 -2090/189 6949/63]
323
+ [ 0 1 -2/189 -569/2079 496/693]
324
+ sage: b.integer_kernel()
325
+ Free module of degree 5 and rank 2 over Integer Ring
326
+ Echelon basis matrix:
327
+ [ 1 979 -11 -279 811]
328
+ [ 0 2079 -22 -569 1488]
329
+
330
+ Sage example in ./linalg.tex, line 2301::
331
+
332
+ sage: A = matrix(GF(97), 4, 4,\
333
+ ....: [86,1,6,68,34,24,8,35,15,36,68,42,27,1,78,26])
334
+ sage: e1 = identity_matrix(GF(97),4)[0]
335
+ sage: U = matrix(A.transpose().maxspin(e1)).transpose()
336
+ sage: F = U^-1*A*U; F
337
+ [ 0 0 0 83]
338
+ [ 1 0 0 77]
339
+ [ 0 1 0 20]
340
+ [ 0 0 1 10]
341
+
342
+ Sage example in ./linalg.tex, line 2320::
343
+
344
+ sage: K.<x> = GF(97)[]
345
+ sage: P = x^4-sum(F[i,3]*x^i for i in range(4)); P
346
+ x^4 + 87*x^3 + 77*x^2 + 20*x + 14
347
+
348
+ Sage example in ./linalg.tex, line 2326::
349
+
350
+ sage: P == A.charpoly()
351
+ True
352
+
353
+ Sage example in ./linalg.tex, line 2502::
354
+
355
+ sage: A = matrix(ZZ,8,[[6,0,-2,4,0,0,0,-2],[14,-1,0,6,0,-1,-1,1],\
356
+ ....: [2,2,0,1,0,0,1,0],[-12,0,5,-8,0,0,0,4],\
357
+ ....: [0,4,0,0,0,0,4,0],[0,0,0,0,1,0,0,0],\
358
+ ....: [-14,2,0,-6,0,2,2,-1],[-4,0,2,-4,0,0,0,4]])
359
+ sage: A.frobenius_form()
360
+ [0 0 0 4 0 0 0 0]
361
+ [1 0 0 4 0 0 0 0]
362
+ [0 1 0 1 0 0 0 0]
363
+ [0 0 1 0 0 0 0 0]
364
+ [0 0 0 0 0 0 4 0]
365
+ [0 0 0 0 1 0 0 0]
366
+ [0 0 0 0 0 1 1 0]
367
+ [0 0 0 0 0 0 0 2]
368
+
369
+ Sage example in ./linalg.tex, line 2540::
370
+
371
+ sage: A.frobenius_form(1)
372
+ [x^4 - x^2 - 4*x - 4, x^3 - x^2 - 4, x - 2]
373
+
374
+ Sage example in ./linalg.tex, line 2547::
375
+
376
+ sage: F,K = A.frobenius_form(2)
377
+ sage: K
378
+ [ 1 -15/56 17/224 15/56 -17/896 0 -15/112 17/64]
379
+ [ 0 29/224 -13/224 -23/448 -17/896 -17/896 29/448 13/128]
380
+ [ 0 -75/896 75/896 -47/896 0 -17/896 -23/448 11/128]
381
+ [ 0 17/896 -29/896 15/896 0 0 0 0]
382
+ [ 0 0 0 0 1 0 0 0]
383
+ [ 0 0 0 0 0 1 0 0]
384
+ [ 0 1 0 0 0 0 1 0]
385
+ [ 0 -4/21 -4/21 -10/21 0 0 -2/21 1]
386
+
387
+ Sage example in ./linalg.tex, line 2573::
388
+
389
+ sage: K^-1*F*K == A
390
+ True
391
+
392
+ Sage example in ./linalg.tex, line 2621::
393
+
394
+ sage: S.<x> = QQ[]
395
+ sage: B = x*identity_matrix(8) - A
396
+ sage: B.elementary_divisors()
397
+ [1, 1, 1, 1, 1, x - 2, x^3 - x^2 - 4, x^4 - x^2 - 4*x - 4]
398
+
399
+ Sage example in ./linalg.tex, line 2629::
400
+
401
+ sage: A.frobenius_form(1)
402
+ [x^4 - x^2 - 4*x - 4, x^3 - x^2 - 4, x - 2]
403
+
404
+ Sage example in ./linalg.tex, line 2726::
405
+
406
+ sage: A = matrix(GF(7),4,[5,5,4,3,0,3,3,4,0,1,5,4,6,0,6,3])
407
+ sage: A.eigenvalues()
408
+ [4, 1, 2, 2]
409
+ sage: A.eigenvectors_right()
410
+ [(4, [(1, 5, 5, 1)], 1),
411
+ (1, [(0, 1, 1, 4)], 1),
412
+ (2, [(1, 3, 0, 1), (0, 0, 1, 1)], 2)]
413
+ sage: A.eigenspaces_right()
414
+ [(4,
415
+ Vector space of degree 4 and dimension 1 over Finite Field of size 7
416
+ User basis matrix:
417
+ [1 5 5 1]),
418
+ (1,
419
+ Vector space of degree 4 and dimension 1 over Finite Field of size 7
420
+ User basis matrix:
421
+ [0 1 1 4]),
422
+ (2,
423
+ Vector space of degree 4 and dimension 2 over Finite Field of size 7
424
+ User basis matrix:
425
+ [1 3 0 1]
426
+ [0 0 1 1])]
427
+
428
+ Sage example in ./linalg.tex, line 2770::
429
+
430
+ sage: A.eigenmatrix_right()
431
+ (
432
+ [4 0 0 0] [1 0 1 0]
433
+ [0 1 0 0] [5 1 3 0]
434
+ [0 0 2 0] [5 1 0 1]
435
+ [0 0 0 2], [1 4 1 1]
436
+ )
437
+
438
+ Sage example in ./linalg.tex, line 2930::
439
+
440
+ sage: A = matrix(ZZ,4,[3,-1,0,-1,0,2,0,-1,1,-1,2,0,1,-1,-1,3])
441
+ sage: A.jordan_form()
442
+ [3|0|0 0]
443
+ [-+-+---]
444
+ [0|3|0 0]
445
+ [-+-+---]
446
+ [0|0|2 1]
447
+ [0|0|0 2]
448
+
449
+ Sage example in ./linalg.tex, line 2949::
450
+
451
+ sage: J,U = A.jordan_form(transformation=True)
452
+ sage: U^-1*A*U == J
453
+ True
454
+ """