
(/VERSIONCHECK 2) 

(DEFUN |IDPOAMS;subtractIfCan;2$U;1| (|x| |y| $)
  (PROG (|u| |t|)
    (RETURN
      (SEQ (COND
             ((NULL |y|) (CONS 0 |x|))
             ((OR (NULL |x|)
                  (SPADCALL (QCAR (|SPADfirst| |x|))
                      (QCAR (|SPADfirst| |y|)) (QREFELT $ 11)))
              (CONS 1 "failed"))
             ((SPADCALL (QCAR (|SPADfirst| |y|))
                  (QCAR (|SPADfirst| |x|)) (QREFELT $ 11))
              (SEQ (LETT |t| (SPADCALL (CDR |x|) |y| (QREFELT $ 13))
                         . #0=(|IDPOAMS;subtractIfCan;2$U;1|))
                   (EXIT (COND
                           ((QEQCAR |t| 1) (CONS 1 "failed"))
                           ('T
                            (CONS 0
                                  (CONS (|SPADfirst| |x|) (QCDR |t|))))))))
             ('T
              (SEQ (LETT |u|
                         (SPADCALL (QCDR (|SPADfirst| |x|))
                             (QCDR (|SPADfirst| |y|)) (QREFELT $ 14)) . #0#)
                   (EXIT (COND
                           ((QEQCAR |u| 1) (CONS 1 "failed"))
                           ((SPADCALL (QCDR |u|) (QREFELT $ 15))
                            (SPADCALL (CDR |x|) (CDR |y|)
                                (QREFELT $ 13)))
                           ('T
                            (SEQ (LETT |t|
                                       (SPADCALL (CDR |x|) (CDR |y|)
                                        (QREFELT $ 13)) . #0#)
                                 (EXIT (COND
                                         ((QEQCAR |t| 1)
                                          (CONS 1 "failed"))
                                         ('T
                                          (CONS 0
                                           (CONS
                                            (CONS
                                             (QCAR (|SPADfirst| |x|))
                                             (QCDR |u|))
                                            (QCDR |t|))))))))))))))))) 

(DEFUN |IDPOAMS;sup;3$;2| (|x| |y| $)
  (PROG (|u|)
    (RETURN
      (SEQ (COND
             ((NULL |y|) |x|)
             ((NULL |x|) |y|)
             ((SPADCALL (QCAR (|SPADfirst| |x|))
                  (QCAR (|SPADfirst| |y|)) (QREFELT $ 11))
              (CONS (|SPADfirst| |y|)
                    (SPADCALL |x| (CDR |y|) (QREFELT $ 16))))
             ((SPADCALL (QCAR (|SPADfirst| |y|))
                  (QCAR (|SPADfirst| |x|)) (QREFELT $ 11))
              (CONS (|SPADfirst| |x|)
                    (SPADCALL (CDR |x|) |y| (QREFELT $ 16))))
             ('T
              (SEQ (LETT |u|
                         (SPADCALL (QCDR (|SPADfirst| |x|))
                             (QCDR (|SPADfirst| |y|)) (QREFELT $ 17))
                         |IDPOAMS;sup;3$;2|)
                   (EXIT (CONS (CONS (QCAR (|SPADfirst| |x|)) |u|)
                               (SPADCALL (CDR |x|) (CDR |y|)
                                   (QREFELT $ 16))))))))))) 

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

(DEFUN |IndexedDirectProductOrderedAbelianMonoidSup;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|IndexedDirectProductOrderedAbelianMonoidSup|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$|
              (LIST '|IndexedDirectProductOrderedAbelianMonoidSup| DV$1
                    DV$2) . #0#)
        (LETT $ (GETREFV 24) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache|
            '|IndexedDirectProductOrderedAbelianMonoidSup|
            (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 '|IndexedDirectProductOrderedAbelianMonoidSup| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL
             (|IndexedDirectProductOrderedAbelianMonoid| 6 7)
             (|local| |#1|) (|local| |#2|) '|Term| '|Rep| (|Boolean|)
             (0 . <) (|Union| $ '"failed")
             |IDPOAMS;subtractIfCan;2$U;1| (6 . |subtractIfCan|)
             (12 . |zero?|) |IDPOAMS;sup;3$;2| (17 . |sup|)
             (|Mapping| 6 6) (|NonNegativeInteger|) (|PositiveInteger|)
             (|SingleInteger|) (|String|) (|OutputForm|))
          '#(|sup| 23 |subtractIfCan| 29) 'NIL
          (CONS (|makeByteWordVec2| 1 '(0 0 0 0 0 0 0 0 0 0 0 0))
                (CONS '#(NIL NIL NIL NIL NIL |AbelianMonoid&|
                         |OrderedSet&| NIL |AbelianSemiGroup&|
                         |SetCategory&| |BasicType&| NIL)
                      (CONS '#((|OrderedAbelianMonoidSup|)
                               (|OrderedCancellationAbelianMonoid|)
                               (|OrderedAbelianMonoid|)
                               (|CancellationAbelianMonoid|)
                               (|OrderedAbelianSemiGroup|)
                               (|AbelianMonoid|) (|OrderedSet|)
                               (|IndexedDirectProductCategory| 6 7)
                               (|AbelianSemiGroup|) (|SetCategory|)
                               (|BasicType|) (|CoercibleTo| 23))
                            (|makeByteWordVec2| 17
                                '(2 7 10 0 0 11 2 6 12 0 0 14 1 6 10 0
                                  15 2 6 0 0 0 17 2 0 0 0 0 16 2 0 12 0
                                  0 13)))))
          '|lookupIncomplete|)) 
