
(/VERSIONCHECK 2) 

(DEFUN |UFD-;squareFreePart;2S;1| (|x| $)
  (PROG (|s| |f| #0=#:G1826 #1=#:G1824 #2=#:G1822 #3=#:G1823)
    (RETURN
      (SEQ (SPADCALL
               (SPADCALL
                   (LETT |s| (SPADCALL |x| (QREFELT $ 8))
                         . #4=(|UFD-;squareFreePart;2S;1|))
                   (QREFELT $ 10))
               (PROGN
                 (LETT #3# NIL . #4#)
                 (SEQ (LETT |f| NIL . #4#)
                      (LETT #0# (SPADCALL |s| (QREFELT $ 13)) . #4#)
                      G190
                      (COND
                        ((OR (ATOM #0#)
                             (PROGN (LETT |f| (CAR #0#) . #4#) NIL))
                         (GO G191)))
                      (SEQ (EXIT (PROGN
                                   (LETT #1# (QCAR |f|) . #4#)
                                   (COND
                                     (#3#
                                      (LETT #2#
                                       (SPADCALL #2# #1#
                                        (QREFELT $ 14)) . #4#))
                                     ('T
                                      (PROGN
                                        (LETT #2# #1# . #4#)
                                        (LETT #3# 'T . #4#)))))))
                      (LETT #0# (CDR #0#) . #4#) (GO G190) G191
                      (EXIT NIL))
                 (COND (#3# #2#) ('T (|spadConstant| $ 15))))
               (QREFELT $ 14)))))) 

(DEFUN |UFD-;prime?;SB;2| (|x| $)
  (EQL (LENGTH (SPADCALL (SPADCALL |x| (QREFELT $ 17)) (QREFELT $ 21)))
       1)) 

(DEFUN |UniqueFactorizationDomain&| (|#1|)
  (PROG (DV$1 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|UniqueFactorizationDomain&|))
        (LETT |dv$| (LIST '|UniqueFactorizationDomain&| DV$1) . #0#)
        (LETT $ (GETREFV 24) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        $)))) 

(MAKEPROP '|UniqueFactorizationDomain&| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|Factored| $)
             (0 . |squareFree|) (|Factored| 6) (5 . |unit|)
             (|Record| (|:| |factor| 6) (|:| |exponent| (|Integer|)))
             (|List| 11) (10 . |factors|) (15 . *) (21 . |One|)
             |UFD-;squareFreePart;2S;1| (25 . |factor|)
             (|Union| '"nil" '"sqfr" '"irred" '"prime")
             (|Record| (|:| |flg| 18) (|:| |fctr| 6)
                 (|:| |xpnt| (|Integer|)))
             (|List| 19) (30 . |factorList|) (|Boolean|)
             |UFD-;prime?;SB;2|)
          '#(|squareFreePart| 35 |prime?| 40) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 23
                                '(1 6 7 0 8 1 9 6 0 10 1 9 12 0 13 2 6
                                  0 0 0 14 0 6 0 15 1 6 7 0 17 1 9 20 0
                                  21 1 0 0 0 16 1 0 22 0 23)))))
          '|lookupComplete|)) 
