
(/VERSIONCHECK 2) 

(DEFUN |INTSLPE;solveLinearPolynomialEquation;LSupU;1| (|lp| |p| $)
  (PROG (|u| #0=#:G1836 #1=#:G1821 #2=#:G1819 #3=#:G1820 |deg| |ans|
             #4=#:G1823 |answer|)
    (RETURN
      (SEQ (COND
             ((NULL (SPADCALL (QREFELT $ 6) |lp| (QREFELT $ 11)))
              (SEQ (LETT |deg|
                         (PROGN
                           (LETT #3# NIL
                                 . #5=(|INTSLPE;solveLinearPolynomialEquation;LSupU;1|))
                           (SEQ (LETT |u| NIL . #5#)
                                (LETT #0# |lp| . #5#) G190
                                (COND
                                  ((OR (ATOM #0#)
                                    (PROGN
                                      (LETT |u| (CAR #0#) . #5#)
                                      NIL))
                                   #6=(GO G191)))
                                (SEQ (EXIT
                                      (PROGN
                                        (LETT #1#
                                         (SPADCALL |u| (QREFELT $ 14)) . #5#)
                                        (COND
                                          (#3#
                                           (LETT #2# (+ #2# #1#) . #5#))
                                          ('T
                                           (PROGN
                                             (LETT #2# #1# . #5#)
                                             (LETT #3# 'T . #5#)))))))
                                (LETT #0# (CDR #0#) . #5#) #7=(GO G190)
                                G191 (EXIT NIL))
                           (COND (#3# #2#) ('T 0))) . #5#)
                   (LETT |ans| (CONS 1 "failed") . #5#)
                   (SETELT $ 7 2147483647)
                   (SEQ G190 (COND ((NULL (QEQCAR |ans| 1)) #6#))
                        (SEQ (LETT |ans|
                                   (SPADCALL |deg| (QREFELT $ 7) |lp|
                                    (QREFELT $ 18)) . #5#)
                             (EXIT (COND
                                     ((QEQCAR |ans| 1)
                                      (SETELT $ 7
                                       (SPADCALL (QREFELT $ 7)
                                        (QREFELT $ 20)))))))
                        NIL #7# G191 (EXIT NIL))
                   (EXIT (SETELT $ 8
                                 (PROG2 (LETT #4# |ans| . #5#)
                                        (QCDR #4#)
                                   (|check-union| (QEQCAR #4# 0)
                                    (|Vector|
                                     (|List|
                                      (|SparseUnivariatePolynomial|
                                       (|Integer|))))
                                    #4#)))))))
           (LETT |answer|
                 (SPADCALL |p| (QREFELT $ 7) (QREFELT $ 8)
                     (QREFELT $ 23)) . #5#)
           (EXIT |answer|))))) 

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

(DEFUN |IntegerSolveLinearPolynomialEquation;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$| '(|IntegerSolveLinearPolynomialEquation|)
              . #0=(|IntegerSolveLinearPolynomialEquation|))
        (LETT $ (GETREFV 25) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache|
            '|IntegerSolveLinearPolynomialEquation| NIL (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 NIL)
        (QSETREFV $ 7 2)
        (QSETREFV $ 8 (GETREFV 0))
        $)))) 

(MAKEPROP '|IntegerSolveLinearPolynomialEquation| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL '|oldlp| '|slpePrime| '|oldtable|
             (|Boolean|) (|List| 13) (0 . =) (|NonNegativeInteger|)
             (|SparseUnivariatePolynomial| 16) (6 . |degree|)
             (|Union| 22 '"failed") (|Integer|) (|GenExEuclid| 16 13)
             (11 . |tablePow|) (|IntegerPrimesPackage| 16)
             (18 . |prevPrime|) (|Union| 10 '"failed") (|Vector| 10)
             (23 . |solveid|)
             |INTSLPE;solveLinearPolynomialEquation;LSupU;1|)
          '#(|solveLinearPolynomialEquation| 30) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 24
                                '(2 10 9 0 0 11 1 13 12 0 14 3 17 15 12
                                  16 10 18 1 19 16 16 20 3 17 21 13 16
                                  22 23 2 0 21 10 13 24)))))
          '|lookupComplete|)) 

(MAKEPROP '|IntegerSolveLinearPolynomialEquation| 'NILADIC T) 
