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