
(/VERSIONCHECK 2) 

(DEFUN |IDPAG;-;2$;1| (|x| $)
  (PROG (#0=#:G1828 |u| #1=#:G1829)
    (RETURN
      (SEQ (PROGN
             (LETT #0# NIL . #2=(|IDPAG;-;2$;1|))
             (SEQ (LETT |u| NIL . #2#) (LETT #1# |x| . #2#) G190
                  (COND
                    ((OR (ATOM #1#)
                         (PROGN (LETT |u| (CAR #1#) . #2#) NIL))
                     (GO G191)))
                  (SEQ (EXIT (LETT #0#
                                   (CONS
                                    (CONS (QCAR |u|)
                                     (SPADCALL (QCDR |u|)
                                      (QREFELT $ 10)))
                                    #0#) . #2#)))
                  (LETT #1# (CDR #1#) . #2#) (GO G190) G191
                  (EXIT (NREVERSE0 #0#)))))))) 

(DEFUN |IDPAG;*;I2$;2| (|n| |x| $)
  (PROG (#0=#:G1833 |u| #1=#:G1834 |a|)
    (RETURN
      (SEQ (COND
             ((EQL |n| 0) (|spadConstant| $ 12))
             ((EQL |n| 1) |x|)
             (#2='T
              (PROGN
                (LETT #0# NIL . #3=(|IDPAG;*;I2$;2|))
                (SEQ (LETT |u| NIL . #3#) (LETT #1# |x| . #3#) G190
                     (COND
                       ((OR (ATOM #1#)
                            (PROGN (LETT |u| (CAR #1#) . #3#) NIL))
                        (GO G191)))
                     (SEQ (EXIT (COND
                                  ((SEQ
                                    (LETT |a|
                                     (SPADCALL |n| (QCDR |u|)
                                      (QREFELT $ 15)) . #3#)
                                    (EXIT
                                     (COND
                                       ((SPADCALL |a|
                                         (|spadConstant| $ 13)
                                         (QREFELT $ 17))
                                        'NIL)
                                       (#2# 'T))))
                                   (LETT #0#
                                    (CONS (CONS (QCAR |u|) |a|) #0#) . #3#)))))
                     (LETT #1# (CDR #1#) . #3#) (GO G190) G191
                     (EXIT (NREVERSE0 #0#)))))))))) 

(PUT '|IDPAG;qsetrest!| '|SPADreplace| 'RPLACD) 

(DEFUN |IDPAG;qsetrest!| (|l| |e| $) (RPLACD |l| |e|)) 

(DEFUN |IDPAG;-;3$;4| (|x| |y| $)
  (PROG (|r| |newcell| |endcell| |end| |res|)
    (RETURN
      (SEQ (COND
             ((NULL |x|) (SPADCALL |y| (QREFELT $ 11)))
             ((NULL |y|) |x|)
             ('T
              (SEQ (LETT |endcell| NIL . #0=(|IDPAG;-;3$;4|))
                   (LETT |res| NIL . #0#)
                   (SEQ G190
                        (COND
                          ((NULL (COND
                                   ((OR (NULL |x|) (NULL |y|)) 'NIL)
                                   ('T 'T)))
                           (GO G191)))
                        (SEQ (LETT |newcell| NIL . #0#)
                             (COND
                               ((SPADCALL (QCAR (|SPADfirst| |x|))
                                    (QCAR (|SPADfirst| |y|))
                                    (QREFELT $ 19))
                                (SEQ (LETT |r|
                                      (SPADCALL
                                       (QCDR (|SPADfirst| |x|))
                                       (QCDR (|SPADfirst| |y|))
                                       (QREFELT $ 20)) . #0#)
                                     (COND
                                       ((NULL
                                         (SPADCALL |r| (QREFELT $ 21)))
                                        (LETT |newcell|
                                         (CONS
                                          (CONS
                                           (QCAR (|SPADfirst| |x|))
                                           |r|)
                                          NIL) . #0#)))
                                     (LETT |x| (CDR |x|) . #0#)
                                     (EXIT (LETT |y| (CDR |y|) . #0#))))
                               ((SPADCALL (QCAR (|SPADfirst| |y|))
                                    (QCAR (|SPADfirst| |x|))
                                    (QREFELT $ 22))
                                (SEQ (LETT |newcell|
                                      (CONS (|SPADfirst| |x|) NIL) . #0#)
                                     (EXIT (LETT |x| (CDR |x|) . #0#))))
                               ('T
                                (SEQ (LETT |newcell|
                                      (CONS
                                       (CONS (QCAR (|SPADfirst| |y|))
                                        (SPADCALL
                                         (QCDR (|SPADfirst| |y|))
                                         (QREFELT $ 10)))
                                       NIL) . #0#)
                                     (EXIT (LETT |y| (CDR |y|) . #0#)))))
                             (EXIT (COND
                                     ((NULL (NULL |newcell|))
                                      (COND
                                        ((NULL |endcell|)
                                         (SEQ
                                          (LETT |res| |newcell| . #0#)
                                          (EXIT
                                           (LETT |endcell| |res| . #0#))))
                                        ('T
                                         (SEQ
                                          (|IDPAG;qsetrest!| |endcell|
                                           |newcell| $)
                                          (EXIT
                                           (LETT |endcell|
                                            |newcell| . #0#)))))))))
                        NIL (GO G190) G191 (EXIT NIL))
                   (COND
                     ((NULL |x|)
                      (LETT |end| (SPADCALL |y| (QREFELT $ 11)) . #0#))
                     ('T (LETT |end| |x| . #0#)))
                   (COND
                     ((NULL |res|) (LETT |res| |end| . #0#))
                     ('T (|IDPAG;qsetrest!| |endcell| |end| $)))
                   (EXIT |res|)))))))) 

(DEFUN |IndexedDirectProductAbelianGroup| (&REST #0=#:G1857)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1858)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (|devaluateList| #0#)
                       (HGET |$ConstructorCache|
                             '|IndexedDirectProductAbelianGroup|)
                       '|domainEqualList|)
                   . #2=(|IndexedDirectProductAbelianGroup|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (APPLY (|function|
                                 |IndexedDirectProductAbelianGroup;|)
                             #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache|
                        '|IndexedDirectProductAbelianGroup|))))))))))) 

(DEFUN |IndexedDirectProductAbelianGroup;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|IndexedDirectProductAbelianGroup|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$|
              (LIST '|IndexedDirectProductAbelianGroup| DV$1 DV$2) . #0#)
        (LETT $ (GETREFV 31) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache|
            '|IndexedDirectProductAbelianGroup| (LIST DV$1 DV$2)
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        (QSETREFV $ 8 (|Record| (|:| |k| |#2|) (|:| |c| |#1|)))
        (QSETREFV $ 9 (|List| (QREFELT $ 8)))
        $)))) 

(MAKEPROP '|IndexedDirectProductAbelianGroup| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL
             (|IndexedDirectProductAbelianMonoid| 6 7) (|local| |#1|)
             (|local| |#2|) '|Term| '|Rep| (0 . -) |IDPAG;-;2$;1|
             (5 . |Zero|) (9 . |Zero|) (|Integer|) (13 . *) (|Boolean|)
             (19 . =) |IDPAG;*;I2$;2| (25 . =) (31 . -) (37 . |zero?|)
             (42 . <) |IDPAG;-;3$;4| (|Mapping| 6 6)
             (|NonNegativeInteger|) (|Union| $ '"failed")
             (|PositiveInteger|) (|SingleInteger|) (|String|)
             (|OutputForm|))
          '#(|Zero| 48 - 52 * 63) 'NIL
          (CONS (|makeByteWordVec2| 1 '(0 0 0 0 0 0 0 0))
                (CONS '#(|AbelianGroup&| NIL |AbelianMonoid&|
                         |AbelianSemiGroup&| NIL |SetCategory&|
                         |BasicType&| NIL)
                      (CONS '#((|AbelianGroup|)
                               (|CancellationAbelianMonoid|)
                               (|AbelianMonoid|) (|AbelianSemiGroup|)
                               (|IndexedDirectProductCategory| 6 7)
                               (|SetCategory|) (|BasicType|)
                               (|CoercibleTo| 30))
                            (|makeByteWordVec2| 23
                                '(1 6 0 0 10 0 0 0 12 0 6 0 13 2 6 0 14
                                  0 15 2 6 16 0 0 17 2 7 16 0 0 19 2 6
                                  0 0 0 20 1 6 16 0 21 2 7 16 0 0 22 0
                                  0 0 12 2 0 0 0 0 23 1 0 0 0 11 2 0 0
                                  14 0 18)))))
          '|lookupIncomplete|)) 
