Non-equality
(boolean-neq operand-left operand-right) → result
Function:
(defun boolean-neq (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 (not (equal x y)))))
Theorem:
(defthm boolean-valuep-of-boolean-neq (b* ((result (boolean-neq operand-left operand-right))) (boolean-valuep result)) :rule-classes :rewrite)
Theorem:
(defthm boolean-neq-commutative (equal (boolean-neq x y) (boolean-neq y x)))
Theorem:
(defthm boolean-neq-of-boolean-value-fix-operand-left (equal (boolean-neq (boolean-value-fix operand-left) operand-right) (boolean-neq operand-left operand-right)))
Theorem:
(defthm boolean-neq-boolean-value-equiv-congruence-on-operand-left (implies (boolean-value-equiv operand-left operand-left-equiv) (equal (boolean-neq operand-left operand-right) (boolean-neq operand-left-equiv operand-right))) :rule-classes :congruence)
Theorem:
(defthm boolean-neq-of-boolean-value-fix-operand-right (equal (boolean-neq operand-left (boolean-value-fix operand-right)) (boolean-neq operand-left operand-right)))
Theorem:
(defthm boolean-neq-boolean-value-equiv-congruence-on-operand-right (implies (boolean-value-equiv operand-right operand-right-equiv) (equal (boolean-neq operand-left operand-right) (boolean-neq operand-left operand-right-equiv))) :rule-classes :congruence)