
(/VERSIONCHECK 2) 

(DEFPARAMETER |PAdicIntegerCategory;CAT| 'NIL) 

(DEFPARAMETER |PAdicIntegerCategory;AL| 'NIL) 

(DEFUN |PAdicIntegerCategory| (#1=#:G1798)
  (LET (#2=#:G1799)
    (COND
     ((SETQ #2# (|assoc| #3=(|devaluate| #1#) |PAdicIntegerCategory;AL|))
      (CDR #2#))
     (T
      (SETQ |PAdicIntegerCategory;AL|
              (|cons5| (CONS #3# (SETQ #2# (|PAdicIntegerCategory;| #1#)))
                       |PAdicIntegerCategory;AL|))
      #2#)))) 

(DEFUN |PAdicIntegerCategory;| (|t#1|)
  (PROG (#1=#:G1797)
    (RETURN
     (PROG1
         (LETT #1#
               (|sublisV| (PAIR '(|t#1|) (LIST (|devaluate| |t#1|)))
                          (COND (|PAdicIntegerCategory;CAT|)
                                ('T
                                 (LETT |PAdicIntegerCategory;CAT|
                                       (|Join| (|EuclideanDomain|)
                                               (|CharacteristicZero|)
                                               (|mkCategory|
                                                '(((|digits|
                                                    ((|Stream| (|Integer|)) $))
                                                   T)
                                                  ((|order|
                                                    ((|NonNegativeInteger|) $))
                                                   T)
                                                  ((|extend| ($ $ (|Integer|)))
                                                   T)
                                                  ((|complete| ($ $)) T)
                                                  ((|modulus| ((|Integer|))) T)
                                                  ((|moduloP| ((|Integer|) $))
                                                   T)
                                                  ((|quotientByP| ($ $)) T)
                                                  ((|approximate|
                                                    ((|Integer|) $
                                                     (|Integer|)))
                                                   T)
                                                  ((|sqrt| ($ $ (|Integer|)))
                                                   T)
                                                  ((|root|
                                                    ($
                                                     (|SparseUnivariatePolynomial|
                                                      (|Integer|))
                                                     (|Integer|)))
                                                   T))
                                                NIL
                                                '((|SparseUnivariatePolynomial|
                                                   (|Integer|))
                                                  (|Integer|)
                                                  (|NonNegativeInteger|)
                                                  (|Stream| (|Integer|)))
                                                NIL))
                                       . #2=(|PAdicIntegerCategory|)))))
               . #2#)
       (SETELT #1# 0 (LIST '|PAdicIntegerCategory| (|devaluate| |t#1|))))))) 
