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