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