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