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-assert-pred-to-spec (implies (and (primep prime) (pfield::fep x prime)) (equal (boolean-assert-pred x prime) (boolean-assert-spec x prime))))
Theorem:
(defthm boolean-assert-circuit-to-spec (implies (and (equal (pfcs::lookup-definition (pfname "boolean_assert") defs) (boolean-assert-circuit)) (primep prime) (pfield::fep x prime)) (equal (pfcs::definition-satp (pfname "boolean_assert") defs (list x) prime) (boolean-assert-spec x prime))))