Get the combinational-type keyword from its numeric encoding.
Function:
(defun code->ctype (x) (declare (xargs :guard (typecodep x))) (let ((__function__ 'code->ctype)) (declare (ignorable __function__)) (car (rassoc (typecode-fix x) *ctype-code-map*))))
Theorem:
(defthm ctypep-of-code->ctype (b* ((ctype (code->ctype x))) (ctypep ctype)) :rule-classes :rewrite)
Theorem:
(defthm code->ctype-of-typecode (equal (code->ctype (typecode x)) (ctype-fix x)))
Theorem:
(defthm typecode-of-code->ctype (equal (typecode (code->ctype x)) (typecode-fix x)))
Theorem:
(defthm normalize-typecode-equivalence (equal (equal (typecode x) code) (and (typecodep code) (equal (ctype-fix x) (code->ctype code)))))