Update the |ACL2|::|C| field of a code-segment-descriptor-attributesbits bit structure.
(!code-segment-descriptor-attributesbits->c c x) → new-x
Function:
(defun !code-segment-descriptor-attributesbits->c$inline (c x) (declare (xargs :guard (and (bitp c) (code-segment-descriptor-attributesbits-p x)))) (mbe :logic (b* ((c (mbe :logic (bfix c) :exec c)) (x (code-segment-descriptor-attributesbits-fix x))) (part-install c x :width 1 :low 2)) :exec (the (unsigned-byte 16) (logior (the (unsigned-byte 16) (logand (the (unsigned-byte 16) x) (the (signed-byte 4) -5))) (the (unsigned-byte 3) (ash (the (unsigned-byte 1) c) 2))))))
Theorem:
(defthm code-segment-descriptor-attributesbits-p-of-!code-segment-descriptor-attributesbits->c (b* ((new-x (!code-segment-descriptor-attributesbits->c$inline c x))) (code-segment-descriptor-attributesbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !code-segment-descriptor-attributesbits->c$inline-of-bfix-c (equal (!code-segment-descriptor-attributesbits->c$inline (bfix c) x) (!code-segment-descriptor-attributesbits->c$inline c x)))
Theorem:
(defthm !code-segment-descriptor-attributesbits->c$inline-bit-equiv-congruence-on-c (implies (bit-equiv c c-equiv) (equal (!code-segment-descriptor-attributesbits->c$inline c x) (!code-segment-descriptor-attributesbits->c$inline c-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !code-segment-descriptor-attributesbits->c$inline-of-code-segment-descriptor-attributesbits-fix-x (equal (!code-segment-descriptor-attributesbits->c$inline c (code-segment-descriptor-attributesbits-fix x)) (!code-segment-descriptor-attributesbits->c$inline c x)))
Theorem:
(defthm !code-segment-descriptor-attributesbits->c$inline-code-segment-descriptor-attributesbits-equiv-congruence-on-x (implies (code-segment-descriptor-attributesbits-equiv x x-equiv) (equal (!code-segment-descriptor-attributesbits->c$inline c x) (!code-segment-descriptor-attributesbits->c$inline c x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !code-segment-descriptor-attributesbits->c-is-code-segment-descriptor-attributesbits (equal (!code-segment-descriptor-attributesbits->c c x) (change-code-segment-descriptor-attributesbits x :c c)))
Theorem:
(defthm code-segment-descriptor-attributesbits->c-of-!code-segment-descriptor-attributesbits->c (b* ((?new-x (!code-segment-descriptor-attributesbits->c$inline c x))) (equal (code-segment-descriptor-attributesbits->c new-x) (bfix c))))
Theorem:
(defthm !code-segment-descriptor-attributesbits->c-equiv-under-mask (b* ((?new-x (!code-segment-descriptor-attributesbits->c$inline c x))) (code-segment-descriptor-attributesbits-equiv-under-mask new-x x -5)))