Update the |ACL2|::|ID| field of a rflagsbits bit structure.
(!rflagsbits->id id x) → new-x
Function:
(defun !rflagsbits->id$inline (id x) (declare (xargs :guard (and (bitp id) (rflagsbits-p x)))) (mbe :logic (b* ((id (mbe :logic (bfix id) :exec id)) (x (rflagsbits-fix x))) (part-install id x :width 1 :low 21)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 23) -2097153))) (the (unsigned-byte 22) (ash (the (unsigned-byte 1) id) 21))))))
Theorem:
(defthm rflagsbits-p-of-!rflagsbits->id (b* ((new-x (!rflagsbits->id$inline id x))) (rflagsbits-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !rflagsbits->id$inline-of-bfix-id (equal (!rflagsbits->id$inline (bfix id) x) (!rflagsbits->id$inline id x)))
Theorem:
(defthm !rflagsbits->id$inline-bit-equiv-congruence-on-id (implies (bit-equiv id id-equiv) (equal (!rflagsbits->id$inline id x) (!rflagsbits->id$inline id-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !rflagsbits->id$inline-of-rflagsbits-fix-x (equal (!rflagsbits->id$inline id (rflagsbits-fix x)) (!rflagsbits->id$inline id x)))
Theorem:
(defthm !rflagsbits->id$inline-rflagsbits-equiv-congruence-on-x (implies (rflagsbits-equiv x x-equiv) (equal (!rflagsbits->id$inline id x) (!rflagsbits->id$inline id x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !rflagsbits->id-is-rflagsbits (equal (!rflagsbits->id id x) (change-rflagsbits x :id id)))
Theorem:
(defthm rflagsbits->id-of-!rflagsbits->id (b* ((?new-x (!rflagsbits->id$inline id x))) (equal (rflagsbits->id new-x) (bfix id))))
Theorem:
(defthm !rflagsbits->id-equiv-under-mask (b* ((?new-x (!rflagsbits->id$inline id x))) (rflagsbits-equiv-under-mask new-x x -2097153)))