Numeric encoding of a combinational-type keyword.
Function:
(defun typecode (x) (declare (xargs :guard (ctypep x))) (let ((__function__ 'typecode)) (declare (ignorable __function__)) (cdr (assoc (ctype-fix x) *ctype-code-map*))))
Theorem:
(defthm natp-of-typecode (b* ((code (typecode x))) (natp code)) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm typecode-bound (< (typecode x) 4) :rule-classes :linear)
Theorem:
(defthm typecodep-of-typecode (typecodep (typecode x)))