
(/VERSIONCHECK 2) 

(DEFUN |CYCLOTOM;cyclotomic;ISup;1| (|n| $)
  (PROG (|g| |u| #0=#:G1832 #1=#:G1824 #2=#:G1826 #3=#:G1827 |l|)
    (RETURN
      (SEQ (LETT |g|
                 (SPADCALL (SPADCALL |n| (QREFELT $ 9)) (QREFELT $ 12))
                 . #4=(|CYCLOTOM;cyclotomic;ISup;1|))
           (LETT |l|
                 (SPADCALL (SPADCALL 1 1 (QREFELT $ 16))
                     (SPADCALL 1 0 (QREFELT $ 16)) (QREFELT $ 17)) . #4#)
           (SEQ (LETT |u| NIL . #4#) (LETT #0# |g| . #4#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |u| (CAR #0#) . #4#) NIL))
                   (GO G191)))
                (SEQ (LETT |l|
                           (QCAR (SPADCALL
                                     (SPADCALL |l|
                                      (PROG1
                                       (LETT #1# (QCAR |u|) . #4#)
                                        (|check-subtype| (>= #1# 0)
                                         '(|NonNegativeInteger|) #1#))
                                      (QREFELT $ 18))
                                     |l| (QREFELT $ 20))) . #4#)
                     (EXIT (COND
                             ((< 1 (QCDR |u|))
                              (LETT |l|
                                    (SPADCALL |l|
                                     (PROG1
                                      (LETT #3#
                                       (EXPT (QCAR |u|)
                                        (PROG1
                                         (LETT #2#
                                          (- (QCDR |u|) 1) . #4#)
                                          (|check-subtype| (>= #2# 0)
                                           '(|NonNegativeInteger|) #2#))) . #4#)
                                       (|check-subtype| (>= #3# 0)
                                        '(|NonNegativeInteger|) #3#))
                                     (QREFELT $ 18)) . #4#)))))
                (LETT #0# (CDR #0#) . #4#) (GO G190) G191 (EXIT NIL))
           (EXIT |l|))))) 

(DEFUN |CYCLOTOM;cyclotomicDecomposition;IL;2| (|n| $)
  (PROG (|g| |u| #0=#:G1846 #1=#:G1847 #2=#:G1848 #3=#:G1836 |rr|
             #4=#:G1849 #5=#:G1850 |z| #6=#:G1851 #7=#:G1838 |m| |l|)
    (RETURN
      (SEQ (LETT |g|
                 (SPADCALL (SPADCALL |n| (QREFELT $ 9)) (QREFELT $ 12))
                 . #8=(|CYCLOTOM;cyclotomicDecomposition;IL;2|))
           (LETT |l|
                 (LIST (SPADCALL (SPADCALL 1 1 (QREFELT $ 16))
                           (SPADCALL 1 0 (QREFELT $ 16))
                           (QREFELT $ 17))) . #8#)
           (SEQ (LETT |u| NIL . #8#) (LETT #0# |g| . #8#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |u| (CAR #0#) . #8#) NIL))
                   #9=(GO G191)))
                (SEQ (LETT |m|
                           (PROGN
                             (LETT #1# NIL . #8#)
                             (SEQ (LETT |z| NIL . #8#)
                                  (LETT #2# |l| . #8#) G190
                                  (COND
                                    ((OR (ATOM #2#)
                                      (PROGN
                                        (LETT |z| (CAR #2#) . #8#)
                                        NIL))
                                     #9#))
                                  (SEQ (EXIT
                                        (LETT #1#
                                         (CONS
                                          (QCAR
                                           (SPADCALL
                                            (SPADCALL |z|
                                             (PROG1
                                              (LETT #3#
                                               (QCAR |u|) . #8#)
                                               (|check-subtype|
                                                (>= #3# 0)
                                                '(|NonNegativeInteger|)
                                                #3#))
                                             (QREFELT $ 18))
                                            |z| (QREFELT $ 20)))
                                          #1#) . #8#)))
                                  (LETT #2# (CDR #2#) . #8#)
                                  #10=(GO G190) G191
                                  (EXIT (NREVERSE0 #1#)))) . #8#)
                     (SEQ (LETT |rr| 1 . #8#)
                          (LETT #4# (- (QCDR |u|) 1) . #8#) G190
                          (COND ((QSGREATERP |rr| #4#) #9#))
                          (SEQ (LETT |l| (APPEND |l| |m|) . #8#)
                               (EXIT (LETT |m|
                                      (PROGN
                                        (LETT #5# NIL . #8#)
                                        (SEQ (LETT |z| NIL . #8#)
                                         (LETT #6# |m| . #8#) G190
                                         (COND
                                           ((OR (ATOM #6#)
                                             (PROGN
                                               (LETT |z|
                                                (CAR #6#) . #8#)
                                               NIL))
                                            #9#))
                                         (SEQ
                                          (EXIT
                                           (LETT #5#
                                            (CONS
                                             (SPADCALL |z|
                                              (PROG1
                                               (LETT #7#
                                                (QCAR |u|) . #8#)
                                                (|check-subtype|
                                                 (>= #7# 0)
                                                 '(|NonNegativeInteger|)
                                                 #7#))
                                              (QREFELT $ 18))
                                             #5#) . #8#)))
                                         (LETT #6# (CDR #6#) . #8#)
                                         #10# G191
                                         (EXIT (NREVERSE0 #5#)))) . #8#)))
                          (LETT |rr| (QSADD1 |rr|) . #8#) #10# G191
                          (EXIT NIL))
                     (EXIT (LETT |l| (APPEND |l| |m|) . #8#)))
                (LETT #0# (CDR #0#) . #8#) #10# G191 (EXIT NIL))
           (EXIT |l|))))) 

(DEFUN |CYCLOTOM;cyclotomicFactorization;IF;3| (|n| $)
  (PROG (|f| #0=#:G1855 |fr|)
    (RETURN
      (SEQ (LETT |fr| (|spadConstant| $ 25)
                 . #1=(|CYCLOTOM;cyclotomicFactorization;IF;3|))
           (SEQ (LETT |f| NIL . #1#)
                (LETT #0# (SPADCALL |n| (QREFELT $ 23)) . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |f| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (LETT |fr|
                                 (SPADCALL |fr|
                                     (SPADCALL |f| 1 (QREFELT $ 26))
                                     (QREFELT $ 27)) . #1#)))
                (LETT #0# (CDR #0#) . #1#) (GO G190) G191 (EXIT NIL))
           (EXIT |fr|))))) 

(DEFUN |CyclotomicPolynomialPackage| ()
  (PROG ()
    (RETURN
      (PROG (#0=#:G1857)
        (RETURN
          (COND
            ((LETT #0#
                   (HGET |$ConstructorCache|
                         '|CyclotomicPolynomialPackage|)
                   . #1=(|CyclotomicPolynomialPackage|))
             (|CDRwithIncrement| (CDAR #0#)))
            ('T
             (UNWIND-PROTECT
               (PROG1 (CDDAR (HPUT |$ConstructorCache|
                                   '|CyclotomicPolynomialPackage|
                                   (LIST
                                    (CONS NIL
                                     (CONS 1
                                      (|CyclotomicPolynomialPackage;|))))))
                 (LETT #0# T . #1#))
               (COND
                 ((NOT #0#)
                  (HREM |$ConstructorCache|
                        '|CyclotomicPolynomialPackage|))))))))))) 

(DEFUN |CyclotomicPolynomialPackage;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$| '(|CyclotomicPolynomialPackage|)
              . #0=(|CyclotomicPolynomialPackage|))
        (LETT $ (GETREFV 29) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|CyclotomicPolynomialPackage|
            NIL (CONS 1 $))
        (|stuffDomainSlots| $)
        $)))) 

(MAKEPROP '|CyclotomicPolynomialPackage| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|Factored| 7) (|Integer|)
             (|IntegerFactorizationPackage| 7) (0 . |factor|)
             (|Record| (|:| |factor| 7) (|:| |exponent| 7)) (|List| 10)
             (5 . |factors|) (|SparseUnivariatePolynomial| 7)
             (10 . |One|) (|NonNegativeInteger|) (14 . |monomial|)
             (20 . -) (26 . |multiplyExponents|)
             (|Record| (|:| |quotient| $) (|:| |remainder| $))
             (32 . |monicDivide|) |CYCLOTOM;cyclotomic;ISup;1|
             (|List| 13) |CYCLOTOM;cyclotomicDecomposition;IL;2|
             (|Factored| 13) (38 . |One|) (42 . |primeFactor|) (48 . *)
             |CYCLOTOM;cyclotomicFactorization;IF;3|)
          '#(|cyclotomicFactorization| 54 |cyclotomicDecomposition| 59
             |cyclotomic| 64)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 28
                                '(1 8 6 7 9 1 6 11 0 12 0 13 0 14 2 13
                                  0 7 15 16 2 13 0 0 0 17 2 13 0 0 15
                                  18 2 13 19 0 0 20 0 24 0 25 2 24 0 13
                                  7 26 2 24 0 0 0 27 1 0 24 7 28 1 0 22
                                  7 23 1 0 13 7 21)))))
          '|lookupComplete|)) 

(MAKEPROP '|CyclotomicPolynomialPackage| 'NILADIC T) 
