
(/VERSIONCHECK 2) 

(DEFUN |SGCF;numberOfImproperPartitionsInternal| (|n| |m| |cm| $)
  (PROG (|s| #1=#:G673 |i|)
    (RETURN
     (SEQ
      (COND ((EQL |n| 0) (SPADCALL |m| |cm| (QREFELT $ 8)))
            ('T
             (SEQ (COND ((EQL |cm| 0) (COND ((< 0 |n|) (EXIT 0)))))
                  (LETT |s| 0 . #2=(|SGCF;numberOfImproperPartitionsInternal|))
                  (SEQ (LETT |i| 0 . #2#) (LETT #1# (- |n| 1) . #2#) G190
                       (COND ((QSGREATERP |i| #1#) (GO G191)))
                       (SEQ
                        (EXIT
                         (LETT |s|
                               (+ |s|
                                  (|SGCF;numberOfImproperPartitionsInternal|
                                   |i| |m| (- |cm| 1) $))
                               . #2#)))
                       (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191 (EXIT NIL))
                  (EXIT |s|)))))))) 

(DEFUN |SGCF;numberOfImproperPartitions;3I;2| (|n| |m| $)
  (PROG (|s| |i| #1=#:G676)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (COND
         ((OR (< |n| 0) (< |m| 1))
          (PROGN
           (LETT #1# 0 . #2=(|SGCF;numberOfImproperPartitions;3I;2|))
           (GO #1#))))
        (COND
         ((OR (EQL |m| 1) (EQL |n| 0)) (PROGN (LETT #1# 1 . #2#) (GO #1#))))
        (LETT |s| 0 . #2#)
        (SEQ (LETT |i| 0 . #2#) G190 (COND ((QSGREATERP |i| |n|) (GO G191)))
             (SEQ
              (EXIT
               (LETT |s| (+ |s| (SPADCALL (- |n| |i|) (- |m| 1) (QREFELT $ 9)))
                     . #2#)))
             (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191 (EXIT NIL))
        (EXIT |s|)))
      #1# (EXIT #1#))))) 

(DEFUN |SGCF;unrankImproperPartitions0;3IL;3| (|n| |m| |k| $)
  (PROG (|l| #1=#:G679 |s| |sOld| |y| #2=#:G685 |t|)
    (RETURN
     (SEQ (LETT |l| NIL . #3=(|SGCF;unrankImproperPartitions0;3IL;3|))
          (EXIT
           (COND ((< |k| 0) (|error| "counting of partitions is started at 0"))
                 ((NULL (< |k| (SPADCALL |n| |m| (QREFELT $ 9))))
                  (|error| "there are not so many partitions"))
                 ('T
                  (SEQ
                   (SEQ (LETT |t| 0 . #3#) (LETT #2# (- |m| 2) . #3#) G190
                        (COND ((QSGREATERP |t| #2#) #4=(GO G191)))
                        (SEQ (LETT |s| 0 . #3#)
                             (SEQ
                              (EXIT
                               (SEQ (LETT |y| 0 . #3#) G190
                                    (COND ((QSGREATERP |y| |n|) #4#))
                                    (SEQ (LETT |sOld| |s| . #3#)
                                         (LETT |s|
                                               (+ |s|
                                                  (SPADCALL (- |n| |y|)
                                                            (- (- |m| |t|) 1)
                                                            (QREFELT $ 9)))
                                               . #3#)
                                         (EXIT
                                          (COND
                                           ((< |k| |s|)
                                            (PROGN
                                             (LETT #1# |$NoValue| . #3#)
                                             (GO #1#))))))
                                    (LETT |y| (QSADD1 |y|) . #3#) #5=(GO G190)
                                    G191 (EXIT NIL)))
                              #1# (EXIT #1#))
                             (LETT |l|
                                   (APPEND |l| (SPADCALL |y| (QREFELT $ 11)))
                                   . #3#)
                             (LETT |k| (- |k| |sOld|) . #3#)
                             (EXIT (LETT |n| (- |n| |y|) . #3#)))
                        (LETT |t| (QSADD1 |t|) . #3#) #5# G191 (EXIT NIL))
                   (LETT |l| (APPEND |l| (SPADCALL |n| (QREFELT $ 11))) . #3#)
                   (EXIT |l|))))))))) 

(DEFUN |SGCF;unrankImproperPartitions1;3IL;4| (|n| |m| |k| $)
  (PROG (#1=#:G696 |i| |nonZeroPos| |nonZeros| #2=#:G689 |s| |sOld| |y| |cm|
         |partition| #3=#:G686)
    (RETURN
     (SEQ (LETT |nonZeros| NIL . #4=(|SGCF;unrankImproperPartitions1;3IL;4|))
          (LETT |partition|
                (SPADCALL
                 (PROG1 (LETT #3# |m| . #4#)
                   (|check-subtype| (>= #3# 0) '(|NonNegativeInteger|) #3#))
                 0 (QREFELT $ 15))
                . #4#)
          (EXIT
           (COND
            ((OR (< |k| 0) (NULL (< |k| (SPADCALL |n| |m| (QREFELT $ 9)))))
             |nonZeros|)
            ('T
             (SEQ (LETT |cm| |m| . #4#)
                  (SEQ G190
                       (COND
                        ((NULL (COND ((EQL |n| 0) 'NIL) ('T 'T)))
                         #5=(GO G191)))
                       (SEQ (LETT |s| 0 . #4#) (LETT |cm| (- |cm| 1) . #4#)
                            (SEQ
                             (EXIT
                              (SEQ (LETT |y| |n| . #4#) G190
                                   (COND ((< |y| 1) #5#))
                                   (SEQ (LETT |sOld| |s| . #4#)
                                        (LETT |s|
                                              (+ |s|
                                                 (|SGCF;numberOfImproperPartitionsInternal|
                                                  (- |n| |y|) |m| |cm| $))
                                              . #4#)
                                        (EXIT
                                         (COND
                                          ((< |k| |s|)
                                           (PROGN
                                            (LETT #2# |$NoValue| . #4#)
                                            (GO #2#))))))
                                   (LETT |y| (+ |y| -1) . #4#) #6=(GO G190)
                                   G191 (EXIT NIL)))
                             #2# (EXIT #2#))
                            (LETT |nonZeros|
                                  (APPEND |nonZeros|
                                          (SPADCALL |y| (QREFELT $ 11)))
                                  . #4#)
                            (LETT |k| (- |k| |sOld|) . #4#)
                            (EXIT (LETT |n| (- |n| |y|) . #4#)))
                       NIL #6# G191 (EXIT NIL))
                  (LETT |nonZeroPos|
                        (REVERSE
                         (SPADCALL |m| (- |m| |cm|) |k| (QREFELT $ 16)))
                        . #4#)
                  (SEQ (LETT |i| 1 . #4#) (LETT #1# (- |m| |cm|) . #4#) G190
                       (COND ((QSGREATERP |i| #1#) #5#))
                       (SEQ
                        (EXIT
                         (SPADCALL |partition|
                                   (+ 1
                                      (SPADCALL |nonZeroPos| |i|
                                                (QREFELT $ 17)))
                                   (SPADCALL |nonZeros| |i| (QREFELT $ 17))
                                   (QREFELT $ 18))))
                       (LETT |i| (QSADD1 |i|) . #4#) #6# G191 (EXIT NIL))
                  (EXIT (SPADCALL |partition| (QREFELT $ 19))))))))))) 

(DEFUN |SGCF;subSet;3IL;5| (|n| |m| |k| $)
  (PROG (|s| |mm| |l| #1=#:G698 #2=#:G706 |y| #3=#:G705 |t| |bin|)
    (RETURN
     (SEQ
      (COND
       ((OR (OR (OR (< |k| 0) (< |n| 0)) (< |m| 0)) (< |n| |m|))
        (|error| "improper argument to subSet"))
       ('T
        (SEQ
         (LETT |bin| (SPADCALL |n| |m| (QREFELT $ 8))
               . #4=(|SGCF;subSet;3IL;5|))
         (EXIT
          (COND
           ((< |k| |bin|)
            (SEQ (LETT |l| NIL . #4#)
                 (EXIT
                  (COND ((EQL |n| 0) |l|)
                        (#5='T
                         (SEQ (LETT |mm| |k| . #4#) (LETT |s| |m| . #4#)
                              (SEQ (LETT |t| 0 . #4#)
                                   (LETT #3# (- |m| 1) . #4#) G190
                                   (COND ((QSGREATERP |t| #3#) #6=(GO G191)))
                                   (SEQ
                                    (SEQ
                                     (EXIT
                                      (SEQ (LETT |y| (- |s| 1) . #4#)
                                           (LETT #2# (+ |n| 1) . #4#) G190
                                           (COND ((> |y| #2#) #6#))
                                           (SEQ
                                            (EXIT
                                             (COND
                                              ((< |mm|
                                                  (SPADCALL |y| |s|
                                                            (QREFELT $ 8)))
                                               (PROGN
                                                (LETT #1# |$NoValue| . #4#)
                                                (GO #1#))))))
                                           (LETT |y| (+ |y| 1) . #4#)
                                           #7=(GO G190) G191 (EXIT NIL)))
                                     #1# (EXIT #1#))
                                    (LETT |l|
                                          (APPEND |l|
                                                  (SPADCALL (- |y| 1)
                                                            (QREFELT $ 11)))
                                          . #4#)
                                    (LETT |mm|
                                          (- |mm|
                                             (SPADCALL (- |y| 1) |s|
                                                       (QREFELT $ 8)))
                                          . #4#)
                                    (EXIT (LETT |s| (- |s| 1) . #4#)))
                                   (LETT |t| (QSADD1 |t|) . #4#) #7# G191
                                   (EXIT NIL))
                              (EXIT |l|)))))))
           (#5# (|error| "there are not so many subsets"))))))))))) 

(DEFUN |SGCF;nextLatticePermutation;2LBL;6|
       (|lambda| |lattP| |constructNotFirst| $)
  (PROG (#1=#:G736 |l| |i| |rightPosition| #2=#:G725 |j| |ready| |leftEntry|
         #3=#:G717 |rightEntry| #4=#:G735 #5=#:G716 |help| |n| #6=#:G715
         #7=#:G713 #8=#:G712 #9=#:G714 #10=#:G734 #11=#:G661 |rows| #12=#:G708
         |columns| #13=#:G707 |lprime|)
    (RETURN
     (SEQ
      (LETT |lprime| (SPADCALL |lambda| (QREFELT $ 22))
            . #14=(|SGCF;nextLatticePermutation;2LBL;6|))
      (LETT |columns|
            (PROG1 (LETT #13# (|SPADfirst| |lambda|) . #14#)
              (|check-subtype| (>= #13# 0) '(|NonNegativeInteger|) #13#))
            . #14#)
      (LETT |rows|
            (PROG1 (LETT #12# (|SPADfirst| |lprime|) . #14#)
              (|check-subtype| (>= #12# 0) '(|NonNegativeInteger|) #12#))
            . #14#)
      (LETT |n|
            (PROG1
                (LETT #6#
                      (PROGN
                       (LETT #7# NIL . #14#)
                       (SEQ (LETT #11# NIL . #14#) (LETT #10# |lambda| . #14#)
                            G190
                            (COND
                             ((OR (ATOM #10#)
                                  (PROGN (LETT #11# (CAR #10#) . #14#) NIL))
                              #15=(GO G191)))
                            (SEQ
                             (EXIT
                              (PROGN
                               (LETT #9# #11# . #14#)
                               (COND (#7# (LETT #8# (+ #8# #9#) . #14#))
                                     ('T
                                      (PROGN
                                       (LETT #8# #9# . #14#)
                                       (LETT #7# 'T . #14#)))))))
                            (LETT #10# (CDR #10#) . #14#) #16=(GO G190) G191
                            (EXIT NIL))
                       (COND (#7# #8#) (#17='T 0)))
                      . #14#)
              (|check-subtype| (>= #6# 0) '(|NonNegativeInteger|) #6#))
            . #14#)
      (EXIT
       (COND
        (|constructNotFirst|
         (SEQ (LETT |help| (SPADCALL |columns| 0 (QREFELT $ 15)) . #14#)
              (LETT |rightPosition| |n| . #14#)
              (LETT |leftEntry|
                    (PROG1
                        (LETT #5#
                              (SPADCALL |lattP| |rightPosition| (QREFELT $ 17))
                              . #14#)
                      (|check-subtype| (>= #5# 0) '(|NonNegativeInteger|) #5#))
                    . #14#)
              (LETT |ready| 'NIL . #14#)
              (SEQ (LETT #4# NIL . #14#) G190 (COND (#4# #15#))
                   (SEQ (LETT |rightEntry| |leftEntry| . #14#)
                        (LETT |leftEntry|
                              (PROG1
                                  (LETT #3#
                                        (SPADCALL |lattP| (- |rightPosition| 1)
                                                  (QREFELT $ 17))
                                        . #14#)
                                (|check-subtype| (>= #3# 0)
                                                 '(|NonNegativeInteger|) #3#))
                              . #14#)
                        (SPADCALL |help| |rightEntry|
                                  (+
                                   (SPADCALL |help| |rightEntry|
                                             (QREFELT $ 23))
                                   1)
                                  (QREFELT $ 18))
                        (COND
                         ((< |leftEntry| |rightEntry|)
                          (COND
                           ((<
                             (+
                              (-
                               (SPADCALL |lprime| |rightEntry| (QREFELT $ 17))
                               (SPADCALL |help| |rightEntry| (QREFELT $ 23)))
                              1)
                             (- (SPADCALL |lprime| |leftEntry| (QREFELT $ 17))
                                (SPADCALL |help| |leftEntry| (QREFELT $ 23))))
                            (SEQ (LETT |ready| 'T . #14#)
                                 (LETT |j| (+ |leftEntry| 1) . #14#)
                                 (SEQ G190
                                      (COND
                                       ((NULL
                                         (COND
                                          ((EQL
                                            (SPADCALL |help| |j|
                                                      (QREFELT $ 23))
                                            0)
                                           'T)
                                          ('T
                                           (<
                                            (-
                                             (SPADCALL |lprime| |leftEntry|
                                                       (QREFELT $ 17))
                                             (SPADCALL |lprime| |j|
                                                       (QREFELT $ 17)))
                                            (+
                                             (-
                                              (SPADCALL |help| |leftEntry|
                                                        (QREFELT $ 23))
                                              (SPADCALL |help| |j|
                                                        (QREFELT $ 23)))
                                             2)))))
                                        #15#))
                                      (SEQ (EXIT (LETT |j| (+ |j| 1) . #14#)))
                                      NIL #16# G191 (EXIT NIL))
                                 (SPADCALL |lattP| (- |rightPosition| 1) |j|
                                           (QREFELT $ 24))
                                 (SPADCALL |help| |j|
                                           (-
                                            (SPADCALL |help| |j|
                                                      (QREFELT $ 23))
                                            1)
                                           (QREFELT $ 18))
                                 (SPADCALL |help| |leftEntry|
                                           (+
                                            (SPADCALL |help| |leftEntry|
                                                      (QREFELT $ 23))
                                            1)
                                           (QREFELT $ 18))
                                 (EXIT
                                  (SEQ (LETT |l| |rightPosition| . #14#) G190
                                       (COND ((> |l| |n|) #15#))
                                       (SEQ (LETT |j| 0 . #14#)
                                            (SEQ G190
                                                 (COND
                                                  ((NULL
                                                    (EQL
                                                     (SPADCALL |help| (+ 1 |j|)
                                                               (QREFELT $ 23))
                                                     0))
                                                   #15#))
                                                 (SEQ
                                                  (EXIT
                                                   (LETT |j| (+ |j| 1)
                                                         . #14#)))
                                                 NIL #16# G191 (EXIT NIL))
                                            (SPADCALL |lattP| |l| (+ |j| 1)
                                                      (QREFELT $ 24))
                                            (EXIT
                                             (SPADCALL |help| (+ 1 |j|)
                                                       (-
                                                        (SPADCALL |help|
                                                                  (+ 1 |j|)
                                                                  (QREFELT $
                                                                           23))
                                                        1)
                                                       (QREFELT $ 18))))
                                       (LETT |l| (+ |l| 1) . #14#) #16# G191
                                       (EXIT NIL))))))))
                        (LETT |rightPosition|
                              (PROG1 (LETT #2# (- |rightPosition| 1) . #14#)
                                (|check-subtype| (>= #2# 0)
                                                 '(|NonNegativeInteger|) #2#))
                              . #14#)
                        (EXIT
                         (COND
                          ((EQL |rightPosition| 1)
                           (LETT |constructNotFirst| 'NIL . #14#)))))
                   (LETT #4#
                         (COND ((OR |ready| (NULL |constructNotFirst|)) 'T)
                               ('T 'NIL))
                         . #14#)
                   #16# G191 (EXIT NIL))
              (EXIT (COND (|constructNotFirst| |lattP|) (#17# NIL)))))
        (#17#
         (SEQ (LETT |lattP| NIL . #14#)
              (SEQ (LETT |i| |columns| . #14#) G190 (COND ((< |i| 1) #15#))
                   (SEQ
                    (EXIT
                     (SEQ (LETT |l| 1 . #14#)
                          (LETT #1# (SPADCALL |lprime| |i| (QREFELT $ 17))
                                . #14#)
                          G190 (COND ((QSGREATERP |l| #1#) #15#))
                          (SEQ (EXIT (LETT |lattP| (CONS |i| |lattP|) . #14#)))
                          (LETT |l| (QSADD1 |l|) . #14#) #16# G191
                          (EXIT NIL))))
                   (LETT |i| (+ |i| -1) . #14#) #16# G191 (EXIT NIL))
              (EXIT |lattP|))))))))) 

(DEFUN |SGCF;makeYoungTableau;2LM;7| (|lambda| |gitter| $)
  (PROG (|i| |j| #1=#:G743 |l| |help| |ytab| |rows| #2=#:G738 |columns|
         #3=#:G737 |lprime|)
    (RETURN
     (SEQ
      (LETT |lprime| (SPADCALL |lambda| (QREFELT $ 22))
            . #4=(|SGCF;makeYoungTableau;2LM;7|))
      (LETT |columns|
            (PROG1 (LETT #3# (|SPADfirst| |lambda|) . #4#)
              (|check-subtype| (>= #3# 0) '(|NonNegativeInteger|) #3#))
            . #4#)
      (LETT |rows|
            (PROG1 (LETT #2# (|SPADfirst| |lprime|) . #4#)
              (|check-subtype| (>= #2# 0) '(|NonNegativeInteger|) #2#))
            . #4#)
      (LETT |ytab| (SPADCALL |rows| |columns| 0 (QREFELT $ 28)) . #4#)
      (LETT |help| (SPADCALL |columns| 1 (QREFELT $ 15)) . #4#)
      (LETT |i| -1 . #4#) (LETT |j| 0 . #4#)
      (SEQ (LETT |l| 1 . #4#)
           (LETT #1# (SPADCALL |gitter| (QREFELT $ 29)) . #4#) G190
           (COND ((QSGREATERP |l| #1#) (GO G191)))
           (SEQ (LETT |j| (SPADCALL |gitter| |l| (QREFELT $ 17)) . #4#)
                (LETT |i| (+ |i| 1) . #4#)
                (SPADCALL |ytab| (SPADCALL |help| |j| (QREFELT $ 23)) |j| |i|
                          (QREFELT $ 30))
                (EXIT
                 (SPADCALL |help| |j|
                           (+ (SPADCALL |help| |j| (QREFELT $ 23)) 1)
                           (QREFELT $ 18))))
           (LETT |l| (QSADD1 |l|) . #4#) (GO G190) G191 (EXIT NIL))
      (EXIT |ytab|))))) 

(DEFUN |SGCF;listYoungTableaus;LL;8| (|lambda| $)
  (PROG (|lattice| |younglist| |ytab| #1=#:G748)
    (RETURN
     (SEQ (LETT |younglist| NIL . #2=(|SGCF;listYoungTableaus;LL;8|))
          (LETT |lattice| (SPADCALL |lambda| |lattice| 'NIL (QREFELT $ 26))
                . #2#)
          (SEQ (LETT #1# NIL . #2#) G190 (COND (#1# (GO G191)))
               (SEQ
                (LETT |ytab| (SPADCALL |lambda| |lattice| (QREFELT $ 31))
                      . #2#)
                (LETT |younglist| (APPEND |younglist| (LIST |ytab|)) . #2#)
                (EXIT
                 (LETT |lattice|
                       (SPADCALL |lambda| |lattice| 'T (QREFELT $ 26)) . #2#)))
               (LETT #1# (NULL |lattice|) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT |younglist|))))) 

(DEFUN |SGCF;nextColeman;2L2M;9| (|alpha| |beta| C $)
  (PROG (|vrest| |coleman| |succ| #1=#:G762 |i| #2=#:G756 |j| #3=#:G751
         #4=#:G761 #5=#:G750 |cnull| |vzero| |vnull| |ncol| |nrow|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |nrow| (LENGTH |beta|) . #6=(|SGCF;nextColeman;2L2M;9|))
            (LETT |ncol| (LENGTH |alpha|) . #6#)
            (LETT |vnull| (SPADCALL NIL (QREFELT $ 34)) . #6#)
            (LETT |vzero| (SPADCALL |ncol| 0 (QREFELT $ 15)) . #6#)
            (LETT |vrest| (SPADCALL |ncol| 0 (QREFELT $ 15)) . #6#)
            (LETT |cnull| (SPADCALL 1 1 0 (QREFELT $ 28)) . #6#)
            (LETT |coleman| (SPADCALL C (QREFELT $ 35)) . #6#)
            (COND
             ((SPADCALL |coleman| |cnull| (QREFELT $ 36))
              (SEQ (LETT |vrest| (SPADCALL |alpha| (QREFELT $ 34)) . #6#)
                   (LETT |coleman| (SPADCALL |nrow| |ncol| 0 (QREFELT $ 28))
                         . #6#)
                   (EXIT (LETT |j| 0 . #6#))))
             ('T
              (SEQ
               (LETT |i|
                     (PROG1 (LETT #5# (- |nrow| 1) . #6#)
                       (|check-subtype| (>= #5# 0) '(|NonNegativeInteger|)
                                        #5#))
                     . #6#)
               (LETT |vrest|
                     (SPADCALL (SPADCALL |coleman| |i| (QREFELT $ 37))
                               (SPADCALL |coleman| |nrow| (QREFELT $ 37))
                               (QREFELT $ 38))
                     . #6#)
               (LETT |succ|
                     (SPADCALL |vrest| (SPADCALL |coleman| |i| (QREFELT $ 37))
                               (SPADCALL |beta| |i| (QREFELT $ 17))
                               (QREFELT $ 39))
                     . #6#)
               (SEQ G190
                    (COND
                     ((NULL (SPADCALL |succ| |vnull| (QREFELT $ 40)))
                      #7=(GO G191)))
                    (SEQ
                     (COND
                      ((EQL |i| 1) (PROGN (LETT #4# |cnull| . #6#) (GO #4#))))
                     (LETT |i|
                           (PROG1 (LETT #3# (- |i| 1) . #6#)
                             (|check-subtype| (>= #3# 0)
                                              '(|NonNegativeInteger|) #3#))
                           . #6#)
                     (LETT |vrest|
                           (SPADCALL |vrest|
                                     (SPADCALL |coleman| |i| (QREFELT $ 37))
                                     (QREFELT $ 38))
                           . #6#)
                     (EXIT
                      (LETT |succ|
                            (SPADCALL |vrest|
                                      (SPADCALL |coleman| |i| (QREFELT $ 37))
                                      (SPADCALL |beta| |i| (QREFELT $ 17))
                                      (QREFELT $ 39))
                            . #6#)))
                    NIL #8=(GO G190) G191 (EXIT NIL))
               (LETT |j| |i| . #6#)
               (LETT |coleman| (SPADCALL |coleman| |i| |succ| (QREFELT $ 41))
                     . #6#)
               (EXIT
                (LETT |vrest|
                      (SPADCALL |vrest| (SPADCALL |coleman| |i| (QREFELT $ 37))
                                (QREFELT $ 42))
                      . #6#)))))
            (SEQ
             (LETT |i|
                   (PROG1 (LETT #2# (+ |j| 1) . #6#)
                     (|check-subtype| (>= #2# 0) '(|NonNegativeInteger|) #2#))
                   . #6#)
             (LETT #1# (- |nrow| 1) . #6#) G190 (COND ((> |i| #1#) #7#))
             (SEQ
              (LETT |succ|
                    (SPADCALL |vrest| |vnull|
                              (SPADCALL |beta| |i| (QREFELT $ 17))
                              (QREFELT $ 39))
                    . #6#)
              (LETT |coleman| (SPADCALL |coleman| |i| |succ| (QREFELT $ 41))
                    . #6#)
              (EXIT
               (LETT |vrest| (SPADCALL |vrest| |succ| (QREFELT $ 42)) . #6#)))
             (LETT |i| (+ |i| 1) . #6#) #8# G191 (EXIT NIL))
            (EXIT (SPADCALL |coleman| |nrow| |vrest| (QREFELT $ 41)))))
      #4# (EXIT #4#))))) 

(DEFUN |SGCF;nextPartition;2VIV;10| (|gamma| |part| |number| $)
  (SPADCALL (SPADCALL |gamma| (QREFELT $ 19)) |part| |number| (QREFELT $ 44))) 

(DEFUN |SGCF;nextPartition;LVIV;11| (|gamma| |part| |number| $)
  (PROG (#1=#:G774 |k| |j| |sum| #2=#:G773 |i| |vnull| |n|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |n| (LENGTH |gamma|) . #3=(|SGCF;nextPartition;LVIV;11|))
            (LETT |vnull| (SPADCALL NIL (QREFELT $ 34)) . #3#)
            (COND
             ((SPADCALL |part| |vnull| (QREFELT $ 40))
              (SEQ (LETT |sum| |number| . #3#)
                   (LETT |part| (SPADCALL |n| 0 (QREFELT $ 15)) . #3#)
                   (EXIT (LETT |i| (+ 1 |n|) . #3#))))
             ('T
              (SEQ (LETT |i| 2 . #3#)
                   (LETT |sum| (SPADCALL |part| 1 (QREFELT $ 23)) . #3#)
                   (SEQ G190
                        (COND
                         ((NULL
                           (COND
                            ((EQL (SPADCALL |part| |i| (QREFELT $ 23))
                                  (SPADCALL |gamma| |i| (QREFELT $ 17)))
                             'T)
                            ('T (EQL |sum| 0))))
                          #4=(GO G191)))
                        (SEQ
                         (LETT |sum|
                               (+ |sum| (SPADCALL |part| |i| (QREFELT $ 23)))
                               . #3#)
                         (LETT |i| (+ |i| 1) . #3#)
                         (EXIT
                          (COND
                           ((EQL |i| (+ 1 |n|))
                            (PROGN (LETT #2# |vnull| . #3#) (GO #2#))))))
                        NIL #5=(GO G190) G191 (EXIT NIL))
                   (LETT |sum| (- |sum| 1) . #3#)
                   (EXIT
                    (SPADCALL |part| |i|
                              (+ (SPADCALL |part| |i| (QREFELT $ 23)) 1)
                              (QREFELT $ 18))))))
            (LETT |j| 1 . #3#)
            (SEQ G190
                 (COND
                  ((NULL (< (SPADCALL |gamma| |j| (QREFELT $ 17)) |sum|)) #4#))
                 (SEQ
                  (SPADCALL |part| |j| (SPADCALL |gamma| |j| (QREFELT $ 17))
                            (QREFELT $ 18))
                  (LETT |sum| (- |sum| (SPADCALL |gamma| |j| (QREFELT $ 17)))
                        . #3#)
                  (EXIT (LETT |j| (+ |j| 1) . #3#)))
                 NIL #5# G191 (EXIT NIL))
            (SPADCALL |part| |j| |sum| (QREFELT $ 18))
            (SEQ (LETT |k| (+ |j| 1) . #3#) (LETT #1# (- |i| 1) . #3#) G190
                 (COND ((> |k| #1#) #4#))
                 (SEQ (EXIT (SPADCALL |part| |k| 0 (QREFELT $ 18))))
                 (LETT |k| (+ |k| 1) . #3#) #5# G191 (EXIT NIL))
            (EXIT |part|)))
      #2# (EXIT #2#))))) 

(DEFUN |SGCF;inverseColeman;2LML;12| (|alpha| |beta| C $)
  (PROG (|pi| #1=#:G783 |k| |i| |j| |sum| |help| |ncol| |nrow|)
    (RETURN
     (SEQ (LETT |pi| NIL . #2=(|SGCF;inverseColeman;2LML;12|))
          (LETT |nrow| (LENGTH |beta|) . #2#)
          (LETT |ncol| (LENGTH |alpha|) . #2#)
          (LETT |help| (SPADCALL |nrow| 0 (QREFELT $ 15)) . #2#)
          (LETT |sum| 1 . #2#)
          (SEQ (LETT |i| 1 . #2#) G190
               (COND ((QSGREATERP |i| |nrow|) #3=(GO G191)))
               (SEQ (SPADCALL |help| |i| |sum| (QREFELT $ 18))
                    (EXIT
                     (LETT |sum| (+ |sum| (SPADCALL |beta| |i| (QREFELT $ 17)))
                           . #2#)))
               (LETT |i| (QSADD1 |i|) . #2#) #4=(GO G190) G191 (EXIT NIL))
          (SEQ (LETT |j| 1 . #2#) G190 (COND ((QSGREATERP |j| |ncol|) #3#))
               (SEQ
                (EXIT
                 (SEQ (LETT |i| 1 . #2#) G190
                      (COND ((QSGREATERP |i| |nrow|) #3#))
                      (SEQ
                       (EXIT
                        (SEQ (LETT |k| 2 . #2#)
                             (LETT #1#
                                   (+ 1 (SPADCALL C |i| |j| (QREFELT $ 45)))
                                   . #2#)
                             G190 (COND ((QSGREATERP |k| #1#) #3#))
                             (SEQ
                              (LETT |pi|
                                    (APPEND |pi|
                                            (SPADCALL
                                             (SPADCALL |help| |i|
                                                       (QREFELT $ 23))
                                             (QREFELT $ 11)))
                                    . #2#)
                              (EXIT
                               (SPADCALL |help| |i|
                                         (+
                                          (SPADCALL |help| |i| (QREFELT $ 23))
                                          1)
                                         (QREFELT $ 18))))
                             (LETT |k| (QSADD1 |k|) . #2#) #4# G191
                             (EXIT NIL))))
                      (LETT |i| (QSADD1 |i|) . #2#) #4# G191 (EXIT NIL))))
               (LETT |j| (QSADD1 |j|) . #2#) #4# G191 (EXIT NIL))
          (EXIT |pi|))))) 

(DEFUN |SGCF;coleman;3LM;13| (|alpha| |beta| |pi| $)
  (PROG (|j| |betasum| #1=#:G791 |help| #2=#:G789 |i| |temp| |alphasum|
         #3=#:G786 #4=#:G784 |colematrix| |ncol| |nrow|)
    (RETURN
     (SEQ (LETT |nrow| (LENGTH |beta|) . #5=(|SGCF;coleman;3LM;13|))
          (LETT |ncol| (LENGTH |alpha|) . #5#) (LETT |temp| NIL . #5#)
          (LETT |help| NIL . #5#)
          (LETT |colematrix| (SPADCALL |nrow| |ncol| 0 (QREFELT $ 28)) . #5#)
          (LETT |betasum| 0 . #5#) (LETT |alphasum| 0 . #5#)
          (SEQ (LETT |i| 1 . #5#) G190
               (COND ((QSGREATERP |i| |ncol|) #6=(GO G191)))
               (SEQ (LETT |help| NIL . #5#)
                    (SEQ (LETT |j| (SPADCALL |alpha| |i| (QREFELT $ 17)) . #5#)
                         G190 (COND ((< |j| 1) #6#))
                         (SEQ
                          (EXIT
                           (LETT |help|
                                 (CONS
                                  (SPADCALL |pi|
                                            (+
                                             (PROG1 (LETT #4# |j| . #5#)
                                               (|check-subtype| (>= #4# 0)
                                                                '(|NonNegativeInteger|)
                                                                #4#))
                                             |alphasum|)
                                            (QREFELT $ 17))
                                  |help|)
                                 . #5#)))
                         (LETT |j| (+ |j| -1) . #5#) #7=(GO G190) G191
                         (EXIT NIL))
                    (LETT |alphasum|
                          (PROG1
                              (LETT #3#
                                    (+ |alphasum|
                                       (SPADCALL |alpha| |i| (QREFELT $ 17)))
                                    . #5#)
                            (|check-subtype| (>= #3# 0) '(|NonNegativeInteger|)
                                             #3#))
                          . #5#)
                    (EXIT
                     (LETT |temp|
                           (APPEND |temp| (SPADCALL |help| (QREFELT $ 48)))
                           . #5#)))
               (LETT |i| (QSADD1 |i|) . #5#) #7# G191 (EXIT NIL))
          (SEQ (LETT |i| 1 . #5#) G190 (COND ((QSGREATERP |i| |nrow|) #6#))
               (SEQ (LETT |help| NIL . #5#)
                    (SEQ (LETT |j| (SPADCALL |beta| |i| (QREFELT $ 17)) . #5#)
                         G190 (COND ((< |j| 1) #6#))
                         (SEQ
                          (EXIT
                           (LETT |help|
                                 (CONS
                                  (+
                                   (PROG1 (LETT #2# |j| . #5#)
                                     (|check-subtype| (>= #2# 0)
                                                      '(|NonNegativeInteger|)
                                                      #2#))
                                   |betasum|)
                                  |help|)
                                 . #5#)))
                         (LETT |j| (+ |j| -1) . #5#) #7# G191 (EXIT NIL))
                    (LETT |betasum|
                          (PROG1
                              (LETT #1#
                                    (+ |betasum|
                                       (SPADCALL |beta| |i| (QREFELT $ 17)))
                                    . #5#)
                            (|check-subtype| (>= #1# 0) '(|NonNegativeInteger|)
                                             #1#))
                          . #5#)
                    (EXIT
                     (SEQ (LETT |j| 1 . #5#) G190
                          (COND ((QSGREATERP |j| |ncol|) #6#))
                          (SEQ
                           (EXIT
                            (SPADCALL |colematrix| |i| |j|
                                      (SPADCALL
                                       (SPADCALL
                                        (SPADCALL |help| (QREFELT $ 50))
                                        (SPADCALL
                                         (SPADCALL |temp| |j| (QREFELT $ 51))
                                         (QREFELT $ 50))
                                        (QREFELT $ 52))
                                       (QREFELT $ 53))
                                      (QREFELT $ 30))))
                          (LETT |j| (QSADD1 |j|) . #5#) #7# G191 (EXIT NIL))))
               (LETT |i| (QSADD1 |i|) . #5#) #7# G191 (EXIT NIL))
          (EXIT |colematrix|))))) 

(DEFUN |SymmetricGroupCombinatoricFunctions| #1=()
  (PROG #1#
    (RETURN
     (PROG (#2=#:G798)
       (RETURN
        (COND
         ((LETT #2#
                (HGET |$ConstructorCache|
                      '|SymmetricGroupCombinatoricFunctions|)
                . #3=(|SymmetricGroupCombinatoricFunctions|))
          (|CDRwithIncrement| (CDAR #2#)))
         ('T
          (UNWIND-PROTECT
              (PROG1
                  (CDDAR
                   (HPUT |$ConstructorCache|
                         '|SymmetricGroupCombinatoricFunctions|
                         (LIST
                          (CONS NIL
                                (CONS 1
                                      (|SymmetricGroupCombinatoricFunctions;|))))))
                (LETT #2# T . #3#))
            (COND
             ((NOT #2#)
              (HREM |$ConstructorCache|
                    '|SymmetricGroupCombinatoricFunctions|))))))))))) 

(DEFUN |SymmetricGroupCombinatoricFunctions;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
     (PROGN
      (LETT |dv$| '(|SymmetricGroupCombinatoricFunctions|)
            . #1=(|SymmetricGroupCombinatoricFunctions|))
      (LETT $ (GETREFV 55) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|SymmetricGroupCombinatoricFunctions|
                  NIL (CONS 1 $))
      (|stuffDomainSlots| $)
      $)))) 

(MAKEPROP '|SymmetricGroupCombinatoricFunctions| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|Integer|)
              (|IntegerCombinatoricFunctions| 6) (0 . |binomial|)
              |SGCF;numberOfImproperPartitions;3I;2| (|List| 6) (6 . |list|)
              |SGCF;unrankImproperPartitions0;3IL;3| (|NonNegativeInteger|)
              (|Vector| 6) (11 . |new|) |SGCF;subSet;3IL;5| (17 . |elt|)
              (23 . |setelt|) (30 . |entries|)
              |SGCF;unrankImproperPartitions1;3IL;4|
              (|PartitionsAndPermutations|) (35 . |conjugate|) (40 . |elt|)
              (46 . |setelt|) (|Boolean|) |SGCF;nextLatticePermutation;2LBL;6|
              (|Matrix| 6) (53 . |new|) (60 . |maxIndex|) (65 . |setelt|)
              |SGCF;makeYoungTableau;2LM;7| (|List| 27)
              |SGCF;listYoungTableaus;LL;8| (73 . |vector|) (78 . |copy|)
              (83 . =) (89 . |row|) (95 . +) |SGCF;nextPartition;2VIV;10|
              (101 . =) (107 . |setRow!|) (114 . -) |SGCF;nextColeman;2L2M;9|
              |SGCF;nextPartition;LVIV;11| (120 . |elt|)
              |SGCF;inverseColeman;2LML;12| (|List| 10) (127 . |list|)
              (|Set| 6) (132 . |brace|) (137 . |elt|) (143 . |intersect|)
              (149 . |#|) |SGCF;coleman;3LM;13|)
           '#(|unrankImproperPartitions1| 154 |unrankImproperPartitions0| 161
              |subSet| 168 |numberOfImproperPartitions| 175 |nextPartition| 181
              |nextLatticePermutation| 195 |nextColeman| 202 |makeYoungTableau|
              209 |listYoungTableaus| 215 |inverseColeman| 220 |coleman| 227)
           'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 54
                                                 '(2 7 6 6 6 8 1 10 0 6 11 2 14
                                                   0 13 6 15 2 10 6 0 6 17 3 14
                                                   6 0 6 6 18 1 14 10 0 19 1 21
                                                   10 10 22 2 14 6 0 6 23 3 10
                                                   6 0 6 6 24 3 27 0 13 13 6 28
                                                   1 10 6 0 29 4 27 6 0 6 6 6
                                                   30 1 14 0 10 34 1 27 0 0 35
                                                   2 27 25 0 0 36 2 27 14 0 6
                                                   37 2 14 0 0 0 38 2 14 25 0 0
                                                   40 3 27 0 0 6 14 41 2 14 0 0
                                                   0 42 3 27 6 0 6 6 45 1 47 0
                                                   10 48 1 49 0 10 50 2 47 10 0
                                                   6 51 2 49 0 0 0 52 1 49 13 0
                                                   53 3 0 10 6 6 6 20 3 0 10 6
                                                   6 6 12 3 0 10 6 6 6 16 2 0 6
                                                   6 6 9 3 0 14 14 14 6 39 3 0
                                                   14 10 14 6 44 3 0 10 10 10
                                                   25 26 3 0 27 10 10 27 43 2 0
                                                   27 10 10 31 1 0 32 10 33 3 0
                                                   10 10 10 27 46 3 0 27 10 10
                                                   10 54)))))
           '|lookupComplete|)) 

(MAKEPROP '|SymmetricGroupCombinatoricFunctions| 'NILADIC T) 
