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