passagemath-standard-no-symbolics 10.6.10__cp310-cp310-macosx_14_0_arm64.whl → 10.6.12__cp310-cp310-macosx_14_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.

Potentially problematic release.


This version of passagemath-standard-no-symbolics might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: passagemath-standard-no-symbolics
3
- Version: 10.6.10
3
+ Version: 10.6.12
4
4
  Summary: passagemath: Sage library without the symbolics subsystem
5
5
  Author-email: The Sage Developers <sage-support@googlegroups.com>
6
6
  Maintainer: Matthias Köppe, passagemath contributors
@@ -29,42 +29,42 @@ Classifier: Topic :: Scientific/Engineering :: Mathematics
29
29
  Requires-Python: <3.14,>=3.10
30
30
  Description-Content-Type: text/x-rst
31
31
  Requires-Dist: six>=1.15.0
32
- Requires-Dist: passagemath-brial~=10.6.10.0
33
- Requires-Dist: passagemath-categories~=10.6.10.0
34
- Requires-Dist: passagemath-cddlib~=10.6.10.0
35
- Requires-Dist: passagemath-combinat~=10.6.10.0
36
- Requires-Dist: passagemath-eclib~=10.6.10.0
37
- Requires-Dist: passagemath-environment~=10.6.10.0
38
- Requires-Dist: passagemath-flint~=10.6.10.0
39
- Requires-Dist: passagemath-gap~=10.6.10.0
40
- Requires-Dist: passagemath-gap-pkg-transgrp-data~=10.6.10.0
41
- Requires-Dist: passagemath-gap-pkg-ctbllib-data~=10.6.10.0
42
- Requires-Dist: passagemath-gap-pkg-tomlib-data~=10.6.10.0
43
- Requires-Dist: passagemath-gap-pkg-irredsol-data~=10.6.10.0
44
- Requires-Dist: passagemath-giac~=10.6.10.0
45
- Requires-Dist: passagemath-glpk~=10.6.10.0
46
- Requires-Dist: passagemath-graphs~=10.6.10.0
47
- Requires-Dist: passagemath-groups~=10.6.10.0
48
- Requires-Dist: passagemath-homfly~=10.6.10.0
49
- Requires-Dist: passagemath-lcalc~=10.6.10.0
50
- Requires-Dist: passagemath-libbraiding~=10.6.10.0
51
- Requires-Dist: passagemath-libecm~=10.6.10.0
52
- Requires-Dist: passagemath-linbox~=10.6.10.0
53
- Requires-Dist: passagemath-modules~=10.6.10.0
54
- Requires-Dist: passagemath-nauty~=10.6.10.0
55
- Requires-Dist: passagemath-ntl~=10.6.10.0
56
- Requires-Dist: passagemath-objects~=10.6.10.0
57
- Requires-Dist: passagemath-palp~=10.6.10.0
58
- Requires-Dist: passagemath-pari~=10.6.10.0
59
- Requires-Dist: passagemath-pari-galdata~=10.6.10.0
60
- Requires-Dist: passagemath-pari-seadata-small~=10.6.10.0
61
- Requires-Dist: passagemath-planarity~=10.6.10.0
62
- Requires-Dist: passagemath-plot~=10.6.10.0
63
- Requires-Dist: passagemath-polyhedra~=10.6.10.0
64
- Requires-Dist: passagemath-repl~=10.6.10.0
65
- Requires-Dist: passagemath-schemes~=10.6.10.0
66
- Requires-Dist: passagemath-singular~=10.6.10.0
67
- Requires-Dist: passagemath-tachyon~=10.6.10.0
32
+ Requires-Dist: passagemath-brial~=10.6.12.0
33
+ Requires-Dist: passagemath-categories~=10.6.12.0
34
+ Requires-Dist: passagemath-cddlib~=10.6.12.0
35
+ Requires-Dist: passagemath-combinat~=10.6.12.0
36
+ Requires-Dist: passagemath-eclib~=10.6.12.0
37
+ Requires-Dist: passagemath-environment~=10.6.12.0
38
+ Requires-Dist: passagemath-flint~=10.6.12.0
39
+ Requires-Dist: passagemath-gap~=10.6.12.0
40
+ Requires-Dist: passagemath-gap-pkg-transgrp-data~=10.6.12.0
41
+ Requires-Dist: passagemath-gap-pkg-ctbllib-data~=10.6.12.0
42
+ Requires-Dist: passagemath-gap-pkg-tomlib-data~=10.6.12.0
43
+ Requires-Dist: passagemath-gap-pkg-irredsol-data~=10.6.12.0
44
+ Requires-Dist: passagemath-giac~=10.6.12.0
45
+ Requires-Dist: passagemath-glpk~=10.6.12.0
46
+ Requires-Dist: passagemath-graphs~=10.6.12.0
47
+ Requires-Dist: passagemath-groups~=10.6.12.0
48
+ Requires-Dist: passagemath-homfly~=10.6.12.0
49
+ Requires-Dist: passagemath-lcalc~=10.6.12.0
50
+ Requires-Dist: passagemath-libbraiding~=10.6.12.0
51
+ Requires-Dist: passagemath-libecm~=10.6.12.0
52
+ Requires-Dist: passagemath-linbox~=10.6.12.0
53
+ Requires-Dist: passagemath-modules~=10.6.12.0
54
+ Requires-Dist: passagemath-nauty~=10.6.12.0
55
+ Requires-Dist: passagemath-ntl~=10.6.12.0
56
+ Requires-Dist: passagemath-objects~=10.6.12.0
57
+ Requires-Dist: passagemath-palp~=10.6.12.0
58
+ Requires-Dist: passagemath-pari~=10.6.12.0
59
+ Requires-Dist: passagemath-pari-galdata~=10.6.12.0
60
+ Requires-Dist: passagemath-pari-seadata-small~=10.6.12.0
61
+ Requires-Dist: passagemath-planarity~=10.6.12.0
62
+ Requires-Dist: passagemath-plot~=10.6.12.0
63
+ Requires-Dist: passagemath-polyhedra~=10.6.12.0
64
+ Requires-Dist: passagemath-repl~=10.6.12.0
65
+ Requires-Dist: passagemath-schemes~=10.6.12.0
66
+ Requires-Dist: passagemath-singular~=10.6.12.0
67
+ Requires-Dist: passagemath-tachyon~=10.6.12.0
68
68
  Requires-Dist: cysignals<1.12.4; sys_platform == "win32"
