Update the |X86ISA|::|RES1| field of a system-segment-descriptorbits bit structure.
(!system-segment-descriptorbits->res1 res1 x) → new-x
Function:
(defun !system-segment-descriptorbits->res1$inline (res1 x) (declare (xargs :guard (and (2bits-p res1) (system-segment-descriptorbits-p x)))) (mbe :logic (b* ((res1 (mbe :logic (2bits-fix res1) :exec res1)) (x (system-segment-descriptorbits-fix x))) (part-install res1 x :width 2 :low 53)) :exec (the (unsigned-byte 128) (logior (the (unsigned-byte 128) (logand (the (unsigned-byte 128) x) (the (signed-byte 56) -27021597764222977))) (the (unsigned-byte 55) (ash (the (unsigned-byte 2) res1) 53))))))
Theorem:
(defthm system-segment-descriptorbits-p-of-!system-segment-descriptorbits->res1 (b* ((new-x (!system-segment-descriptorbits->res1$inline res1 x))) (system-segment-descriptorbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !system-segment-descriptorbits->res1$inline-of-2bits-fix-res1 (equal (!system-segment-descriptorbits->res1$inline (2bits-fix res1) x) (!system-segment-descriptorbits->res1$inline res1 x)))
Theorem:
(defthm !system-segment-descriptorbits->res1$inline-2bits-equiv-congruence-on-res1 (implies (2bits-equiv res1 res1-equiv) (equal (!system-segment-descriptorbits->res1$inline res1 x) (!system-segment-descriptorbits->res1$inline res1-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !system-segment-descriptorbits->res1$inline-of-system-segment-descriptorbits-fix-x (equal (!system-segment-descriptorbits->res1$inline res1 (system-segment-descriptorbits-fix x)) (!system-segment-descriptorbits->res1$inline res1 x)))
Theorem:
(defthm !system-segment-descriptorbits->res1$inline-system-segment-descriptorbits-equiv-congruence-on-x (implies (system-segment-descriptorbits-equiv x x-equiv) (equal (!system-segment-descriptorbits->res1$inline res1 x) (!system-segment-descriptorbits->res1$inline res1 x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !system-segment-descriptorbits->res1-is-system-segment-descriptorbits (equal (!system-segment-descriptorbits->res1 res1 x) (change-system-segment-descriptorbits x :res1 res1)))
Theorem:
(defthm system-segment-descriptorbits->res1-of-!system-segment-descriptorbits->res1 (b* ((?new-x (!system-segment-descriptorbits->res1$inline res1 x))) (equal (system-segment-descriptorbits->res1 new-x) (2bits-fix res1))))
Theorem:
(defthm !system-segment-descriptorbits->res1-equiv-under-mask (b* ((?new-x (!system-segment-descriptorbits->res1$inline res1 x))) (system-segment-descriptorbits-equiv-under-mask new-x x -27021597764222977)))