
(/VERSIONCHECK 2) 

(DEFUN |PMINS;patternMatch;IP2Pmr;1| (|x| |p| |l| $)
  (COND
    ((SPADCALL |p| (QREFELT $ 9))
     (SPADCALL |p| |x| |l| (QREFELT $ 11)))
    ('T (|PMINS;patternMatchInner| |x| |p| |l| $)))) 

(DEFUN |PMINS;patternMatchRestricted| (|x| |p| |l| |y| $)
  (COND
    ((SPADCALL |p| (QREFELT $ 9))
     (SPADCALL |p| |x| |l| |y| (QREFELT $ 13)))
    ('T (|PMINS;patternMatchInner| |x| |p| |l| $)))) 

(DEFUN |PMINS;patternMatchSumProd| (|x| |lp| |l| |invOp| |ident| $)
  (PROG (|p1| |p2| |r| |y|)
    (RETURN
      (SEQ (COND
             ((EQL (LENGTH |lp|) 2)
              (SEQ (LETT |p2| (SPADCALL |lp| (QREFELT $ 15))
                         . #0=(|PMINS;patternMatchSumProd|))
                   (SEQ (LETT |r|
                              (SPADCALL
                                  (LETT |p1| (|SPADfirst| |lp|) . #0#)
                                  (QREFELT $ 17)) . #0#)
                        (EXIT (COND
                                ((QEQCAR |r| 1)
                                 (SEQ (LETT |p1| |p2| . #0#)
                                      (EXIT
                                       (LETT |p2|
                                        (|SPADfirst| |lp|) . #0#)))))))
                   (LETT |r| (SPADCALL |p1| (QREFELT $ 17)) . #0#)
                   (EXIT (COND
                           ((QEQCAR |r| 1) (SPADCALL (QREFELT $ 18)))
                           ('T
                            (SEQ (LETT |y|
                                       (SPADCALL |x|
                                        (SPADCALL (QCDR |r|)
                                         (QREFELT $ 20))
                                        |invOp|) . #0#)
                                 (EXIT (COND
                                         ((QEQCAR |y| 1)
                                          (SPADCALL (QREFELT $ 18)))
                                         ('T
                                          (|PMINS;patternMatchRestricted|
                                           (QCDR |y|) |p2| |l| |ident|
                                           $))))))))))
             ('T (SPADCALL (QREFELT $ 18)))))))) 

(DEFUN |PMINS;patternMatchInner| (|x| |p| |l| $)
  (PROG (|u| #0=#:G1856 |ur| |uu| #1=#:G1871 |uur| |pr| |w| #2=#:G1880
             |uv| #3=#:G1891 |uvr| |v| #4=#:G1895 |r|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |p| (QREFELT $ 21))
              (SEQ (LETT |r| (SPADCALL |p| (QREFELT $ 17))
                         . #5=(|PMINS;patternMatchInner|))
                   (EXIT (COND
                           ((QEQCAR |r| 0)
                            (COND
                              ((EQL (SPADCALL |x| (QREFELT $ 22))
                                    (QCDR |r|))
                               |l|)
                              ('T (SPADCALL (QREFELT $ 18)))))
                           ('T (SPADCALL (QREFELT $ 18)))))))
             ((QEQCAR (LETT |u| (SPADCALL |p| (QREFELT $ 25)) . #5#) 0)
              (SEQ (LETT |ur|
                         (PROG2 (LETT #0# |u| . #5#) (QCDR #0#)
                           (|check-union| (QEQCAR #0# 0)
                               (|Record|
                                   (|:| |val| (|Pattern| (|Integer|)))
                                   (|:| |exponent|
                                    (|NonNegativeInteger|)))
                               #0#)) . #5#)
                   (LETT |v|
                         (SPADCALL |x| (QCDR |ur|) (QREFELT $ 29)) . #5#)
                   (EXIT (COND
                           ((QEQCAR |v| 1) (SPADCALL (QREFELT $ 18)))
                           ('T
                            (|PMINS;patternMatchRestricted| (QCDR |v|)
                                (QCAR |ur|) |l| (|spadConstant| $ 30)
                                $))))))
             ((QEQCAR (LETT |uu| (SPADCALL |p| (QREFELT $ 33)) . #5#)
                      0)
              (SEQ (LETT |uur|
                         (PROG2 (LETT #1# |uu| . #5#) (QCDR #1#)
                           (|check-union| (QEQCAR #1# 0)
                               (|Record|
                                   (|:| |val| (|Pattern| (|Integer|)))
                                   (|:| |exponent|
                                    (|Pattern| (|Integer|))))
                               #1#)) . #5#)
                   (LETT |pr| (SPADCALL |x| (QREFELT $ 35)) . #5#)
                   (EXIT (COND
                           ((SPADCALL
                                (LETT |l|
                                      (|PMINS;patternMatchRestricted|
                                       (SPADCALL (QCDR |pr|)
                                        (QREFELT $ 20))
                                       (QCDR |uur|) |l|
                                       (|spadConstant| $ 30) $) . #5#)
                                (QREFELT $ 36))
                            (SPADCALL (QREFELT $ 18)))
                           ('T
                            (|PMINS;patternMatchRestricted| (QCAR |pr|)
                                (QCAR |uur|) |l| (|spadConstant| $ 30)
                                $))))))
             ((QEQCAR (LETT |w| (SPADCALL |p| (QREFELT $ 39)) . #5#) 0)
              (|PMINS;patternMatchSumProd| |x|
                  (PROG2 (LETT #2# |w| . #5#) (QCDR #2#)
                    (|check-union| (QEQCAR #2# 0)
                        (|List| (|Pattern| (|Integer|))) #2#))
                  |l| (CONS #'|PMINS;patternMatchInner!0| $)
                  (|spadConstant| $ 30) $))
             ((QEQCAR (LETT |w| (SPADCALL |p| (QREFELT $ 42)) . #5#) 0)
              (|PMINS;patternMatchSumProd| |x|
                  (PROG2 (LETT #2# |w| . #5#) (QCDR #2#)
                    (|check-union| (QEQCAR #2# 0)
                        (|List| (|Pattern| (|Integer|))) #2#))
                  |l| (CONS #'|PMINS;patternMatchInner!1| $)
                  (|spadConstant| $ 44) $))
             ((QEQCAR (LETT |uv| (SPADCALL |p| (QREFELT $ 47)) . #5#)
                      0)
              (SEQ (EXIT (SEQ (LETT |uvr|
                                    (PROG2 (LETT #3# |uv| . #5#)
                                     (QCDR #3#)
                                      (|check-union| (QEQCAR #3# 0)
                                       (|Record|
                                        (|:| |num|
                                         (|Pattern| (|Integer|)))
                                        (|:| |den|
                                         (|Pattern| (|Integer|))))
                                       #3#)) . #5#)
                              (SEQ (LETT |r|
                                    (SPADCALL (QCAR |uvr|)
                                     (QREFELT $ 17)) . #5#)
                                   (EXIT
                                    (COND
                                      ((QEQCAR |r| 0)
                                       (SEQ
                                        (LETT |v|
                                         (SPADCALL
                                          (SPADCALL (QCDR |r|)
                                           (QREFELT $ 20))
                                          |x| (QREFELT $ 41)) . #5#)
                                        (EXIT
                                         (COND
                                           ((QEQCAR |v| 0)
                                            (PROGN
                                              (LETT #4#
                                               (|PMINS;patternMatchRestricted|
                                                (QCDR |v|) (QCDR |uvr|)
                                                |l|
                                                (|spadConstant| $ 30)
                                                $) . #5#)
                                              (GO #4#))))))))))
                              (LETT |r|
                                    (SPADCALL (QCDR |uvr|)
                                     (QREFELT $ 17)) . #5#)
                              (EXIT (COND
                                      ((QEQCAR |r| 0)
                                       (SPADCALL
                                        (SPADCALL (QCDR |r|) |x|
                                         (QREFELT $ 48))
                                        (QCAR |uvr|) |l|
                                        (QREFELT $ 12)))
                                      ('T (SPADCALL (QREFELT $ 18)))))))
                   #4# (EXIT #4#)))
             ('T (SPADCALL (QREFELT $ 18)))))))) 

(DEFUN |PMINS;patternMatchInner!1| (|#1| |#2| $)
  (CONS 0 (SPADCALL |#1| |#2| (QREFELT $ 43)))) 

(DEFUN |PMINS;patternMatchInner!0| (|#1| |#2| $)
  (SPADCALL |#1| |#2| (QREFELT $ 41))) 

(DEFUN |PatternMatchIntegerNumberSystem| (#0=#:G1903)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1904)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (LIST (|devaluate| #0#))
                       (HGET |$ConstructorCache|
                             '|PatternMatchIntegerNumberSystem|)
                       '|domainEqualList|)
                   . #2=(|PatternMatchIntegerNumberSystem|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (|PatternMatchIntegerNumberSystem;| #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache|
                        '|PatternMatchIntegerNumberSystem|))))))))))) 

(DEFUN |PatternMatchIntegerNumberSystem;| (|#1|)
  (PROG (DV$1 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|PatternMatchIntegerNumberSystem|))
        (LETT |dv$|
              (LIST '|PatternMatchIntegerNumberSystem| DV$1) . #0#)
        (LETT $ (GETREFV 49) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache|
            '|PatternMatchIntegerNumberSystem| (LIST DV$1) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        $)))) 

(MAKEPROP '|PatternMatchIntegerNumberSystem| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|Boolean|)
             (|Pattern| 19) (0 . |generic?|)
             (|PatternMatchResult| 19 6) (5 . |addMatch|)
             |PMINS;patternMatch;IP2Pmr;1| (12 . |addMatchRestricted|)
             (|List| 8) (20 . |last|) (|Union| 19 '"failed")
             (25 . |retractIfCan|) (30 . |failed|) (|Integer|)
             (34 . |coerce|) (39 . |constant?|) (44 . |convert|)
             (|Record| (|:| |val| $) (|:| |exponent| 27))
             (|Union| 23 '"failed") (49 . |isExpt|)
             (|Union| 6 '"failed") (|NonNegativeInteger|)
             (|IntegerRoots| 6) (54 . |perfectNthRoot|) (60 . |One|)
             (|Record| (|:| |val| $) (|:| |exponent| $))
             (|Union| 31 '"failed") (64 . |isPower|)
             (|Record| (|:| |base| 6) (|:| |exponent| 27))
             (69 . |perfectNthRoot|) (74 . |failed?|) (79 . |base|)
             (|Union| (|List| $) '"failed") (83 . |isTimes|)
             (|Union| $ '"failed") (88 . |exquo|) (94 . |isPlus|)
             (99 . -) (105 . |Zero|)
             (|Record| (|:| |num| $) (|:| |den| $))
             (|Union| 45 '"failed") (109 . |isQuotient|) (114 . *))
          '#(|patternMatch| 120) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 48
                                '(1 8 7 0 9 3 10 0 8 6 0 11 4 10 0 8 6
                                  0 6 13 1 14 8 0 15 1 8 16 0 17 0 10 0
                                  18 1 6 0 19 20 1 8 7 0 21 1 6 19 0 22
                                  1 8 24 0 25 2 28 26 6 27 29 0 6 0 30
                                  1 8 32 0 33 1 28 34 6 35 1 10 7 0 36
                                  0 6 0 37 1 8 38 0 39 2 6 40 0 0 41 1
                                  8 38 0 42 2 6 0 0 0 43 0 6 0 44 1 8
                                  46 0 47 2 6 0 19 0 48 3 0 10 6 8 10
                                  12)))))
          '|lookupComplete|)) 
