Non-equality comparison of unsigned integer values.
Function:
(defun uint-ne (left right) (declare (xargs :guard (and (uintp left) (uintp right)))) (declare (xargs :guard (= (uint->size left) (uint->size right)))) (b* ((x (uint->value left)) (y (uint->value right))) (bool (not (equal x y)))))
Theorem:
(defthm boolp-of-uint-ne (b* ((result (uint-ne left right))) (boolp result)) :rule-classes :rewrite)
Theorem:
(defthm uint-ne-of-uint-fix-left (equal (uint-ne (uint-fix left) right) (uint-ne left right)))
Theorem:
(defthm uint-ne-uint-equiv-congruence-on-left (implies (uint-equiv left left-equiv) (equal (uint-ne left right) (uint-ne left-equiv right))) :rule-classes :congruence)
Theorem:
(defthm uint-ne-of-uint-fix-right (equal (uint-ne left (uint-fix right)) (uint-ne left right)))
Theorem:
(defthm uint-ne-uint-equiv-congruence-on-right (implies (uint-equiv right right-equiv) (equal (uint-ne left right) (uint-ne left right-equiv))) :rule-classes :congruence)