Check if a unary operator does not involve pointers.
These are unary plus, unary minus, and bitwise/logical negation/complement. The other two, address and indirection, involve pointers.
Function:
(defun unop-nonpointerp (op) (declare (xargs :guard (unopp op))) (let ((__function__ 'unop-nonpointerp)) (declare (ignorable __function__)) (and (member-eq (unop-kind op) '(:plus :minus :bitnot :lognot)) t)))
Theorem:
(defthm booleanp-of-unop-nonpointerp (b* ((yes/no (unop-nonpointerp op))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm unop-nonpointerp-of-unop-fix-op (equal (unop-nonpointerp (unop-fix op)) (unop-nonpointerp op)))
Theorem:
(defthm unop-nonpointerp-unop-equiv-congruence-on-op (implies (unop-equiv op op-equiv) (equal (unop-nonpointerp op) (unop-nonpointerp op-equiv))) :rule-classes :congruence)