Access the |ACL2|::|W| field of a evex-byte2 bit structure.
(evex-byte2->w x) → w
Function:
(defun evex-byte2->w$inline (x) (declare (xargs :guard (evex-byte2-p x))) (mbe :logic (let ((x (evex-byte2-fix x))) (part-select x :low 7 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 1) (ash (the (unsigned-byte 8) x) -7))))))
Theorem:
(defthm bitp-of-evex-byte2->w (b* ((w (evex-byte2->w$inline x))) (bitp w)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte2->w$inline-of-evex-byte2-fix-x (equal (evex-byte2->w$inline (evex-byte2-fix x)) (evex-byte2->w$inline x)))
Theorem:
(defthm evex-byte2->w$inline-evex-byte2-equiv-congruence-on-x (implies (evex-byte2-equiv x x-equiv) (equal (evex-byte2->w$inline x) (evex-byte2->w$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte2->w-of-evex-byte2 (equal (evex-byte2->w (evex-byte2 pp res vvvv w)) (bfix w)))
Theorem:
(defthm evex-byte2->w-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte2-equiv-under-mask) (evex-byte2-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 128) 0)) (equal (evex-byte2->w x) (evex-byte2->w y))))