Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

build open-axiom

54512 views
1
2
(DECLAIM
3
(FTYPE (FUNCTION (|%Thing| |%Thing| |%Shell|) |%Thing|) |ABELGRP-;-;3$;1|))
4
5
(DECLAIM
6
(FTYPE (FUNCTION (|%Thing| |%Thing| |%Shell|) |%Thing|)
7
|ABELGRP-;subtractIfCan;2$M;2|))
8
9
(DECLAIM
10
(FTYPE (FUNCTION ((|%IntegerSection| 0) |%Thing| |%Shell|) |%Thing|)
11
|ABELGRP-;*;Nni2$;3|))
12
13
(DECLAIM
14
(FTYPE (FUNCTION (|%Integer| |%Thing| |%Shell|) |%Thing|) |ABELGRP-;*;I2$;4|))
15
16
(DECLAIM
17
(FTYPE (FUNCTION (|%Thing| |%Thing| |%Shell|) |%Boolean|)
18
|ABELGRP-;opposite?;2$B;5|))
19
20
(DEFUN |ABELGRP-;-;3$;1| (|x| |y| $)
21
(SPADCALL |x| (SPADCALL |y| (|shellEntry| $ 7)) (|shellEntry| $ 8)))
22
23
(DEFUN |ABELGRP-;subtractIfCan;2$M;2| (|x| |y| $)
24
(SPADCALL |x| |y| (|shellEntry| $ 10)))
25
26
(DEFUN |ABELGRP-;*;Nni2$;3| (|n| |x| $) (SPADCALL |n| |x| (|shellEntry| $ 16)))
27
28
(DEFUN |ABELGRP-;*;I2$;4| (|n| |x| $)
29
(COND ((ZEROP |n|) (|spadConstant| $ 21))
30
((PLUSP |n|) (SPADCALL |n| |x| (|shellEntry| $ 25)))
31
(T
32
(SPADCALL (- |n|) (SPADCALL |x| (|shellEntry| $ 7))
33
(|shellEntry| $ 25)))))
34
35
(DEFUN |ABELGRP-;opposite?;2$B;5| (|x| |y| $)
36
(SPADCALL |x| (SPADCALL |y| (|shellEntry| $ 7)) (|shellEntry| $ 28)))
37
38
(DEFUN |AbelianGroup&| (|#1|)
39
(LET* ((|dv$1| (|devaluate| |#1|))
40
(|dv$| (LIST '|AbelianGroup&| |dv$1|))
41
($ (|newShell| 30))
42
(|pv$| (|buildPredVector| 0 0 NIL)))
43
(PROGN
44
(SETF (|shellEntry| $ 0) |dv$|)
45
(SETF (|shellEntry| $ 3) |pv$|)
46
(|stuffDomainSlots| $)
47
(SETF (|shellEntry| $ 6) |#1|)
48
(COND ((|HasCategory| |#1| '(|Ring|)))
49
(T (SETF (|shellEntry| $ 27) (CONS #'|ABELGRP-;*;I2$;4| $))))
50
$)))
51
52
(MAKEPROP '|AbelianGroup&| '|infovec|
53
(LIST
54
'#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (0 . -) (5 . +)
55
|ABELGRP-;-;3$;1| (11 . -) (|Maybe| 6) (17 . |just|) (|Maybe| $)
56
|ABELGRP-;subtractIfCan;2$M;2| (|Integer|) (22 . *)
57
(|NonNegativeInteger|) |ABELGRP-;*;Nni2$;3| (|Boolean|)
58
(28 . |zero?|) (33 . |Zero|) (37 . |positive?|)
59
(|RepeatedDoubling| 6) (|PositiveInteger|) (42 . |double|)
60
(48 . -) (53 . *) (59 . =) |ABELGRP-;opposite?;2$B;5|)
61
'#(|subtractIfCan| 65 |opposite?| 71 - 77 * 83) 'NIL
62
(CONS (|makeByteWordVec2| 1 'NIL)
63
(CONS '#()
64
(CONS '#()
65
(|makeByteWordVec2| 29
66
'(1 6 0 0 7 2 6 0 0 0 8 2 6 0
67
0 0 10 1 11 0 6 12 2 6 0 15
68
0 16 1 15 19 0 20 0 6 0 21 1
69
15 19 0 22 2 23 6 24 6 25 1
70
15 0 0 26 2 0 0 15 0 27 2 6
71
19 0 0 28 2 0 13 0 0 14 2 0
72
19 0 0 29 2 0 0 0 0 9 2 0 0
73
15 0 27 2 0 0 17 0 18)))))
74
'|lookupComplete|))
75
76
(SETF (|dbTemplate| (|constructorDB| '|AbelianGroup&|))
77
#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (0 . -) (5 . +)
78
|ABELGRP-;-;3$;1| (11 . -) (|Maybe| 6) (17 . |just|) (|Maybe| $)
79
|ABELGRP-;subtractIfCan;2$M;2| (|Integer|) (22 . *)
80
(|NonNegativeInteger|) |ABELGRP-;*;Nni2$;3| (|Boolean|)
81
(28 . |zero?|) (33 . |Zero|) (37 . |positive?|)
82
(|RepeatedDoubling| 6) (|PositiveInteger|) (42 . |double|) (48 . -)
83
(53 . *) (59 . =) |ABELGRP-;opposite?;2$B;5|))
84
85
(SETF (|dbLookupFunction| (|constructorDB| '|AbelianGroup&|)) '|lookupComplete|)
86
87
(SETF (|dbConstructorForm| (|constructorDB| '|AbelianGroup&|))
88
'(|AbelianGroup&| S))
89
90
(SETF (|dbConstructorKind| (|constructorDB| '|AbelianGroup&|)) '|package|)
91
92
(SETF (|dbConstructorModemap| (|constructorDB| '|AbelianGroup&|))
93
'(((|AbelianGroup&| |#1|)
94
(CATEGORY |package| (SIGNATURE - (|#1| |#1| |#1|))
95
(SIGNATURE - (|#1| |#1|)) (SIGNATURE * (|#1| (|Integer|) |#1|))
96
(SIGNATURE |subtractIfCan| ((|Maybe| |#1|) |#1| |#1|))
97
(SIGNATURE |opposite?| ((|Boolean|) |#1| |#1|))
98
(SIGNATURE * (|#1| (|NonNegativeInteger|) |#1|))
99
(SIGNATURE * (|#1| (|PositiveInteger|) |#1|)))
100
(|AbelianGroup|))
101
(T |AbelianGroup&|)))
102
103
(SETF (|dbDualSignature| (|constructorDB| '|AbelianGroup&|)) '(NIL T))
104
105
(SETF (|dbSourceFile| (|constructorDB| '|AbelianGroup&|)) '"catdef.spad")
106
107
(SETF (|dbOperations| (|constructorDB| '|AbelianGroup&|))
108
'((|subtractIfCan| (((|Maybe| $) $ $) 14 T ELT))
109
(|opposite?| (((|Boolean|) $ $) 29 T ELT))
110
(- (($ $) NIL T ELT) (($ $ $) 9 T ELT))
111
(* (($ (|PositiveInteger|) $) NIL T ELT)
112
(($ (|NonNegativeInteger|) $) 18 T ELT)
113
(($ (|Integer|) $) 27 T ELT))))
114
115
(SETF (|dbOperationTable| (|constructorDB| '|AbelianGroup&|))
116
#(|subtractIfCan| 65 |opposite?| 71 - 77 * 83))
117
118
(SETF (|dbCapsuleDefinitions| (|constructorDB| '|AbelianGroup&|))
119
'((|ABELGRP-;opposite?;2$B;5| ((|Boolean|) $ $))
120
(|ABELGRP-;*;I2$;4| ($ (|Integer|) $))
121
(|ABELGRP-;*;Nni2$;3| ($ (|NonNegativeInteger|) $))
122
(|ABELGRP-;subtractIfCan;2$M;2| ((|Maybe| $) $ $))
123
(|ABELGRP-;-;3$;1| ($ $ $))))
124
125
(SETF (|dbAbbreviation| (|constructorDB| '|AbelianGroup&|)) 'ABELGRP-)
126
127