Check if a type is a promoted arithmetic type.
That is, an arithmetic type that is promoted,
in the sense that applying integer promotions [C:6.3.1.1/2] to it
would leave the type unchanged.
This means that the type is not
a (signed, unsigned, or plain)
Function:
(defun type-promoted-arithmeticp (type) (declare (xargs :guard (typep type))) (let ((__function__ 'type-promoted-arithmeticp)) (declare (ignorable __function__)) (and (type-arithmeticp type) (not (type-case type :char)) (not (type-case type :schar)) (not (type-case type :uchar)) (not (type-case type :sshort)) (not (type-case type :ushort)))))
Theorem:
(defthm booleanp-of-type-promoted-arithmeticp (b* ((yes/no (type-promoted-arithmeticp type))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm type-promoted-arithmeticp-of-type-fix-type (equal (type-promoted-arithmeticp (type-fix type)) (type-promoted-arithmeticp type)))
Theorem:
(defthm type-promoted-arithmeticp-type-equiv-congruence-on-type (implies (type-equiv type type-equiv) (equal (type-promoted-arithmeticp type) (type-promoted-arithmeticp type-equiv))) :rule-classes :congruence)