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