Exclusive or for bitps.
Function:
(defun b-xor$inline (i j) (declare (xargs :guard (and (bitp i) (bitp j)))) (let ((__function__ 'b-xor)) (declare (ignorable __function__)) (mbe :logic (if (zbp i) (if (zbp j) 0 1) (if (zbp j) 1 0)) :exec (the (unsigned-byte 1) (logxor (the (unsigned-byte 1) i) (the (unsigned-byte 1) j))))))
Theorem:
(defthm bitp-of-b-xor (b* ((bit (b-xor$inline i j))) (bitp bit)) :rule-classes :type-prescription)