-
Notifications
You must be signed in to change notification settings - Fork 6
/
packages.lisp
389 lines (372 loc) · 8.36 KB
/
packages.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
;;; -*- Mode:Lisp; Package:CL-USER; Base:10; Lowercase:T; Syntax:Common-Lisp -*-
;;; ===========================================================================
;;; Package Definitions
;;; ===========================================================================
;;; (c) Copyright 1989, 1993 Cornell University
;;; packages.lisp,v 1.19 1995/04/05 21:39:44 chew Exp
(in-package :common-lisp-user)
(defvar *weyli-exported-symbols*
'("*" "+" "-" "/" "=" ">" "<" ">=" "<=" "0?" "1?"
"%MAX"
"%MIN"
"%PLUS"
"%DIFFERENCE"
"%TIMES"
"%QUOTIENT"
"*COERCE-WHERE-POSSIBLE*"
"*DEFAULT-RANDOM-HEIGHT*"
"*DOMAINS*"
"*GENERAL*"
"*MORPHISMS*"
"*NEGATIVE-INFINITY*"
"*POSITIVE-INFINITY*"
"*PRINT-MODULUS*"
"ABELIAN-GROUP"
"ABELIAN-MONOID"
"ABELIAN-SEMIGROUP"
"ABSTRACT-POINT"
"ABSTRACT-SPACE"
"ADD-NEW-VARIABLE"
"ADD-RELATION"
"ADD-SUBSCRIPTS"
"ADJACENCIES"
"ALGEBRA"
"ALGEBRAIC-EXTENSION"
"ALL-NAMES"
"ANGLES"
"ARGS-OF"
"ARGUMENT-OF"
"BANACH-SPACE"
"BASE-OF"
"BIGFLOAT"
"BOUNDARY"
"BOUNDARY-COMPLEX-OF"
"BOUNDARY-DOMAIN"
"BOUND-VARS-OF"
"CHARACTERISTIC"
"CHOOSE"
"COEFFICIENT"
"COEFFICIENT-DOMAIN-OF"
"COERCE"
"COERCIBLE?"
"COMBINATIONS"
"COMPLEX-NUMBER"
"COMPLEX-NUMBERS"
"COMPOSE"
"CONVERT-TO-LISP-NUMBER"
"CREATE-MESH"
"CROSS-PRODUCT"
"DECLARE-DEPENDENCIES"
"DEFINE-OPERATIONS"
"DEGREE"
"DELETE"
"DEPENDS-ON?"
"DERIV"
"DERIVS-OF"
"DESCRIBE-OPERATIONS"
"DIFFERENT-KERNELS"
"DIFFERENTIAL-RING"
"DIMENSION-OF"
"DIMENSIONAL-SPACE"
"DIMENSIONS"
"DIRECT-SUM"
"DISPLAY"
"DOMAIN-OF"
"DOT-PRODUCT"
"DRAW"
"EQN="
"EQN>"
"EQN>="
"EVEN?"
"EUCLIDEAN-DOMAIN"
"EVALUATE-AT"
"EXPONENT-OF"
"EXPR-OF"
"EXPRS-OF"
"EXPAND"
"EXPT"
"FACTOR"
"FACTORIAL"
"FIELD"
"FINITE-FIELD"
"FINITE-SET"
"FOURIER"
"FUNCT"
"FUNCT-DOMAIN-OF"
"FUNCT-OF"
"FUNCT-RANGE-OF"
"FUNCTION-SPACE"
"GCD"
"GCD-DOMAIN"
"GE-ABS?"
"GE-APPLICATION?"
"GE-COS?"
"GE-DERIV?"
"GE-EQN=?"
"GE-EQN>?"
"GE-EQN>=?"
"GE-EQUAL"
"GE-EXPT?"
"GE-FOURIER?"
"GE-FUNCTION?"
"GE-FUNCTION-DERIV?"
"GE-IFOURIER?"
"GE-LOG?"
"GE-NARY?"
"GE-PLUS?"
"GE-SIN?"
"GE-TAN?"
"GE-TIMES?"
"GE-VARIABLE?"
"GENERATORS-OF"
"GET-ABSTRACT-SPACE"
"GET-ALGEBRAIC-EXTENSION"
"GET-AUTOMORPHISMS"
"GET-CHAIN-MODULE"
"GET-COMPLEX-NUMBERS"
"GET-DIFFERENTIAL-RING"
"GET-DIRECT-SUM"
"GET-EUCLIDEAN-SPACE"
"GET-FACTOR-GROUP"
"GET-FACTOR-MODULE"
"GET-FACTOR-RING"
"GET-FINITE-FIELD"
"GET-FREE-MODULE"
"GET-FUNCTION"
"GET-GL-N"
"GET-HILBERT-SPACE"
"GET-HOMOMORPHISMS"
"GET-LISP-NUMBERS"
"GET-MATRIX-SPACE"
"GET-MORPHISMS"
"GET-O-N"
"GET-POLYNOMIAL-RING"
"GET-PSL-N"
"GET-QUATERNION-DOMAIN"
"GET-QUOTIENT-FIELD"
"GET-RATIONAL-INTEGERS"
"GET-RATIONAL-NUMBERS"
"GET-REAL-NUMBERS"
"GET-SL-N"
"GET-SO-N"
"GET-TPOWER-SERIES-DOMAIN"
"GET-UNIT-QUATERNION-DOMAIN"
"GET-VARIABLE-PROPERTY"
"GET-VARIABLE-NAME"
"GET-VECTOR-SPACE"
"GREATER-FUNCTION"
"GFM"
"GFP"
"GROUP"
"HEIGHT"
"HILBERT-SPACE"
"HOME-OF"
"HOMOMORPHISM"
"IFOURIER"
"INNER-PRODUCT"
"INSERT"
"INSERT-BOUNDARY"
"INTEGRAL"
"INTEGRAL-DOMAIN"
"INTERPOLATE"
"JACOBIAN"
"LEXICAL-<"
"LEXICAL->"
"LHS-OF"
"LIST-OF-ELEMENTS"
"LIST-OF-VARIABLES"
"LIST-OPERATIONS"
"LOCATE"
"MAKE-APP-FUNCTION"
"MAKE-CURVED-SEGMENT"
"MAKE-GE-FUNCTION"
"MAKE-GE-DERIV"
"MAKE-GE-EXPT"
"MAKE-GE-FUNCTION"
"MAKE-GE-PLUS"
"MAKE-GE-TIMES"
"MAKE-GENERATOR"
"MAKE-IDEAL"
"MAKE-MESH"
"MAKE-MESH-FROM-FILE"
"MAKE-POINT"
"MAKE-SAMPLED-FUNCTION"
"MAKE-SIMPLEX"
"MAKE-UNION"
"MAKE-UNIVERSAL-QUANTIFIED-SET"
"MAKE-GE-VARIABLE"
"MAP"
"MAP-OVER-CELLS"
"MAP-OVER-MAXIMAL-CELLS"
"MAP-OVER-ELEMENTS"
"MAP-OVER-EXPRESSIONS"
"MAP-OVER-FACES"
"MAP-WITH-DOMAIN"
"MATRIX-DIMENSIONS"
"MAX"
"MEMBER"
"MEMOIZE"
"MESH"
"MIN"
"MINIMAL-POLYNOMIAL"
"MINUS?"
"MONOID"
"MORPHISM"
"MULTIPLICATIVE-ORDER"
"MUTABLE-SET"
"NAME"
"NAME-OF"
"NAME-REGION"
"NARGS-OF"
"NORM"
"NUMBER-OF-ELEMENTS"
"NUMBER?"
"ODD?"
"ONE"
"ONE-MATRIX"
"OPERATION-ARGUMENTS"
"OPERATION-VALUES"
"OPPOSITE"
"ORDERED-ABELIAN-GROUP"
"ORDERED-RING"
"ORDERED-SET"
"ORDERED-SET-OF-PAIRS"
"ORDERED-SIMPLE-SET"
"PARTIAL-DERIV"
"PARTITION"
"PERMUTE"
"PLUS?"
"POCHHAMMER"
"POINT"
"POLYNOMIAL"
"POWER-OF?"
"PRIME?"
"PROJECTIVE-SPACE"
"QUOTIENT-FIELD"
"QUOTIENT-RING"
"RATIONAL-INTEGER"
"RATIONAL-INTEGERS"
"RATIONAL-NUMBER"
"RATIONAL-NUMBERS"
"READ-MESH"
"REAL-NUMBER"
"REAL-NUMBERS"
"RECIP"
"REDUCE-BASIS"
"REF"
"REFINE-MESH"
"RELATIONS"
"REMAINDER"
"REPLACE"
"REQUIRED-OPERATIONS"
"RESET-DOMAINS"
"RESULTANT"
"REVERSION"
"REVLEX->"
"RHS-OF"
"RING"
"RING-VARIABLES"
"RNG"
"SCALAR?"
"SEGMENT?"
"SEMIGROUP"
"SET"
"SET-ELEMENTS"
"SET-OF-PAIRS"
"SIMPLE-FIELD-EXTENSION"
"SIMPLE-RING"
"SIMPLE-SET"
"SIMPLEX"
"SIMPLEX-SIZE"
"SIMPLICIAL-COMPLEX"
"SIMPLIFY"
"SKEW-FIELD"
"SPLIT"
"SQUARE-FREE"
"STRING-OF"
"SUBFACE?"
"SUBSTITUTE"
"TAYLOR"
"TERMS-OF"
"TETRAHEDRON?"
"TILDE"
"TOTAL->"
"TOTIENT"
"TRANSPOSE"
"TRIANGLE?"
"TRUNCATE-ORDER"
"TUPLE"
"UNIQUE-FACTORIZATION-DOMAIN"
"UNIVERSAL-QUANTIFIED-SET"
"VAR-OF"
"VAR-DOMAIN-OF"
"VARIABLE-DERIVATION"
"VARIABLE-INDEX"
"VARLIST-OF"
"VECTOR-SPACE"
"VERTICES-OF"
"WITH-MATRIX-DIMENSIONS"
"WITH-NUMERATOR-AND-DENOMINATOR"
"WRITE-MESH"
"ZERO"
"ZERO-MATRIX")
"Symbols exported from the internal WEYL package.")
(defvar *weyli-shadowed-symbols*
'(coerce set + - * / = > < >= <= minus expt abs random
gcd lcm floor ceiling truncate round max min
complex conjugate realpart imagpart
sqrt exp log phase signum minusp zerop plusp
sin cos tan asin acos atan sinh cosh tanh asinh acosh atanh
numerator denominator reduce
map delete member replace substitute getf union intersection
apply funcall variable
type-of)
"Common lisp symbols shadowed in the internal WEYL package.")
(defvar *weyl-exported-symbols*
'("MAKE-ELEMENT"
"MAKE-UPOLYNOMIAL")
"The WEYL package export these symbols in addition to those exported
form WEYLI.")
;; This should probably only be used to create the WEYL package
(defun use-weyli-package (package)
"Shadow import the shadowed symbols in the WEYLI package and then
use it."
(declare (special *weyli-shadowed-symbols*))
(shadowing-import (loop for sym in *weyli-shadowed-symbols*
collect (intern (symbol-name sym) 'weyli))
package)
(use-package (find-package 'weyli) package))
(defun use-weyl-package (package)
"Shadow import the shadowed symbols in the WEYL package and then use
it."
(declare (special *weyli-shadowed-symbols*))
(shadowing-import (loop for sym in *weyli-shadowed-symbols*
collect (intern (symbol-name sym) 'weyl))
package)
(use-package (find-package 'weyl) package))
(defun intern-in-package (package-name symbols)
(loop for sym in symbols
with package = (find-package package-name)
collect (intern sym package)))
(defpackage "WEYLI"
(:use :common-lisp))
(shadow *weyli-shadowed-symbols* 'weyli)
(export (intern-in-package "WEYLI" *weyli-exported-symbols*) 'weyli)
(defpackage "WEYL"
(:use :common-lisp))
(use-weyli-package 'weyl)
(export (intern-in-package "WEYL" *weyli-exported-symbols*) 'weyl)
(export (intern-in-package "WEYL" *weyl-exported-symbols*) 'weyl)
;; Create the basic-graphics package. This is package is needed if
;; the system Mesh-Draw is loaded.
#-(and)
(unless (find-package "BASIC-GRAPHICS")
#-Genera
(make-package "BASIC-GRAPHICS" :nicknames '(BG)
:use '(#-MCL LISP #+MCL CL #+PCL PCL
#+(and CLOS (not MCL)) CLOS))
#+Genera
(make-package "BASIC-GRAPHICS" :nicknames '(BG)
:use '(#-Rel8 LISP #+Rel8 FUTURE-COMMON-LISP
#+PCL PCL #+CLOS CLOS)
:colon-mode :external))