Update the |ACL2|::|L| field of a vex2-byte1 bit structure.
(!vex2-byte1->l l x) → new-x
Function:
(defun !vex2-byte1->l$inline (l x) (declare (xargs :guard (and (bitp l) (vex2-byte1-p x)))) (mbe :logic (b* ((l (mbe :logic (bfix l) :exec l)) (x (vex2-byte1-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 vex2-byte1-p-of-!vex2-byte1->l (b* ((new-x (!vex2-byte1->l$inline l x))) (vex2-byte1-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !vex2-byte1->l$inline-of-bfix-l (equal (!vex2-byte1->l$inline (bfix l) x) (!vex2-byte1->l$inline l x)))
Theorem:
(defthm !vex2-byte1->l$inline-bit-equiv-congruence-on-l (implies (bit-equiv l l-equiv) (equal (!vex2-byte1->l$inline l x) (!vex2-byte1->l$inline l-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !vex2-byte1->l$inline-of-vex2-byte1-fix-x (equal (!vex2-byte1->l$inline l (vex2-byte1-fix x)) (!vex2-byte1->l$inline l x)))
Theorem:
(defthm !vex2-byte1->l$inline-vex2-byte1-equiv-congruence-on-x (implies (vex2-byte1-equiv x x-equiv) (equal (!vex2-byte1->l$inline l x) (!vex2-byte1->l$inline l x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !vex2-byte1->l-is-vex2-byte1 (equal (!vex2-byte1->l l x) (change-vex2-byte1 x :l l)))
Theorem:
(defthm vex2-byte1->l-of-!vex2-byte1->l (b* ((?new-x (!vex2-byte1->l$inline l x))) (equal (vex2-byte1->l new-x) (bfix l))))
Theorem:
(defthm !vex2-byte1->l-equiv-under-mask (b* ((?new-x (!vex2-byte1->l$inline l x))) (vex2-byte1-equiv-under-mask new-x x -5)))