Correctness of the circuit.
The equivalence between predicate and specification is proved automatically via the prime fields library rules.
The extension to the circuit is boilerplate.
Theorem:
(defthm boolean-and-pred-to-spec (implies (and (primep prime) (pfield::fep x prime) (pfield::fep y prime) (pfield::fep z prime) (bitp x) (bitp y)) (equal (boolean-and-pred x y z prime) (boolean-and-spec x y z prime))))
Theorem:
(defthm boolean-and-circuit-to-spec (implies (and (equal (pfcs::lookup-definition (pfname "boolean_and") defs) (boolean-and-circuit)) (primep prime) (pfield::fep x prime) (pfield::fep y prime) (pfield::fep z prime) (bitp x) (bitp y)) (equal (pfcs::definition-satp (pfname "boolean_and") defs (list x y z) prime) (boolean-and-spec x y z prime))))