
(/VERSIONCHECK 2) 

(DEFUN |REP2;blockMultiply| (|a| |b| |li| |n| $)
  (PROG (#0=#:G1838 |i| #1=#:G1839 #2=#:G1840 |j| #3=#:G1841 |s|
                    #4=#:G1834 #5=#:G1832 #6=#:G1833)
    (RETURN
      (SEQ (SPADCALL
               (PROGN
                 (LETT #0# NIL . #7=(|REP2;blockMultiply|))
                 (SEQ (LETT |i| NIL . #7#) (LETT #1# |li| . #7#) G190
                      (COND
                        ((OR (ATOM #1#)
                             (PROGN (LETT |i| (CAR #1#) . #7#) NIL))
                         #8=(GO G191)))
                      (SEQ (EXIT (LETT #0#
                                       (CONS
                                        (PROGN
                                          (LETT #2# NIL . #7#)
                                          (SEQ (LETT |j| NIL . #7#)
                                           (LETT #3# |li| . #7#) G190
                                           (COND
                                             ((OR (ATOM #3#)
                                               (PROGN
                                                 (LETT |j|
                                                  (CAR #3#) . #7#)
                                                 NIL))
                                              #8#))
                                           (SEQ
                                            (EXIT
                                             (LETT #2#
                                              (CONS
                                               (PROGN
                                                 (LETT #6# NIL . #7#)
                                                 (SEQ
                                                  (LETT |s| 1 . #7#)
                                                  G190
                                                  (COND
                                                    ((QSGREATERP |s|
                                                      |n|)
                                                     #8#))
                                                  (SEQ
                                                   (EXIT
                                                    (PROGN
                                                      (LETT #4#
                                                       (SPADCALL
                                                        (SPADCALL |a|
                                                         |i| |s|
                                                         (QREFELT $ 9))
                                                        (SPADCALL |b|
                                                         |s| |j|
                                                         (QREFELT $ 9))
                                                        (QREFELT $ 10)) . #7#)
                                                      (COND
                                                        (#6#
                                                         (LETT #5#
                                                          (SPADCALL #5#
                                                           #4#
                                                           (QREFELT $
                                                            11)) . #7#))
                                                        ('T
                                                         (PROGN
                                                           (LETT #5#
                                                            #4# . #7#)
                                                           (LETT #6#
                                                            'T . #7#)))))))
                                                  (LETT |s|
                                                   (QSADD1 |s|) . #7#)
                                                  #9=(GO G190) G191
                                                  (EXIT NIL))
                                                 (COND
                                                   (#6# #5#)
                                                   ('T
                                                    (|spadConstant| $
                                                     12))))
                                               #2#) . #7#)))
                                           (LETT #3# (CDR #3#) . #7#)
                                           #9# G191
                                           (EXIT (NREVERSE0 #2#))))
                                        #0#) . #7#)))
                      (LETT #1# (CDR #1#) . #7#) #9# G191
                      (EXIT (NREVERSE0 #0#))))
               (QREFELT $ 14)))))) 

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

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

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

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

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

(DEFUN |REP2;splitInternal|
       (|algebraGenerators| |vector| |doSplitting?| $)
  (PROG (|n| |submodule| |rankOfSubmodule| #0=#:G1926
             |submoduleIndices| #1=#:G1927 |factormoduleIndices|
             |transitionMatrix| |inverseTransitionMatrix| |i|
             #2=#:G1928 |helpMatrix| |submoduleRepresentation|
             |factormoduleRepresentation|)
    (RETURN
      (SEQ (LETT |n| (QVSIZE |vector|) . #3=(|REP2;splitInternal|))
           (LETT |submodule|
                 (SPADCALL |algebraGenerators| |vector| (QREFELT $ 46)) . #3#)
           (LETT |rankOfSubmodule| (QVSIZE |submodule|) . #3#)
           (LETT |submoduleRepresentation| NIL . #3#)
           (LETT |factormoduleRepresentation| NIL . #3#)
           (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 #0# NIL . #3#)
                                       (SEQ (LETT |i| 1 . #3#) G190
                                        (COND
                                          ((QSGREATERP |i|
                                            |rankOfSubmodule|)
                                           #4=(GO G191)))
                                        (SEQ
                                         (EXIT
                                          (LETT #0#
                                           (CONS |i| #0#) . #3#)))
                                        (LETT |i| (QSADD1 |i|) . #3#)
                                        #5=(GO G190) G191
                                        (EXIT (NREVERSE0 #0#)))) . #3#)
                                    (LETT |factormoduleIndices|
                                     (PROGN
                                       (LETT #1# NIL . #3#)
                                       (SEQ
                                        (LETT |i|
                                         (+ 1 |rankOfSubmodule|) . #3#)
                                        G190 (COND ((> |i| |n|) #4#))
                                        (SEQ
                                         (EXIT
                                          (LETT #1#
                                           (CONS |i| #1#) . #3#)))
                                        (LETT |i| (+ |i| 1) . #3#) #5#
                                        G191 (EXIT (NREVERSE0 #1#)))) . #3#)
                                    (LETT |transitionMatrix|
                                     (SPADCALL
                                      (SPADCALL |submodule|
                                       (QREFELT $ 29))
                                      (QREFELT $ 47)) . #3#)
                                    (SPADCALL
                                     "  Transition matrix computed"
                                     (QREFELT $ 52))
                                    (LETT |inverseTransitionMatrix|
                                     (QCDR
                                      (SPADCALL |transitionMatrix|
                                       (QREFELT $ 54))) . #3#)
                                    (SPADCALL
                                     "  The inverse of the transition matrix computed"
                                     (QREFELT $ 52))
                                    (SPADCALL
                                     "  Now transform the matrices"
                                     (QREFELT $ 52))
                                    (EXIT
                                     (SEQ (LETT |i| 1 . #3#)
                                      (LETT #2#
                                       (SPADCALL |algebraGenerators|
                                        (QREFELT $ 37)) . #3#)
                                      G190
                                      (COND
                                        ((QSGREATERP |i| #2#) #4#))
                                      (SEQ
                                       (LETT |helpMatrix|
                                        (SPADCALL
                                         |inverseTransitionMatrix|
                                         (SPADCALL |algebraGenerators|
                                          |i| (QREFELT $ 31))
                                         (QREFELT $ 16)) . #3#)
                                       (LETT |submoduleRepresentation|
                                        (CONS
                                         (|REP2;blockMultiply|
                                          |helpMatrix|
                                          |transitionMatrix|
                                          |submoduleIndices| |n| $)
                                         |submoduleRepresentation|) . #3#)
                                       (EXIT
                                        (LETT
                                         |factormoduleRepresentation|
                                         (CONS
                                          (|REP2;blockMultiply|
                                           |helpMatrix|
                                           |transitionMatrix|
                                           |factormoduleIndices| |n| $)
                                          |factormoduleRepresentation|) . #3#)))
                                      (LETT |i| (QSADD1 |i|) . #3#) #5#
                                      G191 (EXIT NIL))))))
                         (EXIT (LIST (REVERSE
                                      |submoduleRepresentation|)
                                     (REVERSE
                                      |factormoduleRepresentation|))))))))))) 

(DEFUN |REP2;irreducibilityTestInternal|
       (|algebraGenerators| |singularMatrix| |split?| $)
  (PROG (#0=#:G1942 #1=#:G1943 |algebraGeneratorsTranspose| |xt|
            |kernel| |result| |i| #2=#:G1944 |j| #3=#:G1945 |mat|)
    (RETURN
      (SEQ (LETT |algebraGeneratorsTranspose|
                 (PROGN
                   (LETT #0# NIL
                         . #4=(|REP2;irreducibilityTestInternal|))
                   (SEQ (LETT |j| 1 . #4#)
                        (LETT #1#
                              (SPADCALL |algebraGenerators|
                                  (QREFELT $ 37)) . #4#)
                        G190 (COND ((QSGREATERP |j| #1#) #5=(GO G191)))
                        (SEQ (EXIT (LETT #0#
                                    (CONS
                                     (SPADCALL
                                      (SPADCALL |algebraGenerators| |j|
                                       (QREFELT $ 31))
                                      (QREFELT $ 47))
                                     #0#) . #4#)))
                        (LETT |j| (QSADD1 |j|) . #4#) #6=(GO G190) G191
                        (EXIT (NREVERSE0 #0#)))) . #4#)
           (LETT |xt| (SPADCALL |singularMatrix| (QREFELT $ 47)) . #4#)
           (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)) . #4#)
           (LETT |result|
                 (|REP2;splitInternal| |algebraGeneratorsTranspose|
                     (|SPADfirst| |kernel|) |split?| $) . #4#)
           (COND
             ((NULL (CDR |result|))
              (COND
                ((EQL 1 (LENGTH |kernel|))
                 (SPADCALL "  Representation is absolutely irreducible"
                     (QREFELT $ 52)))
                ('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 . #4#)
                                 (LETT #2#
                                       (SPADCALL |result|
                                        (QREFELT $ 57)) . #4#)
                                 G190 (COND ((QSGREATERP |i| #2#) #5#))
                                 (SEQ (EXIT
                                       (SEQ (LETT |j| 1 . #4#)
                                        (LETT #3#
                                         (SPADCALL
                                          (SPADCALL |result| |i|
                                           (QREFELT $ 58))
                                          (QREFELT $ 37)) . #4#)
                                        G190
                                        (COND
                                          ((QSGREATERP |j| #3#) #5#))
                                        (SEQ
                                         (LETT |mat|
                                          (SPADCALL
                                           (SPADCALL |result| |i|
                                            (QREFELT $ 58))
                                           |j| (QREFELT $ 31)) . #4#)
                                         (EXIT
                                          (SPADCALL
                                           (SPADCALL |result| |i|
                                            (QREFELT $ 58))
                                           |j|
                                           (SPADCALL
                                            (QCDR
                                             (SPADCALL |mat|
                                              (QREFELT $ 54)))
                                            (QREFELT $ 47))
                                           (QREFELT $ 59))))
                                        (LETT |j| (QSADD1 |j|) . #4#)
                                        #6# G191 (EXIT NIL))))
                                 (LETT |i| (QSADD1 |i|) . #4#) #6# G191
                                 (EXIT NIL)))))
             ('T
              (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 (|numberOfGenerators| |n| #0=#:G1975 |i| |randomIndex| |x0|
            |x1| |rk0| |rk1| |kernel0| |kernel1| |baseChange0|
            |baseChange1| |j| |transitionM| |foundResult| |result|)
    (RETURN
      (SEQ (LETT |result| 'NIL . #1=(|REP2;areEquivalent?;2LBIM;11|))
           (LETT |transitionM| (SPADCALL 1 1 (QREFELT $ 23)) . #1#)
           (LETT |numberOfGenerators| (LENGTH |aG0|) . #1#)
           (COND
             (|randomelements|
                 (SEQ (LETT |randomIndex|
                            (+ 1 (RANDOM |numberOfGenerators|)) . #1#)
                      (LETT |x0|
                            (SPADCALL |aG0| |randomIndex|
                                (QREFELT $ 31)) . #1#)
                      (EXIT (LETT |x1|
                                  (SPADCALL |aG1| |randomIndex|
                                      (QREFELT $ 31)) . #1#)))))
           (LETT |n| (QVSIZE (SPADCALL |x0| 1 (QREFELT $ 43))) . #1#)
           (LETT |foundResult| 'NIL . #1#)
           (SEQ (LETT #0# NIL . #1#) (LETT |i| 1 . #1#) G190
                (COND
                  ((OR (QSGREATERP |i| |numberOfTries|) #0#)
                   #2=(GO G191)))
                (SEQ (COND
                       ((EQL |i| 7) (LETT |randomelements| 'T . #1#)))
                     (COND
                       (|randomelements|
                           (SEQ (LETT |randomIndex|
                                      (+ 1
                                       (RANDOM |numberOfGenerators|)) . #1#)
                                (LETT |x0|
                                      (SPADCALL |x0|
                                       (SPADCALL |aG0| |randomIndex|
                                        (QREFELT $ 31))
                                       (QREFELT $ 16)) . #1#)
                                (LETT |x1|
                                      (SPADCALL |x1|
                                       (SPADCALL |aG1| |randomIndex|
                                        (QREFELT $ 31))
                                       (QREFELT $ 16)) . #1#)
                                (LETT |randomIndex|
                                      (+ 1
                                       (RANDOM |numberOfGenerators|)) . #1#)
                                (LETT |x0|
                                      (SPADCALL |x0|
                                       (SPADCALL |aG0| |randomIndex|
                                        (QREFELT $ 31))
                                       (QREFELT $ 15)) . #1#)
                                (EXIT (LETT |x1|
                                       (SPADCALL |x1|
                                        (SPADCALL |aG1| |randomIndex|
                                         (QREFELT $ 31))
                                        (QREFELT $ 15)) . #1#))))
                       ('T
                        (SEQ (LETT |x0|
                                   (|REP2;fingerPrint| |i|
                                    (SPADCALL |aG0| 0 (QREFELT $ 31))
                                    (SPADCALL |aG0| 1 (QREFELT $ 31))
                                    |x0| $) . #1#)
                             (EXIT (LETT |x1|
                                    (|REP2;fingerPrint| |i|
                                     (SPADCALL |aG1| 0 (QREFELT $ 31))
                                     (SPADCALL |aG1| 1 (QREFELT $ 31))
                                     |x1| $) . #1#)))))
                     (LETT |rk0| (SPADCALL |x0| (QREFELT $ 41)) . #1#)
                     (LETT |rk1| (SPADCALL |x1| (QREFELT $ 41)) . #1#)
                     (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)) . #1#)
                                      (LETT |kernel1|
                                       (SPADCALL |x1| (QREFELT $ 55)) . #1#)
                                      (LETT |baseChange0|
                                       (SPADCALL |aG0|
                                        (SPADCALL |kernel0| 1
                                         (QREFELT $ 63))
                                        (QREFELT $ 48)) . #1#)
                                      (LETT |baseChange1|
                                       (SPADCALL |aG1|
                                        (SPADCALL |kernel1| 1
                                         (QREFELT $ 63))
                                        (QREFELT $ 48)) . #1#)
                                      (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 . #1#)
                                           (EXIT
                                            (LETT |result| 'NIL . #1#))))))
                                      (EXIT
                                       (COND
                                         ((EQL
                                           (SPADCALL |baseChange0|
                                            (QREFELT $ 64))
                                           |n|)
                                          (SEQ
                                           (LETT |transitionM|
                                            (SPADCALL |baseChange0|
                                             (QCDR
                                              (SPADCALL |baseChange1|
                                               (QREFELT $ 54)))
                                             (QREFELT $ 16)) . #1#)
                                           (LETT |foundResult|
                                            'T . #1#)
                                           (LETT |result| 'T . #1#)
                                           (EXIT
                                            (SEQ (LETT |j| 1 . #1#)
                                             G190
                                             (COND
                                               ((OR
                                                 (QSGREATERP |j|
                                                  |numberOfGenerators|)
                                                 (NULL |result|))
                                                #2#))
                                             (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 . #1#)
                                                   (LETT |transitionM|
                                                    (SPADCALL 1 1
                                                     (QREFELT $ 23)) . #1#)
                                                   (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|) . #1#)
                                             #3=(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 . #1#)
                                   (EXIT (LETT |result| 'NIL . #1#)))))))
                (LETT |i|
                      (PROG1 (QSADD1 |i|)
                        (LETT #0# |foundResult| . #1#)) . #1#)
                #3# G191 (EXIT NIL))
           (COND
             (|foundResult|
                 (COND
                   (|result| (SEQ (SPADCALL " " (QREFELT $ 52))
                                  (EXIT (SPADCALL
                                         "Representations are equivalent."
                                         (QREFELT $ 52)))))
                   (#4='T
                    (SEQ (SPADCALL " " (QREFELT $ 52))
                         (EXIT (SPADCALL
                                   "Representations are not equivalent."
                                   (QREFELT $ 52)))))))
             (#4#
              (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 (|numberOfGenerators| |n| #0=#:G1985 |i| |randomIndex| |x| |rk|
            |foundResult| |kernel| |result|)
    (RETURN
      (SEQ (LETT |result| 'NIL
                 . #1=(|REP2;isAbsolutelyIrreducible?;LIB;13|))
           (LETT |numberOfGenerators| (LENGTH |aG|) . #1#)
           (LETT |randomIndex|
                 (+ 1 (RANDOM |numberOfGenerators|)) . #1#)
           (LETT |x|
                 (SPADCALL |aG| |randomIndex| (QREFELT $ 31)) . #1#)
           (LETT |n| (QVSIZE (SPADCALL |x| 1 (QREFELT $ 43))) . #1#)
           (LETT |foundResult| 'NIL . #1#)
           (SEQ (LETT #0# NIL . #1#) (LETT |i| 1 . #1#) G190
                (COND
                  ((OR (QSGREATERP |i| |numberOfTries|) #0#) (GO G191)))
                (SEQ (LETT |randomIndex|
                           (+ 1 (RANDOM |numberOfGenerators|)) . #1#)
                     (LETT |x|
                           (SPADCALL |x|
                               (SPADCALL |aG| |randomIndex|
                                   (QREFELT $ 31))
                               (QREFELT $ 16)) . #1#)
                     (LETT |randomIndex|
                           (+ 1 (RANDOM |numberOfGenerators|)) . #1#)
                     (LETT |x|
                           (SPADCALL |x|
                               (SPADCALL |aG| |randomIndex|
                                   (QREFELT $ 31))
                               (QREFELT $ 15)) . #1#)
                     (LETT |rk| (SPADCALL |x| (QREFELT $ 41)) . #1#)
                     (EXIT (COND
                             ((EQL |rk| (- |n| 1))
                              (SEQ (LETT |foundResult| 'T . #1#)
                                   (SPADCALL
                                    "Random element in generated algebra has"
                                    (QREFELT $ 52))
                                   (SPADCALL "  one-dimensional kernel"
                                    (QREFELT $ 52))
                                   (LETT |kernel|
                                    (SPADCALL |x| (QREFELT $ 55)) . #1#)
                                   (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)) . #1#))
                                      ('T (LETT |result| 'NIL . #1#))))))
                             ('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 #0# |foundResult| . #1#)) . #1#)
                (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 (|n| |rankOfSubmodule| #0=#:G1996 |submoduleIndices| #1=#:G1997
             |factormoduleIndices| |transitionMatrix|
             |inverseTransitionMatrix| |i| #2=#:G1998 |helpMatrix|
             |submoduleRepresentation| |factormoduleRepresentation|)
    (RETURN
      (SEQ (LETT |n| (QVSIZE (SPADCALL |submodule| 1 (QREFELT $ 21)))
                 . #3=(|REP2;split;LVL;15|))
           (LETT |rankOfSubmodule| (QVSIZE |submodule|) . #3#)
           (LETT |submoduleRepresentation| NIL . #3#)
           (LETT |factormoduleRepresentation| NIL . #3#)
           (LETT |submoduleIndices|
                 (PROGN
                   (LETT #0# NIL . #3#)
                   (SEQ (LETT |i| 1 . #3#) G190
                        (COND
                          ((QSGREATERP |i| |rankOfSubmodule|)
                           #4=(GO G191)))
                        (SEQ (EXIT (LETT #0# (CONS |i| #0#) . #3#)))
                        (LETT |i| (QSADD1 |i|) . #3#) #5=(GO G190) G191
                        (EXIT (NREVERSE0 #0#)))) . #3#)
           (LETT |factormoduleIndices|
                 (PROGN
                   (LETT #1# NIL . #3#)
                   (SEQ (LETT |i| (+ 1 |rankOfSubmodule|) . #3#) G190
                        (COND ((> |i| |n|) #4#))
                        (SEQ (EXIT (LETT #1# (CONS |i| #1#) . #3#)))
                        (LETT |i| (+ |i| 1) . #3#) #5# G191
                        (EXIT (NREVERSE0 #1#)))) . #3#)
           (LETT |transitionMatrix|
                 (SPADCALL (SPADCALL |submodule| (QREFELT $ 29))
                     (QREFELT $ 47)) . #3#)
           (SPADCALL "  Transition matrix computed" (QREFELT $ 52))
           (LETT |inverseTransitionMatrix|
                 (QCDR (SPADCALL |transitionMatrix| (QREFELT $ 54))) . #3#)
           (SPADCALL "  The inverse of the transition matrix computed"
               (QREFELT $ 52))
           (SPADCALL "  Now transform the matrices" (QREFELT $ 52))
           (SEQ (LETT |i| 1 . #3#)
                (LETT #2#
                      (SPADCALL |algebraGenerators| (QREFELT $ 37)) . #3#)
                G190 (COND ((QSGREATERP |i| #2#) #4#))
                (SEQ (LETT |helpMatrix|
                           (SPADCALL |inverseTransitionMatrix|
                               (SPADCALL |algebraGenerators| |i|
                                   (QREFELT $ 31))
                               (QREFELT $ 16)) . #3#)
                     (LETT |submoduleRepresentation|
                           (CONS (|REP2;blockMultiply| |helpMatrix|
                                     |transitionMatrix|
                                     |submoduleIndices| |n| $)
                                 |submoduleRepresentation|) . #3#)
                     (EXIT (LETT |factormoduleRepresentation|
                                 (CONS (|REP2;blockMultiply|
                                        |helpMatrix| |transitionMatrix|
                                        |factormoduleIndices| |n| $)
                                       |factormoduleRepresentation|) . #3#)))
                (LETT |i| (QSADD1 |i|) . #3#) #5# G191 (EXIT NIL))
           (EXIT (CONS (REVERSE |submoduleRepresentation|)
                       (SPADCALL (REVERSE |factormoduleRepresentation|)
                           (QREFELT $ 70)))))))) 

(DEFUN |REP2;meatAxe;LB2IL;16|
       (|algebraGenerators| |randomelements| |numberOfTries| |maxTests|
           $)
  (PROG (|numberOfGenerators| #0=#:G1999 |q| #1=#:G2013 |i|
            |randomIndex| |x| |n| |kernel|
            |numberOfOneDimSubspacesInKernel| |numberOfTests| |j|
            |foundResult| #2=#:G2006 |result|)
    (RETURN
      (SEQ (LETT |numberOfGenerators| (LENGTH |algebraGenerators|)
                 . #3=(|REP2;meatAxe;LB2IL;16|))
           (LETT |result| NIL . #3#)
           (LETT |q|
                 (PROG1 (LETT #0# (SPADCALL (QREFELT $ 72)) . #3#)
                   (|check-subtype| (> #0# 0) '(|PositiveInteger|) #0#)) . #3#)
           (COND
             (|randomelements|
                 (SEQ (LETT |randomIndex|
                            (+ 1 (RANDOM |numberOfGenerators|)) . #3#)
                      (EXIT (LETT |x|
                                  (SPADCALL |algebraGenerators|
                                      |randomIndex| (QREFELT $ 31)) . #3#)))))
           (LETT |foundResult| 'NIL . #3#)
           (SEQ (LETT #1# NIL . #3#) (LETT |i| 1 . #3#) G190
                (COND
                  ((OR (QSGREATERP |i| |numberOfTries|) #1#)
                   #4=(GO G191)))
                (SEQ (COND
                       ((EQL |i| 7) (LETT |randomelements| 'T . #3#)))
                     (COND
                       (|randomelements|
                           (SEQ (LETT |randomIndex|
                                      (+ 1
                                       (RANDOM |numberOfGenerators|)) . #3#)
                                (LETT |x|
                                      (SPADCALL |x|
                                       (SPADCALL |algebraGenerators|
                                        |randomIndex| (QREFELT $ 31))
                                       (QREFELT $ 16)) . #3#)
                                (LETT |randomIndex|
                                      (+ 1
                                       (RANDOM |numberOfGenerators|)) . #3#)
                                (EXIT (LETT |x|
                                       (SPADCALL |x|
                                        (SPADCALL |algebraGenerators|
                                         |randomIndex| (QREFELT $ 31))
                                        (QREFELT $ 15)) . #3#))))
                       ('T
                        (LETT |x|
                              (|REP2;fingerPrint| |i|
                                  (SPADCALL |algebraGenerators| 1
                                      (QREFELT $ 31))
                                  (SPADCALL |algebraGenerators| 2
                                      (QREFELT $ 31))
                                  |x| $) . #3#)))
                     (LETT |n|
                           (QVSIZE (SPADCALL |x| 1 (QREFELT $ 43))) . #3#)
                     (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)) . #3#)
                                   (LETT
                                    |numberOfOneDimSubspacesInKernel|
                                    (QUOTIENT2
                                     (- (EXPT |q| (LENGTH |kernel|)) 1)
                                     (- |q| 1)) . #3#)
                                   (LETT |numberOfTests|
                                    (MIN
                                     |numberOfOneDimSubspacesInKernel|
                                     |maxTests|) . #3#)
                                   (EXIT
                                    (SEQ
                                     (EXIT
                                      (SEQ (LETT |j| 1 . #3#) G190
                                       (COND
                                         ((QSGREATERP |j|
                                           |numberOfTests|)
                                          #4#))
                                       (SEQ
                                        (LETT |result|
                                         (SPADCALL |algebraGenerators|
                                          (SPADCALL |kernel| |j|
                                           (QREFELT $ 73))
                                          (QREFELT $ 69)) . #3#)
                                        (LETT |foundResult|
                                         (COND
                                           ((NULL (CDR |result|)) 'NIL)
                                           ('T 'T)) . #3#)
                                        (EXIT
                                         (COND
                                           (|foundResult|
                                            (PROGN
                                              (LETT #2#
                                               |$NoValue| . #3#)
                                              (GO #2#)))
                                           ((<
                                             |numberOfOneDimSubspacesInKernel|
                                             (+ |j| 1))
                                            (SEQ
                                             (LETT |foundResult|
                                              'T . #3#)
                                             (LETT |result|
                                              (|REP2;irreducibilityTestInternal|
                                               |algebraGenerators| |x|
                                               'T $) . #3#)
                                             (EXIT
                                              (PROGN
                                                (LETT #2#
                                                 |$NoValue| . #3#)
                                                (GO #2#))))))))
                                       (LETT |j| (QSADD1 |j|) . #3#)
                                       #5=(GO G190) G191 (EXIT NIL)))
                                     #2# (EXIT #2#))))))))
                (LETT |i|
                      (PROG1 (QSADD1 |i|)
                        (LETT #1# |foundResult| . #3#)) . #3#)
                #5# G191 (EXIT NIL))
           (COND
             ((NULL |foundResult|)
              (SEQ (LETT |result| (LIST NIL NIL) . #3#)
                   (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 (|dim| |nn| |q| #0=#:G2026 |pos| |nred| |coefficients| |iR|
               #1=#:G2027 #2=#:G2019 |result| |i| #3=#:G2028 |newAdd|
               |j|)
    (RETURN
      (SEQ (LETT |dim| (LENGTH |basis|)
                 . #4=(|REP2;scanOneDimSubspaces;LIV;20|))
           (LETT |nn|
                 (QVSIZE (SPADCALL |basis| 1 (QREFELT $ 63))) . #4#)
           (LETT |q| (SPADCALL (QREFELT $ 72)) . #4#)
           (LETT |nred|
                 (REMAINDER2 |n|
                     (QUOTIENT2 (- (EXPT |q| |dim|) 1) (- |q| 1))) . #4#)
           (LETT |pos| |nred| . #4#) (LETT |i| 0 . #4#)
           (SEQ (LETT |i| 0 . #4#) (LETT #0# (- |dim| 1) . #4#) G190
                (COND
                  ((OR (QSGREATERP |i| #0#)
                       (NULL (COND ((< |nred| 0) 'NIL) ('T 'T))))
                   #5=(GO G191)))
                (SEQ (LETT |pos| |nred| . #4#)
                     (EXIT (LETT |nred|
                                 (- |nred| (EXPT |q| |i|)) . #4#)))
                (LETT |i| (QSADD1 |i|) . #4#) #6=(GO G190) G191
                (EXIT NIL))
           (LETT |i| (COND ((EQL |i| 0) 0) ('T (- |i| 1))) . #4#)
           (LETT |coefficients|
                 (SPADCALL |dim| (|spadConstant| $ 12) (QREFELT $ 79)) . #4#)
           (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|))) . #4#)
           (SEQ (LETT |j| 1 . #4#)
                (LETT #1# (SPADCALL |iR| (QREFELT $ 82)) . #4#) G190
                (COND ((QSGREATERP |j| #1#) #5#))
                (SEQ (EXIT (SPADCALL |coefficients|
                               (+ (- |dim| (LENGTH |iR|)) |j|)
                               (SPADCALL
                                   (PROG1
                                    (LETT #2#
                                     (+
                                      (SPADCALL |iR| |j|
                                       (QREFELT $ 83))
                                      |q|) . #4#)
                                     (|check-subtype| (> #2# 0)
                                      '(|PositiveInteger|) #2#))
                                   (QREFELT $ 84))
                               (QREFELT $ 80))))
                (LETT |j| (QSADD1 |j|) . #4#) #6# G191 (EXIT NIL))
           (LETT |result|
                 (SPADCALL |nn| (|spadConstant| $ 12) (QREFELT $ 79)) . #4#)
           (SEQ (LETT |i| 1 . #4#)
                (LETT #3# (QVSIZE |coefficients|) . #4#) G190
                (COND ((QSGREATERP |i| #3#) #5#))
                (SEQ (LETT |newAdd|
                           (SPADCALL
                               (SPADCALL |coefficients| |i|
                                   (QREFELT $ 25))
                               (SPADCALL |basis| |i| (QREFELT $ 63))
                               (QREFELT $ 85)) . #4#)
                     (EXIT (SEQ (LETT |j| 1 . #4#) G190
                                (COND ((QSGREATERP |j| |nn|) #5#))
                                (SEQ (EXIT
                                      (SPADCALL |result| |j|
                                       (SPADCALL
                                        (SPADCALL |result| |j|
                                         (QREFELT $ 25))
                                        (SPADCALL |newAdd| |j|
                                         (QREFELT $ 25))
                                        (QREFELT $ 11))
                                       (QREFELT $ 80))))
                                (LETT |j| (QSADD1 |j|) . #4#) #6# G191
                                (EXIT NIL))))
                (LETT |i| (QSADD1 |i|) . #4#) #6# G191 (EXIT NIL))
           (EXIT |result|))))) 

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

(DEFUN |RepresentationPackage2;| (|#1|)
  (PROG (DV$1 |dv$| $ #0=#:G2029 |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|) . #1=(|RepresentationPackage2|))
        (LETT |dv$| (LIST '|RepresentationPackage2| DV$1) . #1#)
        (LETT $ (GETREFV 86) . #1#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (LETT #0#
                                  (|HasCategory| |#1| '(|Field|)) . #1#)
                            (AND #0# (|HasCategory| |#1| '(|Finite|)))
                            (|HasCategory| |#1| '(|EuclideanDomain|)))) . #1#))
        (|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|)) 
