Update the |ACL2|::|PE| field of a mxcsrbits bit structure.
(!mxcsrbits->pe pe x) → new-x
Function:
(defun !mxcsrbits->pe$inline (pe x) (declare (xargs :guard (and (bitp pe) (mxcsrbits-p x)))) (mbe :logic (b* ((pe (mbe :logic (bfix pe) :exec pe)) (x (mxcsrbits-fix x))) (part-install pe x :width 1 :low 5)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 7) -33))) (the (unsigned-byte 6) (ash (the (unsigned-byte 1) pe) 5))))))
Theorem:
(defthm mxcsrbits-p-of-!mxcsrbits->pe (b* ((new-x (!mxcsrbits->pe$inline pe x))) (mxcsrbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !mxcsrbits->pe$inline-of-bfix-pe (equal (!mxcsrbits->pe$inline (bfix pe) x) (!mxcsrbits->pe$inline pe x)))
Theorem:
(defthm !mxcsrbits->pe$inline-bit-equiv-congruence-on-pe (implies (bit-equiv pe pe-equiv) (equal (!mxcsrbits->pe$inline pe x) (!mxcsrbits->pe$inline pe-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !mxcsrbits->pe$inline-of-mxcsrbits-fix-x (equal (!mxcsrbits->pe$inline pe (mxcsrbits-fix x)) (!mxcsrbits->pe$inline pe x)))
Theorem:
(defthm !mxcsrbits->pe$inline-mxcsrbits-equiv-congruence-on-x (implies (mxcsrbits-equiv x x-equiv) (equal (!mxcsrbits->pe$inline pe x) (!mxcsrbits->pe$inline pe x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !mxcsrbits->pe-is-mxcsrbits (equal (!mxcsrbits->pe pe x) (change-mxcsrbits x :pe pe)))
Theorem:
(defthm mxcsrbits->pe-of-!mxcsrbits->pe (b* ((?new-x (!mxcsrbits->pe$inline pe x))) (equal (mxcsrbits->pe new-x) (bfix pe))))
Theorem:
(defthm !mxcsrbits->pe-equiv-under-mask (b* ((?new-x (!mxcsrbits->pe$inline pe x))) (mxcsrbits-equiv-under-mask new-x x -33)))