Bitwise negation of unsigned integer values.
Function:
(defun uint-not (operand) (declare (xargs :guard (uintp operand))) (b* ((size (uint->size operand)) (x (uint->value operand))) (make-uint :size (uint->size operand) :value (loghead size (lognot x)))))
Theorem:
(defthm uintp-of-uint-not (b* ((result (uint-not operand))) (uintp result)) :rule-classes :rewrite)
Theorem:
(defthm uint-not-of-uint-fix-operand (equal (uint-not (uint-fix operand)) (uint-not operand)))
Theorem:
(defthm uint-not-uint-equiv-congruence-on-operand (implies (uint-equiv operand operand-equiv) (equal (uint-not operand) (uint-not operand-equiv))) :rule-classes :congruence)