(negate-slice32 x) computes the 32-bit two's complement negation
of
(negate-slice32 x) → ~x
We leave this enabled; we would usually not expect to try to reason about it.
Function:
(defun acl2::negate-slice32$inline (x) (declare (type (unsigned-byte 32) x)) (let ((__function__ 'negate-slice32)) (declare (ignorable __function__)) (mbe :logic (logand (+ 1 (lognot (nfix x))) (1- (expt 2 32))) :exec (the (unsigned-byte 32) (logand (the (signed-byte 33) (+ 1 (the (signed-byte 33) (lognot x)))) 4294967295)))))
Theorem:
(defthm acl2::natp-of-negate-slice32 (b* ((~x (acl2::negate-slice32$inline x))) (natp ~x)) :rule-classes :type-prescription)
Theorem:
(defthm nat-equiv-implies-equal-negate-slice32-1 (implies (nat-equiv x x-equiv) (equal (negate-slice32 x) (negate-slice32 x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm unsigned-byte-p-32-of-negate-slice32 (unsigned-byte-p 32 (negate-slice32 x)))