69
69
  Requires-Dist: cysignals!=1.12.0,>=1.11.2
70
70
  Requires-Dist: cython!=3.0.3,<4.0,>=3.0
@@ -1,16 +1,16 @@
1
- passagemath_standard_no_symbolics-10.6.10.data/scripts/sage-grep,sha256=y7No1LTYggkkven17dnoZKnBiZm8TO6iw8KEJkJSRmg,119
2
- passagemath_standard_no_symbolics-10.6.10.data/scripts/sage-list-packages,sha256=4vwXzr1iKz2NPJwlfd7j0uBExqkxkSyhyyIqPtqVFFM,3650
3
- passagemath_standard_no_symbolics-10.6.10.data/scripts/sage-grepdoc,sha256=R855yu3m539GvfdhptwsDG3Dgwb8wvHBJQDhBIrv4jA,70
4
- passagemath_standard_no_symbolics-10.6.10.dist-info/RECORD,,
5
- passagemath_standard_no_symbolics-10.6.10.dist-info/WHEEL,sha256=BY2G-e9pCnwWPELNk7GCw-k-0y7AcCiRrhf_nAfhQVk,136
6
- passagemath_standard_no_symbolics-10.6.10.dist-info/top_level.txt,sha256=hibFyzQHiLOMK68qL1OWsNKaXOmSXqZjeLTBem6Yy7I,5
7
- passagemath_standard_no_symbolics-10.6.10.dist-info/METADATA,sha256=_XjLVLCdtS2lGMXOJoKj0Og41PxLS_1txpanPhwRx5o,6875
1
+ passagemath_standard_no_symbolics-10.6.12.dist-info/RECORD,,
2
+ passagemath_standard_no_symbolics-10.6.12.dist-info/WHEEL,sha256=BY2G-e9pCnwWPELNk7GCw-k-0y7AcCiRrhf_nAfhQVk,136
3
+ passagemath_standard_no_symbolics-10.6.12.dist-info/top_level.txt,sha256=hibFyzQHiLOMK68qL1OWsNKaXOmSXqZjeLTBem6Yy7I,5
4
+ passagemath_standard_no_symbolics-10.6.12.dist-info/METADATA,sha256=GTr8nDhgIH40BN0-iK0Kp5SRQ1-7YqRyYzD5gpGB87w,6875
5
+ passagemath_standard_no_symbolics-10.6.12.data/scripts/sage-grep,sha256=y7No1LTYggkkven17dnoZKnBiZm8TO6iw8KEJkJSRmg,119
6
+ passagemath_standard_no_symbolics-10.6.12.data/scripts/sage-list-packages,sha256=4vwXzr1iKz2NPJwlfd7j0uBExqkxkSyhyyIqPtqVFFM,3650
7
+ passagemath_standard_no_symbolics-10.6.12.data/scripts/sage-grepdoc,sha256=R855yu3m539GvfdhptwsDG3Dgwb8wvHBJQDhBIrv4jA,70
8
8
  sage/all_cmdline.py,sha256=CJOAQpBYbSivmPwuVeWH-9G1tPpRuckNlEV7VXOTb7c,1252
