
(/VERSIONCHECK 2) 

(DEFUN |SGCF;numberOfImproperPartitionsInternal| (|n| |m| |cm| $)
  (PROG (|i| #0=#:G1827 |s|)
    (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
                         . #1=(|SGCF;numberOfImproperPartitionsInternal|))
                   (SEQ (LETT |i| 0 . #1#) (LETT #0# (- |n| 1) . #1#)
                        G190 (COND ((QSGREATERP |i| #0#) (GO G191)))
                        (SEQ (EXIT (LETT |s|
                                    (+ |s|
                                     (|SGCF;numberOfImproperPartitionsInternal|
                                      |i| |m| (- |cm| 1) $)) . #1#)))
                        (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                        (EXIT NIL))
                   (EXIT |s|)))))))) 

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

(DEFUN |SGCF;unrankImproperPartitions0;3IL;3| (|n| |m| |k| $)
  (PROG (|t| #0=#:G1839 |y| |sOld| |s| #1=#:G1833 |l|)
    (RETURN
      (SEQ (LETT |l| NIL . #2=(|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 . #2#)
                              (LETT #0# (- |m| 2) . #2#) G190
                              (COND
                                ((QSGREATERP |t| #0#) #3=(GO G191)))
                              (SEQ (LETT |s| 0 . #2#)
                                   (SEQ
                                    (EXIT
                                     (SEQ (LETT |y| 0 . #2#) G190
                                      (COND
                                        ((QSGREATERP |y| |n|) #3#))
                                      (SEQ (LETT |sOld| |s| . #2#)
                                       (LETT |s|
                                        (+ |s|
                                         (SPADCALL (- |n| |y|)
                                          (- (- |m| |t|) 1)
                                          (QREFELT $ 9))) . #2#)
                                       (EXIT
                                        (COND
                                          ((< |k| |s|)
                                           (PROGN
                                             (LETT #1#
                                              |$NoValue| . #2#)
                                             (GO #1#))))))
                                      (LETT |y| (QSADD1 |y|) . #2#)
                                      #4=(GO G190) G191 (EXIT NIL)))
                                    #1# (EXIT #1#))
                                   (LETT |l|
                                    (APPEND |l|
                                     (SPADCALL |y| (QREFELT $ 11))) . #2#)
                                   (LETT |k| (- |k| |sOld|) . #2#)
                                   (EXIT (LETT |n| (- |n| |y|) . #2#)))
                              (LETT |t| (QSADD1 |t|) . #2#) #4# G191
                              (EXIT NIL))
                         (LETT |l|
                               (APPEND |l|
                                       (SPADCALL |n| (QREFELT $ 11))) . #2#)
                         (EXIT |l|))))))))) 

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

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

(DEFUN |SGCF;nextLatticePermutation;2LBL;6|
       (|lambda| |lattP| |constructNotFirst| $)
  (PROG (|lprime| #0=#:G1861 |columns| #1=#:G1862 |rows| #2=#:G1815
            #3=#:G1888 #4=#:G1868 #5=#:G1866 #6=#:G1867 #7=#:G1869 |n|
            |help| #8=#:G1870 #9=#:G1889 |rightEntry| #10=#:G1871
            |leftEntry| |ready| |j| #11=#:G1879 |rightPosition| |i| |l|
            #12=#:G1890)
    (RETURN
      (SEQ (LETT |lprime| (SPADCALL |lambda| (QREFELT $ 22))
                 . #13=(|SGCF;nextLatticePermutation;2LBL;6|))
           (LETT |columns|
                 (PROG1 (LETT #0# (|SPADfirst| |lambda|) . #13#)
                   (|check-subtype| (>= #0# 0) '(|NonNegativeInteger|)
                       #0#)) . #13#)
           (LETT |rows|
                 (PROG1 (LETT #1# (|SPADfirst| |lprime|) . #13#)
                   (|check-subtype| (>= #1# 0) '(|NonNegativeInteger|)
                       #1#)) . #13#)
           (LETT |n|
                 (PROG1 (LETT #7#
                              (PROGN
                                (LETT #6# NIL . #13#)
                                (SEQ (LETT #2# NIL . #13#)
                                     (LETT #3# |lambda| . #13#) G190
                                     (COND
                                       ((OR (ATOM #3#)
                                         (PROGN
                                           (LETT #2# (CAR #3#) . #13#)
                                           NIL))
                                        #14=(GO G191)))
                                     (SEQ
                                      (EXIT
                                       (PROGN
                                         (LETT #4# #2# . #13#)
                                         (COND
                                           (#6#
                                            (LETT #5#
                                             (+ #5# #4#) . #13#))
                                           ('T
                                            (PROGN
                                              (LETT #5# #4# . #13#)
                                              (LETT #6# 'T . #13#)))))))
                                     (LETT #3# (CDR #3#) . #13#)
                                     #15=(GO G190) G191 (EXIT NIL))
                                (COND (#6# #5#) (#16='T 0))) . #13#)
                   (|check-subtype| (>= #7# 0) '(|NonNegativeInteger|)
                       #7#)) . #13#)
           (EXIT (COND
                   (|constructNotFirst|
                       (SEQ (LETT |help|
                                  (SPADCALL |columns| 0 (QREFELT $ 15)) . #13#)
                            (LETT |rightPosition| |n| . #13#)
                            (LETT |leftEntry|
                                  (PROG1 (LETT #8#
                                          (SPADCALL |lattP|
                                           |rightPosition|
                                           (QREFELT $ 17)) . #13#)
                                    (|check-subtype| (>= #8# 0)
                                     '(|NonNegativeInteger|) #8#)) . #13#)
                            (LETT |ready| 'NIL . #13#)
                            (SEQ (LETT #9# NIL . #13#) G190
                                 (COND (#9# #14#))
                                 (SEQ (LETT |rightEntry|
                                       |leftEntry| . #13#)
                                      (LETT |leftEntry|
                                       (PROG1
                                        (LETT #10#
                                         (SPADCALL |lattP|
                                          (- |rightPosition| 1)
                                          (QREFELT $ 17)) . #13#)
                                         (|check-subtype| (>= #10# 0)
                                          '(|NonNegativeInteger|) #10#)) . #13#)
                                      (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 . #13#)
                                             (LETT |j|
                                              (+ |leftEntry| 1) . #13#)
                                             (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)))))
                                                 #14#))
                                              (SEQ
                                               (EXIT
                                                (LETT |j|
                                                 (+ |j| 1) . #13#)))
                                              NIL #15# 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| . #13#)
                                               G190
                                               (COND
                                                 ((> |l| |n|) #14#))
                                               (SEQ (LETT |j| 0 . #13#)
                                                (SEQ G190
                                                 (COND
                                                   ((NULL
                                                     (EQL
                                                      (SPADCALL |help|
                                                       (+ 1 |j|)
                                                       (QREFELT $ 23))
                                                      0))
                                                    #14#))
                                                 (SEQ
                                                  (EXIT
                                                   (LETT |j|
                                                    (+ |j| 1) . #13#)))
                                                 NIL #15# 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) . #13#)
                                               #15# G191 (EXIT NIL))))))))
                                      (LETT |rightPosition|
                                       (PROG1
                                        (LETT #11#
                                         (- |rightPosition| 1) . #13#)
                                         (|check-subtype| (>= #11# 0)
                                          '(|NonNegativeInteger|) #11#)) . #13#)
                                      (EXIT
                                       (COND
                                         ((EQL |rightPosition| 1)
                                          (LETT |constructNotFirst|
                                           'NIL . #13#)))))
                                 (LETT #9#
                                       (COND
                                         ((OR |ready|
                                           (NULL |constructNotFirst|))
                                          'T)
                                         ('T 'NIL)) . #13#)
                                 #15# G191 (EXIT NIL))
                            (EXIT (COND
                                    (|constructNotFirst| |lattP|)
                                    (#16# NIL)))))
                   (#16#
                    (SEQ (LETT |lattP| NIL . #13#)
                         (SEQ (LETT |i| |columns| . #13#) G190
                              (COND ((< |i| 1) #14#))
                              (SEQ (EXIT
                                    (SEQ (LETT |l| 1 . #13#)
                                     (LETT #12#
                                      (SPADCALL |lprime| |i|
                                       (QREFELT $ 17)) . #13#)
                                     G190
                                     (COND
                                       ((QSGREATERP |l| #12#) #14#))
                                     (SEQ
                                      (EXIT
                                       (LETT |lattP|
                                        (CONS |i| |lattP|) . #13#)))
                                     (LETT |l| (QSADD1 |l|) . #13#)
                                     #15# G191 (EXIT NIL))))
                              (LETT |i| (+ |i| -1) . #13#) #15# G191
                              (EXIT NIL))
                         (EXIT |lattP|))))))))) 

(DEFUN |SGCF;makeYoungTableau;2LM;7| (|lambda| |gitter| $)
  (PROG (|lprime| #0=#:G1891 |columns| #1=#:G1892 |rows| |ytab| |help|
            |l| #2=#:G1897 |j| |i|)
    (RETURN
      (SEQ (LETT |lprime| (SPADCALL |lambda| (QREFELT $ 22))
                 . #3=(|SGCF;makeYoungTableau;2LM;7|))
           (LETT |columns|
                 (PROG1 (LETT #0# (|SPADfirst| |lambda|) . #3#)
                   (|check-subtype| (>= #0# 0) '(|NonNegativeInteger|)
                       #0#)) . #3#)
           (LETT |rows|
                 (PROG1 (LETT #1# (|SPADfirst| |lprime|) . #3#)
                   (|check-subtype| (>= #1# 0) '(|NonNegativeInteger|)
                       #1#)) . #3#)
           (LETT |ytab|
                 (SPADCALL |rows| |columns| 0 (QREFELT $ 28)) . #3#)
           (LETT |help| (SPADCALL |columns| 1 (QREFELT $ 15)) . #3#)
           (LETT |i| -1 . #3#) (LETT |j| 0 . #3#)
           (SEQ (LETT |l| 1 . #3#)
                (LETT #2# (SPADCALL |gitter| (QREFELT $ 29)) . #3#)
                G190 (COND ((QSGREATERP |l| #2#) (GO G191)))
                (SEQ (LETT |j|
                           (SPADCALL |gitter| |l| (QREFELT $ 17)) . #3#)
                     (LETT |i| (+ |i| 1) . #3#)
                     (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|) . #3#) (GO G190) G191
                (EXIT NIL))
           (EXIT |ytab|))))) 

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

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

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

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

(DEFUN |SGCF;coleman;3LM;13| (|alpha| |beta| |pi| $)
  (PROG (|nrow| |ncol| |colematrix| #0=#:G1938 #1=#:G1940 |alphasum|
                |temp| |i| #2=#:G1943 |help| #3=#:G1945 |betasum| |j|)
    (RETURN
      (SEQ (LETT |nrow| (LENGTH |beta|) . #4=(|SGCF;coleman;3LM;13|))
           (LETT |ncol| (LENGTH |alpha|) . #4#) (LETT |temp| NIL . #4#)
           (LETT |help| NIL . #4#)
           (LETT |colematrix|
                 (SPADCALL |nrow| |ncol| 0 (QREFELT $ 28)) . #4#)
           (LETT |betasum| 0 . #4#) (LETT |alphasum| 0 . #4#)
           (SEQ (LETT |i| 1 . #4#) G190
                (COND ((QSGREATERP |i| |ncol|) #5=(GO G191)))
                (SEQ (LETT |help| NIL . #4#)
                     (SEQ (LETT |j|
                                (SPADCALL |alpha| |i| (QREFELT $ 17)) . #4#)
                          G190 (COND ((< |j| 1) #5#))
                          (SEQ (EXIT (LETT |help|
                                      (CONS
                                       (SPADCALL |pi|
                                        (+
                                         (PROG1 (LETT #0# |j| . #4#)
                                           (|check-subtype| (>= #0# 0)
                                            '(|NonNegativeInteger|)
                                            #0#))
                                         |alphasum|)
                                        (QREFELT $ 17))
                                       |help|) . #4#)))
                          (LETT |j| (+ |j| -1) . #4#) #6=(GO G190) G191
                          (EXIT NIL))
                     (LETT |alphasum|
                           (PROG1 (LETT #1#
                                        (+ |alphasum|
                                         (SPADCALL |alpha| |i|
                                          (QREFELT $ 17))) . #4#)
                             (|check-subtype| (>= #1# 0)
                                 '(|NonNegativeInteger|) #1#)) . #4#)
                     (EXIT (LETT |temp|
                                 (APPEND |temp|
                                         (SPADCALL |help|
                                          (QREFELT $ 48))) . #4#)))
                (LETT |i| (QSADD1 |i|) . #4#) #6# G191 (EXIT NIL))
           (SEQ (LETT |i| 1 . #4#) G190
                (COND ((QSGREATERP |i| |nrow|) #5#))
                (SEQ (LETT |help| NIL . #4#)
                     (SEQ (LETT |j|
                                (SPADCALL |beta| |i| (QREFELT $ 17)) . #4#)
                          G190 (COND ((< |j| 1) #5#))
                          (SEQ (EXIT (LETT |help|
                                      (CONS
                                       (+
                                        (PROG1 (LETT #2# |j| . #4#)
                                          (|check-subtype| (>= #2# 0)
                                           '(|NonNegativeInteger|) #2#))
                                        |betasum|)
                                       |help|) . #4#)))
                          (LETT |j| (+ |j| -1) . #4#) #6# G191
                          (EXIT NIL))
                     (LETT |betasum|
                           (PROG1 (LETT #3#
                                        (+ |betasum|
                                         (SPADCALL |beta| |i|
                                          (QREFELT $ 17))) . #4#)
                             (|check-subtype| (>= #3# 0)
                                 '(|NonNegativeInteger|) #3#)) . #4#)
                     (EXIT (SEQ (LETT |j| 1 . #4#) G190
                                (COND ((QSGREATERP |j| |ncol|) #5#))
                                (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|) . #4#) #6# G191
                                (EXIT NIL))))
                (LETT |i| (QSADD1 |i|) . #4#) #6# G191 (EXIT NIL))
           (EXIT |colematrix|))))) 

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

(DEFUN |SymmetricGroupCombinatoricFunctions;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$| '(|SymmetricGroupCombinatoricFunctions|)
              . #0=(|SymmetricGroupCombinatoricFunctions|))
        (LETT $ (GETREFV 55) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|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) 
