Specification of the circuit.
We use an if. An alternative is to use lognor.
Function:
(defun boolean-nor-spec (x y z prime) (declare (xargs :guard (and (primep prime) (pfield::fep x prime) (pfield::fep y prime) (pfield::fep z prime)))) (declare (ignore prime)) (declare (xargs :guard (and (bitp x) (bitp y)))) (let ((__function__ 'boolean-nor-spec)) (declare (ignorable __function__)) (equal z (if (and (= x 0) (= y 0)) 1 0))))
Theorem:
(defthm booleanp-of-boolean-nor-spec (b* ((yes/no (boolean-nor-spec x y z prime))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm bitp-z-when-boolean-nor-spec (implies (and (boolean-nor-spec x y z prime) (bitp x) (bitp y)) (bitp z)))