
(/VERSIONCHECK 2) 

(PUT '|OMENC;=;2$B;1| '|SPADreplace| 'EQL) 

(DEFUN |OMENC;=;2$B;1| (|u| |v| $) (EQL |u| |v|)) 

(DEFUN |OMENC;coerce;$Of;2| (|u| $)
  (COND ((SPADCALL |u| 0 (QREFELT $ 8)) "Unknown")
        ((SPADCALL |u| 1 (QREFELT $ 8)) "Binary")
        ((SPADCALL |u| (SPADCALL 2 (QREFELT $ 10)) (QREFELT $ 8)) "XML")
        ((SPADCALL |u| (SPADCALL 3 (QREFELT $ 10)) (QREFELT $ 8)) "SGML")
        ('T (|error| "Bogus OpenMath Encoding Type")))) 

(PUT '|OMENC;OMencodingUnknown;$;3| '|SPADreplace| '(XLAM NIL 0)) 

(DEFUN |OMENC;OMencodingUnknown;$;3| ($) 0) 

(PUT '|OMENC;OMencodingBinary;$;4| '|SPADreplace| '(XLAM NIL 1)) 

(DEFUN |OMENC;OMencodingBinary;$;4| ($) 1) 

(DEFUN |OMENC;OMencodingXML;$;5| ($) (SPADCALL 2 (QREFELT $ 10))) 

(DEFUN |OMENC;OMencodingSGML;$;6| ($) (SPADCALL 3 (QREFELT $ 10))) 

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

(DEFUN |OpenMathEncoding;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
     (PROGN
      (LETT |dv$| '(|OpenMathEncoding|) . #1=(|OpenMathEncoding|))
      (LETT $ (GETREFV 19) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|OpenMathEncoding| NIL (CONS 1 $))
      (|stuffDomainSlots| $)
      (SETF |pv$| (QREFELT $ 3))
      (QSETREFV $ 6 (|SingleInteger|))
      $)))) 

(MAKEPROP '|OpenMathEncoding| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL '|Rep| (|Boolean|) |OMENC;=;2$B;1|
              (|Integer|) (0 . |coerce|) (|OutputForm|) |OMENC;coerce;$Of;2|
              |OMENC;OMencodingUnknown;$;3| |OMENC;OMencodingBinary;$;4|
              |OMENC;OMencodingXML;$;5| |OMENC;OMencodingSGML;$;6|
              (|SingleInteger|) (|String|))
           '#(~= 5 |latex| 11 |hash| 16 |coerce| 21 |OMencodingXML| 26
              |OMencodingUnknown| 30 |OMencodingSGML| 34 |OMencodingBinary| 38
              = 42)
           'NIL
           (CONS (|makeByteWordVec2| 1 '(0 0 0))
                 (CONS '#(|SetCategory&| |BasicType&| NIL)
                       (CONS
                        '#((|SetCategory|) (|BasicType|) (|CoercibleTo| 11))
                        (|makeByteWordVec2| 18
                                            '(1 6 0 9 10 2 0 7 0 0 1 1 0 18 0 1
                                              1 0 17 0 1 1 0 11 0 12 0 0 0 15 0
                                              0 0 13 0 0 0 16 0 0 0 14 2 0 7 0
                                              0 8)))))
           '|lookupComplete|)) 

(MAKEPROP '|OpenMathEncoding| 'NILADIC T) 
