Coerce a bit into a Boolean.
This is just
(equal (equal 1 (foo x)) (equal 1 (bar y)))this will case split into:
(if (equal 1 (foo x)) (equal 1 (bar y)) (not (equal 1 (bar y))))whereas
(equal (bit->bool (foo x)) (bit->bool (bar y)))will not.
Because a bunch of libraries were written under the assumption that
Function:
(defun bit->bool$inline (x) (declare (xargs :guard t)) (equal 1 x))
Theorem:
(defthm bit-equiv-implies-equal-bit->bool-1 (implies (bit-equiv a a-equiv) (equal (bit->bool a) (bit->bool a-equiv))) :rule-classes (:congruence))