
(/VERSIONCHECK 2) 

(DEFUN |LSPP;poly2vect| (|p| |vs| $)
  (PROG (|coefs| |i| |v| #0=#:G1824 |u| |c|)
    (RETURN
      (SEQ (LETT |coefs|
                 (SPADCALL (LENGTH |vs|) (|spadConstant| $ 11)
                     (QREFELT $ 14))
                 . #1=(|LSPP;poly2vect|))
           (SEQ (LETT |i| 1 . #1#) (LETT |v| NIL . #1#)
                (LETT #0# |vs| . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |v| (CAR #0#) . #1#) NIL)
                       (NULL (COND
                               ((SPADCALL |p| (|spadConstant| $ 17)
                                    (QREFELT $ 19))
                                'NIL)
                               ('T 'T))))
                   (GO G191)))
                (SEQ (LETT |u| (SPADCALL |p| |v| (QREFELT $ 21)) . #1#)
                     (EXIT (COND
                             ((EQL (SPADCALL |u| (QREFELT $ 23)) 0)
                              "next v")
                             ('T
                              (SEQ (SPADCALL |coefs| |i|
                                    (SPADCALL
                                     (LETT |c|
                                      (SPADCALL |u| (QREFELT $ 24)) . #1#)
                                     (QREFELT $ 25))
                                    (QREFELT $ 27))
                                   (EXIT
                                    (LETT |p|
                                     (SPADCALL |p|
                                      (SPADCALL |c| |v| 1
                                       (QREFELT $ 30))
                                      (QREFELT $ 31)) . #1#)))))))
                (LETT #0#
                      (PROG1 (CDR #0#) (LETT |i| (QSADD1 |i|) . #1#)) . #1#)
                (GO G190) G191 (EXIT NIL))
           (EXIT (CONS |coefs| (SPADCALL |p| (QREFELT $ 25)))))))) 

(DEFUN |LSPP;intoMatrix| (|ps| |vs| $)
  (PROG (|v| |i| |p| #0=#:G1831 |r| |m|)
    (RETURN
      (SEQ (LETT |m|
                 (SPADCALL (LENGTH |ps|) (LENGTH |vs|) (QREFELT $ 33))
                 . #1=(|LSPP;intoMatrix|))
           (LETT |v|
                 (SPADCALL (LENGTH |ps|) (|spadConstant| $ 11)
                     (QREFELT $ 14)) . #1#)
           (SEQ (LETT |i| 1 . #1#) (LETT |p| NIL . #1#)
                (LETT #0# |ps| . #1#) G190
                (COND
                  ((OR (ATOM #0#)
                       (PROGN (LETT |p| (CAR #0#) . #1#) NIL))
                   (GO G191)))
                (SEQ (EXIT (COND
                             ((< 1 (SPADCALL |p| |vs| (QREFELT $ 36)))
                              (|error| "The system is not linear"))
                             ('T
                              (SEQ (LETT |r|
                                    (|LSPP;poly2vect| |p| |vs| $) . #1#)
                                   (LETT |m|
                                    (SPADCALL |m| |i| (QCAR |r|)
                                     (QREFELT $ 37)) . #1#)
                                   (EXIT
                                    (SPADCALL |v| |i|
                                     (SPADCALL (QCDR |r|)
                                      (QREFELT $ 38))
                                     (QREFELT $ 27))))))))
                (LETT #0#
                      (PROG1 (CDR #0#) (LETT |i| (QSADD1 |i|) . #1#)) . #1#)
                (GO G190) G191 (EXIT NIL))
           (EXIT (CONS |m| |v|)))))) 

(DEFUN |LSPP;linSolve;LLR;3| (|ps| |vs| $)
  (PROG (|r|)
    (RETURN
      (SEQ (LETT |r| (|LSPP;intoMatrix| |ps| |vs| $)
                 |LSPP;linSolve;LLR;3|)
           (EXIT (SPADCALL (QCAR |r|) (QCDR |r|) (QREFELT $ 42))))))) 

(DEFUN |LinearSystemPolynomialPackage| (&REST #0=#:G1839)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1840)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (|devaluateList| #0#)
                       (HGET |$ConstructorCache|
                             '|LinearSystemPolynomialPackage|)
                       '|domainEqualList|)
                   . #2=(|LinearSystemPolynomialPackage|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (APPLY (|function|
                                 |LinearSystemPolynomialPackage;|)
                             #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache|
                        '|LinearSystemPolynomialPackage|))))))))))) 

(DEFUN |LinearSystemPolynomialPackage;| (|#1| |#2| |#3| |#4|)
  (PROG (DV$1 DV$2 DV$3 DV$4 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|LinearSystemPolynomialPackage|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT DV$3 (|devaluate| |#3|) . #0#)
        (LETT DV$4 (|devaluate| |#4|) . #0#)
        (LETT |dv$|
              (LIST '|LinearSystemPolynomialPackage| DV$1 DV$2 DV$3
                    DV$4) . #0#)
        (LETT $ (GETREFV 45) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache|
            '|LinearSystemPolynomialPackage| (LIST DV$1 DV$2 DV$3 DV$4)
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 |#3|)
        (QSETREFV $ 9 |#4|)
        $)))) 

(MAKEPROP '|LinearSystemPolynomialPackage| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|local| |#4|) (|Fraction| 9) (0 . |Zero|)
             (|NonNegativeInteger|) (|Vector| 10) (4 . |new|)
             (10 . |Zero|) (14 . |Zero|) (18 . |Zero|) (|Boolean|)
             (22 . =) (|SparseUnivariatePolynomial| $)
             (28 . |univariate|) (|SparseUnivariatePolynomial| 9)
             (34 . |degree|) (39 . |leadingCoefficient|)
             (44 . |coerce|) (|Integer|) (49 . |setelt|) (56 . |One|)
             (60 . |One|) (64 . |monomial|) (71 . -) (|Matrix| 10)
             (77 . |zero|) (83 . |One|) (|List| 8) (87 . |totalDegree|)
             (93 . |setRow!|) (100 . -) (|Union| 13 '"failed")
             (|Record| (|:| |particular| 39) (|:| |basis| (|List| 13)))
             (|LinearSystemMatrixPackage| 10 13 13 32) (105 . |solve|)
             (|List| 9) |LSPP;linSolve;LLR;3|)
          '#(|linSolve| 111) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 44
                                '(0 10 0 11 2 13 0 12 10 14 0 6 0 15 0
                                  7 0 16 0 9 0 17 2 9 18 0 0 19 2 9 20
                                  0 8 21 1 22 12 0 23 1 22 9 0 24 1 10
                                  0 9 25 3 13 10 0 26 10 27 0 6 0 28 0
                                  9 0 29 3 9 0 0 8 12 30 2 9 0 0 0 31 2
                                  32 0 12 12 33 0 10 0 34 2 9 12 0 35
                                  36 3 32 0 0 26 13 37 1 10 0 0 38 2 41
                                  40 32 13 42 2 0 40 43 35 44)))))
          '|lookupComplete|)) 
