Check if a type is an arithmetic type [C17:6.2.5/18].
Function:
(defun type-arithmeticp (type) (declare (xargs :guard (typep type))) (or (type-integerp type) (type-floatingp type)))
Theorem:
(defthm booleanp-of-type-arithmeticp (b* ((yes/no (type-arithmeticp type))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm type-arithmeticp-when-type-kind-syntaxp (implies (and (equal (type-kind type) kind) (syntaxp (quotep kind))) (equal (type-arithmeticp type) (or (type-integerp type) (type-floatingp type)))))
Theorem:
(defthm type-arithmeticp-when-type-integerp (implies (type-integerp type) (type-arithmeticp type)))
Theorem:
(defthm type-arithmeticp-of-type-fix-type (equal (type-arithmeticp (type-fix type)) (type-arithmeticp type)))
Theorem:
(defthm type-arithmeticp-type-equiv-congruence-on-type (implies (type-equiv type type-equiv) (equal (type-arithmeticp type) (type-arithmeticp type-equiv))) :rule-classes :congruence)