
(/VERSIONCHECK 2) 

(DEFUN |REP2;blockMultiply| (|a| |b| |li| |n| $)
  (PROG (#1=#:G679 #2=#:G678 #3=#:G680 |s| #4=#:G687 |j| #5=#:G686 #6=#:G685
         |i| #7=#:G684)
    (RETURN
     (SEQ
      (SPADCALL
       (PROGN
        (LETT #7# NIL . #8=(|REP2;blockMultiply|))
        (SEQ (LETT |i| NIL . #8#) (LETT #6# |li| . #8#) G190
             (COND
              ((OR (ATOM #6#) (PROGN (LETT |i| (CAR #6#) . #8#) NIL))
               #9=(GO G191)))
             (SEQ
              (EXIT
               (LETT #7#
                     (CONS
                      (PROGN
                       (LETT #5# NIL . #8#)
                       (SEQ (LETT |j| NIL . #8#) (LETT #4# |li| . #8#) G190
                            (COND
                             ((OR (ATOM #4#)
                                  (PROGN (LETT |j| (CAR #4#) . #8#) NIL))
                              #9#))
                            (SEQ
                             (EXIT
                              (LETT #5#
                                    (CONS
                                     (PROGN
                                      (LETT #1# NIL . #8#)
                                      (SEQ (LETT |s| 1 . #8#) G190
                                           (COND ((QSGREATERP |s| |n|) #9#))
                                           (SEQ
                                            (EXIT
                                             (PROGN
                                              (LETT #3#
                                                    (SPADCALL
                                                     (SPADCALL |a| |i| |s|
                                                               (QREFELT $ 9))
                                                     (SPADCALL |b| |s| |j|
                                                               (QREFELT $ 9))
                                                     (QREFELT $ 10))
                                                    . #8#)
                                              (COND
                                               (#1#
                                                (LETT #2#
                                                      (SPADCALL #2# #3#
                                                                (QREFELT $ 11))
                                                      . #8#))
                                               ('T
                                                (PROGN
                                                 (LETT #2# #3# . #8#)
                                                 (LETT #1# 'T . #8#)))))))
                                           (LETT |s| (QSADD1 |s|) . #8#)
                                           #10=(GO G190) G191 (EXIT NIL))
                                      (COND (#1# #2#)
                                            ('T (|spadConstant| $ 12))))
                                     #5#)
                                    . #8#)))
                            (LETT #4# (CDR #4#) . #8#) #10# G191
                            (EXIT (NREVERSE0 #5#))))
                      #7#)
                     . #8#)))
             (LETT #6# (CDR #6#) . #8#) #10# G191 (EXIT (NREVERSE0 #7#))))
       (QREFELT $ 14)))))) 

(DEFUN |REP2;fingerPrint| (|i| |a| |b| |x| $)
  (PROG (#1=#:G717 #2=#:G712 #3=#:G707 #4=#:G702 #5=#:G697 #6=#:G692)
    (RETURN
     (SEQ
      (COND
       ((EQL
         (PROG1 (LETT #6# |i| . #7=(|REP2;fingerPrint|))
           (|check-subtype| (> #6# 0) '(|PositiveInteger|) #6#))
         1)
        (LETT |x|
              (SPADCALL (SPADCALL |a| |b| (QREFELT $ 15))
                        (SPADCALL |a| |b| (QREFELT $ 16)) (QREFELT $ 15))
              . #7#))
       ((EQL
         (PROG1 (LETT #5# |i| . #7#)
           (|check-subtype| (> #5# 0) '(|PositiveInteger|) #5#))
         2)
        (LETT |x|
              (SPADCALL
               (SPADCALL |x| (SPADCALL |a| |b| (QREFELT $ 16)) (QREFELT $ 15))
               |b| (QREFELT $ 16))
              . #7#))
       ((EQL
         (PROG1 (LETT #4# |i| . #7#)
           (|check-subtype| (> #4# 0) '(|PositiveInteger|) #4#))
         3)
        (LETT |x|
              (SPADCALL |a| (SPADCALL |b| |x| (QREFELT $ 16)) (QREFELT $ 15))
              . #7#))
       ((EQL
         (PROG1 (LETT #3# |i| . #7#)
           (|check-subtype| (> #3# 0) '(|PositiveInteger|) #3#))
         4)
        (LETT |x| (SPADCALL |x| |b| (QREFELT $ 15)) . #7#))
       ((EQL
         (PROG1 (LETT #2# |i| . #7#)
           (|check-subtype| (> #2# 0) '(|PositiveInteger|) #2#))
         5)
        (LETT |x|
              (SPADCALL |x| (SPADCALL |a| |b| (QREFELT $ 16)) (QREFELT $ 15))
              . #7#))
       ((EQL
         (PROG1 (LETT #1# |i| . #7#)
           (|check-subtype| (> #1# 0) '(|PositiveInteger|) #1#))
         6)
        (LETT |x|
              (SPADCALL (SPADCALL |x| |a| (QREFELT $ 17))
                        (SPADCALL |b| |a| (QREFELT $ 16)) (QREFELT $ 15))
              . #7#))
       ('T
        (SEQ (|error| "Sorry, but there are only 6 fingerprints!")
             (EXIT |x|)))))))) 

(DEFUN |REP2;completeEchelonBasis;VM;3| (|basis| $)
  (PROG (|j| |newStart| |indexOfVectorToBeScanned| |row| |completedBasis| |i|
         |n| |dimensionOfSubmodule|)
    (RETURN
     (SEQ
      (LETT |dimensionOfSubmodule| (QVSIZE |basis|)
            . #1=(|REP2;completeEchelonBasis;VM;3|))
      (LETT |n| (QVSIZE (SPADCALL |basis| 1 (QREFELT $ 21))) . #1#)
      (LETT |indexOfVectorToBeScanned| 1 . #1#)
      (LETT |row| |dimensionOfSubmodule| . #1#)
      (LETT |completedBasis| (SPADCALL |n| |n| (QREFELT $ 23)) . #1#)
      (SEQ (LETT |i| 1 . #1#) G190
           (COND ((QSGREATERP |i| |dimensionOfSubmodule|) #2=(GO G191)))
           (SEQ
            (EXIT
             (LETT |completedBasis|
                   (SPADCALL |completedBasis| |i|
                             (SPADCALL |basis| |i| (QREFELT $ 21))
                             (QREFELT $ 24))
                   . #1#)))
           (LETT |i| (QSADD1 |i|) . #1#) #3=(GO G190) G191 (EXIT NIL))
      (COND
       ((NULL (< |n| (QVSIZE |basis|)))
        (SEQ (LETT |newStart| 1 . #1#)
             (SEQ (LETT |j| 1 . #1#) G190
                  (COND
                   ((OR (QSGREATERP |j| |n|)
                        (NULL
                         (COND
                          ((< |dimensionOfSubmodule|
                              |indexOfVectorToBeScanned|)
                           'NIL)
                          ('T 'T))))
                    #2#))
                  (SEQ
                   (COND
                    ((SPADCALL
                      (SPADCALL
                       (SPADCALL |basis| |indexOfVectorToBeScanned|
                                 (QREFELT $ 21))
                       |j| (QREFELT $ 25))
                      (|spadConstant| $ 12) (QREFELT $ 27))
                     (SEQ
                      (SPADCALL |completedBasis| (+ 1 |row|) |j|
                                (|spadConstant| $ 18) (QREFELT $ 28))
                      (EXIT (LETT |row| (+ |row| 1) . #1#))))
                    ('T
                     (LETT |indexOfVectorToBeScanned|
                           (+ |indexOfVectorToBeScanned| 1) . #1#)))
                   (EXIT (LETT |newStart| (+ |j| 1) . #1#)))
                  (LETT |j| (QSADD1 |j|) . #1#) #3# G191 (EXIT NIL))
             (EXIT
              (SEQ (LETT |j| |newStart| . #1#) G190 (COND ((> |j| |n|) #2#))
                   (SEQ
                    (EXIT
                     (SPADCALL |completedBasis| |j| |j| (|spadConstant| $ 18)
                               (QREFELT $ 28))))
                   (LETT |j| (+ |j| 1) . #1#) #3# G191 (EXIT NIL))))))
      (EXIT |completedBasis|))))) 

(DEFUN |REP2;createRandomElement;L2M;4| (|aG| |algElt| $)
  (PROG (|randomIndex| |numberOfGenerators|)
    (RETURN
     (SEQ
      (LETT |numberOfGenerators| (LENGTH |aG|)
            . #1=(|REP2;createRandomElement;L2M;4|))
      (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|)) . #1#)
      (LETT |algElt|
            (SPADCALL |algElt| (SPADCALL |aG| |randomIndex| (QREFELT $ 31))
                      (QREFELT $ 16))
            . #1#)
      (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|)) . #1#)
      (EXIT
       (SPADCALL |algElt| (SPADCALL |aG| |randomIndex| (QREFELT $ 31))
                 (QREFELT $ 15))))))) 

(DEFUN |REP2;cyclicSubmodule;LVV;5| (|lm| |v| $)
  (PROG (#1=#:G745 |i| #2=#:G744 |furtherElts| |updateFurtherElts| #3=#:G743
         #4=#:G742 |basis| |addedToBasis| |nextVector| |w| #5=#:G741 #6=#:G740)
    (RETURN
     (SEQ
      (LETT |basis|
            (SPADCALL
             (SPADCALL (SPADCALL (SPADCALL |v| (QREFELT $ 34)) (QREFELT $ 35))
                       (QREFELT $ 14))
             (QREFELT $ 36))
            . #7=(|REP2;cyclicSubmodule;LVV;5|))
      (LETT |furtherElts|
            (PROGN
             (LETT #6# NIL . #7#)
             (SEQ (LETT |i| 1 . #7#)
                  (LETT #5# (SPADCALL |lm| (QREFELT $ 37)) . #7#) G190
                  (COND ((QSGREATERP |i| #5#) #8=(GO G191)))
                  (SEQ
                   (EXIT
                    (LETT #6#
                          (CONS
                           (SPADCALL (SPADCALL |lm| |i| (QREFELT $ 31)) |v|
                                     (QREFELT $ 38))
                           #6#)
                          . #7#)))
                  (LETT |i| (QSADD1 |i|) . #7#) #9=(GO G190) G191
                  (EXIT (NREVERSE0 #6#))))
            . #7#)
      (SEQ G190
           (COND
            ((NULL
              (COND ((NULL |furtherElts|) 'NIL)
                    ('T (< (SPADCALL |basis| (QREFELT $ 39)) (QVSIZE |v|)))))
             #8#))
           (SEQ (LETT |w| (|SPADfirst| |furtherElts|) . #7#)
                (LETT |nextVector|
                      (SPADCALL
                       (SPADCALL (SPADCALL |w| (QREFELT $ 34)) (QREFELT $ 35))
                       (QREFELT $ 14))
                      . #7#)
                (LETT |addedToBasis|
                      (SPADCALL |basis| |nextVector| (QREFELT $ 40)) . #7#)
                (EXIT
                 (COND
                  ((EQL (SPADCALL |addedToBasis| (QREFELT $ 41))
                        (SPADCALL |basis| (QREFELT $ 39)))
                   (LETT |furtherElts| (CDR |furtherElts|) . #7#))
                  ('T
                   (SEQ
                    (LETT |basis| (SPADCALL |addedToBasis| (QREFELT $ 36))
                          . #7#)
                    (LETT |updateFurtherElts|
                          (PROGN
                           (LETT #4# NIL . #7#)
                           (SEQ (LETT |i| 1 . #7#)
                                (LETT #3# (SPADCALL |lm| (QREFELT $ 37)) . #7#)
                                G190 (COND ((QSGREATERP |i| #3#) #8#))
                                (SEQ
                                 (EXIT
                                  (LETT #4#
                                        (CONS
                                         (SPADCALL
                                          (SPADCALL |lm| |i| (QREFELT $ 31))
                                          |w| (QREFELT $ 38))
                                         #4#)
                                        . #7#)))
                                (LETT |i| (QSADD1 |i|) . #7#) #9# G191
                                (EXIT (NREVERSE0 #4#))))
                          . #7#)
                    (EXIT
                     (LETT |furtherElts|
                           (APPEND (CDR |furtherElts|) |updateFurtherElts|)
                           . #7#)))))))
           NIL #9# G191 (EXIT NIL))
      (EXIT
       (SPADCALL
        (PROGN
         (LETT #2# NIL . #7#)
         (SEQ (LETT |i| 1 . #7#)
              (LETT #1# (SPADCALL |basis| (QREFELT $ 42)) . #7#) G190
              (COND ((QSGREATERP |i| #1#) #8#))
              (SEQ
               (EXIT
                (LETT #2# (CONS (SPADCALL |basis| |i| (QREFELT $ 43)) #2#)
                      . #7#)))
              (LETT |i| (QSADD1 |i|) . #7#) #9# G191 (EXIT (NREVERSE0 #2#))))
        (QREFELT $ 45))))))) 

(DEFUN |REP2;standardBasisOfCyclicSubmodule;LVM;6| (|lm| |v| $)
  (PROG (|furtherElts| |updateFurtherElts| #1=#:G756 |i| #2=#:G755 |basis|
         |standardBasis| |addedToBasis| |nextVector| |w| #3=#:G754 #4=#:G753
         |dim|)
    (RETURN
     (SEQ
      (LETT |dim| (QVSIZE |v|)
            . #5=(|REP2;standardBasisOfCyclicSubmodule;LVM;6|))
      (LETT |standardBasis|
            (SPADCALL (SPADCALL |v| (QREFELT $ 34)) (QREFELT $ 35)) . #5#)
      (LETT |basis|
            (SPADCALL
             (SPADCALL (SPADCALL (SPADCALL |v| (QREFELT $ 34)) (QREFELT $ 35))
                       (QREFELT $ 14))
             (QREFELT $ 36))
            . #5#)
      (LETT |furtherElts|
            (PROGN
             (LETT #4# NIL . #5#)
             (SEQ (LETT |i| 1 . #5#)
                  (LETT #3# (SPADCALL |lm| (QREFELT $ 37)) . #5#) G190
                  (COND ((QSGREATERP |i| #3#) #6=(GO G191)))
                  (SEQ
                   (EXIT
                    (LETT #4#
                          (CONS
                           (SPADCALL (SPADCALL |lm| |i| (QREFELT $ 31)) |v|
                                     (QREFELT $ 38))
                           #4#)
                          . #5#)))
                  (LETT |i| (QSADD1 |i|) . #5#) #7=(GO G190) G191
                  (EXIT (NREVERSE0 #4#))))
            . #5#)
      (SEQ G190
           (COND
            ((NULL
              (COND ((NULL |furtherElts|) 'NIL)
                    ('T (< (SPADCALL |basis| (QREFELT $ 39)) (QVSIZE |v|)))))
             #6#))
           (SEQ (LETT |w| (|SPADfirst| |furtherElts|) . #5#)
                (LETT |nextVector|
                      (SPADCALL
                       (SPADCALL (SPADCALL |w| (QREFELT $ 34)) (QREFELT $ 35))
                       (QREFELT $ 14))
                      . #5#)
                (LETT |addedToBasis|
                      (SPADCALL |basis| |nextVector| (QREFELT $ 40)) . #5#)
                (EXIT
                 (COND
                  ((EQL (SPADCALL |addedToBasis| (QREFELT $ 41))
                        (SPADCALL |basis| (QREFELT $ 39)))
                   (LETT |furtherElts| (CDR |furtherElts|) . #5#))
                  ('T
                   (SEQ
                    (LETT |standardBasis|
                          (CONS (SPADCALL |w| (QREFELT $ 34)) |standardBasis|)
                          . #5#)
                    (LETT |basis| (SPADCALL |addedToBasis| (QREFELT $ 36))
                          . #5#)
                    (LETT |updateFurtherElts|
                          (PROGN
                           (LETT #2# NIL . #5#)
                           (SEQ (LETT |i| 1 . #5#)
                                (LETT #1# (SPADCALL |lm| (QREFELT $ 37)) . #5#)
                                G190 (COND ((QSGREATERP |i| #1#) #6#))
                                (SEQ
                                 (EXIT
                                  (LETT #2#
                                        (CONS
                                         (SPADCALL
                                          (SPADCALL |lm| |i| (QREFELT $ 31))
                                          |w| (QREFELT $ 38))
                                         #2#)
                                        . #5#)))
                                (LETT |i| (QSADD1 |i|) . #5#) #7# G191
                                (EXIT (NREVERSE0 #2#))))
                          . #5#)
                    (EXIT
                     (LETT |furtherElts|
                           (APPEND (CDR |furtherElts|) |updateFurtherElts|)
                           . #5#)))))))
           NIL #7# G191 (EXIT NIL))
      (EXIT
       (SPADCALL (SPADCALL |standardBasis| (QREFELT $ 14)) (QREFELT $ 47))))))) 

(DEFUN |REP2;splitInternal| (|algebraGenerators| |vector| |doSplitting?| $)
  (PROG (|factormoduleRepresentation| |submoduleRepresentation| |helpMatrix|
         #1=#:G774 |i| |inverseTransitionMatrix| |transitionMatrix|
         |factormoduleIndices| #2=#:G773 |submoduleIndices| #3=#:G772
         |rankOfSubmodule| |submodule| |n|)
    (RETURN
     (SEQ (LETT |n| (QVSIZE |vector|) . #4=(|REP2;splitInternal|))
          (LETT |submodule|
                (SPADCALL |algebraGenerators| |vector| (QREFELT $ 46)) . #4#)
          (LETT |rankOfSubmodule| (QVSIZE |submodule|) . #4#)
          (LETT |submoduleRepresentation| NIL . #4#)
          (LETT |factormoduleRepresentation| NIL . #4#)
          (EXIT
           (COND
            ((EQL |n| |rankOfSubmodule|)
             (SEQ
              (SPADCALL "  The generated cyclic submodule was not proper"
                        (QREFELT $ 52))
              (EXIT (LIST |algebraGenerators|))))
            ('T
             (SEQ
              (SPADCALL "  A proper cyclic submodule is found." (QREFELT $ 52))
              (COND
               (|doSplitting?|
                (SEQ
                 (LETT |submoduleIndices|
                       (PROGN
                        (LETT #3# NIL . #4#)
                        (SEQ (LETT |i| 1 . #4#) G190
                             (COND
                              ((QSGREATERP |i| |rankOfSubmodule|)
                               #5=(GO G191)))
                             (SEQ (EXIT (LETT #3# (CONS |i| #3#) . #4#)))
                             (LETT |i| (QSADD1 |i|) . #4#) #6=(GO G190) G191
                             (EXIT (NREVERSE0 #3#))))
                       . #4#)
                 (LETT |factormoduleIndices|
                       (PROGN
                        (LETT #2# NIL . #4#)
                        (SEQ (LETT |i| (+ 1 |rankOfSubmodule|) . #4#) G190
                             (COND ((> |i| |n|) #5#))
                             (SEQ (EXIT (LETT #2# (CONS |i| #2#) . #4#)))
                             (LETT |i| (+ |i| 1) . #4#) #6# G191
                             (EXIT (NREVERSE0 #2#))))
                       . #4#)
                 (LETT |transitionMatrix|
                       (SPADCALL (SPADCALL |submodule| (QREFELT $ 29))
                                 (QREFELT $ 47))
                       . #4#)
                 (SPADCALL "  Transition matrix computed" (QREFELT $ 52))
                 (LETT |inverseTransitionMatrix|
                       (QCDR (SPADCALL |transitionMatrix| (QREFELT $ 54)))
                       . #4#)
                 (SPADCALL "  The inverse of the transition matrix computed"
                           (QREFELT $ 52))
                 (SPADCALL "  Now transform the matrices" (QREFELT $ 52))
                 (EXIT
                  (SEQ (LETT |i| 1 . #4#)
                       (LETT #1# (SPADCALL |algebraGenerators| (QREFELT $ 37))
                             . #4#)
                       G190 (COND ((QSGREATERP |i| #1#) #5#))
                       (SEQ
                        (LETT |helpMatrix|
                              (SPADCALL |inverseTransitionMatrix|
                                        (SPADCALL |algebraGenerators| |i|
                                                  (QREFELT $ 31))
                                        (QREFELT $ 16))
                              . #4#)
                        (LETT |submoduleRepresentation|
                              (CONS
                               (|REP2;blockMultiply| |helpMatrix|
                                |transitionMatrix| |submoduleIndices| |n| $)
                               |submoduleRepresentation|)
                              . #4#)
                        (EXIT
                         (LETT |factormoduleRepresentation|
                               (CONS
                                (|REP2;blockMultiply| |helpMatrix|
                                 |transitionMatrix| |factormoduleIndices| |n|
                                 $)
                                |factormoduleRepresentation|)
                               . #4#)))
                       (LETT |i| (QSADD1 |i|) . #4#) #6# G191 (EXIT NIL))))))
              (EXIT
               (LIST (REVERSE |submoduleRepresentation|)
                     (REVERSE |factormoduleRepresentation|))))))))))) 

(DEFUN |REP2;irreducibilityTestInternal|
       (|algebraGenerators| |singularMatrix| |split?| $)
  (PROG (|mat| #1=#:G791 |j| #2=#:G790 |i| |result| |kernel| |xt|
         |algebraGeneratorsTranspose| #3=#:G789 #4=#:G788)
    (RETURN
     (SEQ
      (LETT |algebraGeneratorsTranspose|
            (PROGN
             (LETT #4# NIL . #5=(|REP2;irreducibilityTestInternal|))
             (SEQ (LETT |j| 1 . #5#)
                  (LETT #3# (SPADCALL |algebraGenerators| (QREFELT $ 37))
                        . #5#)
                  G190 (COND ((QSGREATERP |j| #3#) #6=(GO G191)))
                  (SEQ
                   (EXIT
                    (LETT #4#
                          (CONS
                           (SPADCALL
                            (SPADCALL |algebraGenerators| |j| (QREFELT $ 31))
                            (QREFELT $ 47))
                           #4#)
                          . #5#)))
                  (LETT |j| (QSADD1 |j|) . #5#) #7=(GO G190) G191
                  (EXIT (NREVERSE0 #4#))))
            . #5#)
      (LETT |xt| (SPADCALL |singularMatrix| (QREFELT $ 47)) . #5#)
      (SPADCALL "  We know that all the cyclic submodules generated by all"
                (QREFELT $ 52))
      (SPADCALL "    non-trivial element of the singular matrix under view are"
                (QREFELT $ 52))
      (SPADCALL
       "    not proper, hence Norton's irreducibility test can be done:"
       (QREFELT $ 52))
      (LETT |kernel| (SPADCALL |xt| (QREFELT $ 55)) . #5#)
      (LETT |result|
            (|REP2;splitInternal| |algebraGeneratorsTranspose|
             (|SPADfirst| |kernel|) |split?| $)
            . #5#)
      (COND
       ((NULL (CDR |result|))
        (COND
         ((EQL 1 (LENGTH |kernel|))
          (SPADCALL "  Representation is absolutely irreducible"
                    (QREFELT $ 52)))
         (#8='T
          (SEQ
           (SPADCALL "  Representation is irreducible, but we don't know "
                     (QREFELT $ 52))
           (EXIT
            (SPADCALL "    whether it is absolutely irreducible"
                      (QREFELT $ 52)))))))
       (|split?|
        (SEQ
         (SPADCALL "  Representation is not irreducible and it will be split:"
                   (QREFELT $ 52))
         (EXIT
          (SEQ (LETT |i| 1 . #5#)
               (LETT #2# (SPADCALL |result| (QREFELT $ 57)) . #5#) G190
               (COND ((QSGREATERP |i| #2#) #6#))
               (SEQ
                (EXIT
                 (SEQ (LETT |j| 1 . #5#)
                      (LETT #1#
                            (SPADCALL (SPADCALL |result| |i| (QREFELT $ 58))
                                      (QREFELT $ 37))
                            . #5#)
                      G190 (COND ((QSGREATERP |j| #1#) #6#))
                      (SEQ
                       (LETT |mat|
                             (SPADCALL (SPADCALL |result| |i| (QREFELT $ 58))
                                       |j| (QREFELT $ 31))
                             . #5#)
                       (EXIT
                        (SPADCALL (SPADCALL |result| |i| (QREFELT $ 58)) |j|
                                  (SPADCALL
                                   (QCDR (SPADCALL |mat| (QREFELT $ 54)))
                                   (QREFELT $ 47))
                                  (QREFELT $ 59))))
                      (LETT |j| (QSADD1 |j|) . #5#) #7# G191 (EXIT NIL))))
               (LETT |i| (QSADD1 |i|) . #5#) #7# G191 (EXIT NIL)))))
       (#8#
        (SPADCALL "  Representation is not irreducible, use meatAxe to split"
                  (QREFELT $ 52))))
      (EXIT (REVERSE |result|)))))) 

(DEFUN |REP2;areEquivalent?;2LM;9| (|aG0| |aG1| $)
  (SPADCALL |aG0| |aG1| 'T 25 (QREFELT $ 60))) 

(DEFUN |REP2;areEquivalent?;2LIM;10| (|aG0| |aG1| |numberOfTries| $)
  (SPADCALL |aG0| |aG1| 'T |numberOfTries| (QREFELT $ 60))) 

(DEFUN |REP2;areEquivalent?;2LBIM;11|
       (|aG0| |aG1| |randomelements| |numberOfTries| $)
  (PROG (|result| |foundResult| |transitionM| |j| |baseChange1| |baseChange0|
         |kernel1| |kernel0| |rk1| |rk0| |x1| |x0| |randomIndex| |i| #1=#:G821
         |n| |numberOfGenerators|)
    (RETURN
     (SEQ (LETT |result| 'NIL . #2=(|REP2;areEquivalent?;2LBIM;11|))
          (LETT |transitionM| (SPADCALL 1 1 (QREFELT $ 23)) . #2#)
          (LETT |numberOfGenerators| (LENGTH |aG0|) . #2#)
          (COND
           (|randomelements|
            (SEQ (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|)) . #2#)
                 (LETT |x0| (SPADCALL |aG0| |randomIndex| (QREFELT $ 31))
                       . #2#)
                 (EXIT
                  (LETT |x1| (SPADCALL |aG1| |randomIndex| (QREFELT $ 31))
                        . #2#)))))
          (LETT |n| (QVSIZE (SPADCALL |x0| 1 (QREFELT $ 43))) . #2#)
          (LETT |foundResult| 'NIL . #2#)
          (SEQ (LETT #1# NIL . #2#) (LETT |i| 1 . #2#) G190
               (COND ((OR (QSGREATERP |i| |numberOfTries|) #1#) #3=(GO G191)))
               (SEQ (COND ((EQL |i| 7) (LETT |randomelements| 'T . #2#)))
                    (COND
                     (|randomelements|
                      (SEQ
                       (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|))
                             . #2#)
                       (LETT |x0|
                             (SPADCALL |x0|
                                       (SPADCALL |aG0| |randomIndex|
                                                 (QREFELT $ 31))
                                       (QREFELT $ 16))
                             . #2#)
                       (LETT |x1|
                             (SPADCALL |x1|
                                       (SPADCALL |aG1| |randomIndex|
                                                 (QREFELT $ 31))
                                       (QREFELT $ 16))
                             . #2#)
                       (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|))
                             . #2#)
                       (LETT |x0|
                             (SPADCALL |x0|
                                       (SPADCALL |aG0| |randomIndex|
                                                 (QREFELT $ 31))
                                       (QREFELT $ 15))
                             . #2#)
                       (EXIT
                        (LETT |x1|
                              (SPADCALL |x1|
                                        (SPADCALL |aG1| |randomIndex|
                                                  (QREFELT $ 31))
                                        (QREFELT $ 15))
                              . #2#))))
                     ('T
                      (SEQ
                       (LETT |x0|
                             (|REP2;fingerPrint| |i|
                              (SPADCALL |aG0| 0 (QREFELT $ 31))
                              (SPADCALL |aG0| 1 (QREFELT $ 31)) |x0| $)
                             . #2#)
                       (EXIT
                        (LETT |x1|
                              (|REP2;fingerPrint| |i|
                               (SPADCALL |aG1| 0 (QREFELT $ 31))
                               (SPADCALL |aG1| 1 (QREFELT $ 31)) |x1| $)
                              . #2#)))))
                    (LETT |rk0| (SPADCALL |x0| (QREFELT $ 41)) . #2#)
                    (LETT |rk1| (SPADCALL |x1| (QREFELT $ 41)) . #2#)
                    (EXIT
                     (COND
                      ((EQL |rk0| |rk1|)
                       (COND
                        ((NULL (EQL |rk0| (- |n| 1)))
                         (COND
                          (|randomelements|
                           (SEQ
                            (SPADCALL
                             "Random element in generated algebra does"
                             (QREFELT $ 52))
                            (EXIT
                             (SPADCALL "  not have a one-dimensional kernel"
                                       (QREFELT $ 52)))))
                          ('T
                           (SEQ
                            (SPADCALL
                             "Fingerprint element in generated algebra does"
                             (QREFELT $ 52))
                            (EXIT
                             (SPADCALL "  not have a one-dimensional kernel"
                                       (QREFELT $ 52)))))))
                        ('T
                         (SEQ
                          (COND
                           (|randomelements|
                            (SEQ
                             (SPADCALL
                              "Random element in generated algebra has"
                              (QREFELT $ 52))
                             (EXIT
                              (SPADCALL "  one-dimensional kernel"
                                        (QREFELT $ 52)))))
                           ('T
                            (SEQ
                             (SPADCALL
                              "Fingerprint element in generated algebra has"
                              (QREFELT $ 52))
                             (EXIT
                              (SPADCALL "  one-dimensional kernel"
                                        (QREFELT $ 52))))))
                          (LETT |kernel0| (SPADCALL |x0| (QREFELT $ 55)) . #2#)
                          (LETT |kernel1| (SPADCALL |x1| (QREFELT $ 55)) . #2#)
                          (LETT |baseChange0|
                                (SPADCALL |aG0|
                                          (SPADCALL |kernel0| 1 (QREFELT $ 63))
                                          (QREFELT $ 48))
                                . #2#)
                          (LETT |baseChange1|
                                (SPADCALL |aG1|
                                          (SPADCALL |kernel1| 1 (QREFELT $ 63))
                                          (QREFELT $ 48))
                                . #2#)
                          (COND
                           ((NULL
                             (EQL (SPADCALL |baseChange0| (QREFELT $ 64))
                                  (SPADCALL |baseChange1| (QREFELT $ 64))))
                            (EXIT
                             (SEQ
                              (SPADCALL
                               "  Dimensions of generated cyclic submodules differ"
                               (QREFELT $ 52))
                              (LETT |foundResult| 'T . #2#)
                              (EXIT (LETT |result| 'NIL . #2#))))))
                          (EXIT
                           (COND
                            ((EQL (SPADCALL |baseChange0| (QREFELT $ 64)) |n|)
                             (SEQ
                              (LETT |transitionM|
                                    (SPADCALL |baseChange0|
                                              (QCDR
                                               (SPADCALL |baseChange1|
                                                         (QREFELT $ 54)))
                                              (QREFELT $ 16))
                                    . #2#)
                              (LETT |foundResult| 'T . #2#)
                              (LETT |result| 'T . #2#)
                              (EXIT
                               (SEQ (LETT |j| 1 . #2#) G190
                                    (COND
                                     ((OR (QSGREATERP |j| |numberOfGenerators|)
                                          (NULL |result|))
                                      #3#))
                                    (SEQ
                                     (EXIT
                                      (COND
                                       ((NULL
                                         (SPADCALL
                                          (SPADCALL
                                           (SPADCALL |aG0| |j| (QREFELT $ 31))
                                           |transitionM| (QREFELT $ 16))
                                          (SPADCALL |transitionM|
                                                    (SPADCALL |aG1| |j|
                                                              (QREFELT $ 31))
                                                    (QREFELT $ 16))
                                          (QREFELT $ 65)))
                                        (SEQ (LETT |result| 'NIL . #2#)
                                             (LETT |transitionM|
                                                   (SPADCALL 1 1
                                                             (QREFELT $ 23))
                                                   . #2#)
                                             (SPADCALL
                                              "  There is no isomorphism, as the only possible one"
                                              (QREFELT $ 52))
                                             (EXIT
                                              (SPADCALL
                                               "    fails to do the necessary base change"
                                               (QREFELT $ 52))))))))
                                    (LETT |j| (QSADD1 |j|) . #2#) #4=(GO G190)
                                    G191 (EXIT NIL)))))
                            ('T
                             (SEQ
                              (SPADCALL
                               "  Generated cyclic submodules have equal, but not full"
                               (QREFELT $ 52))
                              (EXIT
                               (SPADCALL
                                "    dimension, hence we can not draw any conclusion"
                                (QREFELT $ 52)))))))))))
                      ('T
                       (SEQ
                        (SPADCALL "Dimensions of kernels differ"
                                  (QREFELT $ 52))
                        (LETT |foundResult| 'T . #2#)
                        (EXIT (LETT |result| 'NIL . #2#)))))))
               (LETT |i| (PROG1 (QSADD1 |i|) (LETT #1# |foundResult| . #2#))
                     . #2#)
               #4# G191 (EXIT NIL))
          (COND
           (|foundResult|
            (COND
             (|result|
              (SEQ (SPADCALL " " (QREFELT $ 52))
                   (EXIT
                    (SPADCALL "Representations are equivalent."
                              (QREFELT $ 52)))))
             (#5='T
              (SEQ (SPADCALL " " (QREFELT $ 52))
                   (EXIT
                    (SPADCALL "Representations are not equivalent."
                              (QREFELT $ 52)))))))
           (#5#
            (SEQ (SPADCALL " " (QREFELT $ 52))
                 (SPADCALL "Can neither prove equivalence nor inequivalence."
                           (QREFELT $ 52))
                 (EXIT (SPADCALL "  Try again." (QREFELT $ 52))))))
          (EXIT |transitionM|))))) 

(DEFUN |REP2;isAbsolutelyIrreducible?;LB;12| (|aG| $)
  (SPADCALL |aG| 25 (QREFELT $ 66))) 

(DEFUN |REP2;isAbsolutelyIrreducible?;LIB;13| (|aG| |numberOfTries| $)
  (PROG (|result| |kernel| |foundResult| |rk| |x| |randomIndex| |i| #1=#:G831
         |n| |numberOfGenerators|)
    (RETURN
     (SEQ (LETT |result| 'NIL . #2=(|REP2;isAbsolutelyIrreducible?;LIB;13|))
          (LETT |numberOfGenerators| (LENGTH |aG|) . #2#)
          (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|)) . #2#)
          (LETT |x| (SPADCALL |aG| |randomIndex| (QREFELT $ 31)) . #2#)
          (LETT |n| (QVSIZE (SPADCALL |x| 1 (QREFELT $ 43))) . #2#)
          (LETT |foundResult| 'NIL . #2#)
          (SEQ (LETT #1# NIL . #2#) (LETT |i| 1 . #2#) G190
               (COND ((OR (QSGREATERP |i| |numberOfTries|) #1#) (GO G191)))
               (SEQ
                (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|)) . #2#)
                (LETT |x|
                      (SPADCALL |x|
                                (SPADCALL |aG| |randomIndex| (QREFELT $ 31))
                                (QREFELT $ 16))
                      . #2#)
                (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|)) . #2#)
                (LETT |x|
                      (SPADCALL |x|
                                (SPADCALL |aG| |randomIndex| (QREFELT $ 31))
                                (QREFELT $ 15))
                      . #2#)
                (LETT |rk| (SPADCALL |x| (QREFELT $ 41)) . #2#)
                (EXIT
                 (COND
                  ((EQL |rk| (- |n| 1))
                   (SEQ (LETT |foundResult| 'T . #2#)
                        (SPADCALL "Random element in generated algebra has"
                                  (QREFELT $ 52))
                        (SPADCALL "  one-dimensional kernel" (QREFELT $ 52))
                        (LETT |kernel| (SPADCALL |x| (QREFELT $ 55)) . #2#)
                        (EXIT
                         (COND
                          ((EQL |n|
                                (QVSIZE
                                 (SPADCALL |aG| (|SPADfirst| |kernel|)
                                           (QREFELT $ 46))))
                           (LETT |result|
                                 (COND
                                  ((SPADCALL
                                    (SPADCALL
                                     (|REP2;irreducibilityTestInternal| |aG|
                                      |x| 'NIL $)
                                     1 (QREFELT $ 58))
                                    NIL (QREFELT $ 68))
                                   'NIL)
                                  ('T 'T))
                                 . #2#))
                          ('T (LETT |result| 'NIL . #2#))))))
                  ('T
                   (SEQ
                    (SPADCALL "Random element in generated algebra does"
                              (QREFELT $ 52))
                    (EXIT
                     (SPADCALL "  not have a one-dimensional kernel"
                               (QREFELT $ 52))))))))
               (LETT |i| (PROG1 (QSADD1 |i|) (LETT #1# |foundResult| . #2#))
                     . #2#)
               (GO G190) G191 (EXIT NIL))
          (COND
           ((NULL |foundResult|)
            (SEQ
             (SPADCALL "We have not found a one-dimensional kernel so far,"
                       (QREFELT $ 52))
             (EXIT
              (SPADCALL "  as we do a random search you could try again"
                        (QREFELT $ 52))))))
          (EXIT |result|))))) 

(DEFUN |REP2;split;LVL;14| (|algebraGenerators| |vector| $)
  (|REP2;splitInternal| |algebraGenerators| |vector| 'T $)) 

(DEFUN |REP2;split;LVL;15| (|algebraGenerators| |submodule| $)
  (PROG (|factormoduleRepresentation| |submoduleRepresentation| |helpMatrix|
         #1=#:G844 |i| |inverseTransitionMatrix| |transitionMatrix|
         |factormoduleIndices| #2=#:G843 |submoduleIndices| #3=#:G842
         |rankOfSubmodule| |n|)
    (RETURN
     (SEQ
      (LETT |n| (QVSIZE (SPADCALL |submodule| 1 (QREFELT $ 21)))
            . #4=(|REP2;split;LVL;15|))
      (LETT |rankOfSubmodule| (QVSIZE |submodule|) . #4#)
      (LETT |submoduleRepresentation| NIL . #4#)
      (LETT |factormoduleRepresentation| NIL . #4#)
      (LETT |submoduleIndices|
            (PROGN
             (LETT #3# NIL . #4#)
             (SEQ (LETT |i| 1 . #4#) G190
                  (COND ((QSGREATERP |i| |rankOfSubmodule|) #5=(GO G191)))
                  (SEQ (EXIT (LETT #3# (CONS |i| #3#) . #4#)))
                  (LETT |i| (QSADD1 |i|) . #4#) #6=(GO G190) G191
                  (EXIT (NREVERSE0 #3#))))
            . #4#)
      (LETT |factormoduleIndices|
            (PROGN
             (LETT #2# NIL . #4#)
             (SEQ (LETT |i| (+ 1 |rankOfSubmodule|) . #4#) G190
                  (COND ((> |i| |n|) #5#))
                  (SEQ (EXIT (LETT #2# (CONS |i| #2#) . #4#)))
                  (LETT |i| (+ |i| 1) . #4#) #6# G191 (EXIT (NREVERSE0 #2#))))
            . #4#)
      (LETT |transitionMatrix|
            (SPADCALL (SPADCALL |submodule| (QREFELT $ 29)) (QREFELT $ 47))
            . #4#)
      (SPADCALL "  Transition matrix computed" (QREFELT $ 52))
      (LETT |inverseTransitionMatrix|
            (QCDR (SPADCALL |transitionMatrix| (QREFELT $ 54))) . #4#)
      (SPADCALL "  The inverse of the transition matrix computed"
                (QREFELT $ 52))
      (SPADCALL "  Now transform the matrices" (QREFELT $ 52))
      (SEQ (LETT |i| 1 . #4#)
           (LETT #1# (SPADCALL |algebraGenerators| (QREFELT $ 37)) . #4#) G190
           (COND ((QSGREATERP |i| #1#) #5#))
           (SEQ
            (LETT |helpMatrix|
                  (SPADCALL |inverseTransitionMatrix|
                            (SPADCALL |algebraGenerators| |i| (QREFELT $ 31))
                            (QREFELT $ 16))
                  . #4#)
            (LETT |submoduleRepresentation|
                  (CONS
                   (|REP2;blockMultiply| |helpMatrix| |transitionMatrix|
                    |submoduleIndices| |n| $)
                   |submoduleRepresentation|)
                  . #4#)
            (EXIT
             (LETT |factormoduleRepresentation|
                   (CONS
                    (|REP2;blockMultiply| |helpMatrix| |transitionMatrix|
                     |factormoduleIndices| |n| $)
                    |factormoduleRepresentation|)
                   . #4#)))
           (LETT |i| (QSADD1 |i|) . #4#) #6# G191 (EXIT NIL))
      (EXIT
       (CONS (REVERSE |submoduleRepresentation|)
             (SPADCALL (REVERSE |factormoduleRepresentation|)
                       (QREFELT $ 70)))))))) 

(DEFUN |REP2;meatAxe;LB2IL;16|
       (|algebraGenerators| |randomelements| |numberOfTries| |maxTests| $)
  (PROG (|result| #1=#:G852 |foundResult| |j| |numberOfTests|
         |numberOfOneDimSubspacesInKernel| |kernel| |n| |x| |randomIndex| |i|
         #2=#:G859 |q| #3=#:G845 |numberOfGenerators|)
    (RETURN
     (SEQ
      (LETT |numberOfGenerators| (LENGTH |algebraGenerators|)
            . #4=(|REP2;meatAxe;LB2IL;16|))
      (LETT |result| NIL . #4#)
      (LETT |q|
            (PROG1 (LETT #3# (SPADCALL (QREFELT $ 72)) . #4#)
              (|check-subtype| (> #3# 0) '(|PositiveInteger|) #3#))
            . #4#)
      (COND
       (|randomelements|
        (SEQ (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|)) . #4#)
             (EXIT
              (LETT |x|
                    (SPADCALL |algebraGenerators| |randomIndex| (QREFELT $ 31))
                    . #4#)))))
      (LETT |foundResult| 'NIL . #4#)
      (SEQ (LETT #2# NIL . #4#) (LETT |i| 1 . #4#) G190
           (COND ((OR (QSGREATERP |i| |numberOfTries|) #2#) #5=(GO G191)))
           (SEQ (COND ((EQL |i| 7) (LETT |randomelements| 'T . #4#)))
                (COND
                 (|randomelements|
                  (SEQ
                   (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|))
                         . #4#)
                   (LETT |x|
                         (SPADCALL |x|
                                   (SPADCALL |algebraGenerators| |randomIndex|
                                             (QREFELT $ 31))
                                   (QREFELT $ 16))
                         . #4#)
                   (LETT |randomIndex| (+ 1 (RANDOM |numberOfGenerators|))
                         . #4#)
                   (EXIT
                    (LETT |x|
                          (SPADCALL |x|
                                    (SPADCALL |algebraGenerators| |randomIndex|
                                              (QREFELT $ 31))
                                    (QREFELT $ 15))
                          . #4#))))
                 ('T
                  (LETT |x|
                        (|REP2;fingerPrint| |i|
                         (SPADCALL |algebraGenerators| 1 (QREFELT $ 31))
                         (SPADCALL |algebraGenerators| 2 (QREFELT $ 31)) |x| $)
                        . #4#)))
                (LETT |n| (QVSIZE (SPADCALL |x| 1 (QREFELT $ 43))) . #4#)
                (EXIT
                 (COND
                  ((EQL (SPADCALL |x| (QREFELT $ 41)) |n|)
                   (COND
                    (|randomelements|
                     (SPADCALL
                      "Random element in generated algebra is non-singular"
                      (QREFELT $ 52)))
                    ('T
                     (SPADCALL
                      "Fingerprint element in generated algebra is non-singular"
                      (QREFELT $ 52)))))
                  ('T
                   (SEQ
                    (COND
                     (|randomelements|
                      (SPADCALL
                       "Random element in generated algebra is singular"
                       (QREFELT $ 52)))
                     ('T
                      (SPADCALL
                       "Fingerprint element in generated algebra is singular"
                       (QREFELT $ 52))))
                    (LETT |kernel| (SPADCALL |x| (QREFELT $ 55)) . #4#)
                    (LETT |numberOfOneDimSubspacesInKernel|
                          (QUOTIENT2 (- (EXPT |q| (LENGTH |kernel|)) 1)
                                     (- |q| 1))
                          . #4#)
                    (LETT |numberOfTests|
                          (MIN |numberOfOneDimSubspacesInKernel| |maxTests|)
                          . #4#)
                    (EXIT
                     (SEQ
                      (EXIT
                       (SEQ (LETT |j| 1 . #4#) G190
                            (COND ((QSGREATERP |j| |numberOfTests|) #5#))
                            (SEQ
                             (LETT |result|
                                   (SPADCALL |algebraGenerators|
                                             (SPADCALL |kernel| |j|
                                                       (QREFELT $ 73))
                                             (QREFELT $ 69))
                                   . #4#)
                             (LETT |foundResult|
                                   (COND ((NULL (CDR |result|)) 'NIL) ('T 'T))
                                   . #4#)
                             (EXIT
                              (COND
                               (|foundResult|
                                (PROGN (LETT #1# |$NoValue| . #4#) (GO #1#)))
                               ((< |numberOfOneDimSubspacesInKernel| (+ |j| 1))
                                (SEQ (LETT |foundResult| 'T . #4#)
                                     (LETT |result|
                                           (|REP2;irreducibilityTestInternal|
                                            |algebraGenerators| |x| 'T $)
                                           . #4#)
                                     (EXIT
                                      (PROGN
                                       (LETT #1# |$NoValue| . #4#)
                                       (GO #1#))))))))
                            (LETT |j| (QSADD1 |j|) . #4#) #6=(GO G190) G191
                            (EXIT NIL)))
                      #1# (EXIT #1#))))))))
           (LETT |i| (PROG1 (QSADD1 |i|) (LETT #2# |foundResult| . #4#)) . #4#)
           #6# G191 (EXIT NIL))
      (COND
       ((NULL |foundResult|)
        (SEQ (LETT |result| (LIST NIL NIL) . #4#) (SPADCALL " " (QREFELT $ 52))
             (SPADCALL "Sorry, no result, try meatAxe(...,true)"
                       (QREFELT $ 52))
             (EXIT
              (SPADCALL "  or consider using an extension field."
                        (QREFELT $ 52))))))
      (EXIT |result|))))) 

(DEFUN |REP2;meatAxe;LL;17| (|algebraGenerators| $)
  (SPADCALL |algebraGenerators| 'NIL 25 7 (QREFELT $ 74))) 

(DEFUN |REP2;meatAxe;LBL;18| (|algebraGenerators| |randomElements?| $)
  (COND
   (|randomElements?| (SPADCALL |algebraGenerators| 'T 25 7 (QREFELT $ 74)))
   ('T (SPADCALL |algebraGenerators| 'NIL 6 7 (QREFELT $ 74))))) 

(DEFUN |REP2;meatAxe;LPiL;19| (|algebraGenerators| |numberOfTries| $)
  (SPADCALL |algebraGenerators| 'T |numberOfTries| 7 (QREFELT $ 74))) 

(DEFUN |REP2;scanOneDimSubspaces;LIV;20| (|basis| |n| $)
  (PROG (|j| |newAdd| #1=#:G874 |i| |result| #2=#:G865 #3=#:G873 |iR|
         |coefficients| |nred| |pos| #4=#:G872 |q| |nn| |dim|)
    (RETURN
     (SEQ
      (LETT |dim| (LENGTH |basis|) . #5=(|REP2;scanOneDimSubspaces;LIV;20|))
      (LETT |nn| (QVSIZE (SPADCALL |basis| 1 (QREFELT $ 63))) . #5#)
      (LETT |q| (SPADCALL (QREFELT $ 72)) . #5#)
      (LETT |nred|
            (REMAINDER2 |n| (QUOTIENT2 (- (EXPT |q| |dim|) 1) (- |q| 1)))
            . #5#)
      (LETT |pos| |nred| . #5#) (LETT |i| 0 . #5#)
      (SEQ (LETT |i| 0 . #5#) (LETT #4# (- |dim| 1) . #5#) G190
           (COND
            ((OR (QSGREATERP |i| #4#)
                 (NULL (COND ((< |nred| 0) 'NIL) ('T 'T))))
             #6=(GO G191)))
           (SEQ (LETT |pos| |nred| . #5#)
                (EXIT (LETT |nred| (- |nred| (EXPT |q| |i|)) . #5#)))
           (LETT |i| (QSADD1 |i|) . #5#) #7=(GO G190) G191 (EXIT NIL))
      (LETT |i| (COND ((EQL |i| 0) 0) ('T (- |i| 1))) . #5#)
      (LETT |coefficients|
            (SPADCALL |dim| (|spadConstant| $ 12) (QREFELT $ 79)) . #5#)
      (SPADCALL |coefficients| (- |dim| |i|) (|spadConstant| $ 18)
                (QREFELT $ 80))
      (LETT |iR|
            (SPADCALL
             (SPADCALL |pos|
                       (|compiledLookupCheck| '|coerce|
                                              (LIST '$ (LIST '|Integer|))
                                              (|RadixExpansion| |q|)))
             (|compiledLookupCheck| '|wholeRagits|
                                    (LIST (LIST '|List| (LIST '|Integer|)) '$)
                                    (|RadixExpansion| |q|)))
            . #5#)
      (SEQ (LETT |j| 1 . #5#) (LETT #3# (SPADCALL |iR| (QREFELT $ 82)) . #5#)
           G190 (COND ((QSGREATERP |j| #3#) #6#))
           (SEQ
            (EXIT
             (SPADCALL |coefficients| (+ (- |dim| (LENGTH |iR|)) |j|)
                       (SPADCALL
                        (PROG1
                            (LETT #2#
                                  (+ (SPADCALL |iR| |j| (QREFELT $ 83)) |q|)
                                  . #5#)
                          (|check-subtype| (> #2# 0) '(|PositiveInteger|) #2#))
                        (QREFELT $ 84))
                       (QREFELT $ 80))))
           (LETT |j| (QSADD1 |j|) . #5#) #7# G191 (EXIT NIL))
      (LETT |result| (SPADCALL |nn| (|spadConstant| $ 12) (QREFELT $ 79))
            . #5#)
      (SEQ (LETT |i| 1 . #5#) (LETT #1# (QVSIZE |coefficients|) . #5#) G190
           (COND ((QSGREATERP |i| #1#) #6#))
           (SEQ
            (LETT |newAdd|
                  (SPADCALL (SPADCALL |coefficients| |i| (QREFELT $ 25))
                            (SPADCALL |basis| |i| (QREFELT $ 63))
                            (QREFELT $ 85))
                  . #5#)
            (EXIT
             (SEQ (LETT |j| 1 . #5#) G190 (COND ((QSGREATERP |j| |nn|) #6#))
                  (SEQ
                   (EXIT
                    (SPADCALL |result| |j|
                              (SPADCALL (SPADCALL |result| |j| (QREFELT $ 25))
                                        (SPADCALL |newAdd| |j| (QREFELT $ 25))
                                        (QREFELT $ 11))
                              (QREFELT $ 80))))
                  (LETT |j| (QSADD1 |j|) . #5#) #7# G191 (EXIT NIL))))
           (LETT |i| (QSADD1 |i|) . #5#) #7# G191 (EXIT NIL))
      (EXIT |result|))))) 

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

(DEFUN |RepresentationPackage2;| (|#1|)
  (PROG (|pv$| #1=#:G875 $ |dv$| DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #2=(|RepresentationPackage2|))
      (LETT |dv$| (LIST '|RepresentationPackage2| DV$1) . #2#)
      (LETT $ (GETREFV 86) . #2#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (LETT #1#
                                                (|HasCategory| |#1| '(|Field|))
                                                . #2#)
                                          (AND #1#
                                               (|HasCategory| |#1|
                                                              '(|Finite|)))
                                          (|HasCategory| |#1|
                                                         '(|EuclideanDomain|))))
                      . #2#))
      (|haddProp| |$ConstructorCache| '|RepresentationPackage2| (LIST DV$1)
                  (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (COND
       ((|testBitVector| |pv$| 3)
        (PROGN
         (QSETREFV $ 46
                   (CONS (|dispatchFunction| |REP2;cyclicSubmodule;LVV;5|) $))
         (QSETREFV $ 48
                   (CONS
                    (|dispatchFunction|
                     |REP2;standardBasisOfCyclicSubmodule;LVM;6|)
                    $)))))
      (COND
       ((|testBitVector| |pv$| 1)
        (PROGN
         (QSETREFV $ 61
                   (CONS (|dispatchFunction| |REP2;areEquivalent?;2LM;9|) $))
         (QSETREFV $ 62
                   (CONS (|dispatchFunction| |REP2;areEquivalent?;2LIM;10|) $))
         (QSETREFV $ 60
                   (CONS (|dispatchFunction| |REP2;areEquivalent?;2LBIM;11|)
                         $))
         (QSETREFV $ 67
                   (CONS
                    (|dispatchFunction| |REP2;isAbsolutelyIrreducible?;LB;12|)
                    $))
         (QSETREFV $ 66
                   (CONS
                    (|dispatchFunction| |REP2;isAbsolutelyIrreducible?;LIB;13|)
                    $))
         (QSETREFV $ 69 (CONS (|dispatchFunction| |REP2;split;LVL;14|) $))
         (QSETREFV $ 71 (CONS (|dispatchFunction| |REP2;split;LVL;15|) $))
         (COND
          ((|HasCategory| |#1| '(|Finite|))
           (COND
            ((|testBitVector| |pv$| 1)
             (PROGN
              (QSETREFV $ 74
                        (CONS (|dispatchFunction| |REP2;meatAxe;LB2IL;16|) $))
              (QSETREFV $ 75
                        (CONS (|dispatchFunction| |REP2;meatAxe;LL;17|) $))
              (QSETREFV $ 76
                        (CONS (|dispatchFunction| |REP2;meatAxe;LBL;18|) $))
              (QSETREFV $ 78
                        (CONS (|dispatchFunction| |REP2;meatAxe;LPiL;19|) $))
              (QSETREFV $ 73
                        (CONS
                         (|dispatchFunction| |REP2;scanOneDimSubspaces;LIV;20|)
                         $))))))))))
      $)))) 

(MAKEPROP '|RepresentationPackage2| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|Integer|) (|Matrix| 6)
              (0 . |elt|) (7 . *) (13 . +) (19 . |Zero|) (|List| 33)
              (23 . |matrix|) (28 . +) (34 . *) (40 . -) (46 . |One|)
              (|Vector| 6) (|Vector| 19) (50 . |elt|) (|NonNegativeInteger|)
              (56 . |zero|) (62 . |setRow!|) (69 . |elt|) (|Boolean|) (75 . =)
              (81 . |setelt|) |REP2;completeEchelonBasis;VM;3| (|List| 8)
              (89 . |elt|) |REP2;createRandomElement;L2M;4| (|List| 6)
              (95 . |entries|) (100 . |list|) (105 . |rowEchelon|)
              (110 . |maxIndex|) (115 . *) (121 . |nrows|) (126 . |vertConcat|)
              (132 . |rank|) (137 . |maxRowIndex|) (142 . |row|) (|List| 19)
              (148 . |vector|) (153 . |cyclicSubmodule|) (159 . |transpose|)
              (164 . |standardBasisOfCyclicSubmodule|) (|Void|) (|String|)
              (|OutputForm|) (170 . |messagePrint|) (|Union| $ '"failed")
              (175 . |inverse|) (180 . |nullSpace|) (|List| 30)
              (185 . |maxIndex|) (190 . |elt|) (196 . |setelt|)
              (203 . |areEquivalent?|) (211 . |areEquivalent?|)
              (217 . |areEquivalent?|) (224 . |elt|) (230 . |ncols|) (235 . =)
              (241 . |isAbsolutelyIrreducible?|)
              (247 . |isAbsolutelyIrreducible?|) (252 . =) (258 . |split|)
              (264 . |list|) (269 . |split|) (275 . |size|)
              (279 . |scanOneDimSubspaces|) (285 . |meatAxe|) (293 . |meatAxe|)
              (298 . |meatAxe|) (|PositiveInteger|) (304 . |meatAxe|)
              (310 . |new|) (316 . |setelt|) (|List| 7) (323 . |maxIndex|)
              (328 . |elt|) (334 . |index|) (339 . *))
           '#(|standardBasisOfCyclicSubmodule| 345 |split| 351
              |scanOneDimSubspaces| 363 |meatAxe| 369
              |isAbsolutelyIrreducible?| 394 |cyclicSubmodule| 405
              |createRandomElement| 411 |completeEchelonBasis| 417
              |areEquivalent?| 422)
           'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 85
                                                 '(3 8 6 0 7 7 9 2 6 0 0 0 10 2
                                                   6 0 0 0 11 0 6 0 12 1 8 0 13
                                                   14 2 8 0 0 0 15 2 8 0 0 0 16
                                                   2 8 0 0 0 17 0 6 0 18 2 20
                                                   19 0 7 21 2 8 0 22 22 23 3 8
                                                   0 0 7 19 24 2 19 6 0 7 25 2
                                                   6 26 0 0 27 4 8 6 0 7 7 6 28
                                                   2 30 8 0 7 31 1 19 33 0 34 1
                                                   13 0 33 35 1 8 0 0 36 1 30 7
                                                   0 37 2 8 19 0 19 38 1 8 22 0
                                                   39 2 8 0 0 0 40 1 8 22 0 41
                                                   1 8 7 0 42 2 8 19 0 7 43 1
                                                   20 0 44 45 2 0 20 30 19 46 1
                                                   8 0 0 47 2 0 8 30 19 48 1 51
                                                   49 50 52 1 8 53 0 54 1 8 44
                                                   0 55 1 56 7 0 57 2 56 30 0 7
                                                   58 3 30 8 0 7 8 59 4 0 8 30
                                                   30 26 7 60 2 0 8 30 30 61 3
                                                   0 8 30 30 7 62 2 44 19 0 7
                                                   63 1 8 22 0 64 2 8 26 0 0 65
                                                   2 0 26 30 7 66 1 0 26 30 67
                                                   2 30 26 0 0 68 2 0 56 30 19
                                                   69 1 56 0 30 70 2 0 56 30 20
                                                   71 0 6 22 72 2 0 19 44 7 73
                                                   4 0 56 30 26 7 7 74 1 0 56
                                                   30 75 2 0 56 30 26 76 2 0 56
                                                   30 77 78 2 19 0 22 6 79 3 19
                                                   6 0 7 6 80 1 81 7 0 82 2 81
                                                   7 0 7 83 1 6 0 77 84 2 19 0
                                                   6 0 85 2 3 8 30 19 48 2 1 56
                                                   30 19 69 2 1 56 30 20 71 2 2
                                                   19 44 7 73 4 2 56 30 26 7 7
                                                   74 2 2 56 30 26 76 1 2 56 30
                                                   75 2 2 56 30 77 78 2 1 26 30
                                                   7 66 1 1 26 30 67 2 3 20 30
                                                   19 46 2 0 8 30 8 32 1 0 8 20
                                                   29 2 1 8 30 30 61 4 1 8 30
                                                   30 26 7 60 3 1 8 30 30 7
                                                   62)))))
           '|lookupComplete|)) 
