Extract the
We leave this enabled; we would usually not expect to try to reason about it.
Function:
(defun acl2::nth-slice256$inline (n x) (declare (xargs :guard (and (natp n) (integerp x)))) (let ((__function__ 'nth-slice256)) (declare (ignorable __function__)) (mbe :logic (logand (ash (ifix x) (* (nfix n) -256)) (1- (expt 2 256))) :exec (the (unsigned-byte 256) (logand (ash x (the (integer * 0) (* n -256))) 115792089237316195423570985008687907853269984665640564039457584007913129639935)))))
Theorem:
(defthm acl2::natp-of-nth-slice256 (b* ((slice (acl2::nth-slice256$inline n x))) (natp slice)) :rule-classes :type-prescription)
Theorem:
(defthm nat-equiv-implies-equal-nth-slice256-1 (implies (nat-equiv n n-equiv) (equal (nth-slice256 n x) (nth-slice256 n-equiv x))) :rule-classes (:congruence))
Theorem:
(defthm int-equiv-implies-equal-nth-slice256-2 (implies (int-equiv x x-equiv) (equal (nth-slice256 n x) (nth-slice256 n x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm unsigned-byte-p-256-of-nth-slice256 (unsigned-byte-p 256 (nth-slice256 n x)))
Theorem:
(defthm nth-slice256-is-nth-slice (equal (nth-slice256 n x) (nth-slice 256 n x)))