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