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