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