Update the |ACL2|::|B| field of a evex-byte3 bit structure.
(!evex-byte3->b b x) → new-x
Function:
(defun !evex-byte3->b$inline (b x) (declare (xargs :guard (and (bitp b) (evex-byte3-p x)))) (mbe :logic (b* ((b (mbe :logic (bfix b) :exec b)) (x (evex-byte3-fix x))) (part-install b x :width 1 :low 4)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 6) -17))) (the (unsigned-byte 5) (ash (the (unsigned-byte 1) b) 4))))))
Theorem:
(defthm evex-byte3-p-of-!evex-byte3->b (b* ((new-x (!evex-byte3->b$inline b x))) (evex-byte3-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte3->b$inline-of-bfix-b (equal (!evex-byte3->b$inline (bfix b) x) (!evex-byte3->b$inline b x)))
Theorem:
(defthm !evex-byte3->b$inline-bit-equiv-congruence-on-b (implies (bit-equiv b b-equiv) (equal (!evex-byte3->b$inline b x) (!evex-byte3->b$inline b-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->b$inline-of-evex-byte3-fix-x (equal (!evex-byte3->b$inline b (evex-byte3-fix x)) (!evex-byte3->b$inline b x)))
Theorem:
(defthm !evex-byte3->b$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (!evex-byte3->b$inline b x) (!evex-byte3->b$inline b x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->b-is-evex-byte3 (equal (!evex-byte3->b b x) (change-evex-byte3 x :b b)))
Theorem:
(defthm evex-byte3->b-of-!evex-byte3->b (b* ((?new-x (!evex-byte3->b$inline b x))) (equal (evex-byte3->b new-x) (bfix b))))
Theorem:
(defthm !evex-byte3->b-equiv-under-mask (b* ((?new-x (!evex-byte3->b$inline b x))) (evex-byte3-equiv-under-mask new-x x -17)))