Update the |COMMON-LISP|::|TYPE| field of a call-gate-descriptor-attributesbits bit structure.
(!call-gate-descriptor-attributesbits->type type x) → new-x
Function:
(defun !call-gate-descriptor-attributesbits->type$inline (type x) (declare (xargs :guard (and (4bits-p type) (call-gate-descriptor-attributesbits-p x)))) (mbe :logic (b* ((type (mbe :logic (4bits-fix type) :exec type)) (x (call-gate-descriptor-attributesbits-fix x))) (part-install type x :width 4 :low 0)) :exec (the (unsigned-byte 16) (logior (the (unsigned-byte 16) (logand (the (unsigned-byte 16) x) (the (signed-byte 5) -16))) (the (unsigned-byte 4) type)))))
Theorem:
(defthm call-gate-descriptor-attributesbits-p-of-!call-gate-descriptor-attributesbits->type (b* ((new-x (!call-gate-descriptor-attributesbits->type$inline type x))) (call-gate-descriptor-attributesbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !call-gate-descriptor-attributesbits->type$inline-of-4bits-fix-type (equal (!call-gate-descriptor-attributesbits->type$inline (4bits-fix type) x) (!call-gate-descriptor-attributesbits->type$inline type x)))
Theorem:
(defthm !call-gate-descriptor-attributesbits->type$inline-4bits-equiv-congruence-on-type (implies (4bits-equiv type type-equiv) (equal (!call-gate-descriptor-attributesbits->type$inline type x) (!call-gate-descriptor-attributesbits->type$inline type-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !call-gate-descriptor-attributesbits->type$inline-of-call-gate-descriptor-attributesbits-fix-x (equal (!call-gate-descriptor-attributesbits->type$inline type (call-gate-descriptor-attributesbits-fix x)) (!call-gate-descriptor-attributesbits->type$inline type x)))
Theorem:
(defthm !call-gate-descriptor-attributesbits->type$inline-call-gate-descriptor-attributesbits-equiv-congruence-on-x (implies (call-gate-descriptor-attributesbits-equiv x x-equiv) (equal (!call-gate-descriptor-attributesbits->type$inline type x) (!call-gate-descriptor-attributesbits->type$inline type x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !call-gate-descriptor-attributesbits->type-is-call-gate-descriptor-attributesbits (equal (!call-gate-descriptor-attributesbits->type type x) (change-call-gate-descriptor-attributesbits x :type type)))
Theorem:
(defthm call-gate-descriptor-attributesbits->type-of-!call-gate-descriptor-attributesbits->type (b* ((?new-x (!call-gate-descriptor-attributesbits->type$inline type x))) (equal (call-gate-descriptor-attributesbits->type new-x) (4bits-fix type))))
Theorem:
(defthm !call-gate-descriptor-attributesbits->type-equiv-under-mask (b* ((?new-x (!call-gate-descriptor-attributesbits->type$inline type x))) (call-gate-descriptor-attributesbits-equiv-under-mask new-x x -16)))