
(/VERSIONCHECK 2) 

(DEFUN |PERMGRP;shortenWord| (|lw| |gp| $)
  (PROG (|dores| |flag1| |newlw| |anzahl| |test| #1=#:G1869 |flag2| |res|
         #2=#:G1881 |el| |pos| #3=#:G1880 |i| |orderList| #4=#:G1879 |gen|
         #5=#:G1878 |gpgens|)
    (RETURN
     (SEQ
      (LETT |gpgens| (SPADCALL |gp| (QREFELT $ 9))
            . #6=(|PERMGRP;shortenWord|))
      (LETT |orderList|
            (PROGN
             (LETT #5# NIL . #6#)
             (SEQ (LETT |gen| NIL . #6#) (LETT #4# |gpgens| . #6#) G190
                  (COND
                   ((OR (ATOM #4#) (PROGN (LETT |gen| (CAR #4#) . #6#) NIL))
                    #7=(GO G191)))
                  (SEQ
                   (EXIT
                    (LETT #5# (CONS (SPADCALL |gen| (QREFELT $ 12)) #5#)
                          . #6#)))
                  (LETT #4# (CDR #4#) . #6#) #8=(GO G190) G191
                  (EXIT (NREVERSE0 #5#))))
            . #6#)
      (LETT |newlw| (SPADCALL |lw| (QREFELT $ 14)) . #6#)
      (SEQ (LETT |i| 1 . #6#)
           (LETT #3# (SPADCALL |orderList| (QREFELT $ 16)) . #6#) G190
           (COND ((QSGREATERP |i| #3#) #7#))
           (SEQ
            (EXIT
             (COND
              ((EQL (SPADCALL |orderList| |i| (QREFELT $ 17)) 1)
               (SEQ G190
                    (COND ((NULL (SPADCALL |i| |newlw| (QREFELT $ 19))) #7#))
                    (SEQ
                     (LETT |pos| (SPADCALL |i| |newlw| (QREFELT $ 20)) . #6#)
                     (EXIT
                      (LETT |newlw| (SPADCALL |newlw| |pos| (QREFELT $ 21))
                            . #6#)))
                    NIL #8# G191 (EXIT NIL))))))
           (LETT |i| (QSADD1 |i|) . #6#) #8# G191 (EXIT NIL))
      (EXIT
       (COND ((< (SPADCALL |newlw| (QREFELT $ 22)) 2) |newlw|)
             ('T
              (SEQ (LETT |test| (|SPADfirst| |newlw|) . #6#)
                   (LETT |anzahl| 0 . #6#) (LETT |flag1| 'T . #6#)
                   (LETT |dores| 'NIL . #6#)
                   (SEQ G190 (COND ((NULL |flag1|) #7#))
                        (SEQ (LETT |test| (|SPADfirst| |newlw|) . #6#)
                             (LETT |anzahl| 1 . #6#)
                             (COND (|dores| (LETT |res| (LIST |test|) . #6#)))
                             (LETT |flag2| 'T . #6#)
                             (SEQ (LETT |el| NIL . #6#)
                                  (LETT #2# |newlw| . #6#) G190
                                  (COND
                                   ((OR (ATOM #2#)
                                        (PROGN (LETT |el| (CAR #2#) . #6#) NIL)
                                        (NULL |flag2|))
                                    #7#))
                                  (SEQ
                                   (COND
                                    (|dores|
                                     (LETT |res| (CONS |el| |res|) . #6#)))
                                   (LETT |anzahl| (+ |anzahl| 1) . #6#)
                                   (EXIT
                                    (COND
                                     ((EQL |anzahl| 1)
                                      (LETT |test| |el| . #6#))
                                     ((EQL |test| |el|)
                                      (SEQ
                                       (EXIT
                                        (COND
                                         ((EQL |anzahl|
                                               (SPADCALL |orderList| |test|
                                                         (QREFELT $ 17)))
                                          (PROGN
                                           (LETT #1#
                                                 (SEQ
                                                  (COND
                                                   (|dores|
                                                    (LETT |res|
                                                          (SPADCALL |res|
                                                                    |anzahl|
                                                                    (QREFELT $
                                                                             24))
                                                          . #6#))
                                                   ('T
                                                    (LETT |flag2| 'NIL . #6#)))
                                                  (EXIT
                                                   (LETT |anzahl| 0 . #6#)))
                                                 . #6#)
                                           (GO #1#)))))
                                       #1# (EXIT #1#)))
                                     ('T
                                      (SEQ (LETT |test| |el| . #6#)
                                           (EXIT (LETT |anzahl| 1 . #6#)))))))
                                  (LETT #2# (CDR #2#) . #6#) #8# G191
                                  (EXIT NIL))
                             (COND
                              (|dores| (LETT |newlw| (NREVERSE |res|) . #6#)))
                             (LETT |flag1| |dores| . #6#)
                             (EXIT
                              (LETT |dores| (COND (|flag2| 'NIL) ('T 'T))
                                    . #6#)))
                        NIL #8# G191 (EXIT NIL))
                   (EXIT |newlw|))))))))) 

(DEFUN |PERMGRP;times!| (|res| |p| |q| $)
  (PROG (|i| |degree|)
    (RETURN
     (SEQ (LETT |degree| (SPADCALL |p| (QREFELT $ 26)) . #1=(|PERMGRP;times!|))
          (EXIT
           (SEQ (LETT |i| 1 . #1#) G190
                (COND ((QSGREATERP |i| |degree|) (GO G191)))
                (SEQ
                 (EXIT
                  (QSETAREF1O |res| |i| (QAREF1O |p| (QAREF1O |q| |i| 1) 1)
                              1)))
                (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191 (EXIT NIL))))))) 

(DEFUN |PERMGRP;times| (|p| |q| $)
  (PROG (|res| |degree|)
    (RETURN
     (SEQ (LETT |degree| (SPADCALL |p| (QREFELT $ 26)) . #1=(|PERMGRP;times|))
          (LETT |res| (SPADCALL |degree| 0 (QREFELT $ 27)) . #1#)
          (|PERMGRP;times!| |res| |p| |q| $) (EXIT |res|))))) 

(DEFUN |PERMGRP;inv| (|p| $)
  (PROG (|i| |q| |degree|)
    (RETURN
     (SEQ (LETT |degree| (SPADCALL |p| (QREFELT $ 26)) . #1=(|PERMGRP;inv|))
          (LETT |q| (SPADCALL |degree| 0 (QREFELT $ 27)) . #1#)
          (SEQ (LETT |i| 1 . #1#) G190
               (COND ((QSGREATERP |i| |degree|) (GO G191)))
               (SEQ (EXIT (QSETAREF1O |q| (QAREF1O |p| |i| 1) |i| 1)))
               (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191 (EXIT NIL))
          (EXIT |q|))))) 

(DEFUN |PERMGRP;testIdentity| (|p| $)
  (PROG (#1=#:G1892 #2=#:G1894 |i| |degree|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |degree| (SPADCALL |p| (QREFELT $ 26))
              . #3=(|PERMGRP;testIdentity|))
        (SEQ
         (EXIT
          (SEQ (LETT |i| 1 . #3#) G190
               (COND ((QSGREATERP |i| |degree|) (GO G191)))
               (SEQ
                (EXIT
                 (COND
                  ((NULL (EQL (QAREF1O |p| |i| 1) |i|))
                   (PROGN
                    (LETT #1# (PROGN (LETT #2# 'NIL . #3#) (GO #2#)) . #3#)
                    (GO #1#))))))
               (LETT |i| (QSADD1 |i|) . #3#) (GO G190) G191 (EXIT NIL)))
         #1# (EXIT #1#))
        (EXIT 'T)))
      #2# (EXIT #2#))))) 

(DEFUN |PERMGRP;cosetRep1| (|ppt| |dowords| |o| |grpv| |wordv| $)
  (PROG (#1=#:G1904 |p| |word| |xelt| |tmpv| |#G25| |#G24| |x| |osvc| |oorb|
         |n| #2=#:G1906 #3=#:G1905 |degree|)
    (RETURN
     (SEQ
      (EXIT
       (COND
        ((EQL (QVSIZE |grpv|) 0) (|error| "cosetRep needs nonempty group"))
        (#4='T
         (SEQ
          (LETT |degree|
                (SPADCALL (SPADCALL |grpv| 1 (QREFELT $ 29)) (QREFELT $ 26))
                . #5=(|PERMGRP;cosetRep1|))
          (LETT |xelt|
                (PROGN
                 (LETT #3# (GETREFV |degree|) . #5#)
                 (SEQ (LETT #2# 0 . #5#) (LETT |n| 1 . #5#) G190
                      (COND ((QSGREATERP |n| |degree|) (GO G191)))
                      (SEQ (EXIT (SETELT #3# #2# |n|)))
                      (LETT |n|
                            (PROG1 (QSADD1 |n|) (LETT #2# (QSADD1 #2#) . #5#))
                            . #5#)
                      #6=(GO G190) G191 (EXIT NIL))
                 #3#)
                . #5#)
          (LETT |word| NIL . #5#) (LETT |oorb| (QCAR |o|) . #5#)
          (LETT |osvc| (QCDR |o|) . #5#)
          (LETT |p| (QAREF1O |osvc| |ppt| 1) . #5#)
          (EXIT
           (COND
            ((< |p| 0) (PROGN (LETT #1# (CONS |xelt| |word|) . #5#) (GO #1#)))
            (#4#
             (SEQ (LETT |tmpv| (SPADCALL |degree| 0 (QREFELT $ 27)) . #5#)
                  (EXIT
                   (SEQ G190 NIL
                        (SEQ (LETT |x| (QAREF1O |grpv| |p| 1) . #5#)
                             (|PERMGRP;times!| |tmpv| |x| |xelt| $)
                             (PROGN
                              (LETT |#G24| |xelt| . #5#)
                              (LETT |#G25| |tmpv| . #5#)
                              (LETT |tmpv| |#G24| . #5#)
                              (LETT |xelt| |#G25| . #5#))
                             (COND
                              (|dowords|
                               (LETT |word|
                                     (APPEND
                                      (SPADCALL |wordv| |p| (QREFELT $ 31))
                                      |word|)
                                     . #5#)))
                             (LETT |ppt| (QAREF1O |x| |ppt| 1) . #5#)
                             (LETT |p| (QAREF1O |osvc| |ppt| 1) . #5#)
                             (EXIT
                              (COND
                               ((< |p| 0)
                                (PROGN
                                 (LETT #1# (CONS |xelt| |word|) . #5#)
                                 (GO #1#))))))
                        NIL #6# G191 (EXIT NIL)))))))))))
      #1# (EXIT #1#))))) 

(DEFUN |PERMGRP;strip1| (|element| |orbit| |group| |words| $)
  (PROG (|cr| |point| |wordv| |dowords| |grpv|)
    (RETURN
     (SEQ
      (LETT |grpv| (SPADCALL |group| (QREFELT $ 33)) . #1=(|PERMGRP;strip1|))
      (LETT |wordv| (MAKE-ARRAY 0) . #1#)
      (LETT |dowords| (COND ((NULL |words|) 'NIL) ('T 'T)) . #1#)
      (COND (|dowords| (LETT |wordv| (SPADCALL |words| (QREFELT $ 35)) . #1#)))
      (LETT |point|
            (QAREF1O |element| (SPADCALL (QCAR |orbit|) 1 (QREFELT $ 36)) 1)
            . #1#)
      (LETT |cr|
            (|PERMGRP;cosetRep1| |point| |dowords| |orbit| |grpv| |wordv| $)
            . #1#)
      (EXIT
       (CONS (|PERMGRP;times| (QCAR |cr|) |element| $)
             (REVERSE (QCDR |cr|)))))))) 

(DEFUN |PERMGRP;strip| (|z| |i| |dowords| |orbs| |grpv| |wordv| $)
  (PROG (|word| |tmpv| |#G38| |#G37| |ee| |noresult| #1=#:G1916 |entry| |p| |s|
         |orbj| |j| |degree|)
    (RETURN
     (SEQ (LETT |degree| (SPADCALL |z| (QREFELT $ 26)) . #2=(|PERMGRP;strip|))
          (LETT |word| NIL . #2#)
          (LETT |tmpv| (SPADCALL |degree| 0 (QREFELT $ 27)) . #2#)
          (LETT |noresult| 'T . #2#)
          (SEQ (LETT |j| |i| . #2#) G190
               (COND ((OR (< |j| 1) (NULL |noresult|)) #3=(GO G191)))
               (SEQ (LETT |orbj| (QAREF1O |orbs| |j| 1) . #2#)
                    (LETT |s| (QCDR |orbj|) . #2#)
                    (LETT |p| (|SPADfirst| (QCAR |orbj|)) . #2#)
                    (EXIT
                     (SEQ
                      (EXIT
                       (SEQ G190 (COND ((NULL |noresult|) #3#))
                            (SEQ
                             (LETT |entry| (QAREF1O |s| (QAREF1O |z| |p| 1) 1)
                                   . #2#)
                             (EXIT
                              (COND
                               ((< |entry| 0)
                                (SEQ
                                 (COND
                                  ((EQL |entry| -1)
                                   (PROGN
                                    (LETT #1# |$NoValue| . #2#)
                                    (GO #1#))))
                                 (EXIT (LETT |noresult| 'NIL . #2#))))
                               ('T
                                (SEQ
                                 (LETT |ee| (QAREF1O |grpv| |entry| 1) . #2#)
                                 (|PERMGRP;times!| |tmpv| |ee| |z| $)
                                 (PROGN
                                  (LETT |#G37| |tmpv| . #2#)
                                  (LETT |#G38| |z| . #2#)
                                  (LETT |z| |#G37| . #2#)
                                  (LETT |tmpv| |#G38| . #2#))
                                 (EXIT
                                  (COND
                                   (|dowords|
                                    (LETT |word|
                                          (APPEND
                                           (SPADCALL |wordv| |entry|
                                                     (QREFELT $ 31))
                                           |word|)
                                          . #2#)))))))))
                            NIL #4=(GO G190) G191 (EXIT NIL)))
                      #1# (EXIT #1#))))
               (LETT |j| (+ |j| -1) . #2#) #4# G191 (EXIT NIL))
          (EXIT (CONS |z| |word|)))))) 

(DEFUN |PERMGRP;orbitInternal| (|gp| |startList| $)
  (PROG (|pos| |orbitList| |newList| |j| |workList| #1=#:G1930 |gen| |gpset|)
    (RETURN
     (SEQ (LETT |orbitList| (LIST |startList|) . #2=(|PERMGRP;orbitInternal|))
          (LETT |pos| 1 . #2#)
          (SEQ G190
               (COND ((NULL (COND ((ZEROP |pos|) 'NIL) ('T 'T))) #3=(GO G191)))
               (SEQ (LETT |gpset| (QCAR |gp|) . #2#)
                    (SEQ (LETT |gen| NIL . #2#) (LETT #1# |gpset| . #2#) G190
                         (COND
                          ((OR (ATOM #1#)
                               (PROGN (LETT |gen| (CAR #1#) . #2#) NIL))
                           #3#))
                         (SEQ (LETT |newList| NIL . #2#)
                              (LETT |workList|
                                    (SPADCALL |orbitList| |pos| (QREFELT $ 39))
                                    . #2#)
                              (SEQ (LETT |j| (LENGTH |workList|) . #2#) G190
                                   (COND ((< |j| 1) #3#))
                                   (SEQ
                                    (EXIT
                                     (LETT |newList|
                                           (CONS
                                            (SPADCALL |gen|
                                                      (SPADCALL |workList| |j|
                                                                (QREFELT $ 40))
                                                      (QREFELT $ 41))
                                            |newList|)
                                           . #2#)))
                                   (LETT |j| (+ |j| -1) . #2#) #4=(GO G190)
                                   G191 (EXIT NIL))
                              (EXIT
                               (COND
                                ((NULL
                                  (SPADCALL |newList| |orbitList|
                                            (QREFELT $ 42)))
                                 (SEQ
                                  (LETT |orbitList|
                                        (CONS |newList| |orbitList|) . #2#)
                                  (EXIT (LETT |pos| (+ |pos| 1) . #2#)))))))
                         (LETT #1# (CDR #1#) . #2#) #4# G191 (EXIT NIL))
                    (EXIT (LETT |pos| (- |pos| 1) . #2#)))
               NIL #4# G191 (EXIT NIL))
          (EXIT (REVERSE |orbitList|)))))) 

(DEFUN |PERMGRP;ranelt| (|group| |word| |maxLoops| $)
  (PROG (|numberOfLoops| |words| #1=#:G1936 |randomElement| |randomInteger|
         #2=#:G1933 |dowords| |numberOfGenerators|)
    (RETURN
     (SEQ (LETT |numberOfGenerators| (LENGTH |group|) . #3=(|PERMGRP;ranelt|))
          (LETT |randomInteger| (+ 1 (RANDOM |numberOfGenerators|)) . #3#)
          (LETT |randomElement|
                (SPADCALL |group| |randomInteger| (QREFELT $ 43)) . #3#)
          (LETT |words| NIL . #3#)
          (LETT |dowords| (COND ((NULL |word|) 'NIL) (#4='T 'T)) . #3#)
          (COND
           (|dowords|
            (LETT |words|
                  (SPADCALL |word|
                            (PROG1 (LETT #2# |randomInteger| . #3#)
                              (|check-subtype| (>= #2# 0)
                                               '(|NonNegativeInteger|) #2#))
                            (QREFELT $ 44))
                  . #3#)))
          (COND
           ((< 0 |maxLoops|)
            (LETT |numberOfLoops| (+ 1 (RANDOM |maxLoops|)) . #3#))
           (#4# (LETT |numberOfLoops| |maxLoops| . #3#)))
          (SEQ G190 (COND ((NULL (< 0 |numberOfLoops|)) (GO G191)))
               (SEQ
                (LETT |randomInteger| (+ 1 (RANDOM |numberOfGenerators|))
                      . #3#)
                (LETT |randomElement|
                      (|PERMGRP;times|
                       (SPADCALL |group| |randomInteger| (QREFELT $ 43))
                       |randomElement| $)
                      . #3#)
                (COND
                 (|dowords|
                  (LETT |words|
                        (APPEND
                         (SPADCALL |word|
                                   (PROG1 (LETT #1# |randomInteger| . #3#)
                                     (|check-subtype| (>= #1# 0)
                                                      '(|NonNegativeInteger|)
                                                      #1#))
                                   (QREFELT $ 44))
                         |words|)
                        . #3#)))
                (EXIT (LETT |numberOfLoops| (- |numberOfLoops| 1) . #3#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT (CONS |randomElement| |words|)))))) 

(DEFUN |PERMGRP;pointList;$L;11| (|group| $)
  (PROG (|res| |p0| #1=#:G1952 |p| |support| #2=#:G1951 |perm|)
    (RETURN
     (SEQ
      (COND ((NULL (NULL (QVELT (QCDR |group|) 4))) (QVELT (QCDR |group|) 4))
            ('T
             (SEQ (LETT |support| NIL . #3=(|PERMGRP;pointList;$L;11|))
                  (SEQ (LETT |perm| NIL . #3#) (LETT #2# (QCAR |group|) . #3#)
                       G190
                       (COND
                        ((OR (ATOM #2#)
                             (PROGN (LETT |perm| (CAR #2#) . #3#) NIL))
                         #4=(GO G191)))
                       (SEQ
                        (EXIT
                         (LETT |support|
                               (SPADCALL
                                (SPADCALL
                                 (QCAR (SPADCALL |perm| (QREFELT $ 46)))
                                 (QREFELT $ 47))
                                |support| (QREFELT $ 48))
                               . #3#)))
                       (LETT #2# (CDR #2#) . #3#) #5=(GO G190) G191 (EXIT NIL))
                  (LETT |res| NIL . #3#)
                  (EXIT
                   (COND ((NULL |support|) |res|)
                         ('T
                          (SEQ (LETT |p0| (|SPADfirst| |support|) . #3#)
                               (LETT |res| (LIST |p0|) . #3#)
                               (SEQ (LETT |p| NIL . #3#)
                                    (LETT #1# (CDR |support|) . #3#) G190
                                    (COND
                                     ((OR (ATOM #1#)
                                          (PROGN
                                           (LETT |p| (CAR #1#) . #3#)
                                           NIL))
                                      #4#))
                                    (SEQ
                                     (EXIT
                                      (COND
                                       ((SPADCALL |p| |p0| (QREFELT $ 49))
                                        "iterate")
                                       ('T
                                        (SEQ (LETT |p0| |p| . #3#)
                                             (EXIT
                                              (LETT |res| (CONS |p| |res|)
                                                    . #3#)))))))
                                    (LETT #1# (CDR #1#) . #3#) #5# G191
                                    (EXIT NIL))
                               (EXIT
                                (QSETVELT (QCDR |group|) 4
                                          (NREVERSE |res|)))))))))))))) 

(DEFUN |PERMGRP;pointList;$L;12| (|group| $)
  (PROG (|support| #1=#:G1958 |perm|)
    (RETURN
     (SEQ
      (COND ((NULL (NULL (QVELT (QCDR |group|) 4))) (QVELT (QCDR |group|) 4))
            ('T
             (SEQ
              (LETT |support| (SPADCALL (QREFELT $ 52))
                    . #2=(|PERMGRP;pointList;$L;12|))
              (SEQ (LETT |perm| NIL . #2#) (LETT #1# (QCAR |group|) . #2#) G190
                   (COND
                    ((OR (ATOM #1#) (PROGN (LETT |perm| (CAR #1#) . #2#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (LETT |support|
                           (SPADCALL |support| (SPADCALL |perm| (QREFELT $ 53))
                                     (QREFELT $ 54))
                           . #2#)))
                   (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
              (EXIT
               (QSETVELT (QCDR |group|) 4
                         (SPADCALL |support| (QREFELT $ 55))))))))))) 

(DEFUN |PERMGRP;lstolnni| (|ls| |supp| $)
  (PROG (#1=#:G1981 |pp| #2=#:G1980 |rp2| |ls2| |p1| |pel| |flag| #3=#:G1979
         |p2| |i| #4=#:G1978 |p| #5=#:G1977)
    (RETURN
     (SEQ
      (COND ((NULL |ls|) NIL)
            ('T
             (SEQ
              (LETT |ls2|
                    (PROGN
                     (LETT #5# NIL . #6=(|PERMGRP;lstolnni|))
                     (SEQ (LETT |i| 1 . #6#) (LETT |p| NIL . #6#)
                          (LETT #4# |ls| . #6#) G190
                          (COND
                           ((OR (ATOM #4#)
                                (PROGN (LETT |p| (CAR #4#) . #6#) NIL))
                            #7=(GO G191)))
                          (SEQ
                           (EXIT (LETT #5# (CONS (CONS |i| |p|) #5#) . #6#)))
                          (LETT #4#
                                (PROG1 (CDR #4#) (LETT |i| (QSADD1 |i|) . #6#))
                                . #6#)
                          #8=(GO G190) G191 (EXIT (NREVERSE0 #5#))))
                    . #6#)
              (LETT |ls2|
                    (SPADCALL (CONS #'|PERMGRP;lstolnni!0| $) |ls2|
                              (QREFELT $ 62))
                    . #6#)
              (LETT |pel| (|SPADfirst| |ls2|) . #6#)
              (LETT |p1| (QCDR |pel|) . #6#) (LETT |ls2| (CDR |ls2|) . #6#)
              (LETT |rp2| NIL . #6#) (LETT |flag| 'T . #6#)
              (SEQ (LETT |i| 1 . #6#) (LETT |p2| NIL . #6#)
                   (LETT #3# |supp| . #6#) G190
                   (COND
                    ((OR (ATOM #3#) (PROGN (LETT |p2| (CAR #3#) . #6#) NIL)
                         (NULL |flag|))
                     #7#))
                   (SEQ
                    (EXIT
                     (COND
                      ((SPADCALL |p1| |p2| (QREFELT $ 49))
                       (SEQ
                        (LETT |rp2| (CONS (LIST (QCAR |pel|) |i|) |rp2|) . #6#)
                        (EXIT
                         (COND ((NULL |ls2|) (LETT |flag| 'NIL . #6#))
                               ('T
                                (SEQ (LETT |pel| (|SPADfirst| |ls2|) . #6#)
                                     (LETT |p1| (QCDR |pel|) . #6#)
                                     (EXIT
                                      (LETT |ls2| (CDR |ls2|) . #6#)))))))))))
                   (LETT #3# (PROG1 (CDR #3#) (LETT |i| (QSADD1 |i|) . #6#))
                         . #6#)
                   #8# G191 (EXIT NIL))
              (LETT |rp2|
                    (SPADCALL (CONS #'|PERMGRP;lstolnni!1| $) |rp2|
                              (QREFELT $ 66))
                    . #6#)
              (EXIT
               (PROGN
                (LETT #2# NIL . #6#)
                (SEQ (LETT |pp| NIL . #6#) (LETT #1# |rp2| . #6#) G190
                     (COND
                      ((OR (ATOM #1#) (PROGN (LETT |pp| (CAR #1#) . #6#) NIL))
                       #7#))
                     (SEQ
                      (EXIT
                       (LETT #2# (CONS (SPADCALL |pp| (QREFELT $ 67)) #2#)
                             . #6#)))
                     (LETT #1# (CDR #1#) . #6#) #8# G191
                     (EXIT (NREVERSE0 #2#)))))))))))) 

(DEFUN |PERMGRP;lstolnni!1| (|x| |y| $)
  (COND
   ((SPADCALL (SPADCALL |y| (QREFELT $ 63)) (SPADCALL |x| (QREFELT $ 63))
              (QREFELT $ 64))
    (|spadConstant| $ 57))
   ('T (|spadConstant| $ 58)))) 

(DEFUN |PERMGRP;lstolnni!0| (|x| |y| $)
  (COND ((SPADCALL (QCDR |y|) (QCDR |x|) (QREFELT $ 56)) (|spadConstant| $ 57))
        ('T (|spadConstant| $ 58)))) 

(DEFUN |PERMGRP;permtovec;LPNniV;14| (|supp| |p| |degree| $)
  (PROG (#1=#:G1988 |pp| #2=#:G1989 |ip| |il| |pl| |i| |q| |pr|)
    (RETURN
     (SEQ
      (LETT |pr| (SPADCALL |p| (QREFELT $ 46))
            . #3=(|PERMGRP;permtovec;LPNniV;14|))
      (LETT |q| (SPADCALL |degree| 0 (QREFELT $ 27)) . #3#)
      (SEQ (LETT |i| 1 . #3#) G190
           (COND ((QSGREATERP |i| |degree|) #4=(GO G191)))
           (SEQ (EXIT (SPADCALL |q| |i| |i| (QREFELT $ 68))))
           (LETT |i| (QSADD1 |i|) . #3#) #5=(GO G190) G191 (EXIT NIL))
      (LETT |pl| (|PERMGRP;lstolnni| (QCAR |pr|) |supp| $) . #3#)
      (LETT |il| (|PERMGRP;lstolnni| (QCDR |pr|) |supp| $) . #3#)
      (SEQ (LETT |ip| NIL . #3#) (LETT #2# |il| . #3#) (LETT |pp| NIL . #3#)
           (LETT #1# |pl| . #3#) G190
           (COND
            ((OR (ATOM #1#) (PROGN (LETT |pp| (CAR #1#) . #3#) NIL) (ATOM #2#)
                 (PROGN (LETT |ip| (CAR #2#) . #3#) NIL))
             #4#))
           (SEQ (EXIT (SPADCALL |q| |pp| |ip| (QREFELT $ 68))))
           (LETT #1# (PROG1 (CDR #1#) (LETT #2# (CDR #2#) . #3#)) . #3#) #5#
           G191 (EXIT NIL))
      (EXIT |q|))))) 

(DEFUN |PERMGRP;permtovec;LPNniV;15| (|supp| |p| |degree| $)
  (PROG (|pos2| |newEl| |i| |q|)
    (RETURN
     (SEQ
      (LETT |q| (SPADCALL |degree| 0 (QREFELT $ 27))
            . #1=(|PERMGRP;permtovec;LPNniV;15|))
      (SEQ (LETT |i| 1 . #1#) G190 (COND ((QSGREATERP |i| |degree|) (GO G191)))
           (SEQ
            (LETT |newEl|
                  (SPADCALL |p| (SPADCALL |supp| |i| (QREFELT $ 40))
                            (QREFELT $ 41))
                  . #1#)
            (LETT |pos2| (SPADCALL |newEl| |supp| (QREFELT $ 70)) . #1#)
            (EXIT (SPADCALL |q| |i| |pos2| (QREFELT $ 68))))
           (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191 (EXIT NIL))
      (EXIT |q|))))) 

(DEFUN |PERMGRP;orbitWithSvc1| (|group| |grpinv| |point| $)
  (PROG (|position| |orbitsize| |orbit| |newPoint| #1=#:G2005 |i| #2=#:G2006
         |grv| |schreierVector| |orbitv| |degree|)
    (RETURN
     (SEQ
      (LETT |degree| (SPADCALL (|SPADfirst| |group|) (QREFELT $ 26))
            . #3=(|PERMGRP;orbitWithSvc1|))
      (LETT |orbit| (LIST |point|) . #3#)
      (LETT |orbitv| (SPADCALL |degree| 0 (QREFELT $ 27)) . #3#)
      (SPADCALL |orbitv| 1 |point| (QREFELT $ 68)) (LETT |orbitsize| 1 . #3#)
      (LETT |schreierVector| (MAKEARR1 |degree| -2) . #3#)
      (SPADCALL |schreierVector| |point| -1 (QREFELT $ 72))
      (LETT |position| 1 . #3#)
      (SEQ G190
           (COND
            ((NULL (COND ((ZEROP |position|) 'NIL) ('T 'T))) #4=(GO G191)))
           (SEQ
            (SEQ (LETT |grv| NIL . #3#) (LETT #2# |grpinv| . #3#)
                 (LETT |i| 1 . #3#) (LETT #1# (LENGTH |grpinv|) . #3#) G190
                 (COND
                  ((OR (QSGREATERP |i| #1#) (ATOM #2#)
                       (PROGN (LETT |grv| (CAR #2#) . #3#) NIL))
                   #4#))
                 (SEQ
                  (LETT |newPoint|
                        (QAREF1O |orbitv| (+ (- |orbitsize| |position|) 1) 1)
                        . #3#)
                  (LETT |newPoint| (QAREF1O |grv| |newPoint| 1) . #3#)
                  (EXIT
                   (COND
                    ((EQL (QAREF1O |schreierVector| |newPoint| 1) -2)
                     (SEQ (LETT |orbit| (CONS |newPoint| |orbit|) . #3#)
                          (LETT |orbitsize| (+ |orbitsize| 1) . #3#)
                          (SPADCALL |orbitv| |orbitsize| |newPoint|
                                    (QREFELT $ 68))
                          (LETT |position| (+ |position| 1) . #3#)
                          (EXIT
                           (SPADCALL |schreierVector| |newPoint| |i|
                                     (QREFELT $ 72))))))))
                 (LETT |i| (PROG1 (QSADD1 |i|) (LETT #2# (CDR #2#) . #3#))
                       . #3#)
                 #5=(GO G190) G191 (EXIT NIL))
            (EXIT (LETT |position| (- |position| 1) . #3#)))
           NIL #5# G191 (EXIT NIL))
      (EXIT (CONS (NREVERSE |orbit|) |schreierVector|)))))) 

(DEFUN |PERMGRP;orbitWithSvc| (|group| |point| $)
  (PROG (|grpinv| #1=#:G2010 |el|)
    (RETURN
     (SEQ (LETT |grpinv| NIL . #2=(|PERMGRP;orbitWithSvc|))
          (SEQ (LETT |el| NIL . #2#) (LETT #1# |group| . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |el| (CAR #1#) . #2#) NIL))
                 (GO G191)))
               (SEQ
                (EXIT
                 (LETT |grpinv| (CONS (|PERMGRP;inv| |el| $) |grpinv|) . #2#)))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (LETT |grpinv| (REVERSE |grpinv|) . #2#)
          (EXIT (|PERMGRP;orbitWithSvc1| |group| |grpinv| |point| $)))))) 

(DEFUN |PERMGRP;bsgs1|
       (|group| |number1| |words| |maxLoops| |gp| |diff| |out| |outword| $)
  (PROG (|sizeOfGroup| |k2| #1=#:G2031 |j| |words3| |help| |group2| |el2| |str|
         |ran| |words2| |gpsgs| |k| #2=#:G2017 |jj| |gplength| #3=#:G2014 |k1|
         |ort| |i| |wordProblem| |gpinfo| |degree|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |degree| (SPADCALL (|SPADfirst| |group|) (QREFELT $ 26))
              . #4=(|PERMGRP;bsgs1|))
        (LETT |gpinfo| (QCDR |gp|) . #4#)
        (LETT |wordProblem| (COND ((NULL |words|) 'NIL) ('T 'T)) . #4#)
        (SEQ
         (EXIT
          (SEQ (LETT |i| |number1| . #4#) G190
               (COND ((> |i| |degree|) #5=(GO G191)))
               (SEQ (LETT |ort| (|PERMGRP;orbitWithSvc| |group| |i| $) . #4#)
                    (LETT |k| (QCAR |ort|) . #4#)
                    (LETT |k1| (SPADCALL |k| (QREFELT $ 22)) . #4#)
                    (EXIT
                     (COND
                      ((NULL (EQL |k1| 1))
                       (PROGN (LETT #3# |$NoValue| . #4#) (GO #3#))))))
               (LETT |i| (+ |i| 1) . #4#) #6=(GO G190) G191 (EXIT NIL)))
         #3# (EXIT #3#))
        (LETT |gpsgs| NIL . #4#) (LETT |words2| NIL . #4#)
        (LETT |gplength| (LENGTH |group|) . #4#)
        (SEQ
         (EXIT
          (SEQ (LETT |jj| 1 . #4#) G190
               (COND ((QSGREATERP |jj| |gplength|) #5#))
               (SEQ
                (EXIT
                 (COND
                  ((NULL
                    (EQL
                     (SPADCALL (SPADCALL |group| |jj| (QREFELT $ 43)) |i|
                               (QREFELT $ 73))
                     |i|))
                   (PROGN (LETT #2# |$NoValue| . #4#) (GO #2#))))))
               (LETT |jj| (QSADD1 |jj|) . #4#) #6# G191 (EXIT NIL)))
         #2# (EXIT #2#))
        (SEQ (LETT |k| 1 . #4#) G190 (COND ((QSGREATERP |k| |gplength|) #5#))
             (SEQ (LETT |el2| (SPADCALL |group| |k| (QREFELT $ 43)) . #4#)
                  (EXIT
                   (COND
                    ((EQL (SPADCALL |el2| |i| (QREFELT $ 73)) |i|)
                     (SEQ
                      (LETT |gpsgs|
                            (CONS
                             (|PERMGRP;times|
                              (SPADCALL |group| |jj| (QREFELT $ 43)) |el2| $)
                             |gpsgs|)
                            . #4#)
                      (EXIT
                       (COND
                        (|wordProblem|
                         (LETT |words2|
                               (CONS
                                (APPEND (SPADCALL |words| |jj| (QREFELT $ 44))
                                        (SPADCALL |words| |k| (QREFELT $ 44)))
                                |words2|)
                               . #4#))))))
                    ('T
                     (SEQ (LETT |gpsgs| (CONS |el2| |gpsgs|) . #4#)
                          (EXIT
                           (COND
                            (|wordProblem|
                             (LETT |words2|
                                   (CONS (SPADCALL |words| |k| (QREFELT $ 44))
                                         |words2|)
                                   . #4#)))))))))
             (LETT |k| (QSADD1 |k|) . #4#) #6# G191 (EXIT NIL))
        (LETT |group2| NIL . #4#) (LETT |words3| NIL . #4#) (LETT |j| 15 . #4#)
        (SEQ G190 (COND ((NULL (< 0 |j|)) #5#))
             (SEQ
              (LETT |ran| (|PERMGRP;ranelt| |group| |words| |maxLoops| $)
                    . #4#)
              (LETT |str|
                    (|PERMGRP;strip1| (QCAR |ran|) |ort| |group| |words| $)
                    . #4#)
              (LETT |el2| (QCAR |str|) . #4#)
              (COND
               ((NULL (|PERMGRP;testIdentity| |el2| $))
                (COND
                 ((NULL (SPADCALL |el2| |group2| (QREFELT $ 74)))
                  (SEQ (LETT |group2| (CONS |el2| |group2|) . #4#)
                       (COND
                        (|wordProblem|
                         (SEQ
                          (LETT |help|
                                (APPEND (REVERSE (QCDR |str|)) (QCDR |ran|))
                                . #4#)
                          (LETT |help| (|PERMGRP;shortenWord| |help| |gp| $)
                                . #4#)
                          (EXIT
                           (LETT |words3| (CONS |help| |words3|) . #4#)))))
                       (EXIT (LETT |j| (- |j| 2) . #4#)))))))
              (EXIT (LETT |j| (- |j| 1) . #4#)))
             NIL #6# G191 (EXIT NIL))
        (COND (|wordProblem| (LETT |maxLoops| (- |maxLoops| |diff|) . #4#)))
        (COND
         ((OR (NULL |group2|) (< |maxLoops| 0))
          (SEQ (QSETVELT |gpinfo| 2 (LIST |i|))
               (SPADCALL |out| (LIST |gpsgs|) (QREFELT $ 77))
               (SPADCALL |outword| (LIST |words2|) (QREFELT $ 80))
               (EXIT (PROGN (LETT #1# |k1| . #4#) (GO #1#))))))
        (LETT |k2|
              (|PERMGRP;bsgs1| |group2| (+ |i| 1) |words3| |maxLoops| |gp|
               |diff| |out| |outword| $)
              . #4#)
        (LETT |sizeOfGroup| (* |k1| |k2|) . #4#)
        (SPADCALL |out| (APPEND (SPADCALL |out| (QREFELT $ 81)) (LIST |gpsgs|))
                  (QREFELT $ 77))
        (SPADCALL |outword|
                  (APPEND (SPADCALL |outword| (QREFELT $ 82)) (LIST |words2|))
                  (QREFELT $ 80))
        (QSETVELT |gpinfo| 2 (CONS |i| (QVELT |gpinfo| 2)))
        (EXIT |sizeOfGroup|)))
      #1# (EXIT #1#))))) 

(DEFUN |PERMGRP;reduceGenerators| (|kkk| |dowords| |gpinfo| |outl| |outword| $)
  (PROG (|i| |outlk| |grpinv| |sgs| |res| |obs2| |grpinv2| |sgs2| |pos|
         |removedGenerator| |obslen| |obs| |pt| |baseLength| |orbv| |baselst|)
    (RETURN
     (SEQ (LETT |baselst| (QVELT |gpinfo| 2) . #1=(|PERMGRP;reduceGenerators|))
          (LETT |orbv| (QVELT |gpinfo| 3) . #1#) (LETT |sgs| NIL . #1#)
          (LETT |res| NIL . #1#) (LETT |grpinv| NIL . #1#)
          (SEQ (LETT |i| 1 . #1#) G190
               (COND ((QSGREATERP |i| |kkk|) #2=(GO G191)))
               (SEQ
                (LETT |sgs| (APPEND |sgs| (SPADCALL |outl| |i| (QREFELT $ 83)))
                      . #1#)
                (EXIT
                 (LETT |grpinv|
                       (APPEND |grpinv|
                               (SPADCALL (CONS (|function| |PERMGRP;inv|) $)
                                         (SPADCALL |outl| |i| (QREFELT $ 83))
                                         (QREFELT $ 85)))
                       . #1#)))
               (LETT |i| (QSADD1 |i|) . #1#) #3=(GO G190) G191 (EXIT NIL))
          (LETT |removedGenerator| 'NIL . #1#)
          (LETT |baseLength| (SPADCALL |baselst| (QREFELT $ 22)) . #1#)
          (LETT |pt| (+ (- |baseLength| |kkk|) 1) . #1#)
          (LETT |obs|
                (|PERMGRP;orbitWithSvc1| |sgs| |grpinv|
                 (SPADCALL |baselst| |pt| (QREFELT $ 17)) $)
                . #1#)
          (SPADCALL |orbv| |kkk| |obs| (QREFELT $ 88))
          (LETT |obslen| (SPADCALL (QCAR |obs|) (QREFELT $ 22)) . #1#)
          (COND
           ((EQL |obslen| 1)
            (SEQ (LETT |removedGenerator| 'T . #1#)
                 (EXIT (SPADCALL |outl| |kkk| NIL (QREFELT $ 89))))))
          (LETT |i| 1 . #1#)
          (LETT |outlk| (SPADCALL |outl| |kkk| (QREFELT $ 83)) . #1#)
          (SEQ G190
               (COND
                ((NULL
                  (COND ((< (LENGTH |outlk|) |i|) 'NIL)
                        ('T (< 1 (LENGTH |outlk|)))))
                 #2#))
               (SEQ
                (LETT |pos|
                      (SPADCALL (SPADCALL |outlk| |i| (QREFELT $ 43)) |sgs|
                                (QREFELT $ 90))
                      . #1#)
                (LETT |sgs2| (SPADCALL |sgs| |pos| (QREFELT $ 91)) . #1#)
                (LETT |grpinv2| (SPADCALL |grpinv| |pos| (QREFELT $ 91)) . #1#)
                (LETT |obs2|
                      (|PERMGRP;orbitWithSvc1| |sgs2| |grpinv2|
                       (SPADCALL |baselst| |pt| (QREFELT $ 17)) $)
                      . #1#)
                (EXIT
                 (COND
                  ((EQL (SPADCALL (QCAR |obs2|) (QREFELT $ 22)) |obslen|)
                   (SEQ
                    (LETT |res|
                          (CONS (SPADCALL |outlk| |i| (QREFELT $ 43)) |res|)
                          . #1#)
                    (LETT |sgs| |sgs2| . #1#) (LETT |grpinv| |grpinv2| . #1#)
                    (LETT |outlk| (SPADCALL |outlk| |i| (QREFELT $ 91)) . #1#)
                    (SPADCALL |outl| |kkk| |outlk| (QREFELT $ 89))
                    (SPADCALL |orbv| |kkk| |obs2| (QREFELT $ 88))
                    (EXIT
                     (COND
                      (|dowords|
                       (SPADCALL |outword| |kkk|
                                 (SPADCALL
                                  (SPADCALL |outword| |kkk| (QREFELT $ 92)) |i|
                                  (QREFELT $ 93))
                                 (QREFELT $ 94)))))))
                  ('T (LETT |i| (+ |i| 1) . #1#)))))
               NIL #3# G191 (EXIT NIL))
          (EXIT |res|))))) 

(DEFUN |PERMGRP;bsgs| (|group| |wordProblem| |maxLoops| |diff| $)
  (PROG (|sizeOfGroup| #1=#:G2106 |j| |kkk| |outword| |out| |orbv| #2=#:G2088
         |baseOfGroup| |i| |word| |ttt| |word2| #3=#:G2105 |wdi| |addcnt|
         |noAnswer| #4=#:G2076 |basePoint| #5=#:G2073 |newBasePoint| #6=#:G2104
         |p| |ii| |z| |ppp| |noresult| #7=#:G2103 |jjj| |word3| |y1| #8=#:G2102
         |pt| #9=#:G2101 |z0| |gporbi| |wordv| |wordlist| |sgsv| |sgs|
         |rejects| #10=#:G2100 #11=#:G2099 |dummyrec| |newGroup| |k| |words|
         |q| #12=#:G2097 |ggg| #13=#:G2098 |ggp| |gp| |tmpv| #14=#:G2096
         |gpinfo| |degree| |supp| |outwordr| |outr|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |basePoint| 0 . #15=(|PERMGRP;bsgs|))
            (LETT |newBasePoint| 'NIL . #15#) (LETT |baseOfGroup| NIL . #15#)
            (LETT |out| NIL . #15#) (LETT |outword| NIL . #15#)
            (LETT |outr| (SPADCALL NIL (QREFELT $ 95)) . #15#)
            (LETT |outwordr| (SPADCALL NIL (QREFELT $ 96)) . #15#)
            (LETT |supp| (SPADCALL |group| (QREFELT $ 50)) . #15#)
            (LETT |degree| (LENGTH |supp|) . #15#)
            (LETT |gpinfo| (VECTOR 1 NIL NIL #() NIL NIL) . #15#)
            (COND
             ((EQL |degree| 0)
              (SEQ (PROGN (RPLACD |group| |gpinfo|) (QCDR |group|))
                   (EXIT (PROGN (LETT #14# 1 . #15#) (GO #14#))))))
            (LETT |newGroup| NIL . #15#)
            (LETT |tmpv| (SPADCALL |degree| 0 (QREFELT $ 27)) . #15#)
            (LETT |gp| (QCAR |group|) . #15#) (LETT |words| NIL . #15#)
            (SEQ (LETT |ggp| NIL . #15#) (LETT #13# |gp| . #15#)
                 (LETT |ggg| 1 . #15#) (LETT #12# (LENGTH |gp|) . #15#) G190
                 (COND
                  ((OR (QSGREATERP |ggg| #12#) (ATOM #13#)
                       (PROGN (LETT |ggp| (CAR #13#) . #15#) NIL))
                   #16=(GO G191)))
                 (SEQ
                  (LETT |q| (SPADCALL |supp| |ggp| |degree| (QREFELT $ 69))
                        . #15#)
                  (LETT |newGroup| (CONS |q| |newGroup|) . #15#)
                  (EXIT
                   (COND
                    (|wordProblem|
                     (LETT |words|
                           (CONS (SPADCALL |ggg| (QREFELT $ 97)) |words|)
                           . #15#)))))
                 (LETT |ggg|
                       (PROG1 (QSADD1 |ggg|) (LETT #13# (CDR #13#) . #15#))
                       . #15#)
                 #17=(GO G190) G191 (EXIT NIL))
            (COND
             ((< |maxLoops| 1)
              (SEQ
               (COND
                ((ZEROP (SPADCALL (QVELT (QCDR |group|) 2) (QREFELT $ 22)))
                 (LETT |k|
                       (|PERMGRP;bsgs1| |newGroup| 1 NIL 20 |group| 0 |outr|
                        |outwordr| $)
                       . #15#)))
               (EXIT
                (LETT |maxLoops|
                      (- (SPADCALL (QVELT (QCDR |group|) 2) (QREFELT $ 22)) 1)
                      . #15#)))))
            (LETT |k|
                  (|PERMGRP;bsgs1| |newGroup| 1 |words| |maxLoops| |group|
                   |diff| |outr| |outwordr| $)
                  . #15#)
            (LETT |out| (SPADCALL |outr| (QREFELT $ 81)) . #15#)
            (LETT |outword| (SPADCALL |outwordr| (QREFELT $ 82)) . #15#)
            (LETT |kkk| 1 . #15#) (LETT |newGroup| (REVERSE |newGroup|) . #15#)
            (LETT |noAnswer| 'T . #15#) (LETT |addcnt| 0 . #15#)
            (LETT |dummyrec| (CONS NIL (MAKE-ARRAY 0)) . #15#)
            (LETT |baseOfGroup| (QVELT (QCDR |group|) 2) . #15#)
            (QSETVELT |gpinfo| 2 |baseOfGroup|)
            (LETT |orbv|
                  (MAKEARR1 (SPADCALL |baseOfGroup| (QREFELT $ 22)) |dummyrec|)
                  . #15#)
            (SEQ G190 (COND ((NULL |noAnswer|) #16#))
                 (SEQ (QSETVELT |gpinfo| 2 |baseOfGroup|)
                      (QSETVELT |gpinfo| 3 |orbv|) (LETT |sgs| NIL . #15#)
                      (LETT |wordlist| NIL . #15#)
                      (SEQ (LETT |i| 1 . #15#) (LETT #11# (- |kkk| 1) . #15#)
                           G190 (COND ((QSGREATERP |i| #11#) #16#))
                           (SEQ
                            (LETT |sgs|
                                  (APPEND |sgs|
                                          (SPADCALL |out| |i| (QREFELT $ 83)))
                                  . #15#)
                            (EXIT
                             (COND
                              (|wordProblem|
                               (LETT |wordlist|
                                     (APPEND |wordlist|
                                             (SPADCALL |outword| |i|
                                                       (QREFELT $ 92)))
                                     . #15#)))))
                           (LETT |i| (QSADD1 |i|) . #15#) #17# G191 (EXIT NIL))
                      (LETT |noresult| 'T . #15#)
                      (LETT |z| (SPADCALL |degree| 0 (QREFELT $ 27)) . #15#)
                      (SEQ (LETT |i| |kkk| . #15#)
                           (LETT #10# (SPADCALL |baseOfGroup| (QREFELT $ 22))
                                 . #15#)
                           G190
                           (COND ((OR (> |i| #10#) (NULL |noresult|)) #16#))
                           (SEQ
                            (LETT |rejects|
                                  (|PERMGRP;reduceGenerators| |i| |wordProblem|
                                   |gpinfo| |out| |outword| $)
                                  . #15#)
                            (LETT |sgs|
                                  (APPEND |sgs|
                                          (SPADCALL |out| |i| (QREFELT $ 83)))
                                  . #15#)
                            (LETT |sgsv| (SPADCALL |sgs| (QREFELT $ 33))
                                  . #15#)
                            (LETT |wordv| (MAKE-ARRAY 0) . #15#)
                            (COND
                             (|wordProblem|
                              (SEQ
                               (LETT |wordlist|
                                     (APPEND |wordlist|
                                             (SPADCALL |outword| |i|
                                                       (QREFELT $ 92)))
                                     . #15#)
                               (EXIT
                                (LETT |wordv|
                                      (SPADCALL |wordlist| (QREFELT $ 35))
                                      . #15#)))))
                            (LETT |gporbi| (SPADCALL |orbv| |i| (QREFELT $ 98))
                                  . #15#)
                            (SEQ (LETT |z0| NIL . #15#)
                                 (LETT #9# |rejects| . #15#) G190
                                 (COND
                                  ((OR (ATOM #9#)
                                       (PROGN (LETT |z0| (CAR #9#) . #15#) NIL)
                                       (NULL |noresult|))
                                   #16#))
                                 (SEQ
                                  (LETT |z| (SPADCALL |z0| (QREFELT $ 99))
                                        . #15#)
                                  (LETT |ppp|
                                        (|PERMGRP;strip| |z| |i| 'NIL |orbv|
                                         |sgsv| |wordv| $)
                                        . #15#)
                                  (LETT |noresult|
                                        (|PERMGRP;testIdentity| (QCAR |ppp|) $)
                                        . #15#)
                                  (EXIT
                                   (COND
                                    ((NULL |noresult|)
                                     (SEQ
                                      (COND
                                       (|wordProblem|
                                        (SEQ
                                         (LETT |z|
                                               (SPADCALL |z0| (QREFELT $ 99))
                                               . #15#)
                                         (EXIT
                                          (LETT |ppp|
                                                (|PERMGRP;strip| |z| |i| 'T
                                                 |orbv| |sgsv| |wordv| $)
                                                . #15#)))))
                                      (LETT |z| (QCAR |ppp|) . #15#)
                                      (EXIT
                                       (LETT |word| (QCDR |ppp|) . #15#)))))))
                                 (LETT #9# (CDR #9#) . #15#) #17# G191
                                 (EXIT NIL))
                            (SEQ (LETT |pt| NIL . #15#)
                                 (LETT #8# (QCAR |gporbi|) . #15#) G190
                                 (COND
                                  ((OR (ATOM #8#)
                                       (PROGN (LETT |pt| (CAR #8#) . #15#) NIL)
                                       (NULL |noresult|))
                                   #16#))
                                 (SEQ
                                  (LETT |ppp|
                                        (|PERMGRP;cosetRep1| |pt| |wordProblem|
                                         |gporbi| |sgsv| |wordv| $)
                                        . #15#)
                                  (LETT |y1| (|PERMGRP;inv| (QCAR |ppp|) $)
                                        . #15#)
                                  (LETT |word3| (QCDR |ppp|) . #15#)
                                  (EXIT
                                   (SEQ (LETT |jjj| 1 . #15#)
                                        (LETT #7# (LENGTH |sgs|) . #15#) G190
                                        (COND
                                         ((OR (QSGREATERP |jjj| #7#)
                                              (NULL |noresult|))
                                          #16#))
                                        (SEQ (LETT |word| NIL . #15#)
                                             (|PERMGRP;times!| |z|
                                              (QAREF1O |sgsv| |jjj| 1) |y1| $)
                                             (COND
                                              (|wordProblem|
                                               (LETT |word|
                                                     (QAREF1O |wordv| |jjj| 1)
                                                     . #15#)))
                                             (LETT |ppp|
                                                   (|PERMGRP;strip| |z| |i|
                                                    'NIL |orbv| |sgsv| |wordv|
                                                    $)
                                                   . #15#)
                                             (LETT |z| (QCAR |ppp|) . #15#)
                                             (LETT |noresult|
                                                   (|PERMGRP;testIdentity| |z|
                                                    $)
                                                   . #15#)
                                             (EXIT
                                              (COND
                                               ((NULL |noresult|)
                                                (COND
                                                 (|wordProblem|
                                                  (SEQ
                                                   (LETT |z|
                                                         (|PERMGRP;times|
                                                          (QAREF1O |sgsv| |jjj|
                                                                   1)
                                                          |y1| $)
                                                         . #15#)
                                                   (LETT |ppp|
                                                         (|PERMGRP;strip| |z|
                                                          |i| 'T |orbv| |sgsv|
                                                          |wordv| $)
                                                         . #15#)
                                                   (LETT |z| (QCAR |ppp|)
                                                         . #15#)
                                                   (EXIT
                                                    (LETT |word|
                                                          (APPEND (QCDR |ppp|)
                                                                  |word|)
                                                          . #15#)))))))))
                                        (LETT |jjj| (QSADD1 |jjj|) . #15#) #17#
                                        G191 (EXIT NIL))))
                                 (LETT #8# (CDR #8#) . #15#) #17# G191
                                 (EXIT NIL))
                            (EXIT
                             (COND
                              ((NULL |noresult|)
                               (SEQ
                                (EXIT
                                 (SEQ (LETT |ii| 1 . #15#)
                                      (LETT |p| NIL . #15#)
                                      (LETT #6# |baseOfGroup| . #15#) G190
                                      (COND
                                       ((OR (ATOM #6#)
                                            (PROGN
                                             (LETT |p| (CAR #6#) . #15#)
                                             NIL))
                                        #16#))
                                      (SEQ (LETT |basePoint| 1 . #15#)
                                           (LETT |newBasePoint| 'T . #15#)
                                           (EXIT
                                            (COND
                                             ((NULL
                                               (EQL (QAREF1O |z| |p| 1) |p|))
                                              (SEQ
                                               (LETT |newBasePoint| 'NIL
                                                     . #15#)
                                               (LETT |basePoint|
                                                     (PROG1
                                                         (LETT #5#
                                                               (+
                                                                (-
                                                                 (SPADCALL
                                                                  |baseOfGroup|
                                                                  (QREFELT $
                                                                           22))
                                                                 |ii|)
                                                                1)
                                                               . #15#)
                                                       (|check-subtype|
                                                        (>= #5# 0)
                                                        '(|NonNegativeInteger|)
                                                        #5#))
                                                     . #15#)
                                               (EXIT
                                                (PROGN
                                                 (LETT #4# |$NoValue| . #15#)
                                                 (GO #4#))))))))
                                      (LETT #6#
                                            (PROG1 (CDR #6#)
                                              (LETT |ii| (QSADD1 |ii|) . #15#))
                                            . #15#)
                                      #17# G191 (EXIT NIL)))
                                #4# (EXIT #4#))))))
                           (LETT |i| (+ |i| 1) . #15#) #17# G191 (EXIT NIL))
                      (LETT |noAnswer|
                            (COND ((|PERMGRP;testIdentity| |z| $) 'NIL)
                                  ('T 'T))
                            . #15#)
                      (EXIT
                       (COND
                        (|noAnswer|
                         (SEQ (LETT |addcnt| (+ |addcnt| 1) . #15#)
                              (LETT |word2| NIL . #15#)
                              (COND
                               (|wordProblem|
                                (SEQ
                                 (SEQ (LETT |wdi| NIL . #15#)
                                      (LETT #3# |word3| . #15#) G190
                                      (COND
                                       ((OR (ATOM #3#)
                                            (PROGN
                                             (LETT |wdi| (CAR #3#) . #15#)
                                             NIL))
                                        #16#))
                                      (SEQ
                                       (LETT |ttt|
                                             (SPADCALL |newGroup| |wdi|
                                                       (QREFELT $ 43))
                                             . #15#)
                                       (EXIT
                                        (SEQ G190
                                             (COND
                                              ((NULL
                                                (COND
                                                 ((|PERMGRP;testIdentity| |ttt|
                                                   $)
                                                  'NIL)
                                                 ('T 'T)))
                                               #16#))
                                             (SEQ
                                              (LETT |word2|
                                                    (CONS |wdi| |word2|)
                                                    . #15#)
                                              (EXIT
                                               (LETT |ttt|
                                                     (|PERMGRP;times| |ttt|
                                                      (SPADCALL |newGroup|
                                                                |wdi|
                                                                (QREFELT $ 43))
                                                      $)
                                                     . #15#)))
                                             NIL #17# G191 (EXIT NIL))))
                                      (LETT #3# (CDR #3#) . #15#) #17# G191
                                      (EXIT NIL))
                                 (LETT |word| (APPEND |word| |word2|) . #15#)
                                 (EXIT
                                  (LETT |word|
                                        (|PERMGRP;shortenWord| |word| |group|
                                         $)
                                        . #15#)))))
                              (COND
                               (|newBasePoint|
                                (SEQ
                                 (SEQ
                                  (EXIT
                                   (SEQ (LETT |i| 1 . #15#) G190
                                        (COND ((QSGREATERP |i| |degree|) #16#))
                                        (SEQ
                                         (EXIT
                                          (COND
                                           ((NULL
                                             (EQL
                                              (SPADCALL |z| |i| (QREFELT $ 73))
                                              |i|))
                                            (SEQ
                                             (LETT |baseOfGroup|
                                                   (APPEND |baseOfGroup|
                                                           (LIST |i|))
                                                   . #15#)
                                             (EXIT
                                              (PROGN
                                               (LETT #2# |$NoValue| . #15#)
                                               (GO #2#))))))))
                                        (LETT |i| (QSADD1 |i|) . #15#) #17#
                                        G191 (EXIT NIL)))
                                  #2# (EXIT #2#))
                                 (LETT |orbv|
                                       (MAKEARR1
                                        (SPADCALL |baseOfGroup| (QREFELT $ 22))
                                        |dummyrec|)
                                       . #15#)
                                 (LETT |out|
                                       (CONS (SPADCALL |z| (QREFELT $ 100))
                                             |out|)
                                       . #15#)
                                 (EXIT
                                  (COND
                                   (|wordProblem|
                                    (LETT |outword|
                                          (CONS
                                           (SPADCALL |word| (QREFELT $ 101))
                                           |outword|)
                                          . #15#))))))
                               ('T
                                (SEQ
                                 (SPADCALL |out| |basePoint|
                                           (CONS |z|
                                                 (SPADCALL |out| |basePoint|
                                                           (QREFELT $ 83)))
                                           (QREFELT $ 89))
                                 (EXIT
                                  (COND
                                   (|wordProblem|
                                    (SPADCALL |outword| |basePoint|
                                              (CONS |word|
                                                    (SPADCALL |outword|
                                                              |basePoint|
                                                              (QREFELT $ 92)))
                                              (QREFELT $ 94))))))))
                              (EXIT (LETT |kkk| |basePoint| . #15#)))))))
                 NIL #17# G191 (EXIT NIL))
            (LETT |sizeOfGroup| 1 . #15#)
            (SEQ (LETT |j| 1 . #15#)
                 (LETT #1# (SPADCALL |baseOfGroup| (QREFELT $ 22)) . #15#) G190
                 (COND ((QSGREATERP |j| #1#) #16#))
                 (SEQ
                  (EXIT
                   (LETT |sizeOfGroup|
                         (* |sizeOfGroup|
                            (SPADCALL
                             (QCAR (SPADCALL |orbv| |j| (QREFELT $ 98)))
                             (QREFELT $ 22)))
                         . #15#)))
                 (LETT |j| (QSADD1 |j|) . #15#) #17# G191 (EXIT NIL))
            (PROGN
             (RPLACD |group|
                     (VECTOR |sizeOfGroup| |sgs| |baseOfGroup| |orbv| |supp|
                             |wordlist|))
             (QCDR |group|))
            (EXIT |sizeOfGroup|)))
      #14# (EXIT #14#))))) 

(DEFUN |PERMGRP;initialize| (|group| $)
  (PROG (#1=#:G2112 |gen| |gp| |group2|)
    (RETURN
     (SEQ
      (LETT |group2| (SPADCALL (QREFELT $ 103)) . #2=(|PERMGRP;initialize|))
      (LETT |gp| (QCAR |group|) . #2#)
      (SEQ (LETT |gen| NIL . #2#) (LETT #1# |gp| . #2#) G190
           (COND
            ((OR (ATOM #1#) (PROGN (LETT |gen| (CAR #1#) . #2#) NIL))
             (GO G191)))
           (SEQ
            (EXIT
             (COND
              ((< 0 (SPADCALL |gen| (QREFELT $ 104)))
               (SPADCALL |gen| |group2| (QREFELT $ 105))))))
           (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
      (EXIT |group2|))))) 

(DEFUN |PERMGRP;knownGroup?| (|gp| $)
  (SEQ (COND ((EQL (QVELT (QCDR |gp|) 0) 0) (|PERMGRP;bsgs| |gp| 'NIL 20 0 $)))
       (EXIT (SPADCALL (QREFELT $ 107))))) 

(DEFUN |PERMGRP;subgroup| (|gp1| |gp2| $)
  (PROG (#1=#:G2119 #2=#:G2122 #3=#:G2123 |el| |gpset2| |gpset1|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |gpset1| (|PERMGRP;initialize| |gp1| $)
              . #4=(|PERMGRP;subgroup|))
        (LETT |gpset2| (|PERMGRP;initialize| |gp2| $) . #4#)
        (EXIT
         (COND
          ((SPADCALL (SPADCALL |gpset1| |gpset2| (QREFELT $ 108))
                     (QREFELT $ 109))
           'T)
          ('T
           (SEQ
            (SEQ
             (EXIT
              (SEQ (LETT |el| NIL . #4#)
                   (LETT #3# (SPADCALL |gpset1| (QREFELT $ 110)) . #4#) G190
                   (COND
                    ((OR (ATOM #3#) (PROGN (LETT |el| (CAR #3#) . #4#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (COND
                      ((NULL (SPADCALL |el| |gp2| (QREFELT $ 111)))
                       (PROGN
                        (LETT #1# (PROGN (LETT #2# 'NIL . #4#) (GO #2#)) . #4#)
                        (GO #1#))))))
                   (LETT #3# (CDR #3#) . #4#) (GO G190) G191 (EXIT NIL)))
             #1# (EXIT #1#))
            (EXIT 'T)))))))
      #2# (EXIT #2#))))) 

(DEFUN |PERMGRP;memberInternal| (|p| |gp| |dowords| $)
  (PROG (|str| |grpv| #1=#:G2135 |i| |wordv| |pp| |degree| |baselst| |orbv|
         |sgsl| |gpinfo| #2=#:G2133 #3=#:G2127 #4=#:G2134 |x| |mP| |grsupp|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |grsupp| (SPADCALL |gp| (QREFELT $ 50))
              . #5=(|PERMGRP;memberInternal|))
        (LETT |mP| (SPADCALL (SPADCALL |p| (QREFELT $ 53)) (QREFELT $ 55))
              . #5#)
        (SEQ
         (EXIT
          (SEQ (LETT |x| NIL . #5#) (LETT #4# |mP| . #5#) G190
               (COND
                ((OR (ATOM #4#) (PROGN (LETT |x| (CAR #4#) . #5#) NIL))
                 #6=(GO G191)))
               (SEQ
                (EXIT
                 (COND
                  ((NULL (SPADCALL |x| |grsupp| (QREFELT $ 112)))
                   (PROGN
                    (LETT #3# (PROGN (LETT #2# (CONS 'NIL NIL) . #5#) (GO #2#))
                          . #5#)
                    (GO #3#))))))
               (LETT #4# (CDR #4#) . #5#) #7=(GO G190) G191 (EXIT NIL)))
         #3# (EXIT #3#))
        (COND
         ((NULL |dowords|)
          (COND
           ((SPADCALL |p| (QCAR |gp|) (QREFELT $ 113))
            (EXIT (PROGN (LETT #2# (CONS 'T NIL) . #5#) (GO #2#)))))))
        (|PERMGRP;knownGroup?| |gp| $) (LETT |gpinfo| (QCDR |gp|) . #5#)
        (LETT |sgsl| (QVELT |gpinfo| 1) . #5#)
        (LETT |orbv| (QVELT |gpinfo| 3) . #5#)
        (LETT |baselst| (QVELT |gpinfo| 2) . #5#)
        (LETT |degree| (LENGTH |grsupp|) . #5#)
        (LETT |pp| (SPADCALL |grsupp| |p| |degree| (QREFELT $ 69)) . #5#)
        (LETT |wordv| (MAKE-ARRAY 0) . #5#)
        (COND
         (|dowords|
          (SEQ (LETT |wordv| (MAKEARR1 (LENGTH |sgsl|) NIL) . #5#)
               (EXIT
                (SEQ (LETT |i| 1 . #5#) (LETT #1# (LENGTH |sgsl|) . #5#) G190
                     (COND ((QSGREATERP |i| #1#) #6#))
                     (SEQ
                      (EXIT (SPADCALL |wordv| |i| (LIST |i|) (QREFELT $ 114))))
                     (LETT |i| (QSADD1 |i|) . #5#) #7# G191 (EXIT NIL))))))
        (LETT |grpv| (SPADCALL |sgsl| (QREFELT $ 33)) . #5#)
        (LETT |str|
              (|PERMGRP;strip| |pp| (SPADCALL |baselst| (QREFELT $ 22))
               |dowords| |orbv| |grpv| |wordv| $)
              . #5#)
        (EXIT (CONS (|PERMGRP;testIdentity| (QCAR |str|) $) (QCDR |str|)))))
      #2# (EXIT #2#))))) 

(PUT '|PERMGRP;coerce;$L;25| '|SPADreplace| 'QCAR) 

(DEFUN |PERMGRP;coerce;$L;25| (|gp| $) (QCAR |gp|)) 

(PUT '|PERMGRP;generators;$L;26| '|SPADreplace| 'QCAR) 

(DEFUN |PERMGRP;generators;$L;26| (|gp| $) (QCAR |gp|)) 

(DEFUN |PERMGRP;strongGenerators;$L;27| (|group| $)
  (PROG (|strongGens| |pairs| |j| #1=#:G2144 |i| |degree| |grsgs| |grsupp|)
    (RETURN
     (SEQ (|PERMGRP;knownGroup?| |group| $)
          (LETT |grsupp| (QVELT (QCDR |group|) 4)
                . #2=(|PERMGRP;strongGenerators;$L;27|))
          (LETT |grsgs| (QVELT (QCDR |group|) 1) . #2#)
          (LETT |degree| (LENGTH |grsupp|) . #2#) (LETT |strongGens| NIL . #2#)
          (SEQ (LETT |i| NIL . #2#) (LETT #1# |grsgs| . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |i| (CAR #1#) . #2#) NIL))
                 #3=(GO G191)))
               (SEQ (LETT |pairs| NIL . #2#)
                    (SEQ (LETT |j| 1 . #2#) G190
                         (COND ((QSGREATERP |j| |degree|) #3#))
                         (SEQ
                          (EXIT
                           (LETT |pairs|
                                 (CONS
                                  (LIST (SPADCALL |grsupp| |j| (QREFELT $ 40))
                                        (SPADCALL |grsupp|
                                                  (SPADCALL |i| |j|
                                                            (QREFELT $ 73))
                                                  (QREFELT $ 40)))
                                  |pairs|)
                                 . #2#)))
                         (LETT |j| (QSADD1 |j|) . #2#) #4=(GO G190) G191
                         (EXIT NIL))
                    (EXIT
                     (LETT |strongGens|
                           (CONS (SPADCALL |pairs| (QREFELT $ 116))
                                 |strongGens|)
                           . #2#)))
               (LETT #1# (CDR #1#) . #2#) #4# G191 (EXIT NIL))
          (EXIT (REVERSE |strongGens|)))))) 

(DEFUN |PERMGRP;elt;$NniP;28| (|gp| |i| $)
  (SPADCALL (QCAR |gp|) |i| (QREFELT $ 118))) 

(DEFUN |PERMGRP;movedPoints;$S;29| (|gp| $)
  (SPADCALL (SPADCALL |gp| (QREFELT $ 50)) (QREFELT $ 120))) 

(DEFUN |PERMGRP;random;$IP;30| (|group| |maximalNumberOfFactors| $)
  (PROG (|numberOfLoops| |randomElement| |randomInteger| |numberOfGenerators|
         |gp|)
    (RETURN
     (SEQ
      (COND ((< |maximalNumberOfFactors| 1) (|spadConstant| $ 23))
            ('T
             (SEQ (LETT |gp| (QCAR |group|) . #1=(|PERMGRP;random;$IP;30|))
                  (LETT |numberOfGenerators| (LENGTH |gp|) . #1#)
                  (LETT |randomInteger| (+ 1 (RANDOM |numberOfGenerators|))
                        . #1#)
                  (LETT |randomElement|
                        (SPADCALL |gp| |randomInteger| (QREFELT $ 118)) . #1#)
                  (LETT |numberOfLoops| (+ 1 (RANDOM |maximalNumberOfFactors|))
                        . #1#)
                  (SEQ G190 (COND ((NULL (< 0 |numberOfLoops|)) (GO G191)))
                       (SEQ
                        (LETT |randomInteger|
                              (+ 1 (RANDOM |numberOfGenerators|)) . #1#)
                        (LETT |randomElement|
                              (SPADCALL
                               (SPADCALL |gp| |randomInteger| (QREFELT $ 118))
                               |randomElement| (QREFELT $ 122))
                              . #1#)
                        (EXIT
                         (LETT |numberOfLoops| (- |numberOfLoops| 1) . #1#)))
                       NIL (GO G190) G191 (EXIT NIL))
                  (EXIT |randomElement|)))))))) 

(DEFUN |PERMGRP;random;$P;31| (|group| $) (SPADCALL |group| 20 (QREFELT $ 123))) 

(DEFUN |PERMGRP;order;$Nni;32| (|group| $)
  (SEQ (|PERMGRP;knownGroup?| |group| $) (EXIT (QVELT (QCDR |group|) 0)))) 

(DEFUN |PERMGRP;degree;$Nni;33| (|group| $)
  (LENGTH (SPADCALL |group| (QREFELT $ 50)))) 

(DEFUN |PERMGRP;base;$L;34| (|group| $)
  (PROG (|groupBase| #1=#:G2162 |i| |grsupp| |grbase|)
    (RETURN
     (SEQ (|PERMGRP;knownGroup?| |group| $)
          (LETT |grbase| (QVELT (QCDR |group|) 2) . #2=(|PERMGRP;base;$L;34|))
          (LETT |grsupp| (QVELT (QCDR |group|) 4) . #2#)
          (LETT |groupBase| NIL . #2#)
          (SEQ (LETT |i| NIL . #2#) (LETT #1# |grbase| . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |i| (CAR #1#) . #2#) NIL))
                 (GO G191)))
               (SEQ
                (EXIT
                 (LETT |groupBase|
                       (CONS (SPADCALL |grsupp| |i| (QREFELT $ 40))
                             |groupBase|)
                       . #2#)))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT (REVERSE |groupBase|)))))) 

(DEFUN |PERMGRP;wordsForStrongGenerators;$L;35| (|group| $)
  (SEQ (|PERMGRP;knownGroup?| |group| $) (EXIT (QVELT (QCDR |group|) 5)))) 

(DEFUN |PERMGRP;coerce;L$;36| (|gp| $)
  (PROG (|group| |result|)
    (RETURN
     (SEQ
      (LETT |result| (VECTOR 0 NIL NIL #() NIL NIL)
            . #1=(|PERMGRP;coerce;L$;36|))
      (EXIT (LETT |group| (CONS |gp| |result|) . #1#)))))) 

(DEFUN |PERMGRP;permutationGroup;L$;37| (|gp| $)
  (PROG (|group| |result|)
    (RETURN
     (SEQ
      (LETT |result| (VECTOR 0 NIL NIL #() NIL NIL)
            . #1=(|PERMGRP;permutationGroup;L$;37|))
      (EXIT (LETT |group| (CONS |gp| |result|) . #1#)))))) 

(DEFUN |PERMGRP;coerce;$Of;38| (|group| $)
  (PROG (|outList| |i| |gp|)
    (RETURN
     (SEQ (LETT |outList| NIL . #1=(|PERMGRP;coerce;$Of;38|))
          (LETT |gp| (QCAR |group|) . #1#)
          (SEQ (LETT |i| (SPADCALL |gp| (QREFELT $ 131)) . #1#) G190
               (COND ((< |i| 1) (GO G191)))
               (SEQ
                (EXIT
                 (LETT |outList|
                       (CONS
                        (SPADCALL (SPADCALL |gp| |i| (QREFELT $ 118))
                                  (QREFELT $ 133))
                        |outList|)
                       . #1#)))
               (LETT |i| (+ |i| -1) . #1#) (GO G190) G191 (EXIT NIL))
          (EXIT
           (SPADCALL (SPADCALL '> (QREFELT $ 135))
                     (SPADCALL (SPADCALL |outList| (QREFELT $ 137))
                               (SPADCALL '< (QREFELT $ 135)) (QREFELT $ 138))
                     (QREFELT $ 138))))))) 

(DEFUN |PERMGRP;orbit;$SS;39| (|gp| |el| $)
  (PROG (#1=#:G2180 |i| |outSet| |outList| |elList|)
    (RETURN
     (SEQ (LETT |elList| (LIST |el|) . #2=(|PERMGRP;orbit;$SS;39|))
          (LETT |outList| (|PERMGRP;orbitInternal| |gp| |elList| $) . #2#)
          (LETT |outSet| (SPADCALL (QREFELT $ 52)) . #2#)
          (SEQ (LETT |i| 1 . #2#) (LETT #1# (LENGTH |outList|) . #2#) G190
               (COND ((QSGREATERP |i| #1#) (GO G191)))
               (SEQ
                (EXIT
                 (SPADCALL
                  (SPADCALL (SPADCALL |outList| |i| (QREFELT $ 39)) 1
                            (QREFELT $ 40))
                  |outSet| (QREFELT $ 140))))
               (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT |outSet|))))) 

(DEFUN |PERMGRP;orbits;$S;40| (|gp| $)
  (PROG (|spp| |orbits| |orbitSet| |el|)
    (RETURN
     (SEQ
      (LETT |spp| (SPADCALL |gp| (QREFELT $ 121))
            . #1=(|PERMGRP;orbits;$S;40|))
      (LETT |orbits| NIL . #1#)
      (SEQ G190
           (COND ((NULL (< 0 (SPADCALL |spp| (QREFELT $ 142)))) (GO G191)))
           (SEQ (LETT |el| (SPADCALL |spp| (QREFELT $ 143)) . #1#)
                (LETT |orbitSet| (SPADCALL |gp| |el| (QREFELT $ 141)) . #1#)
                (LETT |orbits| (CONS |orbitSet| |orbits|) . #1#)
                (EXIT
                 (LETT |spp| (SPADCALL |spp| |orbitSet| (QREFELT $ 144))
                       . #1#)))
           NIL (GO G190) G191 (EXIT NIL))
      (EXIT (SPADCALL |orbits| (QREFELT $ 147))))))) 

(DEFUN |PERMGRP;member?;P$B;41| (|p| |gp| $)
  (PROG (|mi|)
    (RETURN
     (SEQ
      (LETT |mi| (|PERMGRP;memberInternal| |p| |gp| 'NIL $)
            |PERMGRP;member?;P$B;41|)
      (EXIT (QCAR |mi|)))))) 

(DEFUN |PERMGRP;wordInStrongGenerators;P$L;42| (|p| |gp| $)
  (PROG (|mi|)
    (RETURN
     (SEQ
      (LETT |mi|
            (|PERMGRP;memberInternal| (SPADCALL |p| (QREFELT $ 149)) |gp| 'T $)
            |PERMGRP;wordInStrongGenerators;P$L;42|)
      (COND ((NULL (QCAR |mi|)) (EXIT (|error| "p is not an element of gp"))))
      (EXIT (QCDR |mi|)))))) 

(DEFUN |PERMGRP;wordInGenerators;P$L;43| (|p| |gp| $)
  (PROG (|outlist| #1=#:G2197 |n| |words| |lll| |gpinfo|)
    (RETURN
     (SEQ (LETT |gpinfo| (QCDR |gp|) . #2=(|PERMGRP;wordInGenerators;P$L;43|))
          (COND
           ((EQL (LENGTH (QVELT |gpinfo| 5)) 0)
            (SPADCALL |gp| (QREFELT $ 151))))
          (LETT |lll| (SPADCALL |p| |gp| (QREFELT $ 150)) . #2#)
          (LETT |outlist| NIL . #2#) (LETT |words| (QVELT (QCDR |gp|) 5) . #2#)
          (SEQ (LETT |n| NIL . #2#) (LETT #1# |lll| . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |n| (CAR #1#) . #2#) NIL))
                 (GO G191)))
               (SEQ
                (EXIT
                 (LETT |outlist|
                       (APPEND |outlist| (SPADCALL |words| |n| (QREFELT $ 44)))
                       . #2#)))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT (|PERMGRP;shortenWord| |outlist| |gp| $)))))) 

(DEFUN |PERMGRP;<;2$B;44| (|gp1| |gp2| $)
  (COND
   ((NULL
     (SPADCALL
      (SPADCALL (SPADCALL |gp1| (QREFELT $ 121))
                (SPADCALL |gp2| (QREFELT $ 121)) (QREFELT $ 144))
      (QREFELT $ 153)))
    'NIL)
   ((NULL (|PERMGRP;subgroup| |gp1| |gp2| $)) 'NIL)
   ('T
    (COND
     ((EQL (SPADCALL |gp1| (QREFELT $ 125)) (SPADCALL |gp2| (QREFELT $ 125)))
      'NIL)
     ('T 'T))))) 

(DEFUN |PERMGRP;<=;2$B;45| (|gp1| |gp2| $)
  (COND
   ((NULL
     (SPADCALL
      (SPADCALL (SPADCALL |gp1| (QREFELT $ 121))
                (SPADCALL |gp2| (QREFELT $ 121)) (QREFELT $ 144))
      (QREFELT $ 153)))
    'NIL)
   ('T (|PERMGRP;subgroup| |gp1| |gp2| $)))) 

(DEFUN |PERMGRP;=;2$B;46| (|gp1| |gp2| $)
  (PROG (#1=#:G2212)
    (RETURN
     (SEQ
      (EXIT
       (COND
        ((NULL
          (SPADCALL (SPADCALL |gp1| (QREFELT $ 121))
                    (SPADCALL |gp2| (QREFELT $ 121)) (QREFELT $ 156)))
         'NIL)
        ('T
         (SEQ
          (COND
           ((< (LENGTH (QCAR |gp2|)) (LENGTH (QCAR |gp1|)))
            (COND
             ((NULL (|PERMGRP;subgroup| |gp2| |gp1| $))
              (EXIT
               (PROGN (LETT #1# 'NIL . #2=(|PERMGRP;=;2$B;46|)) (GO #1#))))))
           ((NULL (|PERMGRP;subgroup| |gp1| |gp2| $))
            (EXIT (PROGN (LETT #1# 'NIL . #2#) (GO #1#)))))
          (EXIT
           (COND
            ((EQL (SPADCALL |gp1| (QREFELT $ 125))
                  (SPADCALL |gp2| (QREFELT $ 125)))
             'T)
            ('T 'NIL)))))))
      #1# (EXIT #1#))))) 

(DEFUN |PERMGRP;orbit;$SS;47| (|gp| |startSet| $)
  (PROG (|newSet| #1=#:G2217 |i| |outSet| |outList| |startList|)
    (RETURN
     (SEQ
      (LETT |startList| (SPADCALL |startSet| (QREFELT $ 55))
            . #2=(|PERMGRP;orbit;$SS;47|))
      (LETT |outList| (|PERMGRP;orbitInternal| |gp| |startList| $) . #2#)
      (LETT |outSet| (SPADCALL (QREFELT $ 158)) . #2#)
      (SEQ (LETT |i| 1 . #2#) (LETT #1# (LENGTH |outList|) . #2#) G190
           (COND ((QSGREATERP |i| #1#) (GO G191)))
           (SEQ
            (LETT |newSet|
                  (SPADCALL (SPADCALL |outList| |i| (QREFELT $ 39))
                            (QREFELT $ 120))
                  . #2#)
            (EXIT (SPADCALL |newSet| |outSet| (QREFELT $ 159))))
           (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191 (EXIT NIL))
      (EXIT |outSet|))))) 

(DEFUN |PERMGRP;orbit;$LS;48| (|gp| |startList| $)
  (SPADCALL (|PERMGRP;orbitInternal| |gp| |startList| $) (QREFELT $ 162))) 

(DEFUN |PERMGRP;initializeGroupForWordProblem;$2IV;49|
       (|gp| |maxLoops| |diff| $)
  (SEQ (|PERMGRP;bsgs| |gp| 'T |maxLoops| |diff| $)
       (EXIT (SPADCALL (QREFELT $ 107))))) 

(DEFUN |PERMGRP;initializeGroupForWordProblem;$V;50| (|gp| $)
  (SPADCALL |gp| 0 1 (QREFELT $ 164))) 

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

(DEFUN |PermutationGroup;| (|#1|)
  (PROG (|pv$| $ |dv$| DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #1=(|PermutationGroup|))
      (LETT |dv$| (LIST '|PermutationGroup| DV$1) . #1#)
      (LETT $ (GETREFV 167) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|PermutationGroup| (LIST DV$1)
                  (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (SETF |pv$| (QREFELT $ 3))
      (QSETREFV $ 7
                (|Record| (|:| |gens| (|List| (|Permutation| |#1|)))
                          (|:| |information|
                               (|Record| (|:| |order| (|NonNegativeInteger|))
                                         (|:| |sgset|
                                              (|List|
                                               (|Vector|
                                                (|NonNegativeInteger|))))
                                         (|:| |gpbase|
                                              (|List| (|NonNegativeInteger|)))
                                         (|:| |orbs|
                                              (|Vector|
                                               (|Record|
                                                (|:| |orb|
                                                     (|List|
                                                      (|NonNegativeInteger|)))
                                                (|:| |svc|
                                                     (|Vector| (|Integer|))))))
                                         (|:| |mp| (|List| |#1|))
                                         (|:| |wd|
                                              (|List|
                                               (|List|
                                                (|NonNegativeInteger|))))))))
      (COND
       ((|HasCategory| |#1| '(|OrderedSet|))
        (QSETREFV $ 50
                  (CONS (|dispatchFunction| |PERMGRP;pointList;$L;11|) $)))
       ('T
        (QSETREFV $ 50
                  (CONS (|dispatchFunction| |PERMGRP;pointList;$L;12|) $))))
      (COND
       ((|HasCategory| |#1| '(|OrderedSet|))
        (PROGN
         (QSETREFV $ 69
                   (CONS (|dispatchFunction| |PERMGRP;permtovec;LPNniV;14|)
                         $))))
       ('T
        (QSETREFV $ 69
                  (CONS (|dispatchFunction| |PERMGRP;permtovec;LPNniV;15|)
                        $))))
      $)))) 

(MAKEPROP '|PermutationGroup| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) '|Rep| (|List| 11)
              |PERMGRP;coerce;$L;25| (|NonNegativeInteger|) (|Permutation| 6)
              (0 . |order|) (|List| 10) (5 . |copy|) (|Integer|)
              (10 . |maxIndex|) (15 . |elt|) (|Boolean|) (21 . |member?|)
              (27 . |position|) (33 . |delete|) (39 . |#|) (44 . |One|)
              (48 . |rest|) (|Vector| 10) (54 . |#|) (59 . |new|) (|Vector| 25)
              (65 . |elt|) (|Vector| 13) (71 . |elt|) (|List| 25)
              (77 . |vector|) (|List| 13) (82 . |vector|) (87 . |qelt|)
              (|List| 6) (|List| 37) (93 . |elt|) (99 . |elt|) (105 . |eval|)
              (111 . |member?|) (117 . |elt|) (123 . |elt|)
              (|Record| (|:| |preimage| 37) (|:| |image| 37))
              (129 . |listRepresentation|) (134 . |sort|) (139 . |merge|)
              (145 . =) (151 . |pointList|) (|Set| 6) (156 . |brace|)
              (160 . |movedPoints|) (165 . |union|) (171 . |parts|) (176 . <)
              (182 . |false|) (186 . |true|)
              (|Record| (|:| |preimage| 10) (|:| |image| 6))
              (|Mapping| 18 59 59) (|List| 59) (190 . |sort|) (196 . |first|)
              (201 . <) (|Mapping| 18 13 13) (207 . |sort|) (213 . |second|)
              (218 . |setelt|) (225 . |permtovec|) (232 . |position|)
              (|Vector| 15) (238 . |setelt|) (245 . |elt|) (251 . |member?|)
              (|List| 32) (|Reference| 75) (257 . |setref|) (|List| 34)
              (|Reference| 78) (263 . |setref|) (269 . |deref|) (274 . |deref|)
              (279 . |elt|) (|Mapping| 25 25) (285 . |map|)
              (|Record| (|:| |orb| 13) (|:| |svc| 71)) (|Vector| 86)
              (291 . |setelt|) (298 . |setelt|) (305 . |position|)
              (311 . |delete|) (317 . |elt|) (323 . |delete|) (329 . |setelt|)
              (336 . |ref|) (341 . |ref|) (346 . |list|) (351 . |elt|)
              (357 . |copy|) (362 . |list|) (367 . |list|) (|Set| 11)
              (372 . |brace|) (376 . |degree|) (381 . |insert!|) (|Void|)
              (387 . |void|) (391 . |difference|) (397 . |empty?|)
              (402 . |parts|) |PERMGRP;member?;P$B;41| (407 . |member?|)
              (413 . |member?|) (419 . |setelt|) |PERMGRP;generators;$L;26|
              (426 . |coerceListOfPairs|) |PERMGRP;strongGenerators;$L;27|
              (431 . |elt|) |PERMGRP;elt;$NniP;28| (437 . |brace|)
              |PERMGRP;movedPoints;$S;29| (442 . *) |PERMGRP;random;$IP;30|
              |PERMGRP;random;$P;31| |PERMGRP;order;$Nni;32|
              |PERMGRP;degree;$Nni;33| |PERMGRP;base;$L;34|
              |PERMGRP;wordsForStrongGenerators;$L;35| |PERMGRP;coerce;L$;36|
              |PERMGRP;permutationGroup;L$;37| (448 . |maxIndex|)
              (|OutputForm|) (453 . |coerce|) (|Symbol|) (458 . |outputForm|)
              (|List| $) (463 . |commaSeparate|) (468 . |postfix|)
              |PERMGRP;coerce;$Of;38| (474 . |insert!|) |PERMGRP;orbit;$SS;39|
              (480 . |cardinality|) (485 . |extract!|) (490 . |difference|)
              (|List| 51) (|Set| 51) (496 . |brace|) |PERMGRP;orbits;$S;40|
              (501 . |inv|) |PERMGRP;wordInStrongGenerators;P$L;42|
              |PERMGRP;initializeGroupForWordProblem;$V;50|
              |PERMGRP;wordInGenerators;P$L;43| (506 . |empty?|)
              |PERMGRP;<;2$B;44| |PERMGRP;<=;2$B;45| (511 . =)
              |PERMGRP;=;2$B;46| (517 . |brace|) (521 . |insert!|)
              |PERMGRP;orbit;$SS;47| (|Set| 37) (527 . |brace|)
              |PERMGRP;orbit;$LS;48|
              |PERMGRP;initializeGroupForWordProblem;$2IV;49| (|String|)
              (|SingleInteger|))
           '#(~= 532 |wordsForStrongGenerators| 538 |wordInStrongGenerators|
              543 |wordInGenerators| 549 |strongGenerators| 555 |random| 560
              |pointList| 571 |permutationGroup| 576 |permtovec| 581 |order|
              588 |orbits| 593 |orbit| 598 |movedPoints| 616 |member?| 621
              |latex| 627 |initializeGroupForWordProblem| 632 |hash| 644
              |generators| 649 |elt| 654 |degree| 660 |coerce| 665 |base| 680 =
              685 <= 691 < 697)
           'NIL
           (CONS (|makeByteWordVec2| 1 '(0 0 0))
                 (CONS '#(|SetCategory&| |BasicType&| NIL)
                       (CONS
                        '#((|SetCategory|) (|BasicType|) (|CoercibleTo| 132))
                        (|makeByteWordVec2| 166
                                            '(1 11 10 0 12 1 13 0 0 14 1 13 15
                                              0 16 2 13 10 0 15 17 2 13 18 10 0
                                              19 2 13 15 10 0 20 2 13 0 0 15 21
                                              1 13 10 0 22 0 11 0 23 2 13 0 0
                                              10 24 1 25 10 0 26 2 25 0 10 10
                                              27 2 28 25 0 15 29 2 30 13 0 15
                                              31 1 28 0 32 33 1 30 0 34 35 2 13
                                              10 0 15 36 2 38 37 0 15 39 2 37 6
                                              0 15 40 2 11 6 0 6 41 2 38 18 37
                                              0 42 2 32 25 0 15 43 2 34 13 0 15
                                              44 1 11 45 0 46 1 37 0 0 47 2 37
                                              0 0 0 48 2 6 18 0 0 49 1 0 37 0
                                              50 0 51 0 52 1 11 51 0 53 2 51 0
                                              0 0 54 1 51 37 0 55 2 6 18 0 0 56
                                              0 18 0 57 0 18 0 58 2 61 0 60 0
                                              62 1 13 10 0 63 2 10 18 0 0 64 2
                                              34 0 65 0 66 1 13 10 0 67 3 25 10
                                              0 15 10 68 3 0 25 37 11 10 69 2
                                              37 15 6 0 70 3 71 15 0 15 15 72 2
                                              25 10 0 15 73 2 32 18 25 0 74 2
                                              76 75 0 75 77 2 79 78 0 78 80 1
                                              76 75 0 81 1 79 78 0 82 2 75 32 0
                                              15 83 2 32 0 84 0 85 3 87 86 0 15
                                              86 88 3 75 32 0 15 32 89 2 32 15
                                              25 0 90 2 32 0 0 15 91 2 78 34 0
                                              15 92 2 34 0 0 15 93 3 78 34 0 15
                                              34 94 1 76 0 75 95 1 79 0 78 96 1
                                              13 0 10 97 2 87 86 0 15 98 1 25 0
                                              0 99 1 32 0 25 100 1 34 0 13 101
                                              0 102 0 103 1 11 10 0 104 2 102 0
                                              11 0 105 0 106 0 107 2 102 0 0 0
                                              108 1 102 18 0 109 1 102 8 0 110
                                              2 37 18 6 0 112 2 8 18 11 0 113 3
                                              30 13 0 15 13 114 1 11 0 38 116 2
                                              8 11 0 15 118 1 51 0 37 120 2 11
                                              0 0 0 122 1 8 15 0 131 1 11 132 0
                                              133 1 132 0 134 135 1 132 0 136
                                              137 2 132 0 0 0 138 2 51 0 6 0
                                              140 1 51 10 0 142 1 51 6 0 143 2
                                              51 0 0 0 144 1 146 0 145 147 1 11
                                              0 0 149 1 51 18 0 153 2 51 18 0 0
                                              156 0 146 0 158 2 146 0 51 0 159
                                              1 161 0 38 162 2 0 18 0 0 1 1 0
                                              34 0 128 2 0 13 11 0 150 2 0 13
                                              11 0 152 1 0 8 0 117 2 0 11 0 15
                                              123 1 0 11 0 124 1 0 37 0 50 1 0
                                              0 8 130 3 0 25 37 11 10 69 1 0 10
                                              0 125 1 0 146 0 148 2 0 161 0 37
                                              163 2 0 146 0 51 160 2 0 51 0 6
                                              141 1 0 51 0 121 2 0 18 11 0 111
                                              1 0 165 0 1 3 0 106 0 15 15 164 1
                                              0 106 0 151 1 0 166 0 1 1 0 8 0
                                              115 2 0 11 0 10 119 1 0 10 0 126
                                              1 0 0 8 129 1 0 8 0 9 1 0 132 0
                                              139 1 0 37 0 127 2 0 18 0 0 157 2
                                              0 18 0 0 155 2 0 18 0 0 154)))))
           '|lookupComplete|)) 
