Fixing function for combinational-type keywords.
(ctype-fix x) → ctype
Function:
(defun ctype-fix (x) (declare (xargs :guard t)) (let ((__function__ 'ctype-fix)) (declare (ignorable __function__)) (if (ctypep x) x (const-ctype))))
Theorem:
(defthm ctypep-of-ctype-fix (b* ((ctype (ctype-fix x))) (ctypep ctype)) :rule-classes :rewrite)
Theorem:
(defthm ctype-fix-when-ctypep (implies (ctypep x) (equal (ctype-fix x) x)))