Update the |ACL2|::|W| field of a data-segment-descriptorbits bit structure.
(!data-segment-descriptorbits->w w x) → new-x
Function:
(defun !data-segment-descriptorbits->w$inline (w x) (declare (xargs :guard (and (bitp w) (data-segment-descriptorbits-p x)))) (mbe :logic (b* ((w (mbe :logic (bfix w) :exec w)) (x (data-segment-descriptorbits-fix x))) (part-install w 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) w) 41))))))
Theorem:
(defthm data-segment-descriptorbits-p-of-!data-segment-descriptorbits->w (b* ((new-x (!data-segment-descriptorbits->w$inline w x))) (data-segment-descriptorbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !data-segment-descriptorbits->w$inline-of-bfix-w (equal (!data-segment-descriptorbits->w$inline (bfix w) x) (!data-segment-descriptorbits->w$inline w x)))
Theorem:
(defthm !data-segment-descriptorbits->w$inline-bit-equiv-congruence-on-w (implies (bit-equiv w w-equiv) (equal (!data-segment-descriptorbits->w$inline w x) (!data-segment-descriptorbits->w$inline w-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !data-segment-descriptorbits->w$inline-of-data-segment-descriptorbits-fix-x (equal (!data-segment-descriptorbits->w$inline w (data-segment-descriptorbits-fix x)) (!data-segment-descriptorbits->w$inline w x)))
Theorem:
(defthm !data-segment-descriptorbits->w$inline-data-segment-descriptorbits-equiv-congruence-on-x (implies (data-segment-descriptorbits-equiv x x-equiv) (equal (!data-segment-descriptorbits->w$inline w x) (!data-segment-descriptorbits->w$inline w x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !data-segment-descriptorbits->w-is-data-segment-descriptorbits (equal (!data-segment-descriptorbits->w w x) (change-data-segment-descriptorbits x :w w)))
Theorem:
(defthm data-segment-descriptorbits->w-of-!data-segment-descriptorbits->w (b* ((?new-x (!data-segment-descriptorbits->w$inline w x))) (equal (data-segment-descriptorbits->w new-x) (bfix w))))
Theorem:
(defthm !data-segment-descriptorbits->w-equiv-under-mask (b* ((?new-x (!data-segment-descriptorbits->w$inline w x))) (data-segment-descriptorbits-equiv-under-mask new-x x -2199023255553)))