Update the |AIGNET|::|VALID| field of a cutinfo bit structure.
Function:
(defun !cutinfo->valid (valid x) (declare (xargs :guard (and (booleanp valid) (cutinfo-p x)))) (mbe :logic (b* ((valid (bool->bit valid)) (x (cutinfo-fix x))) (part-install valid x :width 1 :low 19)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 21) -524289))) (the (unsigned-byte 20) (ash (the (unsigned-byte 1) (bool->bit valid)) 19))))))
Theorem:
(defthm cutinfo-p-of-!cutinfo->valid (b* ((new-x (!cutinfo->valid valid x))) (cutinfo-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !cutinfo->valid-of-bool-fix-valid (equal (!cutinfo->valid (acl2::bool-fix valid) x) (!cutinfo->valid valid x)))
Theorem:
(defthm !cutinfo->valid-iff-congruence-on-valid (implies (iff valid valid-equiv) (equal (!cutinfo->valid valid x) (!cutinfo->valid valid-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !cutinfo->valid-of-cutinfo-fix-x (equal (!cutinfo->valid valid (cutinfo-fix x)) (!cutinfo->valid valid x)))
Theorem:
(defthm !cutinfo->valid-cutinfo-equiv-congruence-on-x (implies (cutinfo-equiv x x-equiv) (equal (!cutinfo->valid valid x) (!cutinfo->valid valid x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !cutinfo->valid-is-cutinfo (equal (!cutinfo->valid valid x) (change-cutinfo x :valid valid)))
Theorem:
(defthm cutinfo->valid-of-!cutinfo->valid (b* ((?new-x (!cutinfo->valid valid x))) (equal (cutinfo->valid new-x) (acl2::bool-fix valid))))
Theorem:
(defthm !cutinfo->valid-equiv-under-mask (b* ((?new-x (!cutinfo->valid valid x))) (cutinfo-equiv-under-mask new-x x -524289)))