Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

build open-axiom

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