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

(DEFPARAMETER |UniqueFactorizationDomain;AL| 'NIL) 

(DEFUN |UniqueFactorizationDomain| ()
  (LET (#:G1396)
    (COND
      (|UniqueFactorizationDomain;AL|)
      (T (SETQ |UniqueFactorizationDomain;AL|
               (|UniqueFactorizationDomain;|)))))) 

(DEFUN |UniqueFactorizationDomain;| ()
  (PROG (#0=#:G1394)
    (RETURN
      (PROG1 (LETT #0#
                   (|Join| (|GcdDomain|)
                           (|mkCategory| '|domain|
                               '(((|prime?| ((|Boolean|) $)) T)
                                 ((|squareFree| ((|Factored| $) $)) T)
                                 ((|squareFreePart| ($ $)) T)
                                 ((|factor| ((|Factored| $) $)) T))
                               NIL '((|Factored| $) (|Boolean|)) NIL))
                   |UniqueFactorizationDomain|)
        (SETELT #0# 0 '(|UniqueFactorizationDomain|)))))) 

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

(MAKEPROP '|UniqueFactorizationDomain| 'NILADIC T)