
(/VERSIONCHECK 2) 

(PUT '|LIST;nil;$;1| '|SPADreplace| '(XLAM NIL NIL)) 

(DEFUN |LIST;nil;$;1| ($) NIL) 

(PUT '|LIST;null;$B;2| '|SPADreplace| 'NULL) 

(DEFUN |LIST;null;$B;2| (|l| $) (NULL |l|)) 

(PUT '|LIST;cons;S2$;3| '|SPADreplace| 'CONS) 

(DEFUN |LIST;cons;S2$;3| (|s| |l| $) (CONS |s| |l|)) 

(PUT '|LIST;append;3$;4| '|SPADreplace| 'APPEND) 

(DEFUN |LIST;append;3$;4| (|l| |t| $) (APPEND |l| |t|)) 

(DEFUN |LIST;writeOMList| (|dev| |x| $)
  (SEQ (SPADCALL |dev| (QREFELT $ 14))
       (SPADCALL |dev| "list1" "list" (QREFELT $ 16))
       (SEQ G190 (COND ((NULL (COND ((NULL |x|) 'NIL) ('T 'T))) (GO G191)))
            (SEQ (SPADCALL |dev| (|SPADfirst| |x|) 'NIL (QREFELT $ 17))
                 (EXIT (LETT |x| (CDR |x|) |LIST;writeOMList|)))
            NIL (GO G190) G191 (EXIT NIL))
       (EXIT (SPADCALL |dev| (QREFELT $ 18))))) 

(DEFUN |LIST;OMwrite;$S;6| (|x| $)
  (PROG (|s| |dev| |sp|)
    (RETURN
     (SEQ (LETT |s| "" . #1=(|LIST;OMwrite;$S;6|))
          (LETT |sp| (OM-STRINGTOSTRINGPTR |s|) . #1#)
          (LETT |dev| (SPADCALL |sp| (SPADCALL (QREFELT $ 20)) (QREFELT $ 21))
                . #1#)
          (SPADCALL |dev| (QREFELT $ 22)) (|LIST;writeOMList| |dev| |x| $)
          (SPADCALL |dev| (QREFELT $ 23)) (SPADCALL |dev| (QREFELT $ 24))
          (LETT |s| (OM-STRINGPTRTOSTRING |sp|) . #1#) (EXIT |s|))))) 

(DEFUN |LIST;OMwrite;$BS;7| (|x| |wholeObj| $)
  (PROG (|s| |dev| |sp|)
    (RETURN
     (SEQ (LETT |s| "" . #1=(|LIST;OMwrite;$BS;7|))
          (LETT |sp| (OM-STRINGTOSTRINGPTR |s|) . #1#)
          (LETT |dev| (SPADCALL |sp| (SPADCALL (QREFELT $ 20)) (QREFELT $ 21))
                . #1#)
          (COND (|wholeObj| (SPADCALL |dev| (QREFELT $ 22))))
          (|LIST;writeOMList| |dev| |x| $)
          (COND (|wholeObj| (SPADCALL |dev| (QREFELT $ 23))))
          (SPADCALL |dev| (QREFELT $ 24))
          (LETT |s| (OM-STRINGPTRTOSTRING |sp|) . #1#) (EXIT |s|))))) 

(DEFUN |LIST;OMwrite;Omd$V;8| (|dev| |x| $)
  (SEQ (SPADCALL |dev| (QREFELT $ 22)) (|LIST;writeOMList| |dev| |x| $)
       (EXIT (SPADCALL |dev| (QREFELT $ 23))))) 

(DEFUN |LIST;OMwrite;Omd$BV;9| (|dev| |x| |wholeObj| $)
  (SEQ (COND (|wholeObj| (SPADCALL |dev| (QREFELT $ 22))))
       (|LIST;writeOMList| |dev| |x| $)
       (EXIT (COND (|wholeObj| (SPADCALL |dev| (QREFELT $ 23))))))) 

(DEFUN |LIST;setUnion;3$;10| (|l1| |l2| $)
  (SPADCALL (SPADCALL |l1| |l2| (QREFELT $ 29)) (QREFELT $ 30))) 

(DEFUN |LIST;setIntersection;3$;11| (|l1| |l2| $)
  (PROG (|u|)
    (RETURN
     (SEQ (LETT |u| NIL . #1=(|LIST;setIntersection;3$;11|))
          (LETT |l1| (SPADCALL |l1| (QREFELT $ 30)) . #1#)
          (SEQ G190 (COND ((NULL (COND ((NULL |l1|) 'NIL) ('T 'T))) (GO G191)))
               (SEQ
                (COND
                 ((SPADCALL (|SPADfirst| |l1|) |l2| (QREFELT $ 32))
                  (LETT |u| (CONS (|SPADfirst| |l1|) |u|) . #1#)))
                (EXIT (LETT |l1| (CDR |l1|) . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (EXIT |u|))))) 

(DEFUN |LIST;setDifference;3$;12| (|l1| |l2| $)
  (PROG (|lu| |l11|)
    (RETURN
     (SEQ
      (LETT |l1| (SPADCALL |l1| (QREFELT $ 30))
            . #1=(|LIST;setDifference;3$;12|))
      (LETT |lu| NIL . #1#)
      (SEQ G190 (COND ((NULL (COND ((NULL |l1|) 'NIL) ('T 'T))) (GO G191)))
           (SEQ (LETT |l11| (SPADCALL |l1| 1 (QREFELT $ 35)) . #1#)
                (COND
                 ((NULL (SPADCALL |l11| |l2| (QREFELT $ 32)))
                  (LETT |lu| (CONS |l11| |lu|) . #1#)))
                (EXIT (LETT |l1| (CDR |l1|) . #1#)))
           NIL (GO G190) G191 (EXIT NIL))
      (EXIT |lu|))))) 

(DEFUN |LIST;convert;$If;13| (|x| $)
  (PROG (#1=#:G17150 |a| #2=#:G17149)
    (RETURN
     (SEQ
      (SPADCALL
       (CONS (SPADCALL '|construct| (QREFELT $ 39))
             (PROGN
              (LETT #2# NIL . #3=(|LIST;convert;$If;13|))
              (SEQ (LETT |a| NIL . #3#) (LETT #1# |x| . #3#) G190
                   (COND
                    ((OR (ATOM #1#) (PROGN (LETT |a| (CAR #1#) . #3#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (LETT #2# (CONS (SPADCALL |a| (QREFELT $ 40)) #2#)
                           . #3#)))
                   (LETT #1# (CDR #1#) . #3#) (GO G190) G191
                   (EXIT (NREVERSE0 #2#)))))
       (QREFELT $ 42)))))) 

(DEFUN |List| (#1=#:G17161)
  (PROG ()
    (RETURN
     (PROG (#2=#:G17162)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (LIST (|devaluate| #1#))
                                           (HGET |$ConstructorCache| '|List|)
                                           '|domainEqualList|)
                . #3=(|List|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT (PROG1 (|List;| #1#) (LETT #2# T . #3#))
            (COND ((NOT #2#) (HREM |$ConstructorCache| '|List|))))))))))) 

(DEFUN |List;| (|#1|)
  (PROG (#1=#:G17160 |pv$| #2=#:G17159 $ |dv$| DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #3=(|List|))
      (LETT |dv$| (LIST '|List| DV$1) . #3#)
      (LETT $ (GETREFV 61) . #3#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (|HasCategory| |#1| '(|SetCategory|))
                                          (|HasCategory| |#1|
                                                         '(|ConvertibleTo|
                                                           (|InputForm|)))
                                          (LETT #2#
                                                (|HasCategory| |#1|
                                                               '(|OrderedSet|))
                                                . #3#)
                                          (OR #2#
                                              (|HasCategory| |#1|
                                                             '(|SetCategory|)))
                                          (|HasCategory| |#1| '(|OpenMath|))
                                          (|HasCategory| (|Integer|)
                                                         '(|OrderedSet|))
                                          (AND
                                           (|HasCategory| |#1|
                                                          (LIST '|Evalable|
                                                                (|devaluate|
                                                                 |#1|)))
                                           (|HasCategory| |#1|
                                                          '(|SetCategory|)))
                                          (OR
                                           (AND
                                            (|HasCategory| |#1|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#1|)))
                                            #2#)
                                           (AND
                                            (|HasCategory| |#1|
                                                           (LIST '|Evalable|
                                                                 (|devaluate|
                                                                  |#1|)))
                                            (|HasCategory| |#1|
                                                           '(|SetCategory|))))))
                      . #3#))
      (|haddProp| |$ConstructorCache| '|List| (LIST DV$1) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (AND (|HasCategory| $ '(|finiteAggregate|)) (|augmentPredVector| $ 256))
      (AND (|HasCategory| |#1| '(|SetCategory|))
           (|HasCategory| $ '(|finiteAggregate|)) (|augmentPredVector| $ 512))
      (AND (LETT #1# (|HasCategory| $ '(|shallowlyMutable|)) . #3#)
           (|augmentPredVector| $ 1024))
      (AND #2# #1# (|augmentPredVector| $ 2048))
      (COND
       ((|testBitVector| |pv$| 5)
        (PROGN
         (QSETREFV $ 25 (CONS (|dispatchFunction| |LIST;OMwrite;$S;6|) $))
         (QSETREFV $ 26 (CONS (|dispatchFunction| |LIST;OMwrite;$BS;7|) $))
         (QSETREFV $ 27 (CONS (|dispatchFunction| |LIST;OMwrite;Omd$V;8|) $))
         (QSETREFV $ 28
                   (CONS (|dispatchFunction| |LIST;OMwrite;Omd$BV;9|) $)))))
      (COND
       ((|testBitVector| |pv$| 1)
        (PROGN
         (QSETREFV $ 31 (CONS (|dispatchFunction| |LIST;setUnion;3$;10|) $))
         (QSETREFV $ 33
                   (CONS (|dispatchFunction| |LIST;setIntersection;3$;11|) $))
         (QSETREFV $ 36
                   (CONS (|dispatchFunction| |LIST;setDifference;3$;12|) $)))))
      (COND
       ((|testBitVector| |pv$| 2)
        (QSETREFV $ 43 (CONS (|dispatchFunction| |LIST;convert;$If;13|) $))))
      $)))) 

(MAKEPROP '|List| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL (|IndexedList| 6 (NRTEVAL 1)) (|local| |#1|)
              |LIST;nil;$;1| (|Boolean|) |LIST;null;$B;2| |LIST;cons;S2$;3|
              |LIST;append;3$;4| (|Void|) (|OpenMathDevice|) (0 . |OMputApp|)
              (|String|) (5 . |OMputSymbol|) (12 . |OMwrite|)
              (19 . |OMputEndApp|) (|OpenMathEncoding|) (24 . |OMencodingXML|)
              (28 . |OMopenString|) (34 . |OMputObject|)
              (39 . |OMputEndObject|) (44 . |OMclose|) (49 . |OMwrite|)
              (54 . |OMwrite|) (60 . |OMwrite|) (66 . |OMwrite|)
              (73 . |concat|) (79 . |removeDuplicates|) (84 . |setUnion|)
              (90 . |member?|) (96 . |setIntersection|) (|Integer|)
              (102 . |elt|) (108 . |setDifference|) (|Symbol|) (|InputForm|)
              (114 . |convert|) (119 . |convert|) (|List| $) (124 . |convert|)
              (129 . |convert|) (|Mapping| 6 6 6) (|NonNegativeInteger|)
              (|List| 6) (|Equation| 6) (|List| 47) (|Mapping| 8 6)
              (|Mapping| 8 6 6) (|UniversalSegment| 34) '"last" '"rest"
              '"first" '"value" (|Mapping| 6 6) (|SingleInteger|)
              (|OutputForm|) (|List| 34) (|Union| 6 '"failed"))
           '#(|setUnion| 134 |setIntersection| 140 |setDifference| 146
              |removeDuplicates| 152 |null| 157 |nil| 162 |member?| 166 |elt|
              172 |convert| 178 |cons| 183 |concat| 189 |append| 195 |OMwrite|
              201)
           'NIL
           (CONS
            (|makeByteWordVec2| 8
                                '(0 0 0 0 0 0 0 0 0 3 0 3 0 0 8 4 0 0 0 0 8 1 2
                                  4 5))
            (CONS
             '#(|ListAggregate&| |StreamAggregate&|
                |ExtensibleLinearAggregate&| |FiniteLinearAggregate&|
                |UnaryRecursiveAggregate&| |LinearAggregate&|
                |RecursiveAggregate&| |IndexedAggregate&| |Collection&|
                |OrderedSet&| |HomogeneousAggregate&| NIL |Aggregate&|
                |EltableAggregate&| |Evalable&| |SetCategory&| NIL NIL NIL NIL
                |InnerEvalable&| NIL NIL |BasicType&| NIL)
             (CONS
              '#((|ListAggregate| 6) (|StreamAggregate| 6)
                 (|ExtensibleLinearAggregate| 6) (|FiniteLinearAggregate| 6)
                 (|UnaryRecursiveAggregate| 6) (|LinearAggregate| 6)
                 (|RecursiveAggregate| 6) (|IndexedAggregate| 34 6)
                 (|Collection| 6) (|OrderedSet|) (|HomogeneousAggregate| 6)
                 (|Comparable|) (|Aggregate|) (|EltableAggregate| 34 6)
                 (|Evalable| 6) (|SetCategory|) (|shallowlyMutable|)
                 (|finiteAggregate|) (|Type|) (|Eltable| 34 6)
                 (|InnerEvalable| 6 6) (|CoercibleTo| 58) (|ConvertibleTo| 38)
                 (|BasicType|) (|OpenMath|))
              (|makeByteWordVec2| 43
                                  '(1 13 12 0 14 3 13 12 0 15 15 16 3 6 12 13 0
                                    8 17 1 13 12 0 18 0 19 0 20 2 13 0 15 19 21
                                    1 13 12 0 22 1 13 12 0 23 1 13 12 0 24 1 0
                                    15 0 25 2 0 15 0 8 26 2 0 12 13 0 27 3 0 12
                                    13 0 8 28 2 0 0 0 0 29 1 0 0 0 30 2 0 0 0 0
                                    31 2 0 8 6 0 32 2 0 0 0 0 33 2 0 6 0 34 35
                                    2 0 0 0 0 36 1 38 0 37 39 1 6 38 0 40 1 38
                                    0 41 42 1 0 38 0 43 2 1 0 0 0 31 2 1 0 0 0
                                    33 2 1 0 0 0 36 1 10 0 0 30 1 0 8 0 9 0 0 0
                                    7 2 10 8 6 0 32 2 0 6 0 34 35 1 2 38 0 43 2
                                    0 0 6 0 10 2 0 0 0 0 29 2 0 0 0 0 11 3 5 12
                                    13 0 8 28 2 5 12 13 0 27 1 5 15 0 25 2 5 15
                                    0 8 26)))))
           '|lookupIncomplete|)) 
