Update the |ACL2|::|R| field of a code-segment-descriptorbits bit structure.
(!code-segment-descriptorbits->r r x) → new-x
Function:
(defun !code-segment-descriptorbits->r$inline (r x) (declare (xargs :guard (and (bitp r) (code-segment-descriptorbits-p x)))) (mbe :logic (b* ((r (mbe :logic (bfix r) :exec r)) (x (code-segment-descriptorbits-fix x))) (part-install r x :width 1 :low 41)) :exec (the (unsigned-byte 64) (logior (the (unsigned-byte 64) (logand (the (unsigned-byte 64) x) (the (signed-byte 43) -2199023255553))) (the (unsigned-byte 42) (ash (the (unsigned-byte 1) r) 41))))))
Theorem:
(defthm code-segment-descriptorbits-p-of-!code-segment-descriptorbits->r (b* ((new-x (!code-segment-descriptorbits->r$inline r x))) (code-segment-descriptorbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !code-segment-descriptorbits->r$inline-of-bfix-r (equal (!code-segment-descriptorbits->r$inline (bfix r) x) (!code-segment-descriptorbits->r$inline r x)))
Theorem:
(defthm !code-segment-descriptorbits->r$inline-bit-equiv-congruence-on-r (implies (bit-equiv r r-equiv) (equal (!code-segment-descriptorbits->r$inline r x) (!code-segment-descriptorbits->r$inline r-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !code-segment-descriptorbits->r$inline-of-code-segment-descriptorbits-fix-x (equal (!code-segment-descriptorbits->r$inline r (code-segment-descriptorbits-fix x)) (!code-segment-descriptorbits->r$inline r x)))
Theorem:
(defthm !code-segment-descriptorbits->r$inline-code-segment-descriptorbits-equiv-congruence-on-x (implies (code-segment-descriptorbits-equiv x x-equiv) (equal (!code-segment-descriptorbits->r$inline r x) (!code-segment-descriptorbits->r$inline r x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !code-segment-descriptorbits->r-is-code-segment-descriptorbits (equal (!code-segment-descriptorbits->r r x) (change-code-segment-descriptorbits x :r r)))
Theorem:
(defthm code-segment-descriptorbits->r-of-!code-segment-descriptorbits->r (b* ((?new-x (!code-segment-descriptorbits->r$inline r x))) (equal (code-segment-descriptorbits->r new-x) (bfix r))))
Theorem:
(defthm !code-segment-descriptorbits->r-equiv-under-mask (b* ((?new-x (!code-segment-descriptorbits->r$inline r x))) (code-segment-descriptorbits-equiv-under-mask new-x x -2199023255553)))