
(/VERSIONCHECK 2) 

(DEFUN |ROMAN;roman;I$;1| (|n| $) (SPADCALL |n| (QREFELT $ 6))) 

(DEFUN |ROMAN;roman;S$;2| (|sy| $) (SPADCALL |sy| (QREFELT $ 9))) 

(DEFUN |ROMAN;convert;S$;3| (|sy| $)
  (SPADCALL (SPADCALL (SPADCALL |sy| (QREFELT $ 12)) (QREFELT $ 15))
            (QREFELT $ 6))) 

(DEFUN |ROMAN;coerce;$Of;4| (|r| $)
  (PROG (#1=#:G669 |n|)
    (RETURN
     (SEQ (LETT |n| (SPADCALL |r| (QREFELT $ 16)) . #2=(|ROMAN;coerce;$Of;4|))
          (EXIT
           (COND ((ZEROP |n|) (SPADCALL |n| (QREFELT $ 18)))
                 ((MINUSP |n|)
                  (SPADCALL
                   (SPADCALL (SPADCALL |r| (QREFELT $ 19)) (QREFELT $ 20))
                   (QREFELT $ 21)))
                 ('T
                  (SPADCALL
                   (SPADCALL
                    (SPADCALL
                     (PROG1 (LETT #1# |n| . #2#)
                       (|check-subtype| (> #1# 0) '(|PositiveInteger|) #1#))
                     (QREFELT $ 22))
                    (QREFELT $ 23))
                   (QREFELT $ 24))))))))) 

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

(DEFUN |RomanNumeral;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
     (PROGN
      (LETT |dv$| '(|RomanNumeral|) . #1=(|RomanNumeral|))
      (LETT $ (GETREFV 51) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|RomanNumeral| NIL (CONS 1 $))
      (|stuffDomainSlots| $)
      $)))) 

(MAKEPROP '|RomanNumeral| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL (|Integer|) (0 . |coerce|) |ROMAN;roman;I$;1|
              (|Symbol|) |ROMAN;convert;S$;3| |ROMAN;roman;S$;2| (|String|)
              (5 . |string|) (|PositiveInteger|) (|NumberFormats|)
              (10 . |ScanRoman|) (15 . |convert|) (|OutputForm|)
              (20 . |coerce|) (25 . -) |ROMAN;coerce;$Of;4| (30 . -)
              (35 . |FormatRoman|) (40 . |coerce|) (45 . |coerce|)
              (|Union| 26 '"failed") (|Fraction| 5) (|Boolean|) (|DoubleFloat|)
              (|Union| $ '"failed") (|Float|) (|Pattern| 5)
              (|PatternMatchResult| 5 $) (|Matrix| 5) (|Matrix| $)
              (|InputForm|) (|Record| (|:| |mat| 33) (|:| |vec| (|Vector| 5)))
              (|Vector| $) (|Union| 5 '"failed") (|NonNegativeInteger|)
              (|Record| (|:| |coef| 41) (|:| |generator| $)) (|List| $)
              (|Union| 41 '"failed")
              (|Record| (|:| |quotient| $) (|:| |remainder| $))
              (|Record| (|:| |coef1| $) (|:| |coef2| $) (|:| |generator| $))
              (|Record| (|:| |coef1| $) (|:| |coef2| $)) (|Union| 45 '"failed")
              (|Factored| $) (|SparseUnivariatePolynomial| $)
              (|Record| (|:| |unit| $) (|:| |canonical| $) (|:| |associate| $))
              (|SingleInteger|))
           '#(~= 50 |zero?| 56 |unitNormal| 61 |unitCanonical| 66 |unit?| 71
              |symmetricRemainder| 76 |subtractIfCan| 82 |submod| 88
              |squareFreePart| 95 |squareFree| 100 |smaller?| 105 |sizeLess?|
              111 |sign| 117 |shift| 122 |sample| 128 |roman| 132
              |retractIfCan| 142 |retract| 147 |rem| 152 |reducedSystem| 158
              |recip| 169 |rationalIfCan| 174 |rational?| 179 |rational| 184
              |random| 189 |quo| 198 |principalIdeal| 204 |prime?| 209 |powmod|
              214 |positiveRemainder| 221 |positive?| 227 |permutation| 232
              |patternMatch| 238 |one?| 245 |odd?| 250 |nextItem| 255
              |negative?| 260 |multiEuclidean| 265 |mulmod| 271 |min| 278 |max|
              284 |mask| 290 |length| 295 |lcm| 300 |latex| 311 |invmod| 316
              |init| 322 |inc| 326 |hash| 331 |gcdPolynomial| 341 |gcd| 347
              |factorial| 358 |factor| 363 |extendedEuclidean| 368 |exquo| 381
              |expressIdealMember| 387 |even?| 393 |euclideanSize| 398 |divide|
              403 |differentiate| 409 |dec| 420 |copy| 425 |convert| 430
              |coerce| 460 |characteristic| 480 |bit?| 484 |binomial| 490
              |base| 496 |associates?| 500 |addmod| 506 |abs| 513 ^ 518 |Zero|
              530 |One| 534 D 538 >= 549 > 555 = 561 <= 567 < 573 - 579 + 590 *
              596)
           'NIL
           (CONS
            (|makeByteWordVec2| 1
                                '(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
                                  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
                                  0 0 0 0 0 0 0 0))
            (CONS
             '#(|IntegerNumberSystem&| |EuclideanDomain&|
                |UniqueFactorizationDomain&| NIL NIL |GcdDomain&|
                |IntegralDomain&| |Algebra&| NIL NIL |DifferentialRing&|
                |OrderedRing&| NIL NIL |Module&| NIL NIL |Ring&| NIL NIL NIL
                NIL NIL |AbelianGroup&| NIL NIL NIL |OrderedSet&|
                |AbelianMonoid&| |Monoid&| NIL NIL NIL NIL |SemiGroup&|
                |AbelianSemiGroup&| NIL |SetCategory&| NIL NIL NIL NIL NIL NIL
                NIL NIL NIL |RetractableTo&| NIL NIL NIL NIL |BasicType&| NIL)
             (CONS
              '#((|IntegerNumberSystem|) (|EuclideanDomain|)
                 (|UniqueFactorizationDomain|) (|PrincipalIdealDomain|)
                 (|OrderedIntegralDomain|) (|GcdDomain|) (|IntegralDomain|)
                 (|Algebra| $$) (|CharacteristicZero|)
                 (|LinearlyExplicitRingOver| 5) (|DifferentialRing|)
                 (|OrderedRing|) (|CommutativeRing|) (|EntireRing|)
                 (|Module| $$) (|OrderedAbelianGroup|) (|BiModule| $$ $$)
                 (|Ring|) (|OrderedCancellationAbelianMonoid|)
                 (|LeftModule| $$) (|Rng|) (|RightModule| $$)
                 (|OrderedAbelianMonoid|) (|AbelianGroup|)
                 (|OrderedAbelianSemiGroup|) (|CancellationAbelianMonoid|)
                 (|SemiRing|) (|OrderedSet|) (|AbelianMonoid|) (|Monoid|)
                 (|SemiRng|) (|StepThrough|) (|PatternMatchable| 5)
                 (|Comparable|) (|SemiGroup|) (|AbelianSemiGroup|)
                 (|RealConstant|) (|SetCategory|) (|canonicalsClosed|)
                 (|Canonical|) (|multiplicativeValuation|)
                 (|canonicalUnitNormal|) (|ConvertibleTo| 30)
                 (|ConvertibleTo| 28) (|CombinatorialFunctionCategory|)
                 (|ConvertibleTo| 31) (|ConvertibleTo| 35) (|RetractableTo| 5)
                 (|ConvertibleTo| 5) (|noZeroDivisors|) (|CommutativeStar|)
                 (|unitsKnown|) (|BasicType|) (|CoercibleTo| 17))
              (|makeByteWordVec2| 50
                                  '(1 0 0 5 6 1 8 11 0 12 1 14 13 11 15 1 0 5 0
                                    16 1 5 17 0 18 1 0 0 0 19 1 17 0 0 21 1 14
                                    11 13 22 1 8 0 11 23 1 8 17 0 24 2 0 27 0 0
                                    1 1 0 27 0 1 1 0 49 0 1 1 0 0 0 1 1 0 27 0
                                    1 2 0 0 0 0 1 2 0 29 0 0 1 3 0 0 0 0 0 1 1
                                    0 0 0 1 1 0 47 0 1 2 0 27 0 0 1 2 0 27 0 0
                                    1 1 0 5 0 1 2 0 0 0 0 1 0 0 0 1 1 0 0 5 7 1
                                    0 0 8 10 1 0 38 0 1 1 0 5 0 1 2 0 0 0 0 1 1
                                    0 33 34 1 2 0 36 34 37 1 1 0 29 0 1 1 0 25
                                    0 1 1 0 27 0 1 1 0 26 0 1 1 0 0 0 1 0 0 0 1
                                    2 0 0 0 0 1 1 0 40 41 1 1 0 27 0 1 3 0 0 0
                                    0 0 1 2 0 0 0 0 1 1 0 27 0 1 2 0 0 0 0 1 3
                                    0 32 0 31 32 1 1 0 27 0 1 1 0 27 0 1 1 0 29
                                    0 1 1 0 27 0 1 2 0 42 41 0 1 3 0 0 0 0 0 1
                                    2 0 0 0 0 1 2 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1
                                    2 0 0 0 0 1 1 0 0 41 1 1 0 11 0 1 2 0 0 0 0
                                    1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 50 0 1 2
                                    0 48 48 48 1 2 0 0 0 0 1 1 0 0 41 1 1 0 0 0
                                    1 1 0 47 0 1 2 0 44 0 0 1 3 0 46 0 0 0 1 2
                                    0 29 0 0 1 2 0 42 41 0 1 1 0 27 0 1 1 0 39
                                    0 1 2 0 43 0 0 1 1 0 0 0 1 2 0 0 0 39 1 1 0
                                    0 0 1 1 0 0 0 1 1 0 0 8 9 1 0 28 0 1 1 0 30
                                    0 1 1 0 31 0 1 1 0 35 0 1 1 0 5 0 16 1 0 0
                                    5 6 1 0 0 0 1 1 0 0 5 6 1 0 17 0 20 0 0 39
                                    1 2 0 27 0 0 1 2 0 0 0 0 1 0 0 0 1 2 0 27 0
                                    0 1 3 0 0 0 0 0 1 1 0 0 0 1 2 0 0 0 39 1 2
                                    0 0 0 13 1 0 0 0 1 0 0 0 1 1 0 0 0 1 2 0 0
                                    0 39 1 2 0 27 0 0 1 2 0 27 0 0 1 2 0 27 0 0
                                    1 2 0 27 0 0 1 2 0 27 0 0 1 2 0 0 0 0 1 1 0
                                    0 0 19 2 0 0 0 0 1 2 0 0 5 0 1 2 0 0 0 0 1
                                    2 0 0 39 0 1 2 0 0 13 0 1)))))
           '|lookupComplete|)) 

(MAKEPROP '|RomanNumeral| 'NILADIC T) 
