
(/VERSIONCHECK 2) 

(DEFUN |PSEUDLIN;inv| (|m| $)
  (PROG (#1=#:G1803)
    (RETURN
     (PROG2
         (LETT #1# (SPADCALL |m| (QREFELT $ 9)) |PSEUDLIN;inv|)
         (QCDR #1#)
       (|check-union| (QEQCAR #1# 0) (|Matrix| (QREFELT $ 6)) #1#))))) 

(DEFUN |PSEUDLIN;changeBase;2MAMM;2| (M A |sig| |der| $)
  (PROG ()
    (RETURN
     (SPADCALL (|PSEUDLIN;inv| A $)
               (SPADCALL
                (SPADCALL M
                          (SPADCALL
                           (CONS #'|PSEUDLIN;changeBase;2MAMM;2!0|
                                 (VECTOR $ |sig|))
                           A (QREFELT $ 13))
                          (QREFELT $ 14))
                (SPADCALL |der| A (QREFELT $ 13)) (QREFELT $ 15))
               (QREFELT $ 14))))) 

(DEFUN |PSEUDLIN;changeBase;2MAMM;2!0| (|k1| $$)
  (PROG (|sig| $)
    (LETT |sig| (QREFELT $$ 1) . #1=(|PSEUDLIN;changeBase;2MAMM;2|))
    (LETT $ (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL |sig| |k1| (QREFELT $ 11)))))) 

(DEFUN |PSEUDLIN;normalForm;MAMR;3| (M |sig| |der| $)
  (|PSEUDLIN;normalForm0| M |sig| (SPADCALL |sig| (QREFELT $ 17)) |der| $)) 

(DEFUN |PSEUDLIN;companionBlocks;MVL;4| (R |w| $)
  (PROG (|i| |l| |k| |v| #1=#:G1852 |j| |n|)
    (RETURN
     (SEQ (LETT |i| 1 . #2=(|PSEUDLIN;companionBlocks;MVL;4|))
          (LETT |n| (QVSIZE R) . #2#) (LETT |l| NIL . #2#)
          (SEQ G190
               (COND ((NULL (COND ((< |n| |i|) 'NIL) ('T 'T))) #3=(GO G191)))
               (SEQ (LETT |j| |i| . #2#)
                    (SEQ G190
                         (COND
                          ((NULL
                            (COND ((< |n| (+ |j| 1)) 'NIL)
                                  ('T
                                   (SPADCALL
                                    (SPADCALL R |j| (+ |j| 1) (QREFELT $ 22))
                                    (|spadConstant| $ 20) (QREFELT $ 24)))))
                           #3#))
                         (SEQ (EXIT (LETT |j| (+ |j| 1) . #2#))) NIL
                         #4=(GO G190) G191 (EXIT NIL))
                    (LETT |v|
                          (MAKEARR1
                           (PROG1 (LETT #1# (+ (- |j| |i|) 1) . #2#)
                             (|check-subtype| (>= #1# 0)
                                              '(|NonNegativeInteger|) #1#))
                           (|spadConstant| $ 25))
                          . #2#)
                    (SEQ (LETT |k| |i| . #2#) G190 (COND ((> |k| |j|) #3#))
                         (SEQ
                          (EXIT
                           (SPADCALL |v| (+ (- |k| |i|) 1)
                                     (SPADCALL |w| |k| (QREFELT $ 27))
                                     (QREFELT $ 28))))
                         (LETT |k| (+ |k| 1) . #2#) #4# G191 (EXIT NIL))
                    (LETT |l|
                          (CONS
                           (CONS (SPADCALL R |i| |j| |i| |j| (QREFELT $ 29))
                                 |v|)
                           |l|)
                          . #2#)
                    (EXIT (LETT |i| (+ |j| 1) . #2#)))
               NIL #4# G191 (EXIT NIL))
          (EXIT |l|))))) 

(DEFUN |PSEUDLIN;normalForm0| (M |sig| |siginv| |der| $)
  (PROG (|i| |Binv| B E |j| |k| #1=#:G1892 #2=#:G1891 |recOfMatrices|
         #3=#:G1888 #4=#:G1890 #5=#:G1889 N)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT N (QVSIZE M) . #6=(|PSEUDLIN;normalForm0|))
            (LETT B
                  (SPADCALL
                   (PROGN
                    (LETT #5# (GETREFV N) . #6#)
                    (SEQ (LETT #4# 0 . #6#) (LETT |k| 1 . #6#) G190
                         (COND ((QSGREATERP |k| N) #7=(GO G191)))
                         (SEQ (EXIT (SETELT #5# #4# (|spadConstant| $ 20))))
                         (LETT |k|
                               (PROG1 (QSADD1 |k|)
                                 (LETT #4# (QSADD1 #4#) . #6#))
                               . #6#)
                         #8=(GO G190) G191 (EXIT NIL))
                    #5#)
                   (QREFELT $ 33))
                  . #6#)
            (LETT |Binv| (SPADCALL B (QREFELT $ 34)) . #6#)
            (COND
             ((SPADCALL M (QREFELT $ 35))
              (PROGN (LETT #3# (VECTOR M B |Binv|) . #6#) (GO #3#))))
            (LETT |i| 1 . #6#)
            (SEQ G190 (COND ((NULL (< |i| N)) #7#))
                 (SEQ (LETT |j| (+ |i| 1) . #6#)
                      (SEQ G190
                           (COND
                            ((NULL
                              (COND ((< N |j|) 'NIL)
                                    ('T
                                     (SPADCALL
                                      (SPADCALL M |i| |j| (QREFELT $ 22))
                                      (|spadConstant| $ 25) (QREFELT $ 24)))))
                             #7#))
                           (SEQ (EXIT (LETT |j| (+ |j| 1) . #6#))) NIL #8# G191
                           (EXIT NIL))
                      (EXIT
                       (COND
                        ((< N |j|)
                         (SEQ
                          (SEQ (LETT |j| |i| . #6#) G190 (COND ((< |j| 2) #7#))
                               (SEQ
                                (EXIT
                                 (SEQ (LETT |k| (+ |i| 1) . #6#) G190
                                      (COND ((> |k| N) #7#))
                                      (SEQ
                                       (LETT E
                                             (|PSEUDLIN;addMatrix| N |k|
                                              (- |j| 1)
                                              (SPADCALL M |k| |j|
                                                        (QREFELT $ 22))
                                              $)
                                             . #6#)
                                       (LETT M
                                             (SPADCALL M E |sig| |der|
                                                       (QREFELT $ 16))
                                             . #6#)
                                       (LETT B (SPADCALL B E (QREFELT $ 14))
                                             . #6#)
                                       (EXIT
                                        (LETT |Binv|
                                              (SPADCALL (|PSEUDLIN;inv| E $)
                                                        |Binv| (QREFELT $ 14))
                                              . #6#)))
                                      (LETT |k| (+ |k| 1) . #6#) #8# G191
                                      (EXIT NIL))))
                               (LETT |j| (+ |j| -1) . #6#) #8# G191 (EXIT NIL))
                          (LETT |j| (+ |i| 1) . #6#)
                          (SEQ G190
                               (COND
                                ((NULL
                                  (COND ((< N |j|) 'NIL)
                                        ('T
                                         (SPADCALL
                                          (SPADCALL M |j| 1 (QREFELT $ 22))
                                          (|spadConstant| $ 25)
                                          (QREFELT $ 24)))))
                                 #7#))
                               (SEQ (EXIT (LETT |j| (+ |j| 1) . #6#))) NIL #8#
                               G191 (EXIT NIL))
                          (EXIT
                           (COND
                            ((< N |j|)
                             (SEQ
                              (LETT |recOfMatrices|
                                    (SPADCALL
                                     (SPADCALL M (+ |i| 1) N (+ |i| 1) N
                                               (QREFELT $ 29))
                                     |sig| |der| (QREFELT $ 19))
                                    . #6#)
                              (SPADCALL M (+ |i| 1) (+ |i| 1)
                                        (QVELT |recOfMatrices| 0)
                                        (QREFELT $ 37))
                              (LETT E
                                    (SPADCALL
                                     (PROGN
                                      (LETT #2# (GETREFV N) . #6#)
                                      (SEQ (LETT #1# 0 . #6#)
                                           (LETT |k| 1 . #6#) G190
                                           (COND ((QSGREATERP |k| N) #7#))
                                           (SEQ
                                            (EXIT
                                             (SETELT #2# #1#
                                                     (|spadConstant| $ 20))))
                                           (LETT |k|
                                                 (PROG1 (QSADD1 |k|)
                                                   (LETT #1# (QSADD1 #1#)
                                                         . #6#))
                                                 . #6#)
                                           #8# G191 (EXIT NIL))
                                      #2#)
                                     (QREFELT $ 33))
                                    . #6#)
                              (SPADCALL E (+ |i| 1) (+ |i| 1)
                                        (QVELT |recOfMatrices| 1)
                                        (QREFELT $ 37))
                              (LETT B (SPADCALL B E (QREFELT $ 14)) . #6#)
                              (SPADCALL E (+ |i| 1) (+ |i| 1)
                                        (QVELT |recOfMatrices| 2)
                                        (QREFELT $ 37))
                              (LETT |Binv| (SPADCALL E |Binv| (QREFELT $ 14))
                                    . #6#)
                              (EXIT (LETT |i| N . #6#))))
                            ('T
                             (SEQ
                              (LETT E (|PSEUDLIN;permutationMatrix| N 1 |j| $)
                                    . #6#)
                              (LETT M (SPADCALL M E |sig| |der| (QREFELT $ 16))
                                    . #6#)
                              (LETT B (SPADCALL B E (QREFELT $ 14)) . #6#)
                              (LETT |Binv| (SPADCALL E |Binv| (QREFELT $ 14))
                                    . #6#)
                              (EXIT (LETT |i| 1 . #6#))))))))
                        ('T
                         (SEQ
                          (COND
                           ((NULL (EQL |j| (+ |i| 1)))
                            (SEQ
                             (LETT E
                                   (|PSEUDLIN;permutationMatrix| N (+ |i| 1)
                                    |j| $)
                                   . #6#)
                             (LETT M (SPADCALL M E |sig| |der| (QREFELT $ 16))
                                   . #6#)
                             (LETT B (SPADCALL B E (QREFELT $ 14)) . #6#)
                             (EXIT
                              (LETT |Binv| (SPADCALL E |Binv| (QREFELT $ 14))
                                    . #6#)))))
                          (LETT E
                                (|PSEUDLIN;mulMatrix| N (+ |i| 1)
                                 (SPADCALL |siginv|
                                           (SPADCALL
                                            (SPADCALL M |i| (+ |i| 1)
                                                      (QREFELT $ 22))
                                            (QREFELT $ 38))
                                           (QREFELT $ 11))
                                 $)
                                . #6#)
                          (LETT M (SPADCALL M E |sig| |der| (QREFELT $ 16))
                                . #6#)
                          (LETT B (SPADCALL B E (QREFELT $ 14)) . #6#)
                          (LETT |Binv|
                                (SPADCALL (|PSEUDLIN;inv| E $) |Binv|
                                          (QREFELT $ 14))
                                . #6#)
                          (SEQ (LETT |j| 1 . #6#) G190
                               (COND ((QSGREATERP |j| N) #7#))
                               (SEQ
                                (EXIT
                                 (COND
                                  ((NULL (EQL |j| (+ |i| 1)))
                                   (SEQ
                                    (LETT E
                                          (|PSEUDLIN;addMatrix| N (+ |i| 1) |j|
                                           (SPADCALL |siginv|
                                                     (SPADCALL
                                                      (SPADCALL M |i| |j|
                                                                (QREFELT $ 22))
                                                      (QREFELT $ 39))
                                                     (QREFELT $ 11))
                                           $)
                                          . #6#)
                                    (LETT M
                                          (SPADCALL M E |sig| |der|
                                                    (QREFELT $ 16))
                                          . #6#)
                                    (LETT B (SPADCALL B E (QREFELT $ 14))
                                          . #6#)
                                    (EXIT
                                     (LETT |Binv|
                                           (SPADCALL (|PSEUDLIN;inv| E $)
                                                     |Binv| (QREFELT $ 14))
                                           . #6#)))))))
                               (LETT |j| (QSADD1 |j|) . #6#) #8# G191
                               (EXIT NIL))
                          (EXIT (LETT |i| (+ |i| 1) . #6#)))))))
                 NIL #8# G191 (EXIT NIL))
            (EXIT (VECTOR M B |Binv|))))
      #3# (EXIT #3#))))) 

(DEFUN |PSEUDLIN;mulMatrix| (N |i| |a| $)
  (PROG (M |j| #1=#:G1897 #2=#:G1896)
    (RETURN
     (SEQ
      (LETT M
            (SPADCALL
             (PROGN
              (LETT #2# (GETREFV N) . #3=(|PSEUDLIN;mulMatrix|))
              (SEQ (LETT #1# 0 . #3#) (LETT |j| 1 . #3#) G190
                   (COND ((QSGREATERP |j| N) (GO G191)))
                   (SEQ (EXIT (SETELT #2# #1# (|spadConstant| $ 20))))
                   (LETT |j| (PROG1 (QSADD1 |j|) (LETT #1# (QSADD1 #1#) . #3#))
                         . #3#)
                   (GO G190) G191 (EXIT NIL))
              #2#)
             (QREFELT $ 33))
            . #3#)
      (SPADCALL M |i| |i| |a| (QREFELT $ 40)) (EXIT M))))) 

(DEFUN |PSEUDLIN;addMatrix| (N |i| |k| |a| $)
  (PROG (A |j| #1=#:G1902 #2=#:G1901)
    (RETURN
     (SEQ
      (LETT A
            (SPADCALL
             (PROGN
              (LETT #2# (GETREFV N) . #3=(|PSEUDLIN;addMatrix|))
              (SEQ (LETT #1# 0 . #3#) (LETT |j| 1 . #3#) G190
                   (COND ((QSGREATERP |j| N) (GO G191)))
                   (SEQ (EXIT (SETELT #2# #1# (|spadConstant| $ 20))))
                   (LETT |j| (PROG1 (QSADD1 |j|) (LETT #1# (QSADD1 #1#) . #3#))
                         . #3#)
                   (GO G190) G191 (EXIT NIL))
              #2#)
             (QREFELT $ 33))
            . #3#)
      (SPADCALL A |i| |k| |a| (QREFELT $ 40)) (EXIT A))))) 

(DEFUN |PSEUDLIN;permutationMatrix| (N |i| |k| $)
  (PROG (P |j| #1=#:G1907 #2=#:G1906)
    (RETURN
     (SEQ
      (LETT P
            (SPADCALL
             (PROGN
              (LETT #2# (GETREFV N) . #3=(|PSEUDLIN;permutationMatrix|))
              (SEQ (LETT #1# 0 . #3#) (LETT |j| 1 . #3#) G190
                   (COND ((QSGREATERP |j| N) (GO G191)))
                   (SEQ (EXIT (SETELT #2# #1# (|spadConstant| $ 20))))
                   (LETT |j| (PROG1 (QSADD1 |j|) (LETT #1# (QSADD1 #1#) . #3#))
                         . #3#)
                   (GO G190) G191 (EXIT NIL))
              #2#)
             (QREFELT $ 33))
            . #3#)
      (SPADCALL P |i| |i|
                (SPADCALL P |k| |k| (|spadConstant| $ 25) (QREFELT $ 40))
                (QREFELT $ 40))
      (SPADCALL P |i| |k|
                (SPADCALL P |k| |i| (|spadConstant| $ 20) (QREFELT $ 40))
                (QREFELT $ 40))
      (EXIT P))))) 

(DEFUN |PseudoLinearNormalForm| (#1=#:G1908)
  (PROG ()
    (RETURN
     (PROG (#2=#:G1909)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (LIST (|devaluate| #1#))
                                           (HGET |$ConstructorCache|
                                                 '|PseudoLinearNormalForm|)
                                           '|domainEqualList|)
                . #3=(|PseudoLinearNormalForm|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT
              (PROG1 (|PseudoLinearNormalForm;| #1#) (LETT #2# T . #3#))
            (COND
             ((NOT #2#)
              (HREM |$ConstructorCache| '|PseudoLinearNormalForm|))))))))))) 

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

(MAKEPROP '|PseudoLinearNormalForm| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|Union| $ '"failed")
              (|Matrix| 6) (0 . |inverse|) (|Automorphism| 6) (5 . |elt|)
              (|Mapping| 6 6) (11 . |map|) (17 . *) (23 . +)
              |PSEUDLIN;changeBase;2MAMM;2| (29 . |inv|)
              (|Record| (|:| R 8) (|:| A 8) (|:| |Ainv| 8))
              |PSEUDLIN;normalForm;MAMR;3| (34 . |One|) (|Integer|)
              (38 . |elt|) (|Boolean|) (45 . =) (51 . |Zero|) (|Vector| 6)
              (55 . |elt|) (61 . |setelt|) (68 . |subMatrix|)
              (|Record| (|:| C 8) (|:| |g| 26)) (|List| 30)
              |PSEUDLIN;companionBlocks;MVL;4| (77 . |diagonalMatrix|)
              (82 . |copy|) (87 . |diagonal?|) (92 . |One|)
              (96 . |setsubMatrix!|) (104 . |inv|) (109 . -) (114 . |setelt|))
           '#(|normalForm| 122 |companionBlocks| 129 |changeBase| 135) 'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 40
                                                 '(1 8 7 0 9 2 10 6 0 6 11 2 8
                                                   0 12 0 13 2 8 0 0 0 14 2 8 0
                                                   0 0 15 1 10 0 0 17 0 6 0 20
                                                   3 8 6 0 21 21 22 2 6 23 0 0
                                                   24 0 6 0 25 2 26 6 0 21 27 3
                                                   26 6 0 21 6 28 5 8 0 0 21 21
                                                   21 21 29 1 8 0 26 33 1 8 0 0
                                                   34 1 8 23 0 35 0 10 0 36 4 8
                                                   0 0 21 21 0 37 1 6 0 0 38 1
                                                   6 0 0 39 4 8 6 0 21 21 6 40
                                                   3 0 18 8 10 12 19 2 0 31 8
                                                   26 32 4 0 8 8 8 10 12
                                                   16)))))
           '|lookupComplete|)) 
