
(/VERSIONCHECK 2) 

(DEFUN |BOP;is?;$SB;1| (|op| |s| $) (EQUAL (SPADCALL |op| (QREFELT $ 15)) |s|)) 

(PUT '|BOP;name;$S;2| '|SPADreplace| '(XLAM (|op|) (QVELT |op| 0))) 

(DEFUN |BOP;name;$S;2| (|op| $) (QVELT |op| 0)) 

(PUT '|BOP;properties;$Al;3| '|SPADreplace| '(XLAM (|op|) (QVELT |op| 2))) 

(DEFUN |BOP;properties;$Al;3| (|op| $) (QVELT |op| 2)) 

(DEFUN |BOP;setProperties;$Al$;4| (|op| |l| $)
  (SEQ (QSETVELT |op| 2 |l|) (EXIT |op|))) 

(DEFUN |BOP;operator;S$;5| (|s| $)
  (|BOP;oper| |s| -1 (SPADCALL (QREFELT $ 21)) $)) 

(DEFUN |BOP;operator;SNni$;6| (|s| |n| $)
  (|BOP;oper| |s| (SPADCALL |n| (QREFELT $ 25)) (SPADCALL (QREFELT $ 21)) $)) 

(DEFUN |BOP;property;$SU;7| (|op| |name| $)
  (SPADCALL |name| (QVELT |op| 2) (QREFELT $ 29))) 

(DEFUN |BOP;assert;$S$;8| (|op| |s| $) (SPADCALL |op| |s| NIL (QREFELT $ 32))) 

(DEFUN |BOP;has?;$SB;9| (|op| |name| $)
  (SPADCALL |name| (QVELT |op| 2) (QREFELT $ 34))) 

(PUT '|BOP;oper| '|SPADreplace| 'VECTOR) 

(DEFUN |BOP;oper| (|se| |n| |prop| $) (VECTOR |se| |n| |prop|)) 

(DEFUN |BOP;weight;$Nni$;11| (|op| |n| $)
  (SPADCALL |op| (QREFELT $ 12) |n| (QREFELT $ 32))) 

(DEFUN |BOP;nullary?;$B;12| (|op| $) (QSZEROP (QVELT |op| 1))) 

(DEFUN |BOP;unary?;$B;13| (|op| $) (EQL (QVELT |op| 1) 1)) 

(DEFUN |BOP;nary?;$B;14| (|op| $) (QSMINUSP (QVELT |op| 1))) 

(DEFUN |BOP;equality;$M$;15| (|op| |func| $)
  (SPADCALL |op| (QREFELT $ 11) |func| (QREFELT $ 32))) 

(DEFUN |BOP;comparison;$M$;16| (|op| |func| $)
  (SPADCALL |op| (QREFELT $ 10) |func| (QREFELT $ 32))) 

(DEFUN |BOP;display;$M$;17| (|op| |f| $)
  (PROG ()
    (RETURN
     (SPADCALL |op| (CONS #'|BOP;display;$M$;17!0| (VECTOR |f| $))
               (QREFELT $ 47))))) 

(DEFUN |BOP;display;$M$;17!0| (|l1| $$)
  (PROG ($ |f|)
    (LETT $ (QREFELT $$ 1) . #1=(|BOP;display;$M$;17|))
    (LETT |f| (QREFELT $$ 0) . #1#)
    (RETURN (PROGN (SPADCALL (SPADCALL |l1| (QREFELT $ 45)) |f|))))) 

(DEFUN |BOP;deleteProperty!;$S$;18| (|op| |name| $)
  (SEQ (SPADCALL |name| (SPADCALL |op| (QREFELT $ 19)) (QREFELT $ 50))
       (EXIT |op|))) 

(DEFUN |BOP;setProperty;$SN$;19| (|op| |name| |valu| $)
  (SEQ (SPADCALL (QVELT |op| 2) |name| |valu| (QREFELT $ 52)) (EXIT |op|))) 

(DEFUN |BOP;coerce;$Of;20| (|op| $)
  (SPADCALL (SPADCALL |op| (QREFELT $ 15)) (QREFELT $ 53))) 

(DEFUN |BOP;input;$M$;21| (|op| |f| $)
  (SPADCALL |op| (QREFELT $ 14) |f| (QREFELT $ 32))) 

(DEFUN |BOP;display;$M$;22| (|op| |f| $)
  (SPADCALL |op| (QREFELT $ 13) |f| (QREFELT $ 32))) 

(DEFUN |BOP;display;$U;23| (|op| $)
  (PROG (|u|)
    (RETURN
     (SEQ
      (LETT |u| (SPADCALL |op| (QREFELT $ 13) (QREFELT $ 30))
            |BOP;display;$U;23|)
      (EXIT
       (COND ((QEQCAR |u| 1) (CONS 1 "failed")) ('T (CONS 0 (QCDR |u|))))))))) 

(DEFUN |BOP;input;$U;24| (|op| $)
  (PROG (|u|)
    (RETURN
     (SEQ
      (LETT |u| (SPADCALL |op| (QREFELT $ 14) (QREFELT $ 30))
            |BOP;input;$U;24|)
      (EXIT
       (COND ((QEQCAR |u| 1) (CONS 1 "failed")) ('T (CONS 0 (QCDR |u|))))))))) 

(DEFUN |BOP;arity;$U;25| (|op| $)
  (PROG (#1=#:G736 |n|)
    (RETURN
     (COND
      ((MINUSP (LETT |n| (QVELT |op| 1) . #2=(|BOP;arity;$U;25|)))
       (CONS 1 "failed"))
      ('T
       (CONS 0
             (PROG1 (LETT #1# |n| . #2#)
               (|check-subtype| (>= #1# 0) '(|NonNegativeInteger|) #1#)))))))) 

(DEFUN |BOP;copy;2$;26| (|op| $)
  (PROG (#1=#:G748 |r| #2=#:G747)
    (RETURN
     (SEQ
      (|BOP;oper| (SPADCALL |op| (QREFELT $ 15)) (QVELT |op| 1)
       (SPADCALL
        (PROGN
         (LETT #2# NIL . #3=(|BOP;copy;2$;26|))
         (SEQ (LETT |r| NIL . #3#)
              (LETT #1#
                    (SPADCALL (SPADCALL |op| (QREFELT $ 19)) (QREFELT $ 65))
                    . #3#)
              G190
              (COND
               ((OR (ATOM #1#) (PROGN (LETT |r| (CAR #1#) . #3#) NIL))
                (GO G191)))
              (SEQ
               (EXIT (LETT #2# (CONS (CONS (QCAR |r|) (QCDR |r|)) #2#) . #3#)))
              (LETT #1# (CDR #1#) . #3#) (GO G190) G191
              (EXIT (NREVERSE0 #2#))))
        (QREFELT $ 66))
       $))))) 

(DEFUN |BOP;=;2$B;27| (|op1| |op2| $)
  (PROG (|func|)
    (RETURN
     (SEQ
      (COND ((EQ |op1| |op2|) 'T)
            ((OR
              (OR
               (NULL
                (EQUAL (SPADCALL |op1| (QREFELT $ 15))
                       (SPADCALL |op2| (QREFELT $ 15))))
               (NULL (EQL (QVELT |op1| 1) (QVELT |op2| 1))))
              (NULL
               (SPADCALL
                (SPADCALL
                 (SPADCALL (SPADCALL |op1| (QREFELT $ 19)) (QREFELT $ 69))
                 (QREFELT $ 71))
                (SPADCALL
                 (SPADCALL (SPADCALL |op2| (QREFELT $ 19)) (QREFELT $ 69))
                 (QREFELT $ 71))
                (QREFELT $ 72))))
             'NIL)
            ('T
             (SEQ
              (LETT |func| (SPADCALL |op1| (QREFELT $ 11) (QREFELT $ 30))
                    |BOP;=;2$B;27|)
              (EXIT
               (COND ((QEQCAR |func| 0) (SPADCALL |op1| |op2| (QCDR |func|)))
                     ('T 'T)))))))))) 

(DEFUN |BOP;weight;$Nni;28| (|op| $)
  (PROG (|w|)
    (RETURN
     (SEQ
      (LETT |w| (SPADCALL |op| (QREFELT $ 12) (QREFELT $ 30))
            |BOP;weight;$Nni;28|)
      (EXIT (COND ((QEQCAR |w| 1) 1) ('T (QCDR |w|)))))))) 

(DEFUN |BOP;<;2$B;29| (|op1| |op2| $)
  (PROG (|func| #1=#:G769 |n2| |d2| |n1| |d1| |k2| |k1| #2=#:G777 |w2| |w1|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (SEQ (LETT |w1| (SPADCALL |op1| (QREFELT $ 74)) . #3=(|BOP;<;2$B;29|))
             (LETT |w2| (SPADCALL |op2| (QREFELT $ 74)) . #3#)
             (EXIT
              (COND
               ((NULL (EQL |w1| |w2|))
                (PROGN (LETT #2# (< |w1| |w2|) . #3#) (GO #2#))))))
        (COND
         ((NULL (EQL (QVELT |op1| 1) (QVELT |op2| 1)))
          (EXIT (< (QVELT |op1| 1) (QVELT |op2| 1)))))
        (COND
         ((NULL
           (EQUAL (SPADCALL |op1| (QREFELT $ 15))
                  (SPADCALL |op2| (QREFELT $ 15))))
          (EXIT
           (GGREATERP (SPADCALL |op2| (QREFELT $ 15))
                      (SPADCALL |op1| (QREFELT $ 15))))))
        (LETT |n1|
              (SPADCALL
               (LETT |k1|
                     (SPADCALL
                      (SPADCALL (SPADCALL |op1| (QREFELT $ 19)) (QREFELT $ 69))
                      (QREFELT $ 71))
                     . #3#)
               (QREFELT $ 75))
              . #3#)
        (LETT |n2|
              (SPADCALL
               (LETT |k2|
                     (SPADCALL
                      (SPADCALL (SPADCALL |op2| (QREFELT $ 19)) (QREFELT $ 69))
                      (QREFELT $ 71))
                     . #3#)
               (QREFELT $ 75))
              . #3#)
        (EXIT
         (COND
          ((EQL |n1| |n2|)
           (COND
            ((NULL
              (ZEROP
               (LETT |n1|
                     (SPADCALL
                      (LETT |d1| (SPADCALL |k1| |k2| (QREFELT $ 76)) . #3#)
                      (QREFELT $ 75))
                     . #3#)))
             (SEQ
              (EXIT
               (SEQ
                (SEQ
                 (LETT |n2|
                       (SPADCALL
                        (LETT |d2| (SPADCALL |k2| |k1| (QREFELT $ 76)) . #3#)
                        (QREFELT $ 75))
                       . #3#)
                 (EXIT
                  (COND
                   ((NULL (EQL |n1| |n2|))
                    (PROGN (LETT #1# (< |n1| |n2|) . #3#) (GO #1#))))))
                (EXIT
                 (GGREATERP (SPADCALL |d2| (QREFELT $ 77))
                            (SPADCALL |d1| (QREFELT $ 77))))))
              #1# (EXIT #1#)))
            ('T
             (SEQ
              (LETT |func| (SPADCALL |op1| (QREFELT $ 10) (QREFELT $ 30))
                    . #3#)
              (EXIT
               (COND ((QEQCAR |func| 0) (SPADCALL |op1| |op2| (QCDR |func|)))
                     (#4='T
                      (SEQ
                       (LETT |func|
                             (SPADCALL |op1| (QREFELT $ 11) (QREFELT $ 30))
                             . #3#)
                       (EXIT
                        (COND
                         ((QEQCAR |func| 0)
                          (COND ((SPADCALL |op1| |op2| (QCDR |func|)) 'NIL)
                                (#4# 'T)))
                         (#4# 'NIL)))))))))))
          (#4# (< |n1| |n2|))))))
      #2# (EXIT #2#))))) 

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

(DEFUN |BasicOperator;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
     (PROGN
      (LETT |dv$| '(|BasicOperator|) . #1=(|BasicOperator|))
      (LETT $ (GETREFV 79) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|BasicOperator| NIL (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6
                (|Record| (|:| |opname| (|Symbol|))
                          (|:| |narg| (|SingleInteger|))
                          (|:| |props|
                               (|AssociationList| (|Symbol|) (|None|)))))
      (QSETREFV $ 10 (SPADCALL "%less?" (QREFELT $ 9)))
      (QSETREFV $ 11 (SPADCALL "%equal?" (QREFELT $ 9)))
      (QSETREFV $ 12 '|%weight|)
      (QSETREFV $ 13 '|%display|)
      (QSETREFV $ 14 '|%input|)
      $)))) 

(MAKEPROP '|BasicOperator| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL '|Rep| (|String|) (|Symbol|)
              (0 . |coerce|) 'LESS? 'EQUAL? 'WEIGHT 'DISPLAY 'SEXPR
              |BOP;name;$S;2| (|Boolean|) |BOP;is?;$SB;1|
              (|AssociationList| 8 31) |BOP;properties;$Al;3|
              |BOP;setProperties;$Al$;4| (5 . |table|) |BOP;operator;S$;5|
              (|Integer|) (|SingleInteger|) (9 . |coerce|)
              (|NonNegativeInteger|) |BOP;operator;SNni$;6|
              (|Union| 31 '"failed") (14 . |search|) |BOP;property;$SU;7|
              (|None|) |BOP;setProperty;$SN$;19| |BOP;assert;$S$;8|
              (20 . |key?|) |BOP;has?;$SB;9| |BOP;weight;$Nni$;11|
              |BOP;nullary?;$B;12| |BOP;unary?;$B;13| |BOP;nary?;$B;14|
              (|Mapping| 16 $ $) |BOP;equality;$M$;15| |BOP;comparison;$M$;16|
              (|OutputForm|) (|List| 43) (26 . |first|) (|Mapping| 43 44)
              |BOP;display;$M$;22| (|Mapping| 43 43) |BOP;display;$M$;17|
              (31 . |remove!|) |BOP;deleteProperty!;$S$;18| (37 . |setelt|)
              (44 . |coerce|) |BOP;coerce;$Of;20|
              (|Mapping| (|InputForm|) (|List| (|InputForm|)))
              |BOP;input;$M$;21| (|Union| 46 '"failed") |BOP;display;$U;23|
              (|Union| 55 '"failed") |BOP;input;$U;24| (|Union| 26 '"failed")
              |BOP;arity;$U;25| (|Record| (|:| |key| 8) (|:| |entry| 31))
              (|List| 63) (49 . |entries|) (54 . |table|) |BOP;copy;2$;26|
              (|List| 8) (59 . |keys|) (|Set| 8) (64 . |brace|) (69 . =)
              |BOP;=;2$B;27| |BOP;weight;$Nni;28| (75 . |#|)
              (80 . |difference|) (86 . |inspect|) |BOP;<;2$B;29|)
           '#(~= 91 |weight| 97 |unary?| 108 |smaller?| 113 |setProperty| 119
              |setProperties| 126 |property| 132 |properties| 138 |operator|
              143 |nullary?| 154 |nary?| 159 |name| 164 |min| 169 |max| 175
              |latex| 181 |is?| 186 |input| 192 |hash| 203 |has?| 208
              |equality| 214 |display| 220 |deleteProperty!| 237 |copy| 243
              |comparison| 248 |coerce| 254 |assert| 259 |arity| 265 >= 270 >
              276 = 282 <= 288 < 294)
           'NIL
           (CONS (|makeByteWordVec2| 1 '(0 0 0 0 0))
                 (CONS '#(|OrderedSet&| NIL |SetCategory&| |BasicType&| NIL)
                       (CONS
                        '#((|OrderedSet|) (|Comparable|) (|SetCategory|)
                           (|BasicType|) (|CoercibleTo| 43))
                        (|makeByteWordVec2| 78
                                            '(1 8 0 7 9 0 18 0 21 1 24 0 23 25
                                              2 18 28 8 0 29 2 18 16 8 0 34 1
                                              44 43 0 45 2 18 28 8 0 50 3 18 31
                                              0 8 31 52 1 8 43 0 53 1 18 64 0
                                              65 1 18 0 64 66 1 18 68 0 69 1 70
                                              0 68 71 2 70 16 0 0 72 1 70 26 0
                                              75 2 70 0 0 0 76 1 70 8 0 77 2 0
                                              16 0 0 1 2 0 0 0 26 36 1 0 26 0
                                              74 1 0 16 0 38 2 0 16 0 0 1 3 0 0
                                              0 8 31 32 2 0 0 0 18 20 2 0 28 0
                                              8 30 1 0 18 0 19 1 0 0 8 22 2 0 0
                                              8 26 27 1 0 16 0 37 1 0 16 0 39 1
                                              0 8 0 15 2 0 0 0 0 1 2 0 0 0 0 1
                                              1 0 7 0 1 2 0 16 0 8 17 2 0 0 0
                                              55 56 1 0 59 0 60 1 0 24 0 1 2 0
                                              16 0 8 35 2 0 0 0 40 41 2 0 0 0
                                              46 47 2 0 0 0 48 49 1 0 57 0 58 2
                                              0 0 0 8 51 1 0 0 0 67 2 0 0 0 40
                                              42 1 0 43 0 54 2 0 0 0 8 33 1 0
                                              61 0 62 2 0 16 0 0 1 2 0 16 0 0 1
                                              2 0 16 0 0 73 2 0 16 0 0 1 2 0 16
                                              0 0 78)))))
           '|lookupComplete|)) 

(MAKEPROP '|BasicOperator| 'NILADIC T) 
