Equality
(boolean-eq operand-left operand-right) → result
Function:
(defun boolean-eq (operand-left operand-right) (declare (xargs :guard (and (boolean-valuep operand-left) (boolean-valuep operand-right)))) (b* ((x (boolean-value->bool operand-left)) (y (boolean-value->bool operand-right))) (boolean-value (equal x y))))
Theorem:
(defthm boolean-valuep-of-boolean-eq (b* ((result (boolean-eq operand-left operand-right))) (boolean-valuep result)) :rule-classes :rewrite)
Theorem:
(defthm boolean-eq-commutative (equal (boolean-eq x y) (boolean-eq y x)))
Theorem:
(defthm boolean-eq-of-boolean-value-fix-operand-left (equal (boolean-eq (boolean-value-fix operand-left) operand-right) (boolean-eq operand-left operand-right)))
Theorem:
(defthm boolean-eq-boolean-value-equiv-congruence-on-operand-left (implies (boolean-value-equiv operand-left operand-left-equiv) (equal (boolean-eq operand-left operand-right) (boolean-eq operand-left-equiv operand-right))) :rule-classes :congruence)
Theorem:
(defthm boolean-eq-of-boolean-value-fix-operand-right (equal (boolean-eq operand-left (boolean-value-fix operand-right)) (boolean-eq operand-left operand-right)))
Theorem:
(defthm boolean-eq-boolean-value-equiv-congruence-on-operand-right (implies (boolean-value-equiv operand-right operand-right-equiv) (equal (boolean-eq operand-left operand-right) (boolean-eq operand-left operand-right-equiv))) :rule-classes :congruence)