9
9
  sage/all.py,sha256=_7HnXjnSwDO3HYTZIpkw5-Jpmp45IzzpIoWwAQXXu7Q,6297
10
10
  sage/misc/lazy_attribute.pyi,sha256=lEUbITjqow28vc89Nov-k82LDLrYH6D2Q86kiYbBCJ4,425
11
11
  sage/misc/all.py,sha256=oIpAlwSBebAtKQxqIcrdHSu97Ea56FIH7CdrzwUBN7g,1372
12
12
  sage/databases/cubic_hecke_db.py,sha256=r5L5BdjpoxcnkdtpdCLhj9XfdiU4jZNZnjzqYph_qaE,63703
13
- sage/databases/all.py,sha256=OFMxE5N1THo0sw9jefDbVc-OmF2B21p2Mw9EngRMTHk,2537
13
+ sage/databases/all.py,sha256=7bgfPwuS97DCdHgKj61zXoBibwoGkRgtS9kf_jwcQ50,2647
14
14
  sage/dynamics/surface_dynamics_deprecation.py,sha256=Dxxnecz3JvFvJkehFqM-TuheZtTTWm1tvW7Ac4D68AA,1749
15
15
  sage/dynamics/all.py,sha256=tZTKTXcMirX--xGRQgw4y5j4BA0vd_xPmcDg79_OsQs,854
16
16
  sage/ext_data/nodoctest,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -36,7 +36,7 @@ sage/interacts/calculus.py,sha256=I1YYNg4JNrNscQDg7Uj2OhHaz8YwFcBYJbXpFWrgd-4,10
36
36
  sage/interacts/fractals.py,sha256=ut5BvBl9ipTCVDdtxFx6qfDR2pwwPX4rwuHKhIlvkyg,677
37
37
  sage/interacts/geometry.py,sha256=E5DfdtL6n41ebMn_DkYZx8cjPdNA--lvoaVlq-hFGmM,722
38
38
  sage/interacts/statistics.py,sha256=msjkOecE0O26CBnHAXw714UbxHxFAFTFOpRZfIZ7Cow,656
