passagemath-standard-no-symbolics 10.6.45__cp313-cp313-macosx_13_0_arm64.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 (83) hide show
  1. passagemath_standard_no_symbolics/__init__.py +1 -0
  2. passagemath_standard_no_symbolics-10.6.45.data/scripts/sage-grep +5 -0
  3. passagemath_standard_no_symbolics-10.6.45.data/scripts/sage-grepdoc +5 -0
  4. passagemath_standard_no_symbolics-10.6.45.data/scripts/sage-list-packages +103 -0
  5. passagemath_standard_no_symbolics-10.6.45.dist-info/METADATA +150 -0
  6. passagemath_standard_no_symbolics-10.6.45.dist-info/RECORD +83 -0
  7. passagemath_standard_no_symbolics-10.6.45.dist-info/WHEEL +6 -0
  8. passagemath_standard_no_symbolics-10.6.45.dist-info/top_level.txt +2 -0
  9. sage/all.py +207 -0
  10. sage/all_cmdline.py +36 -0
  11. sage/cli/__init__.py +61 -0
  12. sage/cli/__main__.py +5 -0
  13. sage/cli/eval_cmd.py +45 -0
  14. sage/cli/eval_cmd_test.py +25 -0
  15. sage/cli/interactive_shell_cmd.py +28 -0
  16. sage/cli/notebook_cmd.py +51 -0
  17. sage/cli/notebook_cmd_test.py +39 -0
  18. sage/cli/options.py +26 -0
  19. sage/cli/run_file_cmd.py +50 -0
  20. sage/cli/version_cmd.py +26 -0
  21. sage/databases/all.py +83 -0
  22. sage/databases/cubic_hecke_db.py +1527 -0
  23. sage/dynamics/all.py +31 -0
  24. sage/dynamics/surface_dynamics_deprecation.py +32 -0
  25. sage/ext_data/kenzo/CP2.txt +45 -0
  26. sage/ext_data/kenzo/CP3.txt +349 -0
  27. sage/ext_data/kenzo/CP4.txt +4774 -0
  28. sage/ext_data/kenzo/README.txt +49 -0
  29. sage/ext_data/kenzo/S4.txt +20 -0
  30. sage/ext_data/mwrank/PRIMES +1 -0
  31. sage/ext_data/nbconvert/postprocess.py +48 -0
  32. sage/ext_data/nbconvert/rst_sage.tpl +99 -0
  33. sage/ext_data/nodoctest +0 -0
  34. sage/ext_data/notebook-ipython/kernel.json.in +11 -0
  35. sage/ext_data/notebook-ipython/logo-64x64.png +0 -0
  36. sage/ext_data/notebook-ipython/logo.svg +352 -0
  37. sage/ext_data/valgrind/pyalloc.supp +58 -0
  38. sage/ext_data/valgrind/sage-additional.supp +417 -0
  39. sage/ext_data/valgrind/sage.supp +43 -0
  40. sage/ext_data/valgrind/valgrind-python.supp +480 -0
  41. sage/geometry/all.py +12 -0
  42. sage/groups/matrix_gps/pickling_overrides.py +110 -0
  43. sage/homology/tests.py +66 -0
  44. sage/interacts/algebra.py +20 -0
  45. sage/interacts/all.py +25 -0
  46. sage/interacts/calculus.py +24 -0
  47. sage/interacts/fractals.py +18 -0
  48. sage/interacts/geometry.py +19 -0
  49. sage/interacts/library.py +1950 -0
  50. sage/interacts/library_cython.cpython-313-darwin.so +0 -0
  51. sage/interacts/statistics.py +19 -0
  52. sage/interfaces/axiom.py +1002 -0
  53. sage/interfaces/kash.py +834 -0
  54. sage/interfaces/lie.py +950 -0
  55. sage/interfaces/matlab.py +413 -0
  56. sage/interfaces/mupad.py +686 -0
  57. sage/interfaces/octave.py +858 -0
  58. sage/interfaces/phc.py +943 -0
  59. sage/interfaces/psage.py +189 -0
  60. sage/interfaces/qsieve.py +4 -0
  61. sage/interfaces/r.py +2096 -0
  62. sage/interfaces/read_data.py +46 -0
  63. sage/interfaces/scilab.py +576 -0
  64. sage/interfaces/tests.py +81 -0
  65. sage/libs/all.py +11 -0
  66. sage/libs/cremona/__init__.py +0 -0
  67. sage/libs/mwrank/__init__.py +0 -0
  68. sage/logic/all.py +3 -0
  69. sage/logic/booleval.py +160 -0
  70. sage/logic/boolformula.py +1490 -0
  71. sage/logic/logic.py +856 -0
  72. sage/logic/logicparser.py +696 -0
  73. sage/logic/logictable.py +272 -0
  74. sage/logic/propcalc.py +311 -0
  75. sage/misc/all.py +28 -0
  76. sage/misc/lazy_attribute.pyi +11 -0
  77. sage/rings/all.py +48 -0
  78. sage/rings/commutative_algebra.py +38 -0
  79. sage/rings/finite_rings/all.py +21 -0
  80. sage/rings/numbers_abc.py +58 -0
  81. sage/rings/polynomial/all.py +22 -0
  82. sage/rings/polynomial/convolution.py +421 -0
  83. sage/symbolic/all__sagemath_standard_no_symbolics.py +0 -0
