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