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