@@ -0,0 +1,480 @@
1
+ # From the CPython repository with the suppressions for _PyObject_Free
2
+ # and _PyObject_Realloc enabled. See the upstream suppression file for
3
+ # details:
4
+ #
5
+ # https://github.com/python/cpython/blob/main/Misc/valgrind-python.supp
6
+
7
+ # all tool names: Addrcheck,Memcheck,cachegrind,helgrind,massif
8
+ {
9
+ ADDRESS_IN_RANGE/Invalid read of size 4
10
+ Memcheck:Addr4
11
+ fun:address_in_range
12
+ }
13
+
14
+ {
15
+ ADDRESS_IN_RANGE/Invalid read of size 4
16
+ Memcheck:Value4
17
+ fun:address_in_range
18
+ }
19
+
20
+ {
21
+ ADDRESS_IN_RANGE/Invalid read of size 8 (x86_64 aka amd64)
22
+ Memcheck:Value8
23
+ fun:address_in_range
24
+ }
25
+
26
+ {
27
+ ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
28
+ Memcheck:Cond
29
+ fun:address_in_range
30
+ }
31
+
32
+ #
33
+ # Leaks (including possible leaks)
34
+ # Hmmm, I wonder if this masks some real leaks. I think it does.
35
+ # Will need to fix that.
36
+ #
37
+
38
+ {
39
+ Suppress leaking the GIL after a fork.
40
+ Memcheck:Leak
41
+ fun:malloc
42
+ fun:PyThread_allocate_lock
43
+ fun:PyEval_ReInitThreads
44
+ }
45
+
46
+ {
47
+ Suppress leaking the autoTLSkey. This looks like it shouldn't leak though.
48
+ Memcheck:Leak
49
+ fun:malloc
50
+ fun:PyThread_create_key
51
+ fun:_PyGILState_Init
52
+ fun:Py_InitializeEx
53
+ fun:Py_Main
54
+ }
55
+
56
+ {
57
+ Hmmm, is this a real leak or like the GIL?
58
+ Memcheck:Leak
59
+ fun:malloc
60
+ fun:PyThread_ReInitTLS
61
+ }
62
+
63
+ {
64
+ Handle PyMalloc confusing valgrind (possibly leaked)
65
+ Memcheck:Leak
66
+ fun:realloc
67
+ fun:_PyObject_GC_Resize
68
+ fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
69
+ }
70
+
71
+ {
72
+ Handle PyMalloc confusing valgrind (possibly leaked)
73
+ Memcheck:Leak
74
+ fun:malloc
75
+ fun:_PyObject_GC_New
76
+ fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
77
+ }
78
+
79
+ {
80
+ Handle PyMalloc confusing valgrind (possibly leaked)
81
+ Memcheck:Leak
82
+ fun:malloc
83
+ fun:_PyObject_GC_NewVar
84
+ fun:COMMENT_THIS_LINE_TO_DISABLE_LEAK_WARNING
85
+ }
86
+
87
+ #
88
+ # Non-python specific leaks
89
+ #
90
+
91
+ {
92
+ Handle pthread issue (possibly leaked)
93
+ Memcheck:Leak
94
+ fun:calloc
95
+ fun:allocate_dtv
96
+ fun:_dl_allocate_tls_storage
97
+ fun:_dl_allocate_tls
98
+ }
99
+
100
+ {
101
+ Handle pthread issue (possibly leaked)
102
+ Memcheck:Leak
103
+ fun:memalign
104
+ fun:_dl_allocate_tls_storage
105
+ fun:_dl_allocate_tls
106
+ }
107
+
108
+ {
109
+ ADDRESS_IN_RANGE/Invalid read of size 4
110
+ Memcheck:Addr4
111
+ fun:_PyObject_Free
112
+ }
113
+
114
+ {
115
+ ADDRESS_IN_RANGE/Invalid read of size 4
116
+ Memcheck:Value4
117
+ fun:_PyObject_Free
118
+ }
119
+
120
+ {
121
+ ADDRESS_IN_RANGE/Use of uninitialised value of size 8
122
+ Memcheck:Addr8
123
+ fun:_PyObject_Free
124
+ }
125
+
126
+ {
127
+ ADDRESS_IN_RANGE/Use of uninitialised value of size 8
128
+ Memcheck:Value8
129
+ fun:_PyObject_Free
130
+ }
131
+
132
+ {
133
+ ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
134
+ Memcheck:Cond
135
+ fun:_PyObject_Free
136
+ }
137
+
138
+ {
139
+ ADDRESS_IN_RANGE/Invalid read of size 4
140
+ Memcheck:Addr4
141
+ fun:_PyObject_Realloc
142
+ }
143
+
144
+ {
145
+ ADDRESS_IN_RANGE/Invalid read of size 4
146
+ Memcheck:Value4
147
+ fun:_PyObject_Realloc
148
+ }
149
+
150
+ {
151
+ ADDRESS_IN_RANGE/Use of uninitialised value of size 8
152
+ Memcheck:Addr8
153
+ fun:_PyObject_Realloc
154
+ }
155
+
156
+ {
157
+ ADDRESS_IN_RANGE/Use of uninitialised value of size 8
158
+ Memcheck:Value8
159
+ fun:_PyObject_Realloc
160
+ }
161
+
162
+ {
163
+ ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value
164
+ Memcheck:Cond
165
+ fun:_PyObject_Realloc
166
+ }
167
+
168
+ ###
169
+ ### All the suppressions below are for errors that occur within libraries
170
+ ### that Python uses. The problems to not appear to be related to Python's
171
+ ### use of the libraries.
172
+ ###
173
+
174
+ {
175
+ Generic ubuntu ld problems
176
+ Memcheck:Addr8
177
+ obj:/lib/ld-2.4.so
178
+ obj:/lib/ld-2.4.so
179
+ obj:/lib/ld-2.4.so
180
+ obj:/lib/ld-2.4.so
181
+ }
182
+
183
+ {
184
+ Generic gentoo ld problems
185
+ Memcheck:Cond
186
+ obj:/lib/ld-2.3.4.so
187
+ obj:/lib/ld-2.3.4.so
188
+ obj:/lib/ld-2.3.4.so
189
+ obj:/lib/ld-2.3.4.so
190
+ }
191
+
192
+ {
193
+ DBM problems, see test_dbm
194
+ Memcheck:Param
195
+ write(buf)
196
+ fun:write
197
+ obj:/usr/lib/libdb1.so.2
198
+ obj:/usr/lib/libdb1.so.2
199
+ obj:/usr/lib/libdb1.so.2
200
+ obj:/usr/lib/libdb1.so.2
201
+ fun:dbm_close
202
+ }
203
+
204
+ {
205
+ DBM problems, see test_dbm
206
+ Memcheck:Value8
207
+ fun:memmove
208
+ obj:/usr/lib/libdb1.so.2
209
+ obj:/usr/lib/libdb1.so.2
210
+ obj:/usr/lib/libdb1.so.2
211
+ obj:/usr/lib/libdb1.so.2
212
+ fun:dbm_store
213
+ fun:dbm_ass_sub
214
+ }
215
+
216
+ {
217
+ DBM problems, see test_dbm
218
+ Memcheck:Cond
219
+ obj:/usr/lib/libdb1.so.2
220
+ obj:/usr/lib/libdb1.so.2
221
+ obj:/usr/lib/libdb1.so.2
222
+ fun:dbm_store
223
+ fun:dbm_ass_sub
224
+ }
225
+
226
+ {
227
+ DBM problems, see test_dbm
228
+ Memcheck:Cond
229
+ fun:memmove
230
+ obj:/usr/lib/libdb1.so.2
231
+ obj:/usr/lib/libdb1.so.2
232
+ obj:/usr/lib/libdb1.so.2
233
+ obj:/usr/lib/libdb1.so.2
234
+ fun:dbm_store
235
+ fun:dbm_ass_sub
236
+ }
237
+
238
+ {
239
+ GDBM problems, see test_gdbm
240
+ Memcheck:Param
241
+ write(buf)
242
+ fun:write
243
+ fun:gdbm_open
244
+
245
+ }
246
+
247
+ {
248
+ Uninitialised byte(s) false alarm, see bpo-35561
249
+ Memcheck:Param
250
+ epoll_ctl(event)
251
+ fun:epoll_ctl
252
+ fun:pyepoll_internal_ctl
253
+ }
254
+
255
+ {
256
+ ZLIB problems, see test_gzip
257
+ Memcheck:Cond
258
+ obj:/lib/libz.so.1.2.3
259
+ obj:/lib/libz.so.1.2.3
260
+ fun:deflate
261
+ }
262
+
263
+ {
264
+ Avoid problems w/readline doing a putenv and leaking on exit
265
+ Memcheck:Leak
266
+ fun:malloc
267
+ fun:xmalloc
268
+ fun:sh_set_lines_and_columns
269
+ fun:_rl_get_screen_size
270
+ fun:_rl_init_terminal_io
271
+ obj:/lib/libreadline.so.4.3
272
+ fun:rl_initialize
273
+ }
274
+
275
+ # Valgrind emits "Conditional jump or move depends on uninitialised value(s)"
276
+ # false alarms on GCC builtin strcmp() function. The GCC code is correct.
277
+ #
278
+ # Valgrind bug: https://bugs.kde.org/show_bug.cgi?id=264936
279
+ {
280
+ bpo-38118: Valgrind emits false alarm on GCC builtin strcmp()
281
+ Memcheck:Cond
282
+ fun:PyUnicode_Decode
283
+ }
284
+
285
+
286
+ ###
287
+ ### These occur from somewhere within the SSL, when running
288
+ ### test_socket_sll. They are too general to leave on by default.
289
+ ###
290
+ ###{
291
+ ### somewhere in SSL stuff
292
+ ### Memcheck:Cond
293
+ ### fun:memset
294
+ ###}
295
+ ###{
296
+ ### somewhere in SSL stuff
297
+ ### Memcheck:Value4
298
+ ### fun:memset
299
+ ###}
300
+ ###
301
+ ###{
302
+ ### somewhere in SSL stuff
303
+ ### Memcheck:Cond
304
+ ### fun:MD5_Update
305
+ ###}
306
+ ###
307
+ ###{
308
+ ### somewhere in SSL stuff
309
+ ### Memcheck:Value4
310
+ ### fun:MD5_Update
311
+ ###}
312
+
313
+ # Fedora's package "openssl-1.0.1-0.1.beta2.fc17.x86_64" on x86_64
314
+ # See http://bugs.python.org/issue14171
315
+ {
316
+ openssl 1.0.1 prng 1
317
+ Memcheck:Cond
318
+ fun:bcmp
319
+ fun:fips_get_entropy
320
+ fun:FIPS_drbg_instantiate
321
+ fun:RAND_init_fips
322
+ fun:OPENSSL_init_library
323
+ fun:SSL_library_init
324
+ fun:init_hashlib
325
+ }
326
+
327
+ {
328
+ openssl 1.0.1 prng 2
329
+ Memcheck:Cond
330
+ fun:fips_get_entropy
331
+ fun:FIPS_drbg_instantiate
332
+ fun:RAND_init_fips
333
+ fun:OPENSSL_init_library
334
+ fun:SSL_library_init
335
+ fun:init_hashlib
336
+ }
337
+
338
+ {
339
+ openssl 1.0.1 prng 3
340
+ Memcheck:Value8
341
+ fun:_x86_64_AES_encrypt_compact
342
+ fun:AES_encrypt
343
+ }
344
+
345
+ #
346
+ # All of these problems come from using test_socket_ssl
347
+ #
348
+ {
349
+ from test_socket_ssl
350
+ Memcheck:Cond
351
+ fun:BN_bin2bn
352
+ }
353
+
354
+ {
355
+ from test_socket_ssl
356
+ Memcheck:Cond
357
+ fun:BN_num_bits_word
358
+ }
359
+
360
+ {
361
+ from test_socket_ssl
362
+ Memcheck:Value4
363
+ fun:BN_num_bits_word
364
+ }
365
+
366
+ {
367
+ from test_socket_ssl
368
+ Memcheck:Cond
369
+ fun:BN_mod_exp_mont_word
370
+ }
371
+
372
+ {
373
+ from test_socket_ssl
374
+ Memcheck:Cond
375
+ fun:BN_mod_exp_mont
376
+ }
377
+
378
+ {
379
+ from test_socket_ssl
380
+ Memcheck:Param
381
+ write(buf)
382
+ fun:write
383
+ obj:/usr/lib/libcrypto.so.0.9.7
384
+ }
385
+
386
+ {
387
+ from test_socket_ssl
388
+ Memcheck:Cond
389
+ fun:RSA_verify
390
+ }
391
+
392
+ {
393
+ from test_socket_ssl
394
+ Memcheck:Value4
395
+ fun:RSA_verify
396
+ }
397
+
398
+ {
399
+ from test_socket_ssl
400
+ Memcheck:Value4
401
+ fun:DES_set_key_unchecked
402
+ }
403
+
404
+ {
405
+ from test_socket_ssl
406
+ Memcheck:Value4
407
+ fun:DES_encrypt2
408
+ }
409
+
410
+ {
411
+ from test_socket_ssl
412
+ Memcheck:Cond
413
+ obj:/usr/lib/libssl.so.0.9.7
414
+ }
415
+
416
+ {
417
+ from test_socket_ssl
418
+ Memcheck:Value4
419
+ obj:/usr/lib/libssl.so.0.9.7
420
+ }
421
+
422
+ {
423
+ from test_socket_ssl
424
+ Memcheck:Cond
425
+ fun:BUF_MEM_grow_clean
426
+ }
427
+
428
+ {
429
+ from test_socket_ssl
430
+ Memcheck:Cond
431
+ fun:memcpy
432
+ fun:ssl3_read_bytes
433
+ }
434
+
435
+ {
436
+ from test_socket_ssl
437
+ Memcheck:Cond
438
+ fun:SHA1_Update
439
+ }
440
+
441
+ {
442
+ from test_socket_ssl
443
+ Memcheck:Value4
444
+ fun:SHA1_Update
445
+ }
446
+
447
+ {
448
+ test_buffer_non_debug
449
+ Memcheck:Addr4
450
+ fun:PyUnicodeUCS2_FSConverter
451
+ }
452
+
453
+ {
454
+ test_buffer_non_debug
455
+ Memcheck:Addr4
456
+ fun:PyUnicode_FSConverter
457
+ }
458
+
459
+ {
460
+ wcscmp_false_positive
461
+ Memcheck:Addr8
462
+ fun:wcscmp
463
+ fun:_PyOS_GetOpt
464
+ fun:Py_Main
465
+ fun:main
466
+ }
467
+
468
+ # Additional suppressions for the unified decimal tests:
469
+ {
470
+ test_decimal
471
+ Memcheck:Addr4
472
+ fun:PyUnicodeUCS2_FSConverter
473
+ }
474
+
475
+ {
476
+ test_decimal2
477
+ Memcheck:Addr4
478
+ fun:PyUnicode_FSConverter
479
+ }
480
+
sage/geometry/all.py ADDED
@@ -0,0 +1,12 @@
1
+ from sage.geometry.all__sagemath_polyhedra import *
2
+
3
+ try:
4
+ from sage.geometry.all__sagemath_symbolics import *
5
+ except ImportError:
6
+ pass
7
+
8
+
9
+ try:
10
+ from sage.geometry.all__sagemath_gap import *
11
+ except ImportError:
12
+ pass
@@ -0,0 +1,110 @@
1
+ """
2
+ Overrides to unpickle old matrix groups
3
+ """
4
+
5
+ from sage.structure.sage_object import register_unpickle_override
6
+
7
+ from sage.groups.matrix_gps.finitely_generated_gap import FinitelyGeneratedMatrixGroup_gap
8
+ from sage.groups.matrix_gps.group_element_gap import MatrixGroupElement_gap
9
+ from sage.groups.matrix_gps.linear import GL, LinearMatrixGroup_generic
10
+
11
+
12
+ class LegacyMatrixGroup(FinitelyGeneratedMatrixGroup_gap):
13
+
14
+ def __setstate__(self, state):
15
+ """
16
+ Restore from old pickle.
17
+
18
+ EXAMPLES::
19
+
20
+ sage: from sage.groups.matrix_gps.pickling_overrides import LegacyMatrixGroup
21
+ sage: state = dict()
22
+ sage: state['_MatrixGroup_gap__n'] = 2
23
+ sage: state['_MatrixGroup_gap__R'] = GF(3)
24
+ sage: state['_gensG'] = [ matrix(GF(3), [[1,2],[0,1]]) ]
25
+ sage: M = LegacyMatrixGroup.__new__(LegacyMatrixGroup)
26
+ sage: M.__setstate__(state)
27
+ sage: M
28
+ Matrix group over Finite Field of size 3 with 1 generators (
29
+ [1 2]
30
+ [0 1]
31
+ )
32
+ """
33
+ matrix_gens = state['_gensG']
34
+ ring = state['_MatrixGroup_gap__R']
35
+ degree = state['_MatrixGroup_gap__n']
36
+ from sage.libs.gap.libgap import libgap
37
+ libgap_group = libgap.Group(libgap(matrix_gens))
38
+ self.__init__(degree, ring, libgap_group)
39
+
40
+
41
+ register_unpickle_override(
42
+ 'sage.groups.matrix_gps.matrix_group', 'MatrixGroup_gens_finite_field',
43
+ LegacyMatrixGroup)
44
+
45
+
46
+ class LegacyMatrixGroupElement(MatrixGroupElement_gap):
47
+
48
+ def __setstate__(self, state):
49
+ """
50
+ Restore from old pickle.
51
+
52
+ EXAMPLES::
53
+
54
+ sage: from sage.groups.matrix_gps.pickling_overrides import LegacyMatrixGroup, LegacyMatrixGroupElement
55
+ sage: state = dict()
56
+ sage: state['_MatrixGroup_gap__n'] = 2
57
+ sage: state['_MatrixGroup_gap__R'] = GF(3)
58
+ sage: state['_gensG'] = [ matrix(GF(3), [[1,2],[0,1]]) ]
59
+ sage: M = LegacyMatrixGroup.__new__(LegacyMatrixGroup)
60
+ sage: M.__setstate__(state)
61
+ sage: M
62
+ Matrix group over Finite Field of size 3 with 1 generators (
63
+ [1 2]
64
+ [0 1]
65
+ )
66
+ sage: state = [ M, {'_MatrixGroupElement__mat':matrix(GF(3), [[1,2],[0,1]])} ]
67
+ sage: m = LegacyMatrixGroupElement.__new__(LegacyMatrixGroupElement)
68
+ sage: m.__setstate__(state)
69
+ sage: m
70
+ [1 2]
71
+ [0 1]
72
+ """
73
+ parent = state[0]
74
+ m = state[1]['_MatrixGroupElement__mat']
75
+ m = parent.matrix_space()(m)
76
+ self.__init__(parent, m, check=False)
77
+
78
+
79
+ register_unpickle_override(
80
+ 'sage.groups.matrix_gps.matrix_group_element', 'MatrixGroupElement',
81
+ LegacyMatrixGroupElement)
82
+
83
+
84
+ class LegacyGeneralLinearGroup(LinearMatrixGroup_generic):
85
+
86
+ def __setstate__(self, state):
87
+ """
88
+ Restore from old pickle.
89
+
90
+ EXAMPLES::
91
+
92
+ sage: from sage.groups.group import Group
93
+ sage: from sage.groups.matrix_gps.pickling_overrides import LegacyGeneralLinearGroup
94
+ sage: state = dict()
95
+ sage: state['_MatrixGroup_gap__n'] = 2
96
+ sage: state['_MatrixGroup_gap__R'] = ZZ
97
+ sage: M = Group.__new__(LegacyGeneralLinearGroup)
98
+ sage: M.__setstate__(state)
99
+ sage: M
100
+ General Linear Group of degree 2 over Integer Ring
101
+ """
102
+ ring = state['_MatrixGroup_gap__R']
103
+ n = state['_MatrixGroup_gap__n']
104
+ G = GL(n, ring)
105
+ self.__init__(G.degree(), G.base_ring(), G._special, G._name_string, G._latex_string)
106
+
107
+
108
+ register_unpickle_override(
109
+ 'sage.groups.matrix_gps.general_linear', 'GeneralLinearGroup_finite_field',
110
+ LegacyGeneralLinearGroup)
sage/homology/tests.py ADDED
@@ -0,0 +1,66 @@
1
+ # sage.doctest: needs sage.modules
2
+ """
3
+ Tests for chain complexes, simplicial complexes, etc.
4
+ """
5
+
6
+ from sage.misc.random_testing import random_testing
7
+ from sage.misc.prandom import randint
8
+ from sage.matrix.constructor import random_matrix
9
+ from sage.homology.chain_complex import ChainComplex
10
+ from sage.rings.integer_ring import ZZ
11
+ from sage.topology.simplicial_complex_examples import RandomComplex
12
+
13
+
14
+ def random_chain_complex(level=1):
15
+ """
16
+ Return a random chain complex, defined by specifying a single
17
+ random matrix in a random degree, with differential of degree
18
+ either 1 or -1. The matrix is randomly sparse or dense.
19
+
20
+ - ``level`` -- positive integer (default: 1); measure of complexity. The larger
21
+ this is, the larger the matrix can be, and the larger its degree can be
22
+ in the chain complex.
23
+
24
+ EXAMPLES::
25
+
26
+ sage: from sage.homology.tests import random_chain_complex
27
+ sage: C = random_chain_complex()
28
+ sage: C # random
29
+ Chain complex with at most ... nonzero terms over Integer Ring
30
+ sage: len(C.nonzero_degrees()) in [0, 1, 2]
31
+ True
32
+ sage: C.degree_of_differential() in [-1, 1]
33
+ True
34
+ """
35
+ bound = 50 * level
36
+ nrows = randint(0, bound)
37
+ ncols = randint(0, bound)
38
+ sparseness = bool(randint(0, 1))
39
+ mat = random_matrix(ZZ, nrows, ncols, sparse=sparseness)
40
+ dim = randint(-bound, bound)
41
+ deg = 2 * randint(0, 1) - 1 # -1 or 1
42
+ return ChainComplex({dim: mat}, degree=deg)
43
+
44
+
45
+ def random_simplicial_complex(level=1, p=0.5):
46
+ """
47
+ Return a random simplicial complex.
48
+
49
+ - ``level`` -- positive integer (default: 1); measure of complexity. The
50
+ larger this is, the more vertices and therefore the larger the possible
51
+ dimension of the complex.
52
+ - ``p`` -- float between 0 and 1 (default: 0.5); probability, passed on to
53
+ ``simplicial_complexes.RandomComplex``
54
+
55
+ EXAMPLES::
56
+
57
+ sage: from sage.homology.tests import random_simplicial_complex
58
+ sage: X = random_simplicial_complex()
59
+ sage: X # random
60
+ Simplicial complex with vertex set (0, 1, 2, 3, 4, 5, 6, 7) and 31 facets
61
+ sage: X.dimension() < 11
62
+ True
63
+ """
64
+ n = randint(2, 4 * level)
65
+ dim = randint(1, n)
66
+ return RandomComplex(n, dim, p)
@@ -0,0 +1,20 @@
1
+ """
2
+ Interacts for Algebra and Number Theory
3
+
4
+ AUTHORS:
5
+
6
+ - Harald Schilly (2011-01-16): initial version (:issue:`9623`)
7
+ partially based on work by Lauri Ruotsalainen
8
+ """
9
+
10
+ # ****************************************************************************
11
+ # Copyright (C) 2011 Harald Schilly <harald.schilly@gmail.com>
12
+ #
13
+ # Distributed under the terms of the GNU General Public License (GPL)
14
+ # as published by the Free Software Foundation; either version 2 of
15
+ # the License, or (at your option) any later version.
16
+ # https://www.gnu.org/licenses/
17
+ # ****************************************************************************
18
+
19
+
20
+ from .library import polar_prime_spiral
sage/interacts/all.py ADDED
@@ -0,0 +1,25 @@
1
+ """
2
+ Interacts included with sage
3
+
4
+ AUTHORS:
5
+
6
+ - Harald Schilly (2011-01-16): initial version (#9623) partially based on work by Lauri Ruotsalainen
7
+ """
8
+
9
+ # ****************************************************************************
10
+ # Copyright (C) 2011 Harald Schilly <harald.schilly@gmail.com>
11
+ #
12
+ # Distributed under the terms of the GNU General Public License (GPL)
13
+ # as published by the Free Software Foundation; either version 2 of
14
+ # the License, or (at your option) any later version.
15
+ # https://www.gnu.org/licenses/
16
+ # ****************************************************************************
17
+ from sage.misc.lazy_import import lazy_import
18
+
19
+ from sage.interacts import calculus
20
+ from sage.interacts import geometry
21
+ from sage.interacts import statistics
22
+ from sage.interacts import fractals
23
+ from sage.interacts import algebra
24
+ lazy_import('sage.interacts.library', 'demo')
25
+ del lazy_import