
(/VERSIONCHECK 2) 

(DEFUN |IDPOAMS;subtractIfCan;2$U;1| (|x| |y| $)
  (PROG (|t| |u|)
    (RETURN
     (SEQ
      (COND ((NULL |y|) (CONS 0 |x|))
            ((OR (NULL |x|)
                 (SPADCALL (QCAR (|SPADfirst| |x|)) (QCAR (|SPADfirst| |y|))
                           (QREFELT $ 10)))
             (CONS 1 "failed"))
            ((SPADCALL (QCAR (|SPADfirst| |y|)) (QCAR (|SPADfirst| |x|))
                       (QREFELT $ 10))
             (SEQ
              (LETT |t| (SPADCALL (CDR |x|) |y| (QREFELT $ 12))
                    . #1=(|IDPOAMS;subtractIfCan;2$U;1|))
              (EXIT
               (COND ((QEQCAR |t| 1) (CONS 1 "failed"))
                     (#2='T (CONS 0 (CONS (|SPADfirst| |x|) (QCDR |t|))))))))
            (#2#
             (SEQ
              (LETT |u|
                    (SPADCALL (QCDR (|SPADfirst| |x|)) (QCDR (|SPADfirst| |y|))
                              (QREFELT $ 13))
                    . #1#)
              (EXIT
               (COND ((QEQCAR |u| 1) (CONS 1 "failed"))
                     ((SPADCALL (QCDR |u|) (QREFELT $ 14))
                      (SPADCALL (CDR |x|) (CDR |y|) (QREFELT $ 12)))
                     (#2#
                      (SEQ
                       (LETT |t| (SPADCALL (CDR |x|) (CDR |y|) (QREFELT $ 12))
                             . #1#)
                       (EXIT
                        (COND ((QEQCAR |t| 1) (CONS 1 "failed"))
                              (#2#
                               (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 $ 10))
             (CONS (|SPADfirst| |y|) (SPADCALL |x| (CDR |y|) (QREFELT $ 15))))
            ((SPADCALL (QCAR (|SPADfirst| |y|)) (QCAR (|SPADfirst| |x|))
                       (QREFELT $ 10))
             (CONS (|SPADfirst| |x|) (SPADCALL (CDR |x|) |y| (QREFELT $ 15))))
            ('T
             (SEQ
              (LETT |u|
                    (SPADCALL (QCDR (|SPADfirst| |x|)) (QCDR (|SPADfirst| |y|))
                              (QREFELT $ 16))
                    |IDPOAMS;sup;3$;2|)
              (EXIT
               (CONS (CONS (QCAR (|SPADfirst| |x|)) |u|)
                     (SPADCALL (CDR |x|) (CDR |y|) (QREFELT $ 15))))))))))) 

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

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

(MAKEPROP '|IndexedDirectProductOrderedAbelianMonoidSup| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL
              (|IndexedDirectProductOrderedAbelianMonoid| 6 7) (|local| |#1|)
              (|local| |#2|) '|Rep| (|Boolean|) (0 . <) (|Union| $ '"failed")
              |IDPOAMS;subtractIfCan;2$U;1| (6 . |subtractIfCan|)
              (12 . |zero?|) |IDPOAMS;sup;3$;2| (17 . |sup|) (|Mapping| 6 6)
              (|Record| (|:| |k| 7) (|:| |c| 6)) (|List| 18)
              (|NonNegativeInteger|) (|PositiveInteger|) (|String|)
              (|OutputForm|) (|SingleInteger|))
           '#(|sup| 23 |subtractIfCan| 29) 'NIL
           (CONS (|makeByteWordVec2| 1 '(0 0 0 0 0 0 0 0 0 0 0 0 0))
                 (CONS
                  '#(NIL NIL NIL NIL NIL |OrderedSet&| |AbelianMonoid&| NIL NIL
                     |AbelianSemiGroup&| |SetCategory&| |BasicType&| NIL)
                  (CONS
                   '#((|OrderedAbelianMonoidSup|)
                      (|OrderedCancellationAbelianMonoid|)
                      (|OrderedAbelianMonoid|) (|OrderedAbelianSemiGroup|)
                      (|CancellationAbelianMonoid|) (|OrderedSet|)
                      (|AbelianMonoid|) (|Comparable|)
                      (|IndexedDirectProductCategory| 6 7) (|AbelianSemiGroup|)
                      (|SetCategory|) (|BasicType|) (|CoercibleTo| 23))
                   (|makeByteWordVec2| 16
                                       '(2 7 9 0 0 10 2 6 11 0 0 13 1 6 9 0 14
                                         2 6 0 0 0 16 2 0 0 0 0 15 2 0 11 0 0
                                         12)))))
           '|lookupIncomplete|)) 
