aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/MONOID.lsp
blob: 43b52fd08885b825f9f076889bf5f1b451507c18 (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
(/VERSIONCHECK 2) 

(DEFPARAMETER |Monoid;AL| 'NIL) 

(DEFUN |Monoid;| ()
  (PROG (#0=#:G1398)
    (RETURN
      (PROG1 (LETT #0#
                   (|Join| (|SemiGroup|)
                           (|mkCategory| '|domain|
                               '(((|One| ($) |constant|) T)
                                 ((|sample| ($) |constant|) T)
                                 ((|one?| ((|Boolean|) $)) T)
                                 ((** ($ $ (|NonNegativeInteger|))) T)
                                 ((|recip| ((|Union| $ "failed") $)) T))
                               NIL
                               '((|NonNegativeInteger|) (|Boolean|))
                               NIL))
                   |Monoid|)
        (SETELT #0# 0 '(|Monoid|)))))) 

(DEFUN |Monoid| ()
  (LET () (COND (|Monoid;AL|) (T (SETQ |Monoid;AL| (|Monoid;|)))))) 

(SETQ |$CategoryFrame|
      (|put| '|Monoid| '|isCategory| T
             (|addModemap| '|Monoid| '(|Monoid|) '((|Category|)) T
                 '|Monoid| |$CategoryFrame|))) 

(MAKEPROP '|Monoid| 'NILADIC T)