Update the |ACL2|::|P| field of a interrupt/trap-gate-descriptor-attributesbits bit structure.
(!interrupt/trap-gate-descriptor-attributesbits->p p x) → new-x
Function:
(defun !interrupt/trap-gate-descriptor-attributesbits->p$inline (p x) (declare (xargs :guard (and (bitp p) (interrupt/trap-gate-descriptor-attributesbits-p x)))) (mbe :logic (b* ((p (mbe :logic (bfix p) :exec p)) (x (interrupt/trap-gate-descriptor-attributesbits-fix x))) (part-install p x :width 1 :low 10)) :exec (the (unsigned-byte 16) (logior (the (unsigned-byte 16) (logand (the (unsigned-byte 16) x) (the (signed-byte 12) -1025))) (the (unsigned-byte 11) (ash (the (unsigned-byte 1) p) 10))))))
Theorem:
(defthm interrupt/trap-gate-descriptor-attributesbits-p-of-!interrupt/trap-gate-descriptor-attributesbits->p (b* ((new-x (!interrupt/trap-gate-descriptor-attributesbits->p$inline p x))) (interrupt/trap-gate-descriptor-attributesbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->p$inline-of-bfix-p (equal (!interrupt/trap-gate-descriptor-attributesbits->p$inline (bfix p) x) (!interrupt/trap-gate-descriptor-attributesbits->p$inline p x)))
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->p$inline-bit-equiv-congruence-on-p (implies (bit-equiv p p-equiv) (equal (!interrupt/trap-gate-descriptor-attributesbits->p$inline p x) (!interrupt/trap-gate-descriptor-attributesbits->p$inline p-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->p$inline-of-interrupt/trap-gate-descriptor-attributesbits-fix-x (equal (!interrupt/trap-gate-descriptor-attributesbits->p$inline p (interrupt/trap-gate-descriptor-attributesbits-fix x)) (!interrupt/trap-gate-descriptor-attributesbits->p$inline p x)))
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->p$inline-interrupt/trap-gate-descriptor-attributesbits-equiv-congruence-on-x (implies (interrupt/trap-gate-descriptor-attributesbits-equiv x x-equiv) (equal (!interrupt/trap-gate-descriptor-attributesbits->p$inline p x) (!interrupt/trap-gate-descriptor-attributesbits->p$inline p x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->p-is-interrupt/trap-gate-descriptor-attributesbits (equal (!interrupt/trap-gate-descriptor-attributesbits->p p x) (change-interrupt/trap-gate-descriptor-attributesbits x :p p)))
Theorem:
(defthm interrupt/trap-gate-descriptor-attributesbits->p-of-!interrupt/trap-gate-descriptor-attributesbits->p (b* ((?new-x (!interrupt/trap-gate-descriptor-attributesbits->p$inline p x))) (equal (interrupt/trap-gate-descriptor-attributesbits->p new-x) (bfix p))))
Theorem:
(defthm !interrupt/trap-gate-descriptor-attributesbits->p-equiv-under-mask (b* ((?new-x (!interrupt/trap-gate-descriptor-attributesbits->p$inline p x))) (interrupt/trap-gate-descriptor-attributesbits-equiv-under-mask new-x x -1025)))