An 24-bit unsigned bitstruct type.
This is a bitstruct type introduced by defbitstruct, represented as a unsigned 24-bit integer.
Function:
(defun vex-prefixes-p$inline (x) (declare (xargs :guard t)) (mbe :logic (unsigned-byte-p 24 x) :exec (and (natp x) (< x 16777216))))
Theorem:
(defthm vex-prefixes-p-when-unsigned-byte-p (implies (unsigned-byte-p 24 x) (vex-prefixes-p x)))
Theorem:
(defthm unsigned-byte-p-when-vex-prefixes-p (implies (vex-prefixes-p x) (unsigned-byte-p 24 x)))
Theorem:
(defthm vex-prefixes-p-compound-recognizer (implies (vex-prefixes-p x) (natp x)) :rule-classes :compound-recognizer)
Function:
(defun vex-prefixes-fix$inline (x) (declare (xargs :guard (vex-prefixes-p x))) (mbe :logic (loghead 24 x) :exec x))
Theorem:
(defthm vex-prefixes-p-of-vex-prefixes-fix (b* ((fty::fixed (vex-prefixes-fix$inline x))) (vex-prefixes-p fty::fixed)) :rule-classes :rewrite)
Theorem:
(defthm vex-prefixes-fix-when-vex-prefixes-p (implies (vex-prefixes-p x) (equal (vex-prefixes-fix x) x)))
Function:
(defun vex-prefixes-equiv$inline (x y) (declare (xargs :guard (and (vex-prefixes-p x) (vex-prefixes-p y)))) (equal (vex-prefixes-fix x) (vex-prefixes-fix y)))
Theorem:
(defthm vex-prefixes-equiv-is-an-equivalence (and (booleanp (vex-prefixes-equiv x y)) (vex-prefixes-equiv x x) (implies (vex-prefixes-equiv x y) (vex-prefixes-equiv y x)) (implies (and (vex-prefixes-equiv x y) (vex-prefixes-equiv y z)) (vex-prefixes-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vex-prefixes-equiv-implies-equal-vex-prefixes-fix-1 (implies (vex-prefixes-equiv x x-equiv) (equal (vex-prefixes-fix x) (vex-prefixes-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vex-prefixes-fix-under-vex-prefixes-equiv (vex-prefixes-equiv (vex-prefixes-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Function:
(defun vex-prefixes$inline (byte0 byte1 byte2) (declare (xargs :guard (and (8bits-p byte0) (8bits-p byte1) (8bits-p byte2)))) (b* ((byte0 (mbe :logic (8bits-fix byte0) :exec byte0)) (byte1 (mbe :logic (8bits-fix byte1) :exec byte1)) (byte2 (mbe :logic (8bits-fix byte2) :exec byte2))) (logapp 8 byte0 (logapp 8 byte1 byte2))))
Theorem:
(defthm vex-prefixes-p-of-vex-prefixes (b* ((vex-prefixes (vex-prefixes$inline byte0 byte1 byte2))) (vex-prefixes-p vex-prefixes)) :rule-classes :rewrite)
Theorem:
(defthm vex-prefixes$inline-of-8bits-fix-byte0 (equal (vex-prefixes$inline (8bits-fix byte0) byte1 byte2) (vex-prefixes$inline byte0 byte1 byte2)))
Theorem:
(defthm vex-prefixes$inline-8bits-equiv-congruence-on-byte0 (implies (8bits-equiv byte0 byte0-equiv) (equal (vex-prefixes$inline byte0 byte1 byte2) (vex-prefixes$inline byte0-equiv byte1 byte2))) :rule-classes :congruence)
Theorem:
(defthm vex-prefixes$inline-of-8bits-fix-byte1 (equal (vex-prefixes$inline byte0 (8bits-fix byte1) byte2) (vex-prefixes$inline byte0 byte1 byte2)))
Theorem:
(defthm vex-prefixes$inline-8bits-equiv-congruence-on-byte1 (implies (8bits-equiv byte1 byte1-equiv) (equal (vex-prefixes$inline byte0 byte1 byte2) (vex-prefixes$inline byte0 byte1-equiv byte2))) :rule-classes :congruence)
Theorem:
(defthm vex-prefixes$inline-of-8bits-fix-byte2 (equal (vex-prefixes$inline byte0 byte1 (8bits-fix byte2)) (vex-prefixes$inline byte0 byte1 byte2)))
Theorem:
(defthm vex-prefixes$inline-8bits-equiv-congruence-on-byte2 (implies (8bits-equiv byte2 byte2-equiv) (equal (vex-prefixes$inline byte0 byte1 byte2) (vex-prefixes$inline byte0 byte1 byte2-equiv))) :rule-classes :congruence)
Function:
(defun vex-prefixes-equiv-under-mask$inline (x x1 mask) (declare (xargs :guard (and (vex-prefixes-p x) (vex-prefixes-p x1) (integerp mask)))) (fty::int-equiv-under-mask (vex-prefixes-fix x) (vex-prefixes-fix x1) mask))
Function:
(defun vex-prefixes->byte0$inline (x) (declare (xargs :guard (vex-prefixes-p x))) (mbe :logic (let ((x (vex-prefixes-fix x))) (part-select x :low 0 :width 8)) :exec (the (unsigned-byte 8) (logand (the (unsigned-byte 8) 255) (the (unsigned-byte 24) x)))))
Theorem:
(defthm 8bits-p-of-vex-prefixes->byte0 (b* ((byte0 (vex-prefixes->byte0$inline x))) (8bits-p byte0)) :rule-classes :rewrite)
Theorem:
(defthm vex-prefixes->byte0$inline-of-vex-prefixes-fix-x (equal (vex-prefixes->byte0$inline (vex-prefixes-fix x)) (vex-prefixes->byte0$inline x)))
Theorem:
(defthm vex-prefixes->byte0$inline-vex-prefixes-equiv-congruence-on-x (implies (vex-prefixes-equiv x x-equiv) (equal (vex-prefixes->byte0$inline x) (vex-prefixes->byte0$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vex-prefixes->byte0-of-vex-prefixes (equal (vex-prefixes->byte0 (vex-prefixes byte0 byte1 byte2)) (8bits-fix byte0)))
Theorem:
(defthm vex-prefixes->byte0-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x vex-prefixes-equiv-under-mask) (vex-prefixes-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 255) 0)) (equal (vex-prefixes->byte0 x) (vex-prefixes->byte0 y))))
Function:
(defun vex-prefixes->byte1$inline (x) (declare (xargs :guard (vex-prefixes-p x))) (mbe :logic (let ((x (vex-prefixes-fix x))) (part-select x :low 8 :width 8)) :exec (the (unsigned-byte 8) (logand (the (unsigned-byte 8) 255) (the (unsigned-byte 16) (ash (the (unsigned-byte 24) x) -8))))))
Theorem:
(defthm 8bits-p-of-vex-prefixes->byte1 (b* ((byte1 (vex-prefixes->byte1$inline x))) (8bits-p byte1)) :rule-classes :rewrite)
Theorem:
(defthm vex-prefixes->byte1$inline-of-vex-prefixes-fix-x (equal (vex-prefixes->byte1$inline (vex-prefixes-fix x)) (vex-prefixes->byte1$inline x)))
Theorem:
(defthm vex-prefixes->byte1$inline-vex-prefixes-equiv-congruence-on-x (implies (vex-prefixes-equiv x x-equiv) (equal (vex-prefixes->byte1$inline x) (vex-prefixes->byte1$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vex-prefixes->byte1-of-vex-prefixes (equal (vex-prefixes->byte1 (vex-prefixes byte0 byte1 byte2)) (8bits-fix byte1)))
Theorem:
(defthm vex-prefixes->byte1-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x vex-prefixes-equiv-under-mask) (vex-prefixes-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 65280) 0)) (equal (vex-prefixes->byte1 x) (vex-prefixes->byte1 y))))
Function:
(defun vex-prefixes->byte2$inline (x) (declare (xargs :guard (vex-prefixes-p x))) (mbe :logic (let ((x (vex-prefixes-fix x))) (part-select x :low 16 :width 8)) :exec (the (unsigned-byte 8) (logand (the (unsigned-byte 8) 255) (the (unsigned-byte 8) (ash (the (unsigned-byte 24) x) -16))))))
Theorem:
(defthm 8bits-p-of-vex-prefixes->byte2 (b* ((byte2 (vex-prefixes->byte2$inline x))) (8bits-p byte2)) :rule-classes :rewrite)
Theorem:
(defthm vex-prefixes->byte2$inline-of-vex-prefixes-fix-x (equal (vex-prefixes->byte2$inline (vex-prefixes-fix x)) (vex-prefixes->byte2$inline x)))
Theorem:
(defthm vex-prefixes->byte2$inline-vex-prefixes-equiv-congruence-on-x (implies (vex-prefixes-equiv x x-equiv) (equal (vex-prefixes->byte2$inline x) (vex-prefixes->byte2$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vex-prefixes->byte2-of-vex-prefixes (equal (vex-prefixes->byte2 (vex-prefixes byte0 byte1 byte2)) (8bits-fix byte2)))
Theorem:
(defthm vex-prefixes->byte2-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x vex-prefixes-equiv-under-mask) (vex-prefixes-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 16711680) 0)) (equal (vex-prefixes->byte2 x) (vex-prefixes->byte2 y))))
Theorem:
(defthm vex-prefixes-fix-in-terms-of-vex-prefixes (equal (vex-prefixes-fix x) (change-vex-prefixes x)))
Function:
(defun !vex-prefixes->byte0$inline (byte0 x) (declare (xargs :guard (and (8bits-p byte0) (vex-prefixes-p x)))) (mbe :logic (b* ((byte0 (mbe :logic (8bits-fix byte0) :exec byte0)) (x (vex-prefixes-fix x))) (part-install byte0 x :width 8 :low 0)) :exec (the (unsigned-byte 24) (logior (the (unsigned-byte 24) (logand (the (unsigned-byte 24) x) (the (signed-byte 9) -256))) (the (unsigned-byte 8) byte0)))))
Theorem:
(defthm vex-prefixes-p-of-!vex-prefixes->byte0 (b* ((new-x (!vex-prefixes->byte0$inline byte0 x))) (vex-prefixes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !vex-prefixes->byte0$inline-of-8bits-fix-byte0 (equal (!vex-prefixes->byte0$inline (8bits-fix byte0) x) (!vex-prefixes->byte0$inline byte0 x)))
Theorem:
(defthm !vex-prefixes->byte0$inline-8bits-equiv-congruence-on-byte0 (implies (8bits-equiv byte0 byte0-equiv) (equal (!vex-prefixes->byte0$inline byte0 x) (!vex-prefixes->byte0$inline byte0-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !vex-prefixes->byte0$inline-of-vex-prefixes-fix-x (equal (!vex-prefixes->byte0$inline byte0 (vex-prefixes-fix x)) (!vex-prefixes->byte0$inline byte0 x)))
Theorem:
(defthm !vex-prefixes->byte0$inline-vex-prefixes-equiv-congruence-on-x (implies (vex-prefixes-equiv x x-equiv) (equal (!vex-prefixes->byte0$inline byte0 x) (!vex-prefixes->byte0$inline byte0 x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !vex-prefixes->byte0-is-vex-prefixes (equal (!vex-prefixes->byte0 byte0 x) (change-vex-prefixes x :byte0 byte0)))
Theorem:
(defthm vex-prefixes->byte0-of-!vex-prefixes->byte0 (b* ((?new-x (!vex-prefixes->byte0$inline byte0 x))) (equal (vex-prefixes->byte0 new-x) (8bits-fix byte0))))
Theorem:
(defthm !vex-prefixes->byte0-equiv-under-mask (b* ((?new-x (!vex-prefixes->byte0$inline byte0 x))) (vex-prefixes-equiv-under-mask new-x x -256)))
Function:
(defun !vex-prefixes->byte1$inline (byte1 x) (declare (xargs :guard (and (8bits-p byte1) (vex-prefixes-p x)))) (mbe :logic (b* ((byte1 (mbe :logic (8bits-fix byte1) :exec byte1)) (x (vex-prefixes-fix x))) (part-install byte1 x :width 8 :low 8)) :exec (the (unsigned-byte 24) (logior (the (unsigned-byte 24) (logand (the (unsigned-byte 24) x) (the (signed-byte 17) -65281))) (the (unsigned-byte 16) (ash (the (unsigned-byte 8) byte1) 8))))))
Theorem:
(defthm vex-prefixes-p-of-!vex-prefixes->byte1 (b* ((new-x (!vex-prefixes->byte1$inline byte1 x))) (vex-prefixes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !vex-prefixes->byte1$inline-of-8bits-fix-byte1 (equal (!vex-prefixes->byte1$inline (8bits-fix byte1) x) (!vex-prefixes->byte1$inline byte1 x)))
Theorem:
(defthm !vex-prefixes->byte1$inline-8bits-equiv-congruence-on-byte1 (implies (8bits-equiv byte1 byte1-equiv) (equal (!vex-prefixes->byte1$inline byte1 x) (!vex-prefixes->byte1$inline byte1-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !vex-prefixes->byte1$inline-of-vex-prefixes-fix-x (equal (!vex-prefixes->byte1$inline byte1 (vex-prefixes-fix x)) (!vex-prefixes->byte1$inline byte1 x)))
Theorem:
(defthm !vex-prefixes->byte1$inline-vex-prefixes-equiv-congruence-on-x (implies (vex-prefixes-equiv x x-equiv) (equal (!vex-prefixes->byte1$inline byte1 x) (!vex-prefixes->byte1$inline byte1 x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !vex-prefixes->byte1-is-vex-prefixes (equal (!vex-prefixes->byte1 byte1 x) (change-vex-prefixes x :byte1 byte1)))
Theorem:
(defthm vex-prefixes->byte1-of-!vex-prefixes->byte1 (b* ((?new-x (!vex-prefixes->byte1$inline byte1 x))) (equal (vex-prefixes->byte1 new-x) (8bits-fix byte1))))
Theorem:
(defthm !vex-prefixes->byte1-equiv-under-mask (b* ((?new-x (!vex-prefixes->byte1$inline byte1 x))) (vex-prefixes-equiv-under-mask new-x x -65281)))
Function:
(defun !vex-prefixes->byte2$inline (byte2 x) (declare (xargs :guard (and (8bits-p byte2) (vex-prefixes-p x)))) (mbe :logic (b* ((byte2 (mbe :logic (8bits-fix byte2) :exec byte2)) (x (vex-prefixes-fix x))) (part-install byte2 x :width 8 :low 16)) :exec (the (unsigned-byte 24) (logior (the (unsigned-byte 24) (logand (the (unsigned-byte 24) x) (the (signed-byte 25) -16711681))) (the (unsigned-byte 24) (ash (the (unsigned-byte 8) byte2) 16))))))
Theorem:
(defthm vex-prefixes-p-of-!vex-prefixes->byte2 (b* ((new-x (!vex-prefixes->byte2$inline byte2 x))) (vex-prefixes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !vex-prefixes->byte2$inline-of-8bits-fix-byte2 (equal (!vex-prefixes->byte2$inline (8bits-fix byte2) x) (!vex-prefixes->byte2$inline byte2 x)))
Theorem:
(defthm !vex-prefixes->byte2$inline-8bits-equiv-congruence-on-byte2 (implies (8bits-equiv byte2 byte2-equiv) (equal (!vex-prefixes->byte2$inline byte2 x) (!vex-prefixes->byte2$inline byte2-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !vex-prefixes->byte2$inline-of-vex-prefixes-fix-x (equal (!vex-prefixes->byte2$inline byte2 (vex-prefixes-fix x)) (!vex-prefixes->byte2$inline byte2 x)))
Theorem:
(defthm !vex-prefixes->byte2$inline-vex-prefixes-equiv-congruence-on-x (implies (vex-prefixes-equiv x x-equiv) (equal (!vex-prefixes->byte2$inline byte2 x) (!vex-prefixes->byte2$inline byte2 x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !vex-prefixes->byte2-is-vex-prefixes (equal (!vex-prefixes->byte2 byte2 x) (change-vex-prefixes x :byte2 byte2)))
Theorem:
(defthm vex-prefixes->byte2-of-!vex-prefixes->byte2 (b* ((?new-x (!vex-prefixes->byte2$inline byte2 x))) (equal (vex-prefixes->byte2 new-x) (8bits-fix byte2))))
Theorem:
(defthm !vex-prefixes->byte2-equiv-under-mask (b* ((?new-x (!vex-prefixes->byte2$inline byte2 x))) (vex-prefixes-equiv-under-mask new-x x 65535)))
Function:
(defun vex-prefixes-debug$inline (x) (declare (xargs :guard (vex-prefixes-p x))) (b* (((vex-prefixes x))) (cons (cons 'byte0 x.byte0) (cons (cons 'byte1 x.byte1) (cons (cons 'byte2 x.byte2) nil)))))