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