Update the |FGL|::|SIMPLIFY-LOGIC| field of a interp-flags bit structure.
(!interp-flags->simplify-logic simplify-logic x) → new-x
Function:
(defun !interp-flags->simplify-logic (simplify-logic x) (declare (xargs :guard (and (booleanp simplify-logic) (interp-flags-p x)))) (mbe :logic (b* ((simplify-logic (bool->bit simplify-logic)) (x (interp-flags-fix x))) (acl2::part-install simplify-logic x :width 1 :low 2)) :exec (the (unsigned-byte 6) (logior (the (unsigned-byte 6) (logand (the (unsigned-byte 6) x) (the (signed-byte 4) -5))) (the (unsigned-byte 3) (ash (the (unsigned-byte 1) (bool->bit simplify-logic)) 2))))))
Theorem:
(defthm interp-flags-p-of-!interp-flags->simplify-logic (b* ((new-x (!interp-flags->simplify-logic simplify-logic x))) (interp-flags-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !interp-flags->simplify-logic-of-bool-fix-simplify-logic (equal (!interp-flags->simplify-logic (bool-fix simplify-logic) x) (!interp-flags->simplify-logic simplify-logic x)))
Theorem:
(defthm !interp-flags->simplify-logic-iff-congruence-on-simplify-logic (implies (iff simplify-logic simplify-logic-equiv) (equal (!interp-flags->simplify-logic simplify-logic x) (!interp-flags->simplify-logic simplify-logic-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !interp-flags->simplify-logic-of-interp-flags-fix-x (equal (!interp-flags->simplify-logic simplify-logic (interp-flags-fix x)) (!interp-flags->simplify-logic simplify-logic x)))
Theorem:
(defthm !interp-flags->simplify-logic-interp-flags-equiv-congruence-on-x (implies (interp-flags-equiv x x-equiv) (equal (!interp-flags->simplify-logic simplify-logic x) (!interp-flags->simplify-logic simplify-logic x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !interp-flags->simplify-logic-is-interp-flags (equal (!interp-flags->simplify-logic simplify-logic x) (change-interp-flags x :simplify-logic simplify-logic)))
Theorem:
(defthm interp-flags->simplify-logic-of-!interp-flags->simplify-logic (b* ((?new-x (!interp-flags->simplify-logic simplify-logic x))) (equal (interp-flags->simplify-logic new-x) (bool-fix simplify-logic))))
Theorem:
(defthm !interp-flags->simplify-logic-equiv-under-mask (b* ((?new-x (!interp-flags->simplify-logic simplify-logic x))) (interp-flags-equiv-under-mask new-x x -5)))