39
- sage/interacts/library_cython.cpython-310-darwin.so,sha256=n7elcpD5Ttb3FhI2jdsDsNaWZi2bx7ASe3a7iCAHl7Y,78184
39
+ sage/interacts/library_cython.cpython-310-darwin.so,sha256=sP1dNLzCHK6Bsa9YJ9A6jaurA_JL05sZJ6XYqu3uYu4,78184
40
40
  sage/logic/logicparser.py,sha256=Y3saIYmF9aKJI-Ao4a0Nx0YwxA6wNWS9GKwpzOcrfiU,21269
41
41
  sage/logic/all.py,sha256=k8iqDAtgNbd6ogkp3N2IRiuvxbEgCEkRr9oXwAJX7HM,76
42
42
  sage/logic/propcalc.py,sha256=Ne4k0ptXC0xj6NEvs0LJ6SmH2uKqYPDeey9rE1Gv2YI,8672
@@ -70,7 +70,6 @@ sage/homology/tests.py,sha256=acwIBFS2EBorSUZxXhJatNoywKznl23ka4ImXyNvBrg,2288
70
70
  sage/interfaces/scilab.py,sha256=B-pvSah83Ah3JA1Z4TJ_kvNuVFiSUl_tWFQcPLf5uak,16422
71
71
  sage/interfaces/psage.py,sha256=bmZDJrhnl94eDjnxb1K8tqmkuk-Xy-VmZCIk8dmLMCA,6108
72
72
  sage/interfaces/r.py,sha256=BjJqFfm48CZdHUfKzQ_0bYHpYXK17P1Uii5SSwjE0rA,60773
73
- sage/interfaces/lisp.py,sha256=UIeIjbA7OXBqn5tiTKWrS23gGtNUOVo0z_u-GXuVfYw,15016
74
73
  sage/interfaces/qsieve.py,sha256=YdBXrJAsDIAvhXFuzmO1Y-Zq73W6-_HCm4Mzcb5HjJU,169
75
74
  sage/interfaces/mupad.py,sha256=RsPAsFh03gM8gw73NIyBQtNY9liS8K7Xs_sVTzICROU,21332
76
75
  sage/interfaces/matlab.py,sha256=VsqEOhwack401-7vdOtQ2Cj0ELZuX84Qf5ctlUr9u_w,11856
sage/databases/all.py CHANGED
@@ -72,6 +72,11 @@ try:
72
72
  except ImportError:
73
73
  pass
74
74
 
75
+ try:
76
+ from sage.databases.all__sagemath_database_stein_watkins_mini import *
77
+ except ImportError:
78
+ pass
79
+
75
80
  try:
76
81
  from sage.databases.all__sagemath_database_symbolic_data import *
77
82
  except ImportError:
