
(/VERSIONCHECK 2) 

(DEFUN |SGCF;numberOfImproperPartitionsInternal| (|n| |m| |cm| $)
  (PROG (|s| #1=#:G1806 |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=#:G1809)
    (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=#:G1816 |s| |sOld| |y| #2=#:G1826 |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=#:G1845 |i| |nonZeroPos| |nonZeros| #2=#:G1830 |s| |sOld| |y| |cm|
         |partition| #3=#:G1827)
    (RETURN
     (SEQ (LETT |nonZeros| NIL . #4=(|SGCF;unrankImproperPartitions1;3IL;4|))
          (LETT |partition|
                (MAKEARR1
                 (PROG1 (LETT #3# |m| . #4#)
                   (|check-subtype| (>= #3# 0) '(|NonNegativeInteger|) #3#))
                 0)
                . #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 $ 13)))
                        . #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 $ 14)))
                                   (SPADCALL |nonZeros| |i| (QREFELT $ 14))
                                   (QREFELT $ 16))))
                       (LETT |i| (QSADD1 |i|) . #4#) #6# G191 (EXIT NIL))
                  (EXIT (SPADCALL |partition| (QREFELT $ 17))))))))))) 

(DEFUN |SGCF;subSet;3IL;5| (|n| |m| |k| $)
  (PROG (|s| |mm| |l| #1=#:G1847 #2=#:G1855 |y| #3=#:G1854 |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=#:G1885 |l| |i| |rightPosition| #2=#:G1874 |j| |ready| |leftEntry|
         #3=#:G1866 |rightEntry| #4=#:G1884 #5=#:G1865 |help| |n| #6=#:G1864
         #7=#:G1862 #8=#:G1861 #9=#:G1863 #10=#:G1883 #11=#:G1792 |rows|
         #12=#:G1857 |columns| #13=#:G1856 |lprime|)
    (RETURN
     (SEQ
      (LETT |lprime| (SPADCALL |lambda| (QREFELT $ 20))
            . #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| (MAKEARR1 |columns| 0) . #14#)
              (LETT |rightPosition| |n| . #14#)
              (LETT |leftEntry|
                    (PROG1
                        (LETT #5#
                              (SPADCALL |lattP| |rightPosition| (QREFELT $ 14))
                              . #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 $ 14))
                                        . #14#)
                                (|check-subtype| (>= #3# 0)
                                                 '(|NonNegativeInteger|) #3#))
                              . #14#)
                        (SPADCALL |help| |rightEntry|
                                  (+
                                   (SPADCALL |help| |rightEntry|
                                             (QREFELT $ 21))
                                   1)
                                  (QREFELT $ 16))
                        (COND
                         ((< |leftEntry| |rightEntry|)
                          (COND
                           ((<
                             (+
                              (-
                               (SPADCALL |lprime| |rightEntry| (QREFELT $ 14))
                               (SPADCALL |help| |rightEntry| (QREFELT $ 21)))
                              1)
                             (- (SPADCALL |lprime| |leftEntry| (QREFELT $ 14))
                                (SPADCALL |help| |leftEntry| (QREFELT $ 21))))
                            (SEQ (LETT |ready| 'T . #14#)
                                 (LETT |j| (+ |leftEntry| 1) . #14#)
                                 (SEQ G190
                                      (COND
                                       ((NULL
                                         (COND
                                          ((EQL
                                            (SPADCALL |help| |j|
                                                      (QREFELT $ 21))
                                            0)
                                           'T)
                                          ('T
                                           (<
                                            (-
                                             (SPADCALL |lprime| |leftEntry|
                                                       (QREFELT $ 14))
                                             (SPADCALL |lprime| |j|
                                                       (QREFELT $ 14)))
                                            (+
                                             (-
                                              (SPADCALL |help| |leftEntry|
                                                        (QREFELT $ 21))
                                              (SPADCALL |help| |j|
                                                        (QREFELT $ 21)))
                                             2)))))
                                        #15#))
                                      (SEQ (EXIT (LETT |j| (+ |j| 1) . #14#)))
                                      NIL #16# G191 (EXIT NIL))
                                 (SPADCALL |lattP| (- |rightPosition| 1) |j|
                                           (QREFELT $ 22))
                                 (SPADCALL |help| |j|
                                           (-
                                            (SPADCALL |help| |j|
                                                      (QREFELT $ 21))
                                            1)
                                           (QREFELT $ 16))
                                 (SPADCALL |help| |leftEntry|
                                           (+
                                            (SPADCALL |help| |leftEntry|
                                                      (QREFELT $ 21))
                                            1)
                                           (QREFELT $ 16))
                                 (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 $ 21))
                                                     0))
                                                   #15#))
                                                 (SEQ
                                                  (EXIT
                                                   (LETT |j| (+ |j| 1)
                                                         . #14#)))
                                                 NIL #16# G191 (EXIT NIL))
                                            (SPADCALL |lattP| |l| (+ |j| 1)
                                                      (QREFELT $ 22))
                                            (EXIT
                                             (SPADCALL |help| (+ 1 |j|)
                                                       (-
                                                        (SPADCALL |help|
                                                                  (+ 1 |j|)
                                                                  (QREFELT $
                                                                           21))
                                                        1)
                                                       (QREFELT $ 16))))
                                       (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 $ 14))
                                . #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=#:G1893 |l| |help| |ytab| |rows| #2=#:G1888 |columns|
         #3=#:G1887 |lprime|)
    (RETURN
     (SEQ
      (LETT |lprime| (SPADCALL |lambda| (QREFELT $ 20))
            . #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 $ 27)) . #4#)
      (LETT |help| (MAKEARR1 |columns| 1) . #4#) (LETT |i| -1 . #4#)
      (LETT |j| 0 . #4#)
      (SEQ (LETT |l| 1 . #4#)
           (LETT #1# (SPADCALL |gitter| (QREFELT $ 28)) . #4#) G190
           (COND ((QSGREATERP |l| #1#) (GO G191)))
           (SEQ (LETT |j| (SPADCALL |gitter| |l| (QREFELT $ 14)) . #4#)
                (LETT |i| (+ |i| 1) . #4#)
                (SPADCALL |ytab| (SPADCALL |help| |j| (QREFELT $ 21)) |j| |i|
                          (QREFELT $ 29))
                (EXIT
                 (SPADCALL |help| |j|
                           (+ (SPADCALL |help| |j| (QREFELT $ 21)) 1)
                           (QREFELT $ 16))))
           (LETT |l| (QSADD1 |l|) . #4#) (GO G190) G191 (EXIT NIL))
      (EXIT |ytab|))))) 

(DEFUN |SGCF;listYoungTableaus;LL;8| (|lambda| $)
  (PROG (|lattice| |younglist| |ytab| #1=#:G1898)
    (RETURN
     (SEQ (LETT |younglist| NIL . #2=(|SGCF;listYoungTableaus;LL;8|))
          (LETT |lattice| (SPADCALL |lambda| |lattice| 'NIL (QREFELT $ 24))
                . #2#)
          (SEQ (LETT #1# NIL . #2#) G190 (COND (#1# (GO G191)))
               (SEQ
                (LETT |ytab| (SPADCALL |lambda| |lattice| (QREFELT $ 30))
                      . #2#)
                (LETT |younglist| (APPEND |younglist| (LIST |ytab|)) . #2#)
                (EXIT
                 (LETT |lattice|
                       (SPADCALL |lambda| |lattice| 'T (QREFELT $ 24)) . #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=#:G1912 |i| #2=#:G1906 |j| #3=#:G1901
         #4=#:G1911 #5=#:G1900 |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 $ 33)) . #6#)
            (LETT |vzero| (MAKEARR1 |ncol| 0) . #6#)
            (LETT |vrest| (MAKEARR1 |ncol| 0) . #6#)
            (LETT |cnull| (SPADCALL 1 1 0 (QREFELT $ 27)) . #6#)
            (LETT |coleman| (SPADCALL C (QREFELT $ 34)) . #6#)
            (COND
             ((SPADCALL |coleman| |cnull| (QREFELT $ 35))
              (SEQ (LETT |vrest| (SPADCALL |alpha| (QREFELT $ 33)) . #6#)
                   (LETT |coleman| (SPADCALL |nrow| |ncol| 0 (QREFELT $ 27))
                         . #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 $ 36))
                               (SPADCALL |coleman| |nrow| (QREFELT $ 36))
                               (QREFELT $ 37))
                     . #6#)
               (LETT |succ|
                     (SPADCALL |vrest| (SPADCALL |coleman| |i| (QREFELT $ 36))
                               (SPADCALL |beta| |i| (QREFELT $ 14))
                               (QREFELT $ 38))
                     . #6#)
               (SEQ G190
                    (COND
                     ((NULL (SPADCALL |succ| |vnull| (QREFELT $ 39)))
                      #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 $ 36))
                                     (QREFELT $ 37))
                           . #6#)
                     (EXIT
                      (LETT |succ|
                            (SPADCALL |vrest|
                                      (SPADCALL |coleman| |i| (QREFELT $ 36))
                                      (SPADCALL |beta| |i| (QREFELT $ 14))
                                      (QREFELT $ 38))
                            . #6#)))
                    NIL #8=(GO G190) G191 (EXIT NIL))
               (LETT |j| |i| . #6#)
               (LETT |coleman| (SPADCALL |coleman| |i| |succ| (QREFELT $ 40))
                     . #6#)
               (EXIT
                (LETT |vrest|
                      (SPADCALL |vrest| (SPADCALL |coleman| |i| (QREFELT $ 36))
                                (QREFELT $ 41))
                      . #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 $ 14))
                              (QREFELT $ 38))
                    . #6#)
              (LETT |coleman| (SPADCALL |coleman| |i| |succ| (QREFELT $ 40))
                    . #6#)
              (EXIT
               (LETT |vrest| (SPADCALL |vrest| |succ| (QREFELT $ 41)) . #6#)))
             (LETT |i| (+ |i| 1) . #6#) #8# G191 (EXIT NIL))
            (EXIT (SPADCALL |coleman| |nrow| |vrest| (QREFELT $ 40)))))
      #4# (EXIT #4#))))) 

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

(DEFUN |SGCF;nextPartition;LVIV;11| (|gamma| |part| |number| $)
  (PROG (#1=#:G1924 |k| |j| |sum| #2=#:G1923 |i| |vnull| |n|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ (LETT |n| (LENGTH |gamma|) . #3=(|SGCF;nextPartition;LVIV;11|))
            (LETT |vnull| (SPADCALL NIL (QREFELT $ 33)) . #3#)
            (COND
             ((SPADCALL |part| |vnull| (QREFELT $ 39))
              (SEQ (LETT |sum| |number| . #3#)
                   (LETT |part| (MAKEARR1 |n| 0) . #3#)
                   (EXIT (LETT |i| (+ 1 |n|) . #3#))))
             ('T
              (SEQ (LETT |i| 2 . #3#)
                   (LETT |sum| (SPADCALL |part| 1 (QREFELT $ 21)) . #3#)
                   (SEQ G190
                        (COND
                         ((NULL
                           (COND
                            ((EQL (SPADCALL |part| |i| (QREFELT $ 21))
                                  (SPADCALL |gamma| |i| (QREFELT $ 14)))
                             'T)
                            ('T (EQL |sum| 0))))
                          #4=(GO G191)))
                        (SEQ
                         (LETT |sum|
                               (+ |sum| (SPADCALL |part| |i| (QREFELT $ 21)))
                               . #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 $ 21)) 1)
                              (QREFELT $ 16))))))
            (LETT |j| 1 . #3#)
            (SEQ G190
                 (COND
                  ((NULL (< (SPADCALL |gamma| |j| (QREFELT $ 14)) |sum|)) #4#))
                 (SEQ
                  (SPADCALL |part| |j| (SPADCALL |gamma| |j| (QREFELT $ 14))
                            (QREFELT $ 16))
                  (LETT |sum| (- |sum| (SPADCALL |gamma| |j| (QREFELT $ 14)))
                        . #3#)
                  (EXIT (LETT |j| (+ |j| 1) . #3#)))
                 NIL #5# G191 (EXIT NIL))
            (SPADCALL |part| |j| |sum| (QREFELT $ 16))
            (SEQ (LETT |k| (+ |j| 1) . #3#) (LETT #1# (- |i| 1) . #3#) G190
                 (COND ((> |k| #1#) #4#))
                 (SEQ (EXIT (SPADCALL |part| |k| 0 (QREFELT $ 16))))
                 (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=#:G1933 |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| (MAKEARR1 |nrow| 0) . #2#) (LETT |sum| 1 . #2#)
          (SEQ (LETT |i| 1 . #2#) G190
               (COND ((QSGREATERP |i| |nrow|) #3=(GO G191)))
               (SEQ (SPADCALL |help| |i| |sum| (QREFELT $ 16))
                    (EXIT
                     (LETT |sum| (+ |sum| (SPADCALL |beta| |i| (QREFELT $ 14)))
                           . #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 $ 44)))
                                   . #2#)
                             G190 (COND ((QSGREATERP |k| #1#) #3#))
                             (SEQ
                              (LETT |pi|
                                    (APPEND |pi|
                                            (SPADCALL
                                             (SPADCALL |help| |i|
                                                       (QREFELT $ 21))
                                             (QREFELT $ 11)))
                                    . #2#)
                              (EXIT
                               (SPADCALL |help| |i|
                                         (+
                                          (SPADCALL |help| |i| (QREFELT $ 21))
                                          1)
                                         (QREFELT $ 16))))
                             (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=#:G1941 |help| #2=#:G1939 |i| |temp| |alphasum|
         #3=#:G1936 #4=#:G1934 |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 $ 27)) . #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 $ 14)) . #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 $ 14))
                                  |help|)
                                 . #5#)))
                         (LETT |j| (+ |j| -1) . #5#) #7=(GO G190) G191
                         (EXIT NIL))
                    (LETT |alphasum|
                          (PROG1
                              (LETT #3#
                                    (+ |alphasum|
                                       (SPADCALL |alpha| |i| (QREFELT $ 14)))
                                    . #5#)
                            (|check-subtype| (>= #3# 0) '(|NonNegativeInteger|)
                                             #3#))
                          . #5#)
                    (EXIT
                     (LETT |temp|
                           (APPEND |temp| (SPADCALL |help| (QREFELT $ 47)))
                           . #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 $ 14)) . #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 $ 14)))
                                    . #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 $ 49))
                                        (SPADCALL
                                         (SPADCALL |temp| |j| (QREFELT $ 50))
                                         (QREFELT $ 49))
                                        (QREFELT $ 51))
                                       (QREFELT $ 52))
                                      (QREFELT $ 29))))
                          (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=#:G1948)
       (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 54) . #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| |SGCF;subSet;3IL;5|
              (11 . |elt|) (|Vector| 6) (17 . |setelt|) (24 . |entries|)
              |SGCF;unrankImproperPartitions1;3IL;4|
              (|PartitionsAndPermutations|) (29 . |conjugate|) (34 . |elt|)
              (40 . |setelt|) (|Boolean|) |SGCF;nextLatticePermutation;2LBL;6|
              (|NonNegativeInteger|) (|Matrix| 6) (47 . |new|)
              (54 . |maxIndex|) (59 . |setelt|) |SGCF;makeYoungTableau;2LM;7|
              (|List| 26) |SGCF;listYoungTableaus;LL;8| (67 . |vector|)
              (72 . |copy|) (77 . =) (83 . |row|) (89 . +)
              |SGCF;nextPartition;2VIV;10| (95 . =) (101 . |setRow!|) (108 . -)
              |SGCF;nextColeman;2L2M;9| |SGCF;nextPartition;LVIV;11|
              (114 . |elt|) |SGCF;inverseColeman;2LML;12| (|List| 10)
              (121 . |list|) (|Set| 6) (126 . |brace|) (131 . |elt|)
              (137 . |intersect|) (143 . |#|) |SGCF;coleman;3LM;13|)
           '#(|unrankImproperPartitions1| 148 |unrankImproperPartitions0| 155
              |subSet| 162 |numberOfImproperPartitions| 169 |nextPartition| 175
              |nextLatticePermutation| 189 |nextColeman| 196 |makeYoungTableau|
              203 |listYoungTableaus| 209 |inverseColeman| 214 |coleman| 221)
           'NIL
           (CONS (|makeByteWordVec2| 1 'NIL)
                 (CONS '#()
                       (CONS '#()
                             (|makeByteWordVec2| 53
                                                 '(2 7 6 6 6 8 1 10 0 6 11 2 10
                                                   6 0 6 14 3 15 6 0 6 6 16 1
                                                   15 10 0 17 1 19 10 10 20 2
                                                   15 6 0 6 21 3 10 6 0 6 6 22
                                                   3 26 0 25 25 6 27 1 10 6 0
                                                   28 4 26 6 0 6 6 6 29 1 15 0
                                                   10 33 1 26 0 0 34 2 26 23 0
                                                   0 35 2 26 15 0 6 36 2 15 0 0
                                                   0 37 2 15 23 0 0 39 3 26 0 0
                                                   6 15 40 2 15 0 0 0 41 3 26 6
                                                   0 6 6 44 1 46 0 10 47 1 48 0
                                                   10 49 2 46 10 0 6 50 2 48 0
                                                   0 0 51 1 48 25 0 52 3 0 10 6
                                                   6 6 18 3 0 10 6 6 6 12 3 0
                                                   10 6 6 6 13 2 0 6 6 6 9 3 0
                                                   15 15 15 6 38 3 0 15 10 15 6
                                                   43 3 0 10 10 10 23 24 3 0 26
                                                   10 10 26 42 2 0 26 10 10 30
                                                   1 0 31 10 32 3 0 10 10 10 26
                                                   45 3 0 26 10 10 10 53)))))
           '|lookupComplete|)) 

(MAKEPROP '|SymmetricGroupCombinatoricFunctions| 'NILADIC T) 
