Update the |AIGNET|::|TRUTH| field of a cutinfo bit structure.
(!cutinfo->truth truth x) → new-x
Function:
(defun !cutinfo->truth (truth x) (declare (xargs :guard (and (truth::truth4-p truth) (cutinfo-p x)))) (mbe :logic (b* ((truth (mbe :logic (truth::truth4-fix$ truth) :exec truth)) (x (cutinfo-fix x))) (part-install truth x :width 16 :low 0)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 17) -65536))) (the (unsigned-byte 16) truth)))))
Theorem:
(defthm cutinfo-p-of-!cutinfo->truth (b* ((new-x (!cutinfo->truth truth x))) (cutinfo-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !cutinfo->truth-of-truth4-fix$-truth (equal (!cutinfo->truth (truth::truth4-fix$ truth) x) (!cutinfo->truth truth x)))
Theorem:
(defthm !cutinfo->truth-truth4-equiv-congruence-on-truth (implies (truth::truth4-equiv truth truth-equiv) (equal (!cutinfo->truth truth x) (!cutinfo->truth truth-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !cutinfo->truth-of-cutinfo-fix-x (equal (!cutinfo->truth truth (cutinfo-fix x)) (!cutinfo->truth truth x)))
Theorem:
(defthm !cutinfo->truth-cutinfo-equiv-congruence-on-x (implies (cutinfo-equiv x x-equiv) (equal (!cutinfo->truth truth x) (!cutinfo->truth truth x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !cutinfo->truth-is-cutinfo (equal (!cutinfo->truth truth x) (change-cutinfo x :truth truth)))
Theorem:
(defthm cutinfo->truth-of-!cutinfo->truth (b* ((?new-x (!cutinfo->truth truth x))) (equal (cutinfo->truth new-x) (truth::truth4-fix$ truth))))
Theorem:
(defthm !cutinfo->truth-equiv-under-mask (b* ((?new-x (!cutinfo->truth truth x))) (cutinfo-equiv-under-mask new-x x -65536)))