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