sage/interfaces/lisp.py DELETED
@@ -1,574 +0,0 @@
1
- r"""
2
- Lisp Interface
3
-
4
- EXAMPLES::
5
-
6
- sage: lisp.eval('(* 4 5)')
7
- '20'
8
- sage: a = lisp(3); b = lisp(5)
9
- sage: a + b
10
- 8
11
- sage: a * b
12
- 15
13
- sage: a / b
14
- 3/5
15
- sage: a - b
16
- -2
17
- sage: a.sin()
18
- 0.14112
19
- sage: b.cos()
20
- 0.2836622
21
- sage: a.exp()
22
- 20.085537
23
- sage: lisp.eval('(+ %s %s)'%(a.name(), b.name()))
24
- '8'
25
-
26
- One can define functions and the interface supports object-oriented
27
- notation for calling them::
28
-
29
- sage: lisp.eval('(defun factorial (n) (if (= n 1) 1 (* n (factorial (- n 1)))))')
30
- 'FACTORIAL'
31
- sage: lisp('(factorial 10)')
32
- 3628800
33
- sage: lisp(10).factorial()
34
- 3628800
35
- sage: a = lisp(17)
36
- sage: a.factorial()
37
- 355687428096000
38
-
39
- AUTHORS:
40
- -- William Stein (first version)
41
- -- William Stein (2007-06-20): significant improvements.
42
- """
43
-
44
- ##########################################################################
45
- #
46
- # Copyright (C) 2006 William Stein <wstein@gmail.com>
47
- #
48
- # Distributed under the terms of the GNU General Public License (GPL)
49
- #
50
- # https://www.gnu.org/licenses/
51
- #
52
- ##########################################################################
53
- import os
54
- import random
55
-
56
- from .expect import Expect, ExpectElement, ExpectFunction, FunctionElement, gc_disabled
57
- from sage.structure.element import RingElement, parent
58
- from sage.misc.instancedoc import instancedoc
59
- from sage.structure.richcmp import rich_to_bool
60
-
61
-
62
- class Lisp(Expect):
63
- def __init__(self,
64
- maxread=None, script_subdirectory=None,
65
- logfile=None,
66
- server=None,
67
- server_tmpdir=None):
68
- """
69
- EXAMPLES::
70
-
71
- sage: lisp == loads(dumps(lisp))
72
- True
73
- """
74
- Expect.__init__(self,
75
-
76
- # The capitalized version of this is used for printing.
77
- name='Lisp',
78
-
79
- # This is regexp of the input prompt. If you can change
80
- # it to be very obfuscated that would be better. Even
81
- # better is to use sequence numbers.
82
- prompt='> ',
83
-
84
- # This is the command that starts up your program
85
- command='ecl',
86
-
87
- server=server,
88
- server_tmpdir=server_tmpdir,
89
- script_subdirectory=script_subdirectory,
90
-
91
- # If this is true, then whenever the user presses Control-C to
92
- # interrupt a calculation, the whole interface is restarted.
93
- restart_on_ctrlc=False,
94
-
95
- # If true, print out a message when starting
96
- # up the command when you first send a command
97
- # to this interface.
98
- verbose_start=False,
99
-
100
- logfile=logfile,
101
-
102
- # If an input is longer than this number of characters, then
103
- # try to switch to outputting to a file.
104
- eval_using_file_cutoff=1024)
105
-
106
- self.__seq = 0
107
- self.__in_seq = 1
108
-
109
- def eval(self, code, strip=True, **kwds):
110
- """
111
- EXAMPLES::
112
-
113
- sage: lisp.eval('(+ 2 2)')
114
- '4'
115
-
116
- TESTS:
117
-
118
- Verify that it works when input == output::
119
-
120
- sage: lisp.eval('2')
121
- '2'
122
- """
123
- with gc_disabled():
124
- self._synchronize()
125
- code = str(code)
126
- code = code.strip()
127
- code = code.replace('\n', ' ')
128
- x = []
129
- for L in code.split('\n'):
130
- if L:
131
- try:
132
- s = self.__in_seq + 1
133
- M = self._eval_line(L, wait_for_prompt=self._prompt)
134
- if M.startswith(L + "\n"):
135
- M = M[len(L):] # skip L in case it was echoed
136
- x.append(M.strip())
137
- self.__in_seq = s
138
- except TypeError as s:
139
- return 'error evaluating "%s":\n%s' % (code, s)
140
- return '\n'.join(x)
141
-
142
- def _an_element_(self):
143
- """
144
- EXAMPLES::
145
-
146
- sage: lisp._an_element_()
147
- 0
148
- """
149
- return self(0)
150
-
151
- def set(self, var, value):
152
- """
153
- Set the variable var to the given value.
154
-
155
- EXAMPLES::
156
-
157
- sage: lisp.set('x', '2')
158
- sage: lisp.get('x')
159
- '2'
160
-
161
- TESTS:
162
-
163
- It must also be possible to eval the variable by name::
164
-
165
- sage: lisp.eval('x')
166
- '2'
167
- """
168
- cmd = '(setq %s %s)' % (var, value)
169
- out = self.eval(cmd)
170
- if '***' in out:
171
- raise TypeError("Error executing code in Sage\nCODE:\n\t%s\nSAGE ERROR:\n\t%s" % (cmd, out))
172
-
173
- def get(self, var):
174
- """
175
- EXAMPLES::
176
-
177
- sage: lisp.set('x', '2')
178
- sage: lisp.get('x')
179
- '2'
180
- """
181
- out = self.eval(var)
182
- return out
183
-
184
- def _start(self, *args, **kwds):
185
- """
186
- EXAMPLES::
187
-
188
- sage: l = Lisp()
189
- sage: l.is_running()
190
- False
191
- sage: l._start()
192
- sage: l.is_running()
193
- True
194
- """
195
- Expect._start(self, *args, **kwds)
196
- self.__in_seq = 1
197
-
198
- def _synchronize(self):
199
- E = self._expect
200
- if E is None:
201
- self._start()
202
- E = self._expect
203
- r = random.randrange(2147483647)
204
- s = str(r + 1)
205
- cmd = "(+ 1 %s)" % r
206
- E.sendline(cmd)
207
- E.expect(s)
208
- E.expect(self._prompt)
209
-
210
- def _repr_(self):
211
- """
212
- EXAMPLES::
213
-
214
- sage: lisp
215
- Lisp Interpreter
216
- """
217
- return 'Lisp Interpreter'
218
-
219
- def __reduce__(self):
220
- """
221
- EXAMPLES::
222
-
223
- sage: Lisp().__reduce__()
224
- (<function reduce_load_Lisp at 0x...>, ())
225
- """
226
- return reduce_load_Lisp, tuple([])
227
-
228
- def _function_class(self):
229
- """
230
- EXAMPLES::
231
-
232
- sage: lisp._function_class()
233
- <class 'sage.interfaces.lisp.LispFunction'>
234
- """
235
- return LispFunction
236
-
237
- def _quit_string(self):
238
- """
239
- EXAMPLES::
240
-
241
- sage: lisp._quit_string()
242
- '(quit);'
243
-
244
- sage: l = Lisp()
245
- sage: l._start()
246
- sage: l.quit()
247
- sage: l.is_running()
248
- False
249
- """
250
- return '(quit);'
251
-
252
- def _read_in_file_command(self, filename):
253
- """
254
- EXAMPLES::
255
-
256
- sage: lisp._read_in_file_command(tmp_filename())
257
- Traceback (most recent call last):
258
- ...
259
- NotImplementedError
260
- """
261
- raise NotImplementedError
262
-
263
- def kill(self, var):
264
- """
265
- EXAMPLES::
266
-
267
- sage: lisp.kill('x')
268
- Traceback (most recent call last):
269
- ...
270
- NotImplementedError
271
- """
272
- raise NotImplementedError
273
-
274
- def console(self):
275
- """
276
- Spawn a new Lisp command-line session.
277
-
278
- EXAMPLES::
279
-
280
- sage: lisp.console() #not tested
281
- ECL (Embeddable Common-Lisp) ...
282
- Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
283
- Copyright (C) 1993 Giuseppe Attardi
284
- Copyright (C) 2000 Juan J. Garcia-Ripoll
285
- ECL is free software, and you are welcome to redistribute it
286
- under certain conditions; see file 'Copyright' for details.
287
- Type :h for Help. Top level.
288
- ...
289
- """
290
- lisp_console()
291
-
292
- def version(self):
293
- """
294
- Return the version of Lisp being used.
295
-
296
- EXAMPLES::
297
-
298
- sage: lisp.version()
299
- 'Version information is given by lisp.console().'
300
- """
301
- # import subprocess
302
- # p = subprocess.Popen('ecl --version', shell=True, stdin=subprocess.PIPE,
303
- # stdout = subprocess.PIPE, stderr=subprocess.PIPE)
304
- # return AsciiArtString(p.stdout.read())
305
- return "Version information is given by lisp.console()."
306
-
307
- def _object_class(self):
308
- """
309
- EXAMPLES::
310
-
311
- sage: lisp._object_class()
312
- <class 'sage.interfaces.lisp.LispElement'>
313
- """
314
- return LispElement
315
-
316
- def _function_element_class(self):
317
- """
318
- EXAMPLES::
319
-
320
- sage: lisp._function_element_class()
321
- <class 'sage.interfaces.lisp.LispFunctionElement'>
322
- """
323
- return LispFunctionElement
324
-
325
- def _true_symbol(self):
326
- """
327
- EXAMPLES::
328
-
329
- sage: lisp._true_symbol()
330
- 'T'
331
- """
332
- return 'T'
333
-
334
- def _false_symbol(self):
335
- """
336
- EXAMPLES::
337
-
338
- sage: lisp._false_symbol()
339
- 'NIL'
340
- """
341
- return 'NIL'
342
-
343
- def _equality_symbol(self):
344
- """
345
- We raise a :exc:`NotImplementedError` when ``_equality_symbol`` is
346
- called since equality testing in Lisp does not use infix notation and
347
- cannot be done the same way as in the other interfaces.
348
-
349
- EXAMPLES::
350
-
351
- sage: lisp._equality_symbol()
352
- Traceback (most recent call last):
353
- ...
354
- NotImplementedError: ...
355
- """
356
- raise NotImplementedError("We should never reach here in the Lisp interface. " +
357
- "Please report this as a bug.")
358
-
359
- def help(self, command):
360
- """
361
- EXAMPLES::
362
-
363
- sage: lisp.help('setq')
364
- Traceback (most recent call last):
365
- ...
366
- NotImplementedError
367
- """
368
- raise NotImplementedError
369
-
370
- def function_call(self, function, args=None, kwds=None):
371
- """
372
- Call the Lisp function with given ``args`` and ``kwds``.
373
- For Lisp functions, the ``kwds`` are ignored.
374
-
375
- EXAMPLES::
376
-
377
- sage: lisp.function_call('sin', ['2'])
378
- 0.9092974
379
- sage: lisp.sin(2)
380
- 0.9092974
381
- """
382
- args, kwds = self._convert_args_kwds(args, kwds)
383
- self._check_valid_function_name(function)
384
- return self.new("(%s %s)" % (function, ",".join(s.name() for s in args)))
385
-
386
-
387
- # Inherit from RingElement to make __pow__ work
388
- @instancedoc
389
- class LispElement(RingElement, ExpectElement):
390
- def _richcmp_(self, other, op):
391
- """
392
- EXAMPLES::
393
-
394
- sage: one = lisp(1); two = lisp(2)
395
- sage: one == one
396
- True
397
- sage: one != two
398
- True
399
- sage: one < two
400
- True
401
- sage: two > one
402
- True
403
- sage: one < 1
404
- False
405
- sage: two == 2
406
- True
407
- """
408
- P = self._check_valid()
409
- if parent(other) is not P:
410
- other = P(other)
411
-
412
- if P.eval('(= %s %s)' % (self.name(), other.name())) == P._true_symbol():
413
- return rich_to_bool(op, 0)
414
- elif P.eval('(< %s %s)' % (self.name(), other.name())) == P._true_symbol():
415
- return rich_to_bool(op, -1)
416
- else:
417
- return rich_to_bool(op, 1)
418
-
419
- def __bool__(self):
420
- """
421
- EXAMPLES::
422
-
423
- sage: lisp(2).bool()
424
- True
425
- sage: lisp(0).bool()
426
- False
427
- sage: bool(lisp(2))
428
- True
429
- sage: bool(lisp('T'))
430
- True
431
- sage: bool(lisp('NIL'))
432
- False
433
- """
434
- return self != 0 and repr(self) != 'NIL'
435
-
436
- def _add_(self, right):
437
- """
438
- EXAMPLES::
439
-
440
- sage: a = lisp(1); b = lisp(2)
441
- sage: a + b
442
- 3
443
- """
444
- P = self._check_valid()
445
- return P.new('(+ %s %s)' % (self._name, right._name))
446
-
447
- def _sub_(self, right):
448
- """
449
- EXAMPLES::
450
-
451
- sage: a = lisp(1); b = lisp(2)
452
- sage: a - b
453
- -1
454
- """
455
- P = self._check_valid()
456
- return P.new('(- %s %s)' % (self._name, right._name))
457
-
458
- def _mul_(self, right):
459
- """
460
- EXAMPLES::
461
-
462
- sage: a = lisp(1); b = lisp(2)
463
- sage: a * b
464
- 2
465
- """
466
- P = self._check_valid()
467
- return P.new('(* %s %s)' % (self._name, right._name))
468
-
469
- def _div_(self, right):
470
- """
471
- EXAMPLES::
472
-
473
- sage: a = lisp(1); b = lisp(2)
474
- sage: a / b
475
- 1/2
476
- """
477
- P = self._check_valid()
478
- return P.new('(/ %s %s)' % (self._name, right._name))
479
-
480
- def __pow__(self, n):
481
- """
482
- EXAMPLES::
483
-
484
- sage: a = lisp(3)
485
- sage: a^3
486
- 27
487
- """
488
- return RingElement.__pow__(self, n)
489
-
490
-
491
- @instancedoc
492
- class LispFunctionElement(FunctionElement):
493
- def _instancedoc_(self):
494
- """
495
- EXAMPLES::
496
-
497
- sage: two = lisp(2)
498
- sage: two.sin.__doc__
499
- Traceback (most recent call last):
500
- ...
501
- NotImplementedError
502
- """
503
- M = self._obj.parent()
504
- return M.help(self._name)
505
-
506
-
507
- @instancedoc
508
- class LispFunction(ExpectFunction):
509
- def _instancedoc_(self):
510
- """
511
- EXAMPLES::
512
-
513
- sage: lisp.sin.__doc__
514
- Traceback (most recent call last):
515
- ...
516
- NotImplementedError
517
- """
518
- M = self._parent
519
- return M.help(self._name)
520
-
521
-
522
- def is_LispElement(x):
523
- """
524
- EXAMPLES::
525
-
526
- sage: from sage.interfaces.lisp import is_LispElement
527
- sage: is_LispElement(2)
528
- doctest:...: DeprecationWarning: the function is_LispElement is deprecated; use isinstance(x, sage.interfaces.abc.LispElement) instead
529
- See https://github.com/sagemath/sage/issues/34804 for details.
530
- False
531
- sage: is_LispElement(lisp(2))
532
- True
533
- """
534
- from sage.misc.superseded import deprecation
535
- deprecation(34804, "the function is_LispElement is deprecated; use isinstance(x, sage.interfaces.abc.LispElement) instead")
536
-
537
- return isinstance(x, LispElement)
538
-
539
-
540
- # An instance
541
- lisp = Lisp()
542
-
543
-
544
- def reduce_load_Lisp():
545
- """
546
- EXAMPLES::
547
-
548
- sage: from sage.interfaces.lisp import reduce_load_Lisp
549
- sage: reduce_load_Lisp()
550
- Lisp Interpreter
551
- """
552
- return lisp
553
-
554
-
555
- def lisp_console():
556
- """
557
- Spawn a new Lisp command-line session.
558
-
559
- EXAMPLES::
560
-
561
- sage: lisp.console() #not tested
562
- ECL (Embeddable Common-Lisp) ...
563
- Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
564
- Copyright (C) 1993 Giuseppe Attardi
565
- Copyright (C) 2000 Juan J. Garcia-Ripoll
566
- ECL is free software, and you are welcome to redistribute it
567
- under certain conditions; see file 'Copyright' for details.
568
- Type :h for Help. Top level.
569
- ...
570
- """
571
- from sage.repl.rich_output.display_manager import get_display_manager
572
- if not get_display_manager().is_in_terminal():
573
- raise RuntimeError('Can use the console only in the terminal. Try %%lisp magics instead.')
574
- os.system('ecl')