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