
(/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 (|n| #0=#:G1823)
    (RETURN
      (SEQ (LETT |n| (SPADCALL |r| (QREFELT $ 16))
                 . #1=(|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 #0# |n| . #1#)
                                  (|check-subtype| (> #0# 0)
                                      '(|PositiveInteger|) #0#))
                                (QREFELT $ 22))
                            (QREFELT $ 23))
                        (QREFELT $ 24))))))))) 

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

(DEFUN |RomanNumeral;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$| '(|RomanNumeral|) . #0=(|RomanNumeral|))
        (LETT $ (GETREFV 51) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|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
             |sizeLess?| 105 |sign| 111 |shift| 116 |sample| 122
             |roman| 126 |retractIfCan| 136 |retract| 141 |rem| 146
             |reducedSystem| 152 |recip| 163 |rationalIfCan| 168
             |rational?| 173 |rational| 178 |random| 183 |quo| 192
             |principalIdeal| 198 |prime?| 203 |powmod| 208
             |positiveRemainder| 215 |positive?| 221 |permutation| 226
             |patternMatch| 232 |one?| 239 |odd?| 244 |nextItem| 249
             |negative?| 254 |multiEuclidean| 259 |mulmod| 265 |min|
             272 |max| 278 |mask| 284 |length| 289 |lcm| 294 |latex|
             305 |invmod| 310 |init| 316 |inc| 320 |hash| 325
             |gcdPolynomial| 335 |gcd| 341 |factorial| 352 |factor| 357
             |extendedEuclidean| 362 |exquo| 375 |expressIdealMember|
             381 |even?| 387 |euclideanSize| 392 |divide| 397
             |differentiate| 403 |dec| 414 |copy| 419 |convert| 424
             |coerce| 454 |characteristic| 474 |bit?| 478 |binomial|
             484 |base| 490 |associates?| 494 |addmod| 500 |abs| 507 ^
             512 |Zero| 524 |One| 528 D 532 >= 543 > 549 = 555 <= 561 <
             567 - 573 + 584 ** 590 * 602)
          '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))
                (CONS '#(|IntegerNumberSystem&| |EuclideanDomain&|
                         |UniqueFactorizationDomain&| NIL NIL
                         |GcdDomain&| |IntegralDomain&| |Algebra&| NIL
                         NIL |DifferentialRing&| |OrderedRing&| NIL NIL
                         |Module&| NIL |Ring&| NIL NIL NIL NIL NIL
                         |AbelianGroup&| NIL NIL NIL NIL
                         |AbelianMonoid&| |Monoid&| NIL NIL NIL
                         |OrderedSet&| |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| $$) (|BiModule| $$ $$)
                               (|Ring|) (|OrderedAbelianGroup|)
                               (|LeftModule| $$) (|Rng|)
                               (|RightModule| $$)
                               (|OrderedCancellationAbelianMonoid|)
                               (|AbelianGroup|)
                               (|OrderedAbelianMonoid|)
                               (|CancellationAbelianMonoid|)
                               (|SemiRing|) (|OrderedAbelianSemiGroup|)
                               (|AbelianMonoid|) (|Monoid|) (|SemiRng|)
                               (|StepThrough|) (|PatternMatchable| 5)
                               (|OrderedSet|) (|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 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 1 0 0 41 1 2 0 0 0 0 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 5 6 1 0 0 0 1
                                  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 0 39 1 2 0 0 0 13 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) 
