blob: 7c101f7edf7dfe5424c57deee30f314b08825a97 (
plain)
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
|
(/VERSIONCHECK 2)
(DEFPARAMETER |EuclideanDomain;AL| 'NIL)
(DEFUN |EuclideanDomain;| ()
(PROG (#0=#:G1412)
(RETURN
(PROG1 (LETT #0#
(|Join| (|PrincipalIdealDomain|)
(|mkCategory| '|domain|
'(((|sizeLess?| ((|Boolean|) $ $)) T)
((|euclideanSize|
((|NonNegativeInteger|) $))
T)
((|divide|
((|Record| (|:| |quotient| $)
(|:| |remainder| $))
$ $))
T)
((|quo| ($ $ $)) T)
((|rem| ($ $ $)) T)
((|extendedEuclidean|
((|Record| (|:| |coef1| $)
(|:| |coef2| $)
(|:| |generator| $))
$ $))
T)
((|extendedEuclidean|
((|Union|
(|Record| (|:| |coef1| $)
(|:| |coef2| $))
"failed")
$ $ $))
T)
((|multiEuclidean|
((|Union| (|List| $) "failed")
(|List| $) $))
T))
NIL
'((|List| $) (|NonNegativeInteger|)
(|Boolean|))
NIL))
|EuclideanDomain|)
(SETELT #0# 0 '(|EuclideanDomain|))))))
(DEFUN |EuclideanDomain| ()
(LET ()
(COND
(|EuclideanDomain;AL|)
(T (SETQ |EuclideanDomain;AL| (|EuclideanDomain;|))))))
(SETQ |$CategoryFrame|
(|put| '|EuclideanDomain| '|isCategory| T
(|addModemap| '|EuclideanDomain| '(|EuclideanDomain|)
'((|Category|)) T '|EuclideanDomain| |$CategoryFrame|)))
(MAKEPROP '|EuclideanDomain| 'NILADIC T)
|