Check if a value is a promoted arithmetic value.
That is, an arithmetic value whose type is a promoted arithmetic type
Function:
(defun value-promoted-arithmeticp (val) (declare (xargs :guard (valuep val))) (let ((__function__ 'value-promoted-arithmeticp)) (declare (ignorable __function__)) (and (value-arithmeticp val) (not (value-case val :schar)) (not (value-case val :uchar)) (not (value-case val :sshort)) (not (value-case val :ushort)))))
Theorem:
(defthm booleanp-of-value-promoted-arithmeticp (b* ((yes/no (value-promoted-arithmeticp val))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm value-promoted-arithmeticp-of-value-fix-val (equal (value-promoted-arithmeticp (value-fix val)) (value-promoted-arithmeticp val)))
Theorem:
(defthm value-promoted-arithmeticp-value-equiv-congruence-on-val (implies (value-equiv val val-equiv) (equal (value-promoted-arithmeticp val) (value-promoted-arithmeticp val-equiv))) :rule-classes :congruence)