
(/VERSIONCHECK 2) 

(DEFUN |IBACHIN;applyFrobToMatrix| (|mat| |q| $)
  (PROG (|m| |n| |ans| |i| |j|)
    (RETURN
      (SEQ (LETT |m| (SPADCALL |mat| (QREFELT $ 11))
                 . #0=(|IBACHIN;applyFrobToMatrix|))
           (LETT |n| (SPADCALL |mat| (QREFELT $ 12)) . #0#)
           (LETT |ans|
                 (SPADCALL |m| |n| (|spadConstant| $ 14)
                     (QREFELT $ 15)) . #0#)
           (SEQ (LETT |i| 1 . #0#) G190
                (COND ((QSGREATERP |i| |m|) #1=(GO G191)))
                (SEQ (EXIT (SEQ (LETT |j| 1 . #0#) G190
                                (COND ((QSGREATERP |j| |n|) #1#))
                                (SEQ (EXIT
                                      (SPADCALL |ans| |i| |j|
                                       (SPADCALL
                                        (CONS
                                         #'|IBACHIN;applyFrobToMatrix!0|
                                         (VECTOR $ |q|))
                                        (SPADCALL |mat| |i| |j|
                                         (QREFELT $ 18))
                                        (QREFELT $ 20))
                                       (QREFELT $ 21))))
                                (LETT |j| (QSADD1 |j|) . #0#)
                                #2=(GO G190) G191 (EXIT NIL))))
                (LETT |i| (QSADD1 |i|) . #0#) #2# G191 (EXIT NIL))
           (EXIT |ans|))))) 

(DEFUN |IBACHIN;applyFrobToMatrix!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 16))) 

(DEFUN |IBACHIN;listConjugateBases;R2NniL;2| (|bas| |q| |n| $)
  (PROG (|i| #0=#:G1832 |b| |bInv| |bDen| |newBasis| |outList|)
    (RETURN
      (SEQ (LETT |outList| (SPADCALL |bas| (QREFELT $ 24))
                 . #1=(|IBACHIN;listConjugateBases;R2NniL;2|))
           (LETT |b| (QVELT |bas| 0) . #1#)
           (LETT |bInv| (QVELT |bas| 2) . #1#)
           (LETT |bDen| (QVELT |bas| 1) . #1#)
           (SEQ (LETT |i| 1 . #1#) (LETT #0# (- |n| 1) . #1#) G190
                (COND ((QSGREATERP |i| #0#) (GO G191)))
                (SEQ (LETT |b|
                           (|IBACHIN;applyFrobToMatrix| |b| |q| $) . #1#)
                     (LETT |bInv|
                           (|IBACHIN;applyFrobToMatrix| |bInv| |q| $) . #1#)
                     (LETT |bDen|
                           (SPADCALL
                               (CONS #'|IBACHIN;listConjugateBases;R2NniL;2!0|
                                     (VECTOR $ |q|))
                               |bDen| (QREFELT $ 20)) . #1#)
                     (LETT |newBasis| (VECTOR |b| |bDen| |bInv|) . #1#)
                     (EXIT (LETT |outList|
                                 (CONS |newBasis| |outList|) . #1#)))
                (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                (EXIT NIL))
           (EXIT (NREVERSE |outList|)))))) 

(DEFUN |IBACHIN;listConjugateBases;R2NniL;2!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 16))) 

(DEFUN |IBACHIN;factorList;K3NniL;3| (|a| |q| |n| |k| $)
  (PROG (|xx| |i| #0=#:G1837 |coef| |outList|)
    (RETURN
      (SEQ (LETT |coef| (SPADCALL |a| 0 (QREFELT $ 29))
                 . #1=(|IBACHIN;factorList;K3NniL;3|))
           (LETT |xx|
                 (SPADCALL (|spadConstant| $ 25) 1 (QREFELT $ 29)) . #1#)
           (LETT |outList|
                 (SPADCALL
                     (SPADCALL (SPADCALL |xx| |coef| (QREFELT $ 30))
                         |k| (QREFELT $ 31))
                     (QREFELT $ 33)) . #1#)
           (SEQ (LETT |i| 1 . #1#) (LETT #0# (- |n| 1) . #1#) G190
                (COND ((QSGREATERP |i| #0#) (GO G191)))
                (SEQ (LETT |coef|
                           (SPADCALL |coef| |q| (QREFELT $ 31)) . #1#)
                     (EXIT (LETT |outList|
                                 (CONS (SPADCALL
                                        (SPADCALL |xx| |coef|
                                         (QREFELT $ 30))
                                        |k| (QREFELT $ 31))
                                       |outList|) . #1#)))
                (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                (EXIT NIL))
           (EXIT (NREVERSE |outList|)))))) 

(DEFUN |IBACHIN;basisInfoToPolys| (|mat| |lcm| |den| $)
  (PROG (|n| |n1| |i| |j| |pp| |outList|)
    (RETURN
      (SEQ (LETT |n| (SPADCALL |mat| (QREFELT $ 11))
                 . #0=(|IBACHIN;basisInfoToPolys|))
           (LETT |n1| (- |n| 1) . #0#) (LETT |outList| NIL . #0#)
           (SEQ (LETT |i| 1 . #0#) G190
                (COND ((QSGREATERP |i| |n|) #1=(GO G191)))
                (SEQ (LETT |pp| (|spadConstant| $ 35) . #0#)
                     (SEQ (LETT |j| 0 . #0#) G190
                          (COND ((QSGREATERP |j| |n1|) #1#))
                          (SEQ (EXIT (LETT |pp|
                                      (SPADCALL |pp|
                                       (SPADCALL
                                        (SPADCALL
                                         (SPADCALL |lcm| |den|
                                          (QREFELT $ 36))
                                         (SPADCALL |mat| |i| (+ |j| 1)
                                          (QREFELT $ 18))
                                         (QREFELT $ 37))
                                        |j| (QREFELT $ 38))
                                       (QREFELT $ 39)) . #0#)))
                          (LETT |j| (QSADD1 |j|) . #0#) #2=(GO G190)
                          G191 (EXIT NIL))
                     (EXIT (LETT |outList| (CONS |pp| |outList|) . #0#)))
                (LETT |i| (QSADD1 |i|) . #0#) #2# G191 (EXIT NIL))
           (EXIT (NREVERSE |outList|)))))) 

(DEFUN |IBACHIN;basesToPolyLists| (|basisList| |lcm| $)
  (PROG (#0=#:G1846 |b| #1=#:G1847)
    (RETURN
      (SEQ (PROGN
             (LETT #0# NIL . #2=(|IBACHIN;basesToPolyLists|))
             (SEQ (LETT |b| NIL . #2#) (LETT #1# |basisList| . #2#)
                  G190
                  (COND
                    ((OR (ATOM #1#)
                         (PROGN (LETT |b| (CAR #1#) . #2#) NIL))
                     (GO G191)))
                  (SEQ (EXIT (LETT #0#
                                   (CONS
                                    (|IBACHIN;basisInfoToPolys|
                                     (QVELT |b| 0) |lcm| (QVELT |b| 1)
                                     $)
                                    #0#) . #2#)))
                  (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                  (EXIT (NREVERSE0 #0#)))))))) 

(DEFUN |IBACHIN;approximateExtendedEuclidean| (|f| |g| |p| |n| $)
  (PROG (|sae| |fSUP| |gSUP| |fBar| |gBar| |ee| |ss1| |tt1| |s1| |t1|
               |i| |num| #0=#:G1855 |rhs| |sigma| |tau| |quorem|
               |pPower| |s| |t|)
    (RETURN
      (SEQ (LETT |sae|
                 (|SimpleAlgebraicExtension| (QREFELT $ 6)
                     (QREFELT $ 7) |p|)
                 . #1=(|IBACHIN;approximateExtendedEuclidean|))
           (LETT |fSUP| (SPADCALL |f| (QREFELT $ 41)) . #1#)
           (LETT |gSUP| (SPADCALL |g| (QREFELT $ 41)) . #1#)
           (LETT |fBar|
                 (SPADCALL
                     (CONS #'|IBACHIN;approximateExtendedEuclidean!0|
                           (VECTOR |sae| $))
                     |fSUP|
                     (|compiledLookupCheck| '|map|
                         (LIST (LIST '|SparseUnivariatePolynomial|
                                     (|devaluate| |sae|))
                               (LIST '|Mapping| (|devaluate| |sae|)
                                     (|devaluate| (ELT $ 7)))
                               (LIST '|SparseUnivariatePolynomial|
                                     (|devaluate| (ELT $ 7))))
                         (|SparseUnivariatePolynomialFunctions2|
                             (ELT $ 7) |sae|))) . #1#)
           (LETT |gBar|
                 (SPADCALL
                     (CONS #'|IBACHIN;approximateExtendedEuclidean!1|
                           (VECTOR |sae| $))
                     |gSUP|
                     (|compiledLookupCheck| '|map|
                         (LIST (LIST '|SparseUnivariatePolynomial|
                                     (|devaluate| |sae|))
                               (LIST '|Mapping| (|devaluate| |sae|)
                                     (|devaluate| (ELT $ 7)))
                               (LIST '|SparseUnivariatePolynomial|
                                     (|devaluate| (ELT $ 7))))
                         (|SparseUnivariatePolynomialFunctions2|
                             (ELT $ 7) |sae|))) . #1#)
           (LETT |ee|
                 (SPADCALL |fBar| |gBar|
                     (|compiledLookupCheck| '|extendedEuclidean|
                         (LIST (LIST '|Record| (LIST '|:| '|coef1| '$)
                                     (LIST '|:| '|coef2| '$)
                                     (LIST '|:| '|generator| '$))
                               '$ '$)
                         (|SparseUnivariatePolynomial| |sae|))) . #1#)
           (COND
             ((NULL (SPADCALL (QVELT |ee| 2)
                        (SPADCALL
                            (|compiledLookupCheck| '|One| (LIST '$)
                                (|SparseUnivariatePolynomial| |sae|)))
                        (|compiledLookupCheck| '=
                            (LIST (LIST '|Boolean|) '$ '$)
                            (|SparseUnivariatePolynomial| |sae|))))
              (EXIT (|error| "polynomials aren't relatively prime"))))
           (LETT |ss1| (QVELT |ee| 0) . #1#)
           (LETT |tt1| (QVELT |ee| 1) . #1#)
           (LETT |s1|
                 (SPADCALL
                     (CONS #'|IBACHIN;approximateExtendedEuclidean!2|
                           (VECTOR |sae| $))
                     |ss1|
                     (|compiledLookupCheck| '|map|
                         (LIST (LIST '|SparseUnivariatePolynomial|
                                     (|devaluate| (ELT $ 7)))
                               (LIST '|Mapping| (|devaluate| (ELT $ 7))
                                     (|devaluate| |sae|))
                               (LIST '|SparseUnivariatePolynomial|
                                     (|devaluate| |sae|)))
                         (|SparseUnivariatePolynomialFunctions2| |sae|
                             (ELT $ 7)))) . #1#)
           (LETT |s| |s1| . #1#)
           (LETT |t1|
                 (SPADCALL
                     (CONS #'|IBACHIN;approximateExtendedEuclidean!3|
                           (VECTOR |sae| $))
                     |tt1|
                     (|compiledLookupCheck| '|map|
                         (LIST (LIST '|SparseUnivariatePolynomial|
                                     (|devaluate| (ELT $ 7)))
                               (LIST '|Mapping| (|devaluate| (ELT $ 7))
                                     (|devaluate| |sae|))
                               (LIST '|SparseUnivariatePolynomial|
                                     (|devaluate| |sae|)))
                         (|SparseUnivariatePolynomialFunctions2| |sae|
                             (ELT $ 7)))) . #1#)
           (LETT |t| |t1| . #1#) (LETT |pPower| |p| . #1#)
           (SEQ (LETT |i| 2 . #1#) G190
                (COND ((QSGREATERP |i| |n|) (GO G191)))
                (SEQ (LETT |num|
                           (SPADCALL
                               (SPADCALL (|spadConstant| $ 44)
                                   (SPADCALL |s| |fSUP| (QREFELT $ 42))
                                   (QREFELT $ 45))
                               (SPADCALL |t| |gSUP| (QREFELT $ 42))
                               (QREFELT $ 45)) . #1#)
                     (LETT |rhs|
                           (PROG2 (LETT #0#
                                        (SPADCALL |num| |pPower|
                                         (QREFELT $ 47)) . #1#)
                                  (QCDR #0#)
                             (|check-union| (QEQCAR #0# 0)
                                 (|SparseUnivariatePolynomial|
                                     (QREFELT $ 7))
                                 #0#)) . #1#)
                     (LETT |sigma|
                           (SPADCALL
                               (CONS #'|IBACHIN;approximateExtendedEuclidean!4|
                                     (VECTOR $ |p|))
                               (SPADCALL |s1| |rhs| (QREFELT $ 42))
                               (QREFELT $ 50)) . #1#)
                     (LETT |tau|
                           (SPADCALL
                               (CONS #'|IBACHIN;approximateExtendedEuclidean!5|
                                     (VECTOR $ |p|))
                               (SPADCALL |t1| |rhs| (QREFELT $ 42))
                               (QREFELT $ 50)) . #1#)
                     (LETT |s|
                           (SPADCALL |s|
                               (SPADCALL |pPower| |sigma|
                                   (QREFELT $ 51))
                               (QREFELT $ 52)) . #1#)
                     (LETT |t|
                           (SPADCALL |t|
                               (SPADCALL |pPower| |tau| (QREFELT $ 51))
                               (QREFELT $ 52)) . #1#)
                     (LETT |quorem|
                           (SPADCALL |s| |gSUP| (QREFELT $ 54)) . #1#)
                     (LETT |pPower|
                           (SPADCALL |pPower| |p| (QREFELT $ 37)) . #1#)
                     (LETT |s|
                           (SPADCALL
                               (CONS #'|IBACHIN;approximateExtendedEuclidean!6|
                                     (VECTOR $ |pPower|))
                               (QCDR |quorem|) (QREFELT $ 50)) . #1#)
                     (EXIT (LETT |t|
                                 (SPADCALL
                                     (CONS
                                      #'|IBACHIN;approximateExtendedEuclidean!7|
                                      (VECTOR $ |pPower|))
                                     (SPADCALL |t|
                                      (SPADCALL |fSUP| (QCAR |quorem|)
                                       (QREFELT $ 42))
                                      (QREFELT $ 52))
                                     (QREFELT $ 50)) . #1#)))
                (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                (EXIT NIL))
           (EXIT (CONS (SPADCALL |s| (QREFELT $ 55))
                       (SPADCALL |t| (QREFELT $ 55)))))))) 

(DEFUN |IBACHIN;approximateExtendedEuclidean!7| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 48))) 

(DEFUN |IBACHIN;approximateExtendedEuclidean!6| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 48))) 

(DEFUN |IBACHIN;approximateExtendedEuclidean!5| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 48))) 

(DEFUN |IBACHIN;approximateExtendedEuclidean!4| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 48))) 

(DEFUN |IBACHIN;approximateExtendedEuclidean!3| (|#1| $$)
  (SPADCALL |#1|
      (|compiledLookupCheck| '|convert|
          (LIST (|devaluate| (ELT (QREFELT $$ 1) 7)) '$)
          (QREFELT $$ 0)))) 

(DEFUN |IBACHIN;approximateExtendedEuclidean!2| (|#1| $$)
  (SPADCALL |#1|
      (|compiledLookupCheck| '|convert|
          (LIST (|devaluate| (ELT (QREFELT $$ 1) 7)) '$)
          (QREFELT $$ 0)))) 

(DEFUN |IBACHIN;approximateExtendedEuclidean!1| (|#1| $$)
  (SPADCALL |#1|
      (|compiledLookupCheck| '|convert|
          (LIST '$ (|devaluate| (ELT (QREFELT $$ 1) 7)))
          (QREFELT $$ 0)))) 

(DEFUN |IBACHIN;approximateExtendedEuclidean!0| (|#1| $$)
  (SPADCALL |#1|
      (|compiledLookupCheck| '|convert|
          (LIST '$ (|devaluate| (ELT (QREFELT $$ 1) 7)))
          (QREFELT $$ 0)))) 

(DEFUN |IBACHIN;mapChineseToList| (|list| |polyList| |i| |den| $)
  (PROG (#0=#:G1875 |p| |j| |q| |factoredDen| |prime| #1=#:G1869 |n|
            |invPoly| #2=#:G1876 |pp| #3=#:G1877)
    (RETURN
      (SEQ (LETT |q| (|spadConstant| $ 43)
                 . #4=(|IBACHIN;mapChineseToList|))
           (SEQ (LETT |j| 1 . #4#) (LETT #0# (- |i| 1) . #4#) G190
                (COND ((QSGREATERP |j| #0#) #5=(GO G191)))
                (SEQ (LETT |q|
                           (SPADCALL |q| (|SPADfirst| |polyList|)
                               (QREFELT $ 56)) . #4#)
                     (EXIT (LETT |polyList| (CDR |polyList|) . #4#)))
                (LETT |j| (QSADD1 |j|) . #4#) #6=(GO G190) G191
                (EXIT NIL))
           (LETT |p| (|SPADfirst| |polyList|) . #4#)
           (LETT |polyList| (CDR |polyList|) . #4#)
           (SEQ (LETT |j| (+ |i| 1) . #4#) G190
                (COND
                  ((NULL (COND ((NULL |polyList|) 'NIL) ('T 'T))) #5#))
                (SEQ (LETT |q|
                           (SPADCALL |q| (|SPADfirst| |polyList|)
                               (QREFELT $ 56)) . #4#)
                     (EXIT (LETT |polyList| (CDR |polyList|) . #4#)))
                (LETT |j| (+ |j| 1) . #4#) #6# G191 (EXIT NIL))
           (LETT |factoredDen| (SPADCALL |den| (QREFELT $ 59)) . #4#)
           (LETT |prime|
                 (SPADCALL |factoredDen| 1 (QREFELT $ 60)) . #4#)
           (LETT |n|
                 (PROG1 (LETT #1#
                              (SPADCALL |factoredDen| 1 (QREFELT $ 61)) . #4#)
                   (|check-subtype| (>= #1# 0) '(|NonNegativeInteger|)
                       #1#)) . #4#)
           (LETT |invPoly|
                 (QCAR (|IBACHIN;approximateExtendedEuclidean| |q| |p|
                           |prime| |n| $)) . #4#)
           (EXIT (PROGN
                   (LETT #2# NIL . #4#)
                   (SEQ (LETT |pp| NIL . #4#) (LETT #3# |list| . #4#)
                        G190
                        (COND
                          ((OR (ATOM #3#)
                               (PROGN (LETT |pp| (CAR #3#) . #4#) NIL))
                           #5#))
                        (SEQ (EXIT (LETT #2#
                                    (CONS
                                     (QCDR
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL |pp| |invPoly|
                                         (QREFELT $ 56))
                                        |q| (QREFELT $ 56))
                                       (SPADCALL |p| |q|
                                        (QREFELT $ 56))
                                       (QREFELT $ 62)))
                                     #2#) . #4#)))
                        (LETT #3# (CDR #3#) . #4#) #6# G191
                        (EXIT (NREVERSE0 #2#))))))))) 

(DEFUN |IBACHIN;polyListToMatrix| (|polyList| |n| $)
  (PROG (|mat| #0=#:G1884 |i| |poly|)
    (RETURN
      (SEQ (LETT |mat|
                 (SPADCALL |n| |n| (|spadConstant| $ 14)
                     (QREFELT $ 15))
                 . #1=(|IBACHIN;polyListToMatrix|))
           (SEQ (LETT |poly| NIL . #1#) (LETT #0# |polyList| . #1#)
                (LETT |i| 1 . #1#) G190
                (COND
                  ((OR (QSGREATERP |i| |n|) (ATOM #0#)
                       (PROGN (LETT |poly| (CAR #0#) . #1#) NIL))
                   #2=(GO G191)))
                (SEQ (EXIT (SEQ G190
                                (COND
                                  ((NULL
                                    (COND
                                      ((SPADCALL |poly| (QREFELT $ 64))
                                       'NIL)
                                      ('T 'T)))
                                   #2#))
                                (SEQ (SPADCALL |mat| |i|
                                      (+
                                       (SPADCALL |poly| (QREFELT $ 65))
                                       1)
                                      (SPADCALL |poly| (QREFELT $ 66))
                                      (QREFELT $ 67))
                                     (EXIT
                                      (LETT |poly|
                                       (SPADCALL |poly| (QREFELT $ 68)) . #1#)))
                                NIL #3=(GO G190) G191 (EXIT NIL))))
                (LETT |i|
                      (PROG1 (QSADD1 |i|) (LETT #0# (CDR #0#) . #1#)) . #1#)
                #3# G191 (EXIT NIL))
           (EXIT |mat|))))) 

(DEFUN |IBACHIN;chineseRemainder;LLNniR;9|
       (|factors| |factorBases| |n| $)
  (PROG (#0=#:G1894 |base| #1=#:G1895 |denLCM| |factorBasisPolyLists|
            |pList| #2=#:G1896 |i| |polyList| |basisPolyLists|
            |basisPolys| |mat| |matInv|)
    (RETURN
      (SEQ (LETT |denLCM|
                 (SPADCALL (ELT $ 69)
                     (PROGN
                       (LETT #0# NIL
                             . #3=(|IBACHIN;chineseRemainder;LLNniR;9|))
                       (SEQ (LETT |base| NIL . #3#)
                            (LETT #1# |factorBases| . #3#) G190
                            (COND
                              ((OR (ATOM #1#)
                                   (PROGN
                                     (LETT |base| (CAR #1#) . #3#)
                                     NIL))
                               #4=(GO G191)))
                            (SEQ (EXIT (LETT #0#
                                        (CONS (QVELT |base| 1) #0#) . #3#)))
                            (LETT #1# (CDR #1#) . #3#) #5=(GO G190)
                            G191 (EXIT (NREVERSE0 #0#))))
                     (QREFELT $ 72)) . #3#)
           (EXIT (COND
                   ((SPADCALL |denLCM| (|spadConstant| $ 26)
                        (QREFELT $ 73))
                    (VECTOR (SPADCALL |n| (|spadConstant| $ 26)
                                (QREFELT $ 74))
                            (|spadConstant| $ 26)
                            (SPADCALL |n| (|spadConstant| $ 26)
                                (QREFELT $ 74))))
                   ('T
                    (SEQ (LETT |factorBasisPolyLists|
                               (|IBACHIN;basesToPolyLists|
                                   |factorBases| |denLCM| $) . #3#)
                         (LETT |basisPolyLists| NIL . #3#)
                         (SEQ (LETT |pList| NIL . #3#)
                              (LETT #2# |factorBasisPolyLists| . #3#)
                              (LETT |i| 1 . #3#) G190
                              (COND
                                ((OR (ATOM #2#)
                                     (PROGN
                                       (LETT |pList| (CAR #2#) . #3#)
                                       NIL))
                                 #4#))
                              (SEQ (LETT |polyList|
                                    (|IBACHIN;mapChineseToList| |pList|
                                     |factors| |i| |denLCM| $) . #3#)
                                   (EXIT
                                    (LETT |basisPolyLists|
                                     (CONS |polyList| |basisPolyLists|) . #3#)))
                              (LETT |i|
                                    (PROG1 (QSADD1 |i|)
                                      (LETT #2# (CDR #2#) . #3#)) . #3#)
                              #5# G191 (EXIT NIL))
                         (LETT |basisPolys|
                               (SPADCALL (NREVERSE |basisPolyLists|)
                                   (QREFELT $ 77)) . #3#)
                         (LETT |mat|
                               (SPADCALL
                                   (SPADCALL
                                    (|IBACHIN;polyListToMatrix|
                                     |basisPolys| |n| $)
                                    |denLCM| (QREFELT $ 79))
                                   (QREFELT $ 80)) . #3#)
                         (LETT |matInv|
                               (SPADCALL |mat| |denLCM| (QREFELT $ 82)) . #3#)
                         (EXIT (VECTOR |mat| |denLCM| |matInv|)))))))))) 

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

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

(MAKEPROP '|ChineseRemainderToolsForIntegralBases| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|NonNegativeInteger|) (|Matrix| 7)
             (0 . |nrows|) (5 . |ncols|) (10 . |Zero|) (14 . |Zero|)
             (18 . |new|) (25 . **) (|Integer|) (31 . |qelt|)
             (|Mapping| 6 6) (38 . |map|) (44 . |qsetelt!|)
             (|Record| (|:| |basis| 10) (|:| |basisDen| 7)
                 (|:| |basisInv| 10))
             (|List| 22) (52 . |list|) (57 . |One|) (61 . |One|)
             |IBACHIN;listConjugateBases;R2NniL;2|
             (|SparseUnivariatePolynomial| 6) (65 . |monomial|)
             (71 . -) (77 . **) (|List| 28) (83 . |list|)
             |IBACHIN;factorList;K3NniL;3| (88 . |Zero|) (92 . |quo|)
             (98 . *) (104 . |monomial|) (110 . +)
             (|SparseUnivariatePolynomial| 7) (116 . |makeSUP|)
             (121 . *) (127 . |One|) (131 . |One|) (135 . -)
             (|Union| $ '"failed") (141 . |exquo|) (147 . |rem|)
             (|Mapping| 7 7) (153 . |map|) (159 . *) (165 . +)
             (|Record| (|:| |quotient| $) (|:| |remainder| $))
             (171 . |monicDivide|) (177 . |unmakeSUP|) (182 . *)
             (|Factored| 7) (|DistinctDegreeFactorize| 6 7)
             (188 . |factor|) (193 . |nthFactor|) (199 . |nthExponent|)
             (205 . |monicDivide|) (|Boolean|) (211 . |zero?|)
             (216 . |degree|) (221 . |leadingCoefficient|)
             (226 . |setelt|) (234 . |reductum|) (239 . |lcm|)
             (|Mapping| 7 7 7) (|List| 7) (245 . |reduce|) (251 . =)
             (257 . |scalarMatrix|) (|List| $) (|List| 8)
             (263 . |concat|) (|ModularHermitianRowReduction| 7)
             (268 . |rowEchelon|) (274 . |squareTop|)
             (|TriangularMatrixOperations| 7 (|Vector| 7) (|Vector| 7)
                 10)
             (279 . |UpTriBddDenomInv|)
             |IBACHIN;chineseRemainder;LLNniR;9|)
          '#(|listConjugateBases| 285 |factorList| 292
             |chineseRemainder| 300)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 83
                                '(1 10 9 0 11 1 10 9 0 12 0 6 0 13 0 7
                                  0 14 3 10 0 9 9 7 15 2 6 0 0 9 16 3
                                  10 7 0 17 17 18 2 7 0 19 0 20 4 10 7
                                  0 17 17 7 21 1 23 0 22 24 0 6 0 25 0
                                  7 0 26 2 28 0 6 9 29 2 28 0 0 0 30 2
                                  28 0 0 9 31 1 32 0 28 33 0 8 0 35 2 7
                                  0 0 0 36 2 7 0 0 0 37 2 8 0 7 9 38 2
                                  8 0 0 0 39 1 8 40 0 41 2 40 0 0 0 42
                                  0 8 0 43 0 40 0 44 2 40 0 0 0 45 2 40
                                  46 0 7 47 2 7 0 0 0 48 2 40 0 49 0 50
                                  2 40 0 7 0 51 2 40 0 0 0 52 2 40 53 0
                                  0 54 1 8 0 40 55 2 8 0 0 0 56 1 58 57
                                  7 59 2 57 7 0 17 60 2 57 17 0 17 61 2
                                  8 53 0 0 62 1 8 63 0 64 1 8 9 0 65 1
                                  8 7 0 66 4 10 7 0 17 17 7 67 1 8 0 0
                                  68 2 7 0 0 0 69 2 71 7 70 0 72 2 7 63
                                  0 0 73 2 10 0 9 7 74 1 76 0 75 77 2
                                  78 10 10 7 79 1 10 0 0 80 2 81 10 10
                                  7 82 3 0 23 22 9 9 27 4 0 32 6 9 9 9
                                  34 3 0 22 76 23 9 83)))))
          '|lookupComplete|)) 
