Update the |FGL|::|DONT-PRIMITIVE-EXEC| field of a fgl-function-mode bit structure.
(!fgl-function-mode->dont-primitive-exec dont-primitive-exec x) → new-x
Function:
(defun !fgl-function-mode->dont-primitive-exec (dont-primitive-exec x) (declare (xargs :guard (and (booleanp dont-primitive-exec) (fgl-function-mode-p x)))) (mbe :logic (b* ((dont-primitive-exec (bool->bit dont-primitive-exec)) (x (fgl-function-mode-fix x))) (acl2::part-install dont-primitive-exec x :width 1 :low 5)) :exec (the (unsigned-byte 6) (logior (the (unsigned-byte 6) (logand (the (unsigned-byte 6) x) (the (signed-byte 7) -33))) (the (unsigned-byte 6) (ash (the (unsigned-byte 1) (bool->bit dont-primitive-exec)) 5))))))
Theorem:
(defthm fgl-function-mode-p-of-!fgl-function-mode->dont-primitive-exec (b* ((new-x (!fgl-function-mode->dont-primitive-exec dont-primitive-exec x))) (fgl-function-mode-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !fgl-function-mode->dont-primitive-exec-of-bool-fix-dont-primitive-exec (equal (!fgl-function-mode->dont-primitive-exec (bool-fix dont-primitive-exec) x) (!fgl-function-mode->dont-primitive-exec dont-primitive-exec x)))
Theorem:
(defthm !fgl-function-mode->dont-primitive-exec-iff-congruence-on-dont-primitive-exec (implies (iff dont-primitive-exec dont-primitive-exec-equiv) (equal (!fgl-function-mode->dont-primitive-exec dont-primitive-exec x) (!fgl-function-mode->dont-primitive-exec dont-primitive-exec-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !fgl-function-mode->dont-primitive-exec-of-fgl-function-mode-fix-x (equal (!fgl-function-mode->dont-primitive-exec dont-primitive-exec (fgl-function-mode-fix x)) (!fgl-function-mode->dont-primitive-exec dont-primitive-exec x)))
Theorem:
(defthm !fgl-function-mode->dont-primitive-exec-fgl-function-mode-equiv-congruence-on-x (implies (fgl-function-mode-equiv x x-equiv) (equal (!fgl-function-mode->dont-primitive-exec dont-primitive-exec x) (!fgl-function-mode->dont-primitive-exec dont-primitive-exec x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !fgl-function-mode->dont-primitive-exec-is-fgl-function-mode (equal (!fgl-function-mode->dont-primitive-exec dont-primitive-exec x) (change-fgl-function-mode x :dont-primitive-exec dont-primitive-exec)))
Theorem:
(defthm fgl-function-mode->dont-primitive-exec-of-!fgl-function-mode->dont-primitive-exec (b* ((?new-x (!fgl-function-mode->dont-primitive-exec dont-primitive-exec x))) (equal (fgl-function-mode->dont-primitive-exec new-x) (bool-fix dont-primitive-exec))))
Theorem:
(defthm !fgl-function-mode->dont-primitive-exec-equiv-under-mask (b* ((?new-x (!fgl-function-mode->dont-primitive-exec dont-primitive-exec x))) (fgl-function-mode-equiv-under-mask new-x x 31)))