Functions to decode and collect EVEX prefix bytes from an x86 instruction.
Function:
(defun evex-prefixes-p$inline (x) (declare (xargs :guard t)) (mbe :logic (unsigned-byte-p 32 x) :exec (and (natp x) (< x 4294967296))))
Theorem:
(defthm evex-prefixes-p-when-unsigned-byte-p (implies (unsigned-byte-p 32 x) (evex-prefixes-p x)))
Theorem:
(defthm unsigned-byte-p-when-evex-prefixes-p (implies (evex-prefixes-p x) (unsigned-byte-p 32 x)))
Theorem:
(defthm evex-prefixes-p-compound-recognizer (implies (evex-prefixes-p x) (natp x)) :rule-classes :compound-recognizer)
Function:
(defun evex-prefixes-fix$inline (x) (declare (xargs :guard (evex-prefixes-p x))) (mbe :logic (loghead 32 x) :exec x))
Theorem:
(defthm evex-prefixes-p-of-evex-prefixes-fix (b* ((fty::fixed (evex-prefixes-fix$inline x))) (evex-prefixes-p fty::fixed)) :rule-classes :rewrite)
Theorem:
(defthm evex-prefixes-fix-when-evex-prefixes-p (implies (evex-prefixes-p x) (equal (evex-prefixes-fix x) x)))
Function:
(defun evex-prefixes-equiv$inline (x y) (declare (xargs :guard (and (evex-prefixes-p x) (evex-prefixes-p y)))) (equal (evex-prefixes-fix x) (evex-prefixes-fix y)))
Theorem:
(defthm evex-prefixes-equiv-is-an-equivalence (and (booleanp (evex-prefixes-equiv x y)) (evex-prefixes-equiv x x) (implies (evex-prefixes-equiv x y) (evex-prefixes-equiv y x)) (implies (and (evex-prefixes-equiv x y) (evex-prefixes-equiv y z)) (evex-prefixes-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm evex-prefixes-equiv-implies-equal-evex-prefixes-fix-1 (implies (evex-prefixes-equiv x x-equiv) (equal (evex-prefixes-fix x) (evex-prefixes-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm evex-prefixes-fix-under-evex-prefixes-equiv (evex-prefixes-equiv (evex-prefixes-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Function:
(defun evex-prefixes$inline (byte0 byte1 byte2 byte3) (declare (xargs :guard (and (8bits-p byte0) (8bits-p byte1) (8bits-p byte2) (8bits-p byte3)))) (b* ((byte0 (mbe :logic (8bits-fix byte0) :exec byte0)) (byte1 (mbe :logic (8bits-fix byte1) :exec byte1)) (byte2 (mbe :logic (8bits-fix byte2) :exec byte2)) (byte3 (mbe :logic (8bits-fix byte3) :exec byte3))) (logapp 8 byte0 (logapp 8 byte1 (logapp 8 byte2 byte3)))))
Theorem:
(defthm evex-prefixes-p-of-evex-prefixes (b* ((evex-prefixes (evex-prefixes$inline byte0 byte1 byte2 byte3))) (evex-prefixes-p evex-prefixes)) :rule-classes :rewrite)
Theorem:
(defthm evex-prefixes$inline-of-8bits-fix-byte0 (equal (evex-prefixes$inline (8bits-fix byte0) byte1 byte2 byte3) (evex-prefixes$inline byte0 byte1 byte2 byte3)))
Theorem:
(defthm evex-prefixes$inline-8bits-equiv-congruence-on-byte0 (implies (8bits-equiv byte0 byte0-equiv) (equal (evex-prefixes$inline byte0 byte1 byte2 byte3) (evex-prefixes$inline byte0-equiv byte1 byte2 byte3))) :rule-classes :congruence)
Theorem:
(defthm evex-prefixes$inline-of-8bits-fix-byte1 (equal (evex-prefixes$inline byte0 (8bits-fix byte1) byte2 byte3) (evex-prefixes$inline byte0 byte1 byte2 byte3)))
Theorem:
(defthm evex-prefixes$inline-8bits-equiv-congruence-on-byte1 (implies (8bits-equiv byte1 byte1-equiv) (equal (evex-prefixes$inline byte0 byte1 byte2 byte3) (evex-prefixes$inline byte0 byte1-equiv byte2 byte3))) :rule-classes :congruence)
Theorem:
(defthm evex-prefixes$inline-of-8bits-fix-byte2 (equal (evex-prefixes$inline byte0 byte1 (8bits-fix byte2) byte3) (evex-prefixes$inline byte0 byte1 byte2 byte3)))
Theorem:
(defthm evex-prefixes$inline-8bits-equiv-congruence-on-byte2 (implies (8bits-equiv byte2 byte2-equiv) (equal (evex-prefixes$inline byte0 byte1 byte2 byte3) (evex-prefixes$inline byte0 byte1 byte2-equiv byte3))) :rule-classes :congruence)
Theorem:
(defthm evex-prefixes$inline-of-8bits-fix-byte3 (equal (evex-prefixes$inline byte0 byte1 byte2 (8bits-fix byte3)) (evex-prefixes$inline byte0 byte1 byte2 byte3)))
Theorem:
(defthm evex-prefixes$inline-8bits-equiv-congruence-on-byte3 (implies (8bits-equiv byte3 byte3-equiv) (equal (evex-prefixes$inline byte0 byte1 byte2 byte3) (evex-prefixes$inline byte0 byte1 byte2 byte3-equiv))) :rule-classes :congruence)
Function:
(defun evex-prefixes-equiv-under-mask$inline (x x1 mask) (declare (xargs :guard (and (evex-prefixes-p x) (evex-prefixes-p x1) (integerp mask)))) (fty::int-equiv-under-mask (evex-prefixes-fix x) (evex-prefixes-fix x1) mask))
Function:
(defun evex-prefixes->byte0$inline (x) (declare (xargs :guard (evex-prefixes-p x))) (mbe :logic (let ((x (evex-prefixes-fix x))) (part-select x :low 0 :width 8)) :exec (the (unsigned-byte 8) (logand (the (unsigned-byte 8) 255) (the (unsigned-byte 32) x)))))
Theorem:
(defthm 8bits-p-of-evex-prefixes->byte0 (b* ((byte0 (evex-prefixes->byte0$inline x))) (8bits-p byte0)) :rule-classes :rewrite)
Theorem:
(defthm evex-prefixes->byte0$inline-of-evex-prefixes-fix-x (equal (evex-prefixes->byte0$inline (evex-prefixes-fix x)) (evex-prefixes->byte0$inline x)))
Theorem:
(defthm evex-prefixes->byte0$inline-evex-prefixes-equiv-congruence-on-x (implies (evex-prefixes-equiv x x-equiv) (equal (evex-prefixes->byte0$inline x) (evex-prefixes->byte0$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-prefixes->byte0-of-evex-prefixes (equal (evex-prefixes->byte0 (evex-prefixes byte0 byte1 byte2 byte3)) (8bits-fix byte0)))
Theorem:
(defthm evex-prefixes->byte0-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-prefixes-equiv-under-mask) (evex-prefixes-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 255) 0)) (equal (evex-prefixes->byte0 x) (evex-prefixes->byte0 y))))
Function:
(defun evex-prefixes->byte1$inline (x) (declare (xargs :guard (evex-prefixes-p x))) (mbe :logic (let ((x (evex-prefixes-fix x))) (part-select x :low 8 :width 8)) :exec (the (unsigned-byte 8) (logand (the (unsigned-byte 8) 255) (the (unsigned-byte 24) (ash (the (unsigned-byte 32) x) -8))))))
Theorem:
(defthm 8bits-p-of-evex-prefixes->byte1 (b* ((byte1 (evex-prefixes->byte1$inline x))) (8bits-p byte1)) :rule-classes :rewrite)
Theorem:
(defthm evex-prefixes->byte1$inline-of-evex-prefixes-fix-x (equal (evex-prefixes->byte1$inline (evex-prefixes-fix x)) (evex-prefixes->byte1$inline x)))
Theorem:
(defthm evex-prefixes->byte1$inline-evex-prefixes-equiv-congruence-on-x (implies (evex-prefixes-equiv x x-equiv) (equal (evex-prefixes->byte1$inline x) (evex-prefixes->byte1$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-prefixes->byte1-of-evex-prefixes (equal (evex-prefixes->byte1 (evex-prefixes byte0 byte1 byte2 byte3)) (8bits-fix byte1)))
Theorem:
(defthm evex-prefixes->byte1-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-prefixes-equiv-under-mask) (evex-prefixes-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 65280) 0)) (equal (evex-prefixes->byte1 x) (evex-prefixes->byte1 y))))
Function:
(defun evex-prefixes->byte2$inline (x) (declare (xargs :guard (evex-prefixes-p x))) (mbe :logic (let ((x (evex-prefixes-fix x))) (part-select x :low 16 :width 8)) :exec (the (unsigned-byte 8) (logand (the (unsigned-byte 8) 255) (the (unsigned-byte 16) (ash (the (unsigned-byte 32) x) -16))))))
Theorem:
(defthm 8bits-p-of-evex-prefixes->byte2 (b* ((byte2 (evex-prefixes->byte2$inline x))) (8bits-p byte2)) :rule-classes :rewrite)
Theorem:
(defthm evex-prefixes->byte2$inline-of-evex-prefixes-fix-x (equal (evex-prefixes->byte2$inline (evex-prefixes-fix x)) (evex-prefixes->byte2$inline x)))
Theorem:
(defthm evex-prefixes->byte2$inline-evex-prefixes-equiv-congruence-on-x (implies (evex-prefixes-equiv x x-equiv) (equal (evex-prefixes->byte2$inline x) (evex-prefixes->byte2$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-prefixes->byte2-of-evex-prefixes (equal (evex-prefixes->byte2 (evex-prefixes byte0 byte1 byte2 byte3)) (8bits-fix byte2)))
Theorem:
(defthm evex-prefixes->byte2-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-prefixes-equiv-under-mask) (evex-prefixes-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 16711680) 0)) (equal (evex-prefixes->byte2 x) (evex-prefixes->byte2 y))))
Function:
(defun evex-prefixes->byte3$inline (x) (declare (xargs :guard (evex-prefixes-p x))) (mbe :logic (let ((x (evex-prefixes-fix x))) (part-select x :low 24 :width 8)) :exec (the (unsigned-byte 8) (logand (the (unsigned-byte 8) 255) (the (unsigned-byte 8) (ash (the (unsigned-byte 32) x) -24))))))
Theorem:
(defthm 8bits-p-of-evex-prefixes->byte3 (b* ((byte3 (evex-prefixes->byte3$inline x))) (8bits-p byte3)) :rule-classes :rewrite)
Theorem:
(defthm evex-prefixes->byte3$inline-of-evex-prefixes-fix-x (equal (evex-prefixes->byte3$inline (evex-prefixes-fix x)) (evex-prefixes->byte3$inline x)))
Theorem:
(defthm evex-prefixes->byte3$inline-evex-prefixes-equiv-congruence-on-x (implies (evex-prefixes-equiv x x-equiv) (equal (evex-prefixes->byte3$inline x) (evex-prefixes->byte3$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-prefixes->byte3-of-evex-prefixes (equal (evex-prefixes->byte3 (evex-prefixes byte0 byte1 byte2 byte3)) (8bits-fix byte3)))
Theorem:
(defthm evex-prefixes->byte3-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-prefixes-equiv-under-mask) (evex-prefixes-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 4278190080) 0)) (equal (evex-prefixes->byte3 x) (evex-prefixes->byte3 y))))
Theorem:
(defthm evex-prefixes-fix-in-terms-of-evex-prefixes (equal (evex-prefixes-fix x) (change-evex-prefixes x)))
Function:
(defun !evex-prefixes->byte0$inline (byte0 x) (declare (xargs :guard (and (8bits-p byte0) (evex-prefixes-p x)))) (mbe :logic (b* ((byte0 (mbe :logic (8bits-fix byte0) :exec byte0)) (x (evex-prefixes-fix x))) (part-install byte0 x :width 8 :low 0)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 9) -256))) (the (unsigned-byte 8) byte0)))))
Theorem:
(defthm evex-prefixes-p-of-!evex-prefixes->byte0 (b* ((new-x (!evex-prefixes->byte0$inline byte0 x))) (evex-prefixes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-prefixes->byte0$inline-of-8bits-fix-byte0 (equal (!evex-prefixes->byte0$inline (8bits-fix byte0) x) (!evex-prefixes->byte0$inline byte0 x)))
Theorem:
(defthm !evex-prefixes->byte0$inline-8bits-equiv-congruence-on-byte0 (implies (8bits-equiv byte0 byte0-equiv) (equal (!evex-prefixes->byte0$inline byte0 x) (!evex-prefixes->byte0$inline byte0-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-prefixes->byte0$inline-of-evex-prefixes-fix-x (equal (!evex-prefixes->byte0$inline byte0 (evex-prefixes-fix x)) (!evex-prefixes->byte0$inline byte0 x)))
Theorem:
(defthm !evex-prefixes->byte0$inline-evex-prefixes-equiv-congruence-on-x (implies (evex-prefixes-equiv x x-equiv) (equal (!evex-prefixes->byte0$inline byte0 x) (!evex-prefixes->byte0$inline byte0 x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-prefixes->byte0-is-evex-prefixes (equal (!evex-prefixes->byte0 byte0 x) (change-evex-prefixes x :byte0 byte0)))
Theorem:
(defthm evex-prefixes->byte0-of-!evex-prefixes->byte0 (b* ((?new-x (!evex-prefixes->byte0$inline byte0 x))) (equal (evex-prefixes->byte0 new-x) (8bits-fix byte0))))
Theorem:
(defthm !evex-prefixes->byte0-equiv-under-mask (b* ((?new-x (!evex-prefixes->byte0$inline byte0 x))) (evex-prefixes-equiv-under-mask new-x x -256)))
Function:
(defun !evex-prefixes->byte1$inline (byte1 x) (declare (xargs :guard (and (8bits-p byte1) (evex-prefixes-p x)))) (mbe :logic (b* ((byte1 (mbe :logic (8bits-fix byte1) :exec byte1)) (x (evex-prefixes-fix x))) (part-install byte1 x :width 8 :low 8)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 17) -65281))) (the (unsigned-byte 16) (ash (the (unsigned-byte 8) byte1) 8))))))
Theorem:
(defthm evex-prefixes-p-of-!evex-prefixes->byte1 (b* ((new-x (!evex-prefixes->byte1$inline byte1 x))) (evex-prefixes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-prefixes->byte1$inline-of-8bits-fix-byte1 (equal (!evex-prefixes->byte1$inline (8bits-fix byte1) x) (!evex-prefixes->byte1$inline byte1 x)))
Theorem:
(defthm !evex-prefixes->byte1$inline-8bits-equiv-congruence-on-byte1 (implies (8bits-equiv byte1 byte1-equiv) (equal (!evex-prefixes->byte1$inline byte1 x) (!evex-prefixes->byte1$inline byte1-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-prefixes->byte1$inline-of-evex-prefixes-fix-x (equal (!evex-prefixes->byte1$inline byte1 (evex-prefixes-fix x)) (!evex-prefixes->byte1$inline byte1 x)))
Theorem:
(defthm !evex-prefixes->byte1$inline-evex-prefixes-equiv-congruence-on-x (implies (evex-prefixes-equiv x x-equiv) (equal (!evex-prefixes->byte1$inline byte1 x) (!evex-prefixes->byte1$inline byte1 x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-prefixes->byte1-is-evex-prefixes (equal (!evex-prefixes->byte1 byte1 x) (change-evex-prefixes x :byte1 byte1)))
Theorem:
(defthm evex-prefixes->byte1-of-!evex-prefixes->byte1 (b* ((?new-x (!evex-prefixes->byte1$inline byte1 x))) (equal (evex-prefixes->byte1 new-x) (8bits-fix byte1))))
Theorem:
(defthm !evex-prefixes->byte1-equiv-under-mask (b* ((?new-x (!evex-prefixes->byte1$inline byte1 x))) (evex-prefixes-equiv-under-mask new-x x -65281)))
Function:
(defun !evex-prefixes->byte2$inline (byte2 x) (declare (xargs :guard (and (8bits-p byte2) (evex-prefixes-p x)))) (mbe :logic (b* ((byte2 (mbe :logic (8bits-fix byte2) :exec byte2)) (x (evex-prefixes-fix x))) (part-install byte2 x :width 8 :low 16)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 25) -16711681))) (the (unsigned-byte 24) (ash (the (unsigned-byte 8) byte2) 16))))))
Theorem:
(defthm evex-prefixes-p-of-!evex-prefixes->byte2 (b* ((new-x (!evex-prefixes->byte2$inline byte2 x))) (evex-prefixes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-prefixes->byte2$inline-of-8bits-fix-byte2 (equal (!evex-prefixes->byte2$inline (8bits-fix byte2) x) (!evex-prefixes->byte2$inline byte2 x)))
Theorem:
(defthm !evex-prefixes->byte2$inline-8bits-equiv-congruence-on-byte2 (implies (8bits-equiv byte2 byte2-equiv) (equal (!evex-prefixes->byte2$inline byte2 x) (!evex-prefixes->byte2$inline byte2-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-prefixes->byte2$inline-of-evex-prefixes-fix-x (equal (!evex-prefixes->byte2$inline byte2 (evex-prefixes-fix x)) (!evex-prefixes->byte2$inline byte2 x)))
Theorem:
(defthm !evex-prefixes->byte2$inline-evex-prefixes-equiv-congruence-on-x (implies (evex-prefixes-equiv x x-equiv) (equal (!evex-prefixes->byte2$inline byte2 x) (!evex-prefixes->byte2$inline byte2 x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-prefixes->byte2-is-evex-prefixes (equal (!evex-prefixes->byte2 byte2 x) (change-evex-prefixes x :byte2 byte2)))
Theorem:
(defthm evex-prefixes->byte2-of-!evex-prefixes->byte2 (b* ((?new-x (!evex-prefixes->byte2$inline byte2 x))) (equal (evex-prefixes->byte2 new-x) (8bits-fix byte2))))
Theorem:
(defthm !evex-prefixes->byte2-equiv-under-mask (b* ((?new-x (!evex-prefixes->byte2$inline byte2 x))) (evex-prefixes-equiv-under-mask new-x x -16711681)))
Function:
(defun !evex-prefixes->byte3$inline (byte3 x) (declare (xargs :guard (and (8bits-p byte3) (evex-prefixes-p x)))) (mbe :logic (b* ((byte3 (mbe :logic (8bits-fix byte3) :exec byte3)) (x (evex-prefixes-fix x))) (part-install byte3 x :width 8 :low 24)) :exec (the (unsigned-byte 32) (logior (the (unsigned-byte 32) (logand (the (unsigned-byte 32) x) (the (signed-byte 33) -4278190081))) (the (unsigned-byte 32) (ash (the (unsigned-byte 8) byte3) 24))))))
Theorem:
(defthm evex-prefixes-p-of-!evex-prefixes->byte3 (b* ((new-x (!evex-prefixes->byte3$inline byte3 x))) (evex-prefixes-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-prefixes->byte3$inline-of-8bits-fix-byte3 (equal (!evex-prefixes->byte3$inline (8bits-fix byte3) x) (!evex-prefixes->byte3$inline byte3 x)))
Theorem:
(defthm !evex-prefixes->byte3$inline-8bits-equiv-congruence-on-byte3 (implies (8bits-equiv byte3 byte3-equiv) (equal (!evex-prefixes->byte3$inline byte3 x) (!evex-prefixes->byte3$inline byte3-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-prefixes->byte3$inline-of-evex-prefixes-fix-x (equal (!evex-prefixes->byte3$inline byte3 (evex-prefixes-fix x)) (!evex-prefixes->byte3$inline byte3 x)))
Theorem:
(defthm !evex-prefixes->byte3$inline-evex-prefixes-equiv-congruence-on-x (implies (evex-prefixes-equiv x x-equiv) (equal (!evex-prefixes->byte3$inline byte3 x) (!evex-prefixes->byte3$inline byte3 x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-prefixes->byte3-is-evex-prefixes (equal (!evex-prefixes->byte3 byte3 x) (change-evex-prefixes x :byte3 byte3)))
Theorem:
(defthm evex-prefixes->byte3-of-!evex-prefixes->byte3 (b* ((?new-x (!evex-prefixes->byte3$inline byte3 x))) (equal (evex-prefixes->byte3 new-x) (8bits-fix byte3))))
Theorem:
(defthm !evex-prefixes->byte3-equiv-under-mask (b* ((?new-x (!evex-prefixes->byte3$inline byte3 x))) (evex-prefixes-equiv-under-mask new-x x 16777215)))
Function:
(defun evex-prefixes-debug$inline (x) (declare (xargs :guard (evex-prefixes-p x))) (b* (((evex-prefixes x))) (cons (cons 'byte0 x.byte0) (cons (cons 'byte1 x.byte1) (cons (cons 'byte2 x.byte2) (cons (cons 'byte3 x.byte3) nil))))))
Function:
(defun evex-byte1-p$inline (byte1) (declare (xargs :guard t)) (mbe :logic (unsigned-byte-p 8 byte1) :exec (and (natp byte1) (< byte1 256))))
Theorem:
(defthm evex-byte1-p-when-unsigned-byte-p (implies (unsigned-byte-p 8 byte1) (evex-byte1-p byte1)))
Theorem:
(defthm unsigned-byte-p-when-evex-byte1-p (implies (evex-byte1-p byte1) (unsigned-byte-p 8 byte1)))
Theorem:
(defthm evex-byte1-p-compound-recognizer (implies (evex-byte1-p byte1) (natp byte1)) :rule-classes :compound-recognizer)
Function:
(defun evex-byte1-fix$inline (byte1) (declare (xargs :guard (evex-byte1-p byte1))) (mbe :logic (loghead 8 byte1) :exec byte1))
Theorem:
(defthm evex-byte1-p-of-evex-byte1-fix (b* ((fty::fixed (evex-byte1-fix$inline byte1))) (evex-byte1-p fty::fixed)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte1-fix-when-evex-byte1-p (implies (evex-byte1-p byte1) (equal (evex-byte1-fix byte1) byte1)))
Function:
(defun evex-byte1-equiv$inline (x y) (declare (xargs :guard (and (evex-byte1-p x) (evex-byte1-p y)))) (equal (evex-byte1-fix x) (evex-byte1-fix y)))
Theorem:
(defthm evex-byte1-equiv-is-an-equivalence (and (booleanp (evex-byte1-equiv x y)) (evex-byte1-equiv x x) (implies (evex-byte1-equiv x y) (evex-byte1-equiv y x)) (implies (and (evex-byte1-equiv x y) (evex-byte1-equiv y z)) (evex-byte1-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm evex-byte1-equiv-implies-equal-evex-byte1-fix-1 (implies (evex-byte1-equiv x x-equiv) (equal (evex-byte1-fix x) (evex-byte1-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm evex-byte1-fix-under-evex-byte1-equiv (evex-byte1-equiv (evex-byte1-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Function:
(defun evex-byte1$inline (mmm res r-prime b x r) (declare (xargs :guard (and (3bits-p mmm) (bitp res) (bitp r-prime) (bitp b) (bitp x) (bitp r)))) (b* ((mmm (mbe :logic (3bits-fix mmm) :exec mmm)) (res (mbe :logic (bfix res) :exec res)) (r-prime (mbe :logic (bfix r-prime) :exec r-prime)) (b (mbe :logic (bfix b) :exec b)) (x (mbe :logic (bfix x) :exec x)) (r (mbe :logic (bfix r) :exec r))) (logapp 3 mmm (logapp 1 res (logapp 1 r-prime (logapp 1 b (logapp 1 x r)))))))
Theorem:
(defthm evex-byte1-p-of-evex-byte1 (b* ((evex-byte1 (evex-byte1$inline mmm res r-prime b x r))) (evex-byte1-p evex-byte1)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte1$inline-of-3bits-fix-mmm (equal (evex-byte1$inline (3bits-fix mmm) res r-prime b x r) (evex-byte1$inline mmm res r-prime b x r)))
Theorem:
(defthm evex-byte1$inline-3bits-equiv-congruence-on-mmm (implies (3bits-equiv mmm mmm-equiv) (equal (evex-byte1$inline mmm res r-prime b x r) (evex-byte1$inline mmm-equiv res r-prime b x r))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1$inline-of-bfix-res (equal (evex-byte1$inline mmm (bfix res) r-prime b x r) (evex-byte1$inline mmm res r-prime b x r)))
Theorem:
(defthm evex-byte1$inline-bit-equiv-congruence-on-res (implies (bit-equiv res res-equiv) (equal (evex-byte1$inline mmm res r-prime b x r) (evex-byte1$inline mmm res-equiv r-prime b x r))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1$inline-of-bfix-r-prime (equal (evex-byte1$inline mmm res (bfix r-prime) b x r) (evex-byte1$inline mmm res r-prime b x r)))
Theorem:
(defthm evex-byte1$inline-bit-equiv-congruence-on-r-prime (implies (bit-equiv r-prime r-prime-equiv) (equal (evex-byte1$inline mmm res r-prime b x r) (evex-byte1$inline mmm res r-prime-equiv b x r))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1$inline-of-bfix-b (equal (evex-byte1$inline mmm res r-prime (bfix b) x r) (evex-byte1$inline mmm res r-prime b x r)))
Theorem:
(defthm evex-byte1$inline-bit-equiv-congruence-on-b (implies (bit-equiv b b-equiv) (equal (evex-byte1$inline mmm res r-prime b x r) (evex-byte1$inline mmm res r-prime b-equiv x r))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1$inline-of-bfix-x (equal (evex-byte1$inline mmm res r-prime b (bfix x) r) (evex-byte1$inline mmm res r-prime b x r)))
Theorem:
(defthm evex-byte1$inline-bit-equiv-congruence-on-x (implies (bit-equiv x x-equiv) (equal (evex-byte1$inline mmm res r-prime b x r) (evex-byte1$inline mmm res r-prime b x-equiv r))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1$inline-of-bfix-r (equal (evex-byte1$inline mmm res r-prime b x (bfix r)) (evex-byte1$inline mmm res r-prime b x r)))
Theorem:
(defthm evex-byte1$inline-bit-equiv-congruence-on-r (implies (bit-equiv r r-equiv) (equal (evex-byte1$inline mmm res r-prime b x r) (evex-byte1$inline mmm res r-prime b x r-equiv))) :rule-classes :congruence)
Function:
(defun evex-byte1-equiv-under-mask$inline (byte1 byte11 mask) (declare (xargs :guard (and (evex-byte1-p byte1) (evex-byte1-p byte11) (integerp mask)))) (fty::int-equiv-under-mask (evex-byte1-fix byte1) (evex-byte1-fix byte11) mask))
Function:
(defun evex-byte1->mmm$inline (byte1) (declare (xargs :guard (evex-byte1-p byte1))) (mbe :logic (let ((byte1 (evex-byte1-fix byte1))) (part-select byte1 :low 0 :width 3)) :exec (the (unsigned-byte 3) (logand (the (unsigned-byte 3) 7) (the (unsigned-byte 8) byte1)))))
Theorem:
(defthm 3bits-p-of-evex-byte1->mmm (b* ((mmm (evex-byte1->mmm$inline byte1))) (3bits-p mmm)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte1->mmm$inline-of-evex-byte1-fix-byte1 (equal (evex-byte1->mmm$inline (evex-byte1-fix byte1)) (evex-byte1->mmm$inline byte1)))
Theorem:
(defthm evex-byte1->mmm$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (evex-byte1->mmm$inline byte1) (evex-byte1->mmm$inline byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1->mmm-of-evex-byte1 (equal (evex-byte1->mmm (evex-byte1 mmm res r-prime b x r)) (3bits-fix mmm)))
Theorem:
(defthm evex-byte1->mmm-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps byte1 evex-byte1-equiv-under-mask) (evex-byte1-equiv-under-mask byte1 y fty::mask) (equal (logand (lognot fty::mask) 7) 0)) (equal (evex-byte1->mmm byte1) (evex-byte1->mmm y))))
Function:
(defun evex-byte1->res$inline (byte1) (declare (xargs :guard (evex-byte1-p byte1))) (mbe :logic (let ((byte1 (evex-byte1-fix byte1))) (part-select byte1 :low 3 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 5) (ash (the (unsigned-byte 8) byte1) -3))))))
Theorem:
(defthm bitp-of-evex-byte1->res (b* ((res (evex-byte1->res$inline byte1))) (bitp res)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte1->res$inline-of-evex-byte1-fix-byte1 (equal (evex-byte1->res$inline (evex-byte1-fix byte1)) (evex-byte1->res$inline byte1)))
Theorem:
(defthm evex-byte1->res$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (evex-byte1->res$inline byte1) (evex-byte1->res$inline byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1->res-of-evex-byte1 (equal (evex-byte1->res (evex-byte1 mmm res r-prime b x r)) (bfix res)))
Theorem:
(defthm evex-byte1->res-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps byte1 evex-byte1-equiv-under-mask) (evex-byte1-equiv-under-mask byte1 y fty::mask) (equal (logand (lognot fty::mask) 8) 0)) (equal (evex-byte1->res byte1) (evex-byte1->res y))))
Function:
(defun evex-byte1->r-prime$inline (byte1) (declare (xargs :guard (evex-byte1-p byte1))) (mbe :logic (let ((byte1 (evex-byte1-fix byte1))) (part-select byte1 :low 4 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 4) (ash (the (unsigned-byte 8) byte1) -4))))))
Theorem:
(defthm bitp-of-evex-byte1->r-prime (b* ((r-prime (evex-byte1->r-prime$inline byte1))) (bitp r-prime)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte1->r-prime$inline-of-evex-byte1-fix-byte1 (equal (evex-byte1->r-prime$inline (evex-byte1-fix byte1)) (evex-byte1->r-prime$inline byte1)))
Theorem:
(defthm evex-byte1->r-prime$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (evex-byte1->r-prime$inline byte1) (evex-byte1->r-prime$inline byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1->r-prime-of-evex-byte1 (equal (evex-byte1->r-prime (evex-byte1 mmm res r-prime b x r)) (bfix r-prime)))
Theorem:
(defthm evex-byte1->r-prime-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps byte1 evex-byte1-equiv-under-mask) (evex-byte1-equiv-under-mask byte1 y fty::mask) (equal (logand (lognot fty::mask) 16) 0)) (equal (evex-byte1->r-prime byte1) (evex-byte1->r-prime y))))
Function:
(defun evex-byte1->b$inline (byte1) (declare (xargs :guard (evex-byte1-p byte1))) (mbe :logic (let ((byte1 (evex-byte1-fix byte1))) (part-select byte1 :low 5 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 3) (ash (the (unsigned-byte 8) byte1) -5))))))
Theorem:
(defthm bitp-of-evex-byte1->b (b* ((b (evex-byte1->b$inline byte1))) (bitp b)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte1->b$inline-of-evex-byte1-fix-byte1 (equal (evex-byte1->b$inline (evex-byte1-fix byte1)) (evex-byte1->b$inline byte1)))
Theorem:
(defthm evex-byte1->b$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (evex-byte1->b$inline byte1) (evex-byte1->b$inline byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1->b-of-evex-byte1 (equal (evex-byte1->b (evex-byte1 mmm res r-prime b x r)) (bfix b)))
Theorem:
(defthm evex-byte1->b-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps byte1 evex-byte1-equiv-under-mask) (evex-byte1-equiv-under-mask byte1 y fty::mask) (equal (logand (lognot fty::mask) 32) 0)) (equal (evex-byte1->b byte1) (evex-byte1->b y))))
Function:
(defun evex-byte1->x$inline (byte1) (declare (xargs :guard (evex-byte1-p byte1))) (mbe :logic (let ((byte1 (evex-byte1-fix byte1))) (part-select byte1 :low 6 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 2) (ash (the (unsigned-byte 8) byte1) -6))))))
Theorem:
(defthm bitp-of-evex-byte1->x (b* ((x (evex-byte1->x$inline byte1))) (bitp x)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte1->x$inline-of-evex-byte1-fix-byte1 (equal (evex-byte1->x$inline (evex-byte1-fix byte1)) (evex-byte1->x$inline byte1)))
Theorem:
(defthm evex-byte1->x$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (evex-byte1->x$inline byte1) (evex-byte1->x$inline byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1->x-of-evex-byte1 (equal (evex-byte1->x (evex-byte1 mmm res r-prime b x r)) (bfix x)))
Theorem:
(defthm evex-byte1->x-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps byte1 evex-byte1-equiv-under-mask) (evex-byte1-equiv-under-mask byte1 y fty::mask) (equal (logand (lognot fty::mask) 64) 0)) (equal (evex-byte1->x byte1) (evex-byte1->x y))))
Function:
(defun evex-byte1->r$inline (byte1) (declare (xargs :guard (evex-byte1-p byte1))) (mbe :logic (let ((byte1 (evex-byte1-fix byte1))) (part-select byte1 :low 7 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 1) (ash (the (unsigned-byte 8) byte1) -7))))))
Theorem:
(defthm bitp-of-evex-byte1->r (b* ((r (evex-byte1->r$inline byte1))) (bitp r)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte1->r$inline-of-evex-byte1-fix-byte1 (equal (evex-byte1->r$inline (evex-byte1-fix byte1)) (evex-byte1->r$inline byte1)))
Theorem:
(defthm evex-byte1->r$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (evex-byte1->r$inline byte1) (evex-byte1->r$inline byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte1->r-of-evex-byte1 (equal (evex-byte1->r (evex-byte1 mmm res r-prime b x r)) (bfix r)))
Theorem:
(defthm evex-byte1->r-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps byte1 evex-byte1-equiv-under-mask) (evex-byte1-equiv-under-mask byte1 y fty::mask) (equal (logand (lognot fty::mask) 128) 0)) (equal (evex-byte1->r byte1) (evex-byte1->r y))))
Theorem:
(defthm evex-byte1-fix-in-terms-of-evex-byte1 (equal (evex-byte1-fix byte1) (change-evex-byte1 byte1)))
Function:
(defun !evex-byte1->mmm$inline (mmm byte1) (declare (xargs :guard (and (3bits-p mmm) (evex-byte1-p byte1)))) (mbe :logic (b* ((mmm (mbe :logic (3bits-fix mmm) :exec mmm)) (byte1 (evex-byte1-fix byte1))) (part-install mmm byte1 :width 3 :low 0)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) byte1) (the (signed-byte 4) -8))) (the (unsigned-byte 3) mmm)))))
Theorem:
(defthm evex-byte1-p-of-!evex-byte1->mmm (b* ((new-byte1 (!evex-byte1->mmm$inline mmm byte1))) (evex-byte1-p new-byte1)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte1->mmm$inline-of-3bits-fix-mmm (equal (!evex-byte1->mmm$inline (3bits-fix mmm) byte1) (!evex-byte1->mmm$inline mmm byte1)))
Theorem:
(defthm !evex-byte1->mmm$inline-3bits-equiv-congruence-on-mmm (implies (3bits-equiv mmm mmm-equiv) (equal (!evex-byte1->mmm$inline mmm byte1) (!evex-byte1->mmm$inline mmm-equiv byte1))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->mmm$inline-of-evex-byte1-fix-byte1 (equal (!evex-byte1->mmm$inline mmm (evex-byte1-fix byte1)) (!evex-byte1->mmm$inline mmm byte1)))
Theorem:
(defthm !evex-byte1->mmm$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (!evex-byte1->mmm$inline mmm byte1) (!evex-byte1->mmm$inline mmm byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->mmm-is-evex-byte1 (equal (!evex-byte1->mmm mmm byte1) (change-evex-byte1 byte1 :mmm mmm)))
Theorem:
(defthm evex-byte1->mmm-of-!evex-byte1->mmm (b* ((?new-byte1 (!evex-byte1->mmm$inline mmm byte1))) (equal (evex-byte1->mmm new-byte1) (3bits-fix mmm))))
Theorem:
(defthm !evex-byte1->mmm-equiv-under-mask (b* ((?new-byte1 (!evex-byte1->mmm$inline mmm byte1))) (evex-byte1-equiv-under-mask new-byte1 byte1 -8)))
Function:
(defun !evex-byte1->res$inline (res byte1) (declare (xargs :guard (and (bitp res) (evex-byte1-p byte1)))) (mbe :logic (b* ((res (mbe :logic (bfix res) :exec res)) (byte1 (evex-byte1-fix byte1))) (part-install res byte1 :width 1 :low 3)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) byte1) (the (signed-byte 5) -9))) (the (unsigned-byte 4) (ash (the (unsigned-byte 1) res) 3))))))
Theorem:
(defthm evex-byte1-p-of-!evex-byte1->res (b* ((new-byte1 (!evex-byte1->res$inline res byte1))) (evex-byte1-p new-byte1)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte1->res$inline-of-bfix-res (equal (!evex-byte1->res$inline (bfix res) byte1) (!evex-byte1->res$inline res byte1)))
Theorem:
(defthm !evex-byte1->res$inline-bit-equiv-congruence-on-res (implies (bit-equiv res res-equiv) (equal (!evex-byte1->res$inline res byte1) (!evex-byte1->res$inline res-equiv byte1))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->res$inline-of-evex-byte1-fix-byte1 (equal (!evex-byte1->res$inline res (evex-byte1-fix byte1)) (!evex-byte1->res$inline res byte1)))
Theorem:
(defthm !evex-byte1->res$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (!evex-byte1->res$inline res byte1) (!evex-byte1->res$inline res byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->res-is-evex-byte1 (equal (!evex-byte1->res res byte1) (change-evex-byte1 byte1 :res res)))
Theorem:
(defthm evex-byte1->res-of-!evex-byte1->res (b* ((?new-byte1 (!evex-byte1->res$inline res byte1))) (equal (evex-byte1->res new-byte1) (bfix res))))
Theorem:
(defthm !evex-byte1->res-equiv-under-mask (b* ((?new-byte1 (!evex-byte1->res$inline res byte1))) (evex-byte1-equiv-under-mask new-byte1 byte1 -9)))
Function:
(defun !evex-byte1->r-prime$inline (r-prime byte1) (declare (xargs :guard (and (bitp r-prime) (evex-byte1-p byte1)))) (mbe :logic (b* ((r-prime (mbe :logic (bfix r-prime) :exec r-prime)) (byte1 (evex-byte1-fix byte1))) (part-install r-prime byte1 :width 1 :low 4)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) byte1) (the (signed-byte 6) -17))) (the (unsigned-byte 5) (ash (the (unsigned-byte 1) r-prime) 4))))))
Theorem:
(defthm evex-byte1-p-of-!evex-byte1->r-prime (b* ((new-byte1 (!evex-byte1->r-prime$inline r-prime byte1))) (evex-byte1-p new-byte1)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte1->r-prime$inline-of-bfix-r-prime (equal (!evex-byte1->r-prime$inline (bfix r-prime) byte1) (!evex-byte1->r-prime$inline r-prime byte1)))
Theorem:
(defthm !evex-byte1->r-prime$inline-bit-equiv-congruence-on-r-prime (implies (bit-equiv r-prime r-prime-equiv) (equal (!evex-byte1->r-prime$inline r-prime byte1) (!evex-byte1->r-prime$inline r-prime-equiv byte1))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->r-prime$inline-of-evex-byte1-fix-byte1 (equal (!evex-byte1->r-prime$inline r-prime (evex-byte1-fix byte1)) (!evex-byte1->r-prime$inline r-prime byte1)))
Theorem:
(defthm !evex-byte1->r-prime$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (!evex-byte1->r-prime$inline r-prime byte1) (!evex-byte1->r-prime$inline r-prime byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->r-prime-is-evex-byte1 (equal (!evex-byte1->r-prime r-prime byte1) (change-evex-byte1 byte1 :r-prime r-prime)))
Theorem:
(defthm evex-byte1->r-prime-of-!evex-byte1->r-prime (b* ((?new-byte1 (!evex-byte1->r-prime$inline r-prime byte1))) (equal (evex-byte1->r-prime new-byte1) (bfix r-prime))))
Theorem:
(defthm !evex-byte1->r-prime-equiv-under-mask (b* ((?new-byte1 (!evex-byte1->r-prime$inline r-prime byte1))) (evex-byte1-equiv-under-mask new-byte1 byte1 -17)))
Function:
(defun !evex-byte1->b$inline (b byte1) (declare (xargs :guard (and (bitp b) (evex-byte1-p byte1)))) (mbe :logic (b* ((b (mbe :logic (bfix b) :exec b)) (byte1 (evex-byte1-fix byte1))) (part-install b byte1 :width 1 :low 5)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) byte1) (the (signed-byte 7) -33))) (the (unsigned-byte 6) (ash (the (unsigned-byte 1) b) 5))))))
Theorem:
(defthm evex-byte1-p-of-!evex-byte1->b (b* ((new-byte1 (!evex-byte1->b$inline b byte1))) (evex-byte1-p new-byte1)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte1->b$inline-of-bfix-b (equal (!evex-byte1->b$inline (bfix b) byte1) (!evex-byte1->b$inline b byte1)))
Theorem:
(defthm !evex-byte1->b$inline-bit-equiv-congruence-on-b (implies (bit-equiv b b-equiv) (equal (!evex-byte1->b$inline b byte1) (!evex-byte1->b$inline b-equiv byte1))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->b$inline-of-evex-byte1-fix-byte1 (equal (!evex-byte1->b$inline b (evex-byte1-fix byte1)) (!evex-byte1->b$inline b byte1)))
Theorem:
(defthm !evex-byte1->b$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (!evex-byte1->b$inline b byte1) (!evex-byte1->b$inline b byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->b-is-evex-byte1 (equal (!evex-byte1->b b byte1) (change-evex-byte1 byte1 :b b)))
Theorem:
(defthm evex-byte1->b-of-!evex-byte1->b (b* ((?new-byte1 (!evex-byte1->b$inline b byte1))) (equal (evex-byte1->b new-byte1) (bfix b))))
Theorem:
(defthm !evex-byte1->b-equiv-under-mask (b* ((?new-byte1 (!evex-byte1->b$inline b byte1))) (evex-byte1-equiv-under-mask new-byte1 byte1 -33)))
Function:
(defun !evex-byte1->x$inline (x byte1) (declare (xargs :guard (and (bitp x) (evex-byte1-p byte1)))) (mbe :logic (b* ((x (mbe :logic (bfix x) :exec x)) (byte1 (evex-byte1-fix byte1))) (part-install x byte1 :width 1 :low 6)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) byte1) (the (signed-byte 8) -65))) (the (unsigned-byte 7) (ash (the (unsigned-byte 1) x) 6))))))
Theorem:
(defthm evex-byte1-p-of-!evex-byte1->x (b* ((new-byte1 (!evex-byte1->x$inline x byte1))) (evex-byte1-p new-byte1)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte1->x$inline-of-bfix-x (equal (!evex-byte1->x$inline (bfix x) byte1) (!evex-byte1->x$inline x byte1)))
Theorem:
(defthm !evex-byte1->x$inline-bit-equiv-congruence-on-x (implies (bit-equiv x x-equiv) (equal (!evex-byte1->x$inline x byte1) (!evex-byte1->x$inline x-equiv byte1))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->x$inline-of-evex-byte1-fix-byte1 (equal (!evex-byte1->x$inline x (evex-byte1-fix byte1)) (!evex-byte1->x$inline x byte1)))
Theorem:
(defthm !evex-byte1->x$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (!evex-byte1->x$inline x byte1) (!evex-byte1->x$inline x byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->x-is-evex-byte1 (equal (!evex-byte1->x x byte1) (change-evex-byte1 byte1 :x x)))
Theorem:
(defthm evex-byte1->x-of-!evex-byte1->x (b* ((?new-byte1 (!evex-byte1->x$inline x byte1))) (equal (evex-byte1->x new-byte1) (bfix x))))
Theorem:
(defthm !evex-byte1->x-equiv-under-mask (b* ((?new-byte1 (!evex-byte1->x$inline x byte1))) (evex-byte1-equiv-under-mask new-byte1 byte1 -65)))
Function:
(defun !evex-byte1->r$inline (r byte1) (declare (xargs :guard (and (bitp r) (evex-byte1-p byte1)))) (mbe :logic (b* ((r (mbe :logic (bfix r) :exec r)) (byte1 (evex-byte1-fix byte1))) (part-install r byte1 :width 1 :low 7)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) byte1) (the (signed-byte 9) -129))) (the (unsigned-byte 8) (ash (the (unsigned-byte 1) r) 7))))))
Theorem:
(defthm evex-byte1-p-of-!evex-byte1->r (b* ((new-byte1 (!evex-byte1->r$inline r byte1))) (evex-byte1-p new-byte1)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte1->r$inline-of-bfix-r (equal (!evex-byte1->r$inline (bfix r) byte1) (!evex-byte1->r$inline r byte1)))
Theorem:
(defthm !evex-byte1->r$inline-bit-equiv-congruence-on-r (implies (bit-equiv r r-equiv) (equal (!evex-byte1->r$inline r byte1) (!evex-byte1->r$inline r-equiv byte1))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->r$inline-of-evex-byte1-fix-byte1 (equal (!evex-byte1->r$inline r (evex-byte1-fix byte1)) (!evex-byte1->r$inline r byte1)))
Theorem:
(defthm !evex-byte1->r$inline-evex-byte1-equiv-congruence-on-byte1 (implies (evex-byte1-equiv byte1 byte1-equiv) (equal (!evex-byte1->r$inline r byte1) (!evex-byte1->r$inline r byte1-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte1->r-is-evex-byte1 (equal (!evex-byte1->r r byte1) (change-evex-byte1 byte1 :r r)))
Theorem:
(defthm evex-byte1->r-of-!evex-byte1->r (b* ((?new-byte1 (!evex-byte1->r$inline r byte1))) (equal (evex-byte1->r new-byte1) (bfix r))))
Theorem:
(defthm !evex-byte1->r-equiv-under-mask (b* ((?new-byte1 (!evex-byte1->r$inline r byte1))) (evex-byte1-equiv-under-mask new-byte1 byte1 127)))
Function:
(defun evex-byte1-debug$inline (byte1) (declare (xargs :guard (evex-byte1-p byte1))) (b* (((evex-byte1 byte1))) (cons (cons 'mmm byte1.mmm) (cons (cons 'res byte1.res) (cons (cons 'r-prime byte1.r-prime) (cons (cons 'b byte1.b) (cons (cons 'x byte1.x) (cons (cons 'r byte1.r) nil))))))))
Function:
(defun evex-byte2-p$inline (x) (declare (xargs :guard t)) (mbe :logic (unsigned-byte-p 8 x) :exec (and (natp x) (< x 256))))
Theorem:
(defthm evex-byte2-p-when-unsigned-byte-p (implies (unsigned-byte-p 8 x) (evex-byte2-p x)))
Theorem:
(defthm unsigned-byte-p-when-evex-byte2-p (implies (evex-byte2-p x) (unsigned-byte-p 8 x)))
Theorem:
(defthm evex-byte2-p-compound-recognizer (implies (evex-byte2-p x) (natp x)) :rule-classes :compound-recognizer)
Function:
(defun evex-byte2-fix$inline (x) (declare (xargs :guard (evex-byte2-p x))) (mbe :logic (loghead 8 x) :exec x))
Theorem:
(defthm evex-byte2-p-of-evex-byte2-fix (b* ((fty::fixed (evex-byte2-fix$inline x))) (evex-byte2-p fty::fixed)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte2-fix-when-evex-byte2-p (implies (evex-byte2-p x) (equal (evex-byte2-fix x) x)))
Function:
(defun evex-byte2-equiv$inline (x y) (declare (xargs :guard (and (evex-byte2-p x) (evex-byte2-p y)))) (equal (evex-byte2-fix x) (evex-byte2-fix y)))
Theorem:
(defthm evex-byte2-equiv-is-an-equivalence (and (booleanp (evex-byte2-equiv x y)) (evex-byte2-equiv x x) (implies (evex-byte2-equiv x y) (evex-byte2-equiv y x)) (implies (and (evex-byte2-equiv x y) (evex-byte2-equiv y z)) (evex-byte2-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm evex-byte2-equiv-implies-equal-evex-byte2-fix-1 (implies (evex-byte2-equiv x x-equiv) (equal (evex-byte2-fix x) (evex-byte2-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm evex-byte2-fix-under-evex-byte2-equiv (evex-byte2-equiv (evex-byte2-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Function:
(defun evex-byte2$inline (pp res vvvv w) (declare (xargs :guard (and (2bits-p pp) (bitp res) (4bits-p vvvv) (bitp w)))) (b* ((pp (mbe :logic (2bits-fix pp) :exec pp)) (res (mbe :logic (bfix res) :exec res)) (vvvv (mbe :logic (4bits-fix vvvv) :exec vvvv)) (w (mbe :logic (bfix w) :exec w))) (logapp 2 pp (logapp 1 res (logapp 4 vvvv w)))))
Theorem:
(defthm evex-byte2-p-of-evex-byte2 (b* ((evex-byte2 (evex-byte2$inline pp res vvvv w))) (evex-byte2-p evex-byte2)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte2$inline-of-2bits-fix-pp (equal (evex-byte2$inline (2bits-fix pp) res vvvv w) (evex-byte2$inline pp res vvvv w)))
Theorem:
(defthm evex-byte2$inline-2bits-equiv-congruence-on-pp (implies (2bits-equiv pp pp-equiv) (equal (evex-byte2$inline pp res vvvv w) (evex-byte2$inline pp-equiv res vvvv w))) :rule-classes :congruence)
Theorem:
(defthm evex-byte2$inline-of-bfix-res (equal (evex-byte2$inline pp (bfix res) vvvv w) (evex-byte2$inline pp res vvvv w)))
Theorem:
(defthm evex-byte2$inline-bit-equiv-congruence-on-res (implies (bit-equiv res res-equiv) (equal (evex-byte2$inline pp res vvvv w) (evex-byte2$inline pp res-equiv vvvv w))) :rule-classes :congruence)
Theorem:
(defthm evex-byte2$inline-of-4bits-fix-vvvv (equal (evex-byte2$inline pp res (4bits-fix vvvv) w) (evex-byte2$inline pp res vvvv w)))
Theorem:
(defthm evex-byte2$inline-4bits-equiv-congruence-on-vvvv (implies (4bits-equiv vvvv vvvv-equiv) (equal (evex-byte2$inline pp res vvvv w) (evex-byte2$inline pp res vvvv-equiv w))) :rule-classes :congruence)
Theorem:
(defthm evex-byte2$inline-of-bfix-w (equal (evex-byte2$inline pp res vvvv (bfix w)) (evex-byte2$inline pp res vvvv w)))
Theorem:
(defthm evex-byte2$inline-bit-equiv-congruence-on-w (implies (bit-equiv w w-equiv) (equal (evex-byte2$inline pp res vvvv w) (evex-byte2$inline pp res vvvv w-equiv))) :rule-classes :congruence)
Function:
(defun evex-byte2-equiv-under-mask$inline (x x1 mask) (declare (xargs :guard (and (evex-byte2-p x) (evex-byte2-p x1) (integerp mask)))) (fty::int-equiv-under-mask (evex-byte2-fix x) (evex-byte2-fix x1) mask))
Function:
(defun evex-byte2->pp$inline (x) (declare (xargs :guard (evex-byte2-p x))) (mbe :logic (let ((x (evex-byte2-fix x))) (part-select x :low 0 :width 2)) :exec (the (unsigned-byte 2) (logand (the (unsigned-byte 2) 3) (the (unsigned-byte 8) x)))))
Theorem:
(defthm 2bits-p-of-evex-byte2->pp (b* ((pp (evex-byte2->pp$inline x))) (2bits-p pp)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte2->pp$inline-of-evex-byte2-fix-x (equal (evex-byte2->pp$inline (evex-byte2-fix x)) (evex-byte2->pp$inline x)))
Theorem:
(defthm evex-byte2->pp$inline-evex-byte2-equiv-congruence-on-x (implies (evex-byte2-equiv x x-equiv) (equal (evex-byte2->pp$inline x) (evex-byte2->pp$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte2->pp-of-evex-byte2 (equal (evex-byte2->pp (evex-byte2 pp res vvvv w)) (2bits-fix pp)))
Theorem:
(defthm evex-byte2->pp-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte2-equiv-under-mask) (evex-byte2-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 3) 0)) (equal (evex-byte2->pp x) (evex-byte2->pp y))))
Function:
(defun evex-byte2->res$inline (x) (declare (xargs :guard (evex-byte2-p x))) (mbe :logic (let ((x (evex-byte2-fix x))) (part-select x :low 2 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 6) (ash (the (unsigned-byte 8) x) -2))))))
Theorem:
(defthm bitp-of-evex-byte2->res (b* ((res (evex-byte2->res$inline x))) (bitp res)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte2->res$inline-of-evex-byte2-fix-x (equal (evex-byte2->res$inline (evex-byte2-fix x)) (evex-byte2->res$inline x)))
Theorem:
(defthm evex-byte2->res$inline-evex-byte2-equiv-congruence-on-x (implies (evex-byte2-equiv x x-equiv) (equal (evex-byte2->res$inline x) (evex-byte2->res$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte2->res-of-evex-byte2 (equal (evex-byte2->res (evex-byte2 pp res vvvv w)) (bfix res)))
Theorem:
(defthm evex-byte2->res-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte2-equiv-under-mask) (evex-byte2-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 4) 0)) (equal (evex-byte2->res x) (evex-byte2->res y))))
Function:
(defun evex-byte2->vvvv$inline (x) (declare (xargs :guard (evex-byte2-p x))) (mbe :logic (let ((x (evex-byte2-fix x))) (part-select x :low 3 :width 4)) :exec (the (unsigned-byte 4) (logand (the (unsigned-byte 4) 15) (the (unsigned-byte 5) (ash (the (unsigned-byte 8) x) -3))))))
Theorem:
(defthm 4bits-p-of-evex-byte2->vvvv (b* ((vvvv (evex-byte2->vvvv$inline x))) (4bits-p vvvv)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte2->vvvv$inline-of-evex-byte2-fix-x (equal (evex-byte2->vvvv$inline (evex-byte2-fix x)) (evex-byte2->vvvv$inline x)))
Theorem:
(defthm evex-byte2->vvvv$inline-evex-byte2-equiv-congruence-on-x (implies (evex-byte2-equiv x x-equiv) (equal (evex-byte2->vvvv$inline x) (evex-byte2->vvvv$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte2->vvvv-of-evex-byte2 (equal (evex-byte2->vvvv (evex-byte2 pp res vvvv w)) (4bits-fix vvvv)))
Theorem:
(defthm evex-byte2->vvvv-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte2-equiv-under-mask) (evex-byte2-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 120) 0)) (equal (evex-byte2->vvvv x) (evex-byte2->vvvv y))))
Function:
(defun evex-byte2->w$inline (x) (declare (xargs :guard (evex-byte2-p x))) (mbe :logic (let ((x (evex-byte2-fix x))) (part-select x :low 7 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 1) (ash (the (unsigned-byte 8) x) -7))))))
Theorem:
(defthm bitp-of-evex-byte2->w (b* ((w (evex-byte2->w$inline x))) (bitp w)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte2->w$inline-of-evex-byte2-fix-x (equal (evex-byte2->w$inline (evex-byte2-fix x)) (evex-byte2->w$inline x)))
Theorem:
(defthm evex-byte2->w$inline-evex-byte2-equiv-congruence-on-x (implies (evex-byte2-equiv x x-equiv) (equal (evex-byte2->w$inline x) (evex-byte2->w$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte2->w-of-evex-byte2 (equal (evex-byte2->w (evex-byte2 pp res vvvv w)) (bfix w)))
Theorem:
(defthm evex-byte2->w-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte2-equiv-under-mask) (evex-byte2-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 128) 0)) (equal (evex-byte2->w x) (evex-byte2->w y))))
Theorem:
(defthm evex-byte2-fix-in-terms-of-evex-byte2 (equal (evex-byte2-fix x) (change-evex-byte2 x)))
Function:
(defun !evex-byte2->pp$inline (pp x) (declare (xargs :guard (and (2bits-p pp) (evex-byte2-p x)))) (mbe :logic (b* ((pp (mbe :logic (2bits-fix pp) :exec pp)) (x (evex-byte2-fix x))) (part-install pp x :width 2 :low 0)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 3) -4))) (the (unsigned-byte 2) pp)))))
Theorem:
(defthm evex-byte2-p-of-!evex-byte2->pp (b* ((new-x (!evex-byte2->pp$inline pp x))) (evex-byte2-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte2->pp$inline-of-2bits-fix-pp (equal (!evex-byte2->pp$inline (2bits-fix pp) x) (!evex-byte2->pp$inline pp x)))
Theorem:
(defthm !evex-byte2->pp$inline-2bits-equiv-congruence-on-pp (implies (2bits-equiv pp pp-equiv) (equal (!evex-byte2->pp$inline pp x) (!evex-byte2->pp$inline pp-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte2->pp$inline-of-evex-byte2-fix-x (equal (!evex-byte2->pp$inline pp (evex-byte2-fix x)) (!evex-byte2->pp$inline pp x)))
Theorem:
(defthm !evex-byte2->pp$inline-evex-byte2-equiv-congruence-on-x (implies (evex-byte2-equiv x x-equiv) (equal (!evex-byte2->pp$inline pp x) (!evex-byte2->pp$inline pp x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte2->pp-is-evex-byte2 (equal (!evex-byte2->pp pp x) (change-evex-byte2 x :pp pp)))
Theorem:
(defthm evex-byte2->pp-of-!evex-byte2->pp (b* ((?new-x (!evex-byte2->pp$inline pp x))) (equal (evex-byte2->pp new-x) (2bits-fix pp))))
Theorem:
(defthm !evex-byte2->pp-equiv-under-mask (b* ((?new-x (!evex-byte2->pp$inline pp x))) (evex-byte2-equiv-under-mask new-x x -4)))
Function:
(defun !evex-byte2->res$inline (res x) (declare (xargs :guard (and (bitp res) (evex-byte2-p x)))) (mbe :logic (b* ((res (mbe :logic (bfix res) :exec res)) (x (evex-byte2-fix x))) (part-install res x :width 1 :low 2)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 4) -5))) (the (unsigned-byte 3) (ash (the (unsigned-byte 1) res) 2))))))
Theorem:
(defthm evex-byte2-p-of-!evex-byte2->res (b* ((new-x (!evex-byte2->res$inline res x))) (evex-byte2-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte2->res$inline-of-bfix-res (equal (!evex-byte2->res$inline (bfix res) x) (!evex-byte2->res$inline res x)))
Theorem:
(defthm !evex-byte2->res$inline-bit-equiv-congruence-on-res (implies (bit-equiv res res-equiv) (equal (!evex-byte2->res$inline res x) (!evex-byte2->res$inline res-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte2->res$inline-of-evex-byte2-fix-x (equal (!evex-byte2->res$inline res (evex-byte2-fix x)) (!evex-byte2->res$inline res x)))
Theorem:
(defthm !evex-byte2->res$inline-evex-byte2-equiv-congruence-on-x (implies (evex-byte2-equiv x x-equiv) (equal (!evex-byte2->res$inline res x) (!evex-byte2->res$inline res x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte2->res-is-evex-byte2 (equal (!evex-byte2->res res x) (change-evex-byte2 x :res res)))
Theorem:
(defthm evex-byte2->res-of-!evex-byte2->res (b* ((?new-x (!evex-byte2->res$inline res x))) (equal (evex-byte2->res new-x) (bfix res))))
Theorem:
(defthm !evex-byte2->res-equiv-under-mask (b* ((?new-x (!evex-byte2->res$inline res x))) (evex-byte2-equiv-under-mask new-x x -5)))
Function:
(defun !evex-byte2->vvvv$inline (vvvv x) (declare (xargs :guard (and (4bits-p vvvv) (evex-byte2-p x)))) (mbe :logic (b* ((vvvv (mbe :logic (4bits-fix vvvv) :exec vvvv)) (x (evex-byte2-fix x))) (part-install vvvv x :width 4 :low 3)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 8) -121))) (the (unsigned-byte 7) (ash (the (unsigned-byte 4) vvvv) 3))))))
Theorem:
(defthm evex-byte2-p-of-!evex-byte2->vvvv (b* ((new-x (!evex-byte2->vvvv$inline vvvv x))) (evex-byte2-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte2->vvvv$inline-of-4bits-fix-vvvv (equal (!evex-byte2->vvvv$inline (4bits-fix vvvv) x) (!evex-byte2->vvvv$inline vvvv x)))
Theorem:
(defthm !evex-byte2->vvvv$inline-4bits-equiv-congruence-on-vvvv (implies (4bits-equiv vvvv vvvv-equiv) (equal (!evex-byte2->vvvv$inline vvvv x) (!evex-byte2->vvvv$inline vvvv-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte2->vvvv$inline-of-evex-byte2-fix-x (equal (!evex-byte2->vvvv$inline vvvv (evex-byte2-fix x)) (!evex-byte2->vvvv$inline vvvv x)))
Theorem:
(defthm !evex-byte2->vvvv$inline-evex-byte2-equiv-congruence-on-x (implies (evex-byte2-equiv x x-equiv) (equal (!evex-byte2->vvvv$inline vvvv x) (!evex-byte2->vvvv$inline vvvv x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte2->vvvv-is-evex-byte2 (equal (!evex-byte2->vvvv vvvv x) (change-evex-byte2 x :vvvv vvvv)))
Theorem:
(defthm evex-byte2->vvvv-of-!evex-byte2->vvvv (b* ((?new-x (!evex-byte2->vvvv$inline vvvv x))) (equal (evex-byte2->vvvv new-x) (4bits-fix vvvv))))
Theorem:
(defthm !evex-byte2->vvvv-equiv-under-mask (b* ((?new-x (!evex-byte2->vvvv$inline vvvv x))) (evex-byte2-equiv-under-mask new-x x -121)))
Function:
(defun !evex-byte2->w$inline (w x) (declare (xargs :guard (and (bitp w) (evex-byte2-p x)))) (mbe :logic (b* ((w (mbe :logic (bfix w) :exec w)) (x (evex-byte2-fix x))) (part-install w x :width 1 :low 7)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 9) -129))) (the (unsigned-byte 8) (ash (the (unsigned-byte 1) w) 7))))))
Theorem:
(defthm evex-byte2-p-of-!evex-byte2->w (b* ((new-x (!evex-byte2->w$inline w x))) (evex-byte2-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte2->w$inline-of-bfix-w (equal (!evex-byte2->w$inline (bfix w) x) (!evex-byte2->w$inline w x)))
Theorem:
(defthm !evex-byte2->w$inline-bit-equiv-congruence-on-w (implies (bit-equiv w w-equiv) (equal (!evex-byte2->w$inline w x) (!evex-byte2->w$inline w-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte2->w$inline-of-evex-byte2-fix-x (equal (!evex-byte2->w$inline w (evex-byte2-fix x)) (!evex-byte2->w$inline w x)))
Theorem:
(defthm !evex-byte2->w$inline-evex-byte2-equiv-congruence-on-x (implies (evex-byte2-equiv x x-equiv) (equal (!evex-byte2->w$inline w x) (!evex-byte2->w$inline w x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte2->w-is-evex-byte2 (equal (!evex-byte2->w w x) (change-evex-byte2 x :w w)))
Theorem:
(defthm evex-byte2->w-of-!evex-byte2->w (b* ((?new-x (!evex-byte2->w$inline w x))) (equal (evex-byte2->w new-x) (bfix w))))
Theorem:
(defthm !evex-byte2->w-equiv-under-mask (b* ((?new-x (!evex-byte2->w$inline w x))) (evex-byte2-equiv-under-mask new-x x 127)))
Function:
(defun evex-byte2-debug$inline (x) (declare (xargs :guard (evex-byte2-p x))) (b* (((evex-byte2 x))) (cons (cons 'pp x.pp) (cons (cons 'res x.res) (cons (cons 'vvvv x.vvvv) (cons (cons 'w x.w) nil))))))
Function:
(defun evex-byte3-p$inline (x) (declare (xargs :guard t)) (mbe :logic (unsigned-byte-p 8 x) :exec (and (natp x) (< x 256))))
Theorem:
(defthm evex-byte3-p-when-unsigned-byte-p (implies (unsigned-byte-p 8 x) (evex-byte3-p x)))
Theorem:
(defthm unsigned-byte-p-when-evex-byte3-p (implies (evex-byte3-p x) (unsigned-byte-p 8 x)))
Theorem:
(defthm evex-byte3-p-compound-recognizer (implies (evex-byte3-p x) (natp x)) :rule-classes :compound-recognizer)
Function:
(defun evex-byte3-fix$inline (x) (declare (xargs :guard (evex-byte3-p x))) (mbe :logic (loghead 8 x) :exec x))
Theorem:
(defthm evex-byte3-p-of-evex-byte3-fix (b* ((fty::fixed (evex-byte3-fix$inline x))) (evex-byte3-p fty::fixed)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte3-fix-when-evex-byte3-p (implies (evex-byte3-p x) (equal (evex-byte3-fix x) x)))
Function:
(defun evex-byte3-equiv$inline (x y) (declare (xargs :guard (and (evex-byte3-p x) (evex-byte3-p y)))) (equal (evex-byte3-fix x) (evex-byte3-fix y)))
Theorem:
(defthm evex-byte3-equiv-is-an-equivalence (and (booleanp (evex-byte3-equiv x y)) (evex-byte3-equiv x x) (implies (evex-byte3-equiv x y) (evex-byte3-equiv y x)) (implies (and (evex-byte3-equiv x y) (evex-byte3-equiv y z)) (evex-byte3-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm evex-byte3-equiv-implies-equal-evex-byte3-fix-1 (implies (evex-byte3-equiv x x-equiv) (equal (evex-byte3-fix x) (evex-byte3-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm evex-byte3-fix-under-evex-byte3-equiv (evex-byte3-equiv (evex-byte3-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Function:
(defun evex-byte3$inline (aaa v-prime b vl/rc z) (declare (xargs :guard (and (3bits-p aaa) (bitp v-prime) (bitp b) (2bits-p vl/rc) (bitp z)))) (b* ((aaa (mbe :logic (3bits-fix aaa) :exec aaa)) (v-prime (mbe :logic (bfix v-prime) :exec v-prime)) (b (mbe :logic (bfix b) :exec b)) (vl/rc (mbe :logic (2bits-fix vl/rc) :exec vl/rc)) (z (mbe :logic (bfix z) :exec z))) (logapp 3 aaa (logapp 1 v-prime (logapp 1 b (logapp 2 vl/rc z))))))
Theorem:
(defthm evex-byte3-p-of-evex-byte3 (b* ((evex-byte3 (evex-byte3$inline aaa v-prime b vl/rc z))) (evex-byte3-p evex-byte3)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte3$inline-of-3bits-fix-aaa (equal (evex-byte3$inline (3bits-fix aaa) v-prime b vl/rc z) (evex-byte3$inline aaa v-prime b vl/rc z)))
Theorem:
(defthm evex-byte3$inline-3bits-equiv-congruence-on-aaa (implies (3bits-equiv aaa aaa-equiv) (equal (evex-byte3$inline aaa v-prime b vl/rc z) (evex-byte3$inline aaa-equiv v-prime b vl/rc z))) :rule-classes :congruence)
Theorem:
(defthm evex-byte3$inline-of-bfix-v-prime (equal (evex-byte3$inline aaa (bfix v-prime) b vl/rc z) (evex-byte3$inline aaa v-prime b vl/rc z)))
Theorem:
(defthm evex-byte3$inline-bit-equiv-congruence-on-v-prime (implies (bit-equiv v-prime v-prime-equiv) (equal (evex-byte3$inline aaa v-prime b vl/rc z) (evex-byte3$inline aaa v-prime-equiv b vl/rc z))) :rule-classes :congruence)
Theorem:
(defthm evex-byte3$inline-of-bfix-b (equal (evex-byte3$inline aaa v-prime (bfix b) vl/rc z) (evex-byte3$inline aaa v-prime b vl/rc z)))
Theorem:
(defthm evex-byte3$inline-bit-equiv-congruence-on-b (implies (bit-equiv b b-equiv) (equal (evex-byte3$inline aaa v-prime b vl/rc z) (evex-byte3$inline aaa v-prime b-equiv vl/rc z))) :rule-classes :congruence)
Theorem:
(defthm evex-byte3$inline-of-2bits-fix-vl/rc (equal (evex-byte3$inline aaa v-prime b (2bits-fix vl/rc) z) (evex-byte3$inline aaa v-prime b vl/rc z)))
Theorem:
(defthm evex-byte3$inline-2bits-equiv-congruence-on-vl/rc (implies (2bits-equiv vl/rc vl/rc-equiv) (equal (evex-byte3$inline aaa v-prime b vl/rc z) (evex-byte3$inline aaa v-prime b vl/rc-equiv z))) :rule-classes :congruence)
Theorem:
(defthm evex-byte3$inline-of-bfix-z (equal (evex-byte3$inline aaa v-prime b vl/rc (bfix z)) (evex-byte3$inline aaa v-prime b vl/rc z)))
Theorem:
(defthm evex-byte3$inline-bit-equiv-congruence-on-z (implies (bit-equiv z z-equiv) (equal (evex-byte3$inline aaa v-prime b vl/rc z) (evex-byte3$inline aaa v-prime b vl/rc z-equiv))) :rule-classes :congruence)
Function:
(defun evex-byte3-equiv-under-mask$inline (x x1 mask) (declare (xargs :guard (and (evex-byte3-p x) (evex-byte3-p x1) (integerp mask)))) (fty::int-equiv-under-mask (evex-byte3-fix x) (evex-byte3-fix x1) mask))
Function:
(defun evex-byte3->aaa$inline (x) (declare (xargs :guard (evex-byte3-p x))) (mbe :logic (let ((x (evex-byte3-fix x))) (part-select x :low 0 :width 3)) :exec (the (unsigned-byte 3) (logand (the (unsigned-byte 3) 7) (the (unsigned-byte 8) x)))))
Theorem:
(defthm 3bits-p-of-evex-byte3->aaa (b* ((aaa (evex-byte3->aaa$inline x))) (3bits-p aaa)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte3->aaa$inline-of-evex-byte3-fix-x (equal (evex-byte3->aaa$inline (evex-byte3-fix x)) (evex-byte3->aaa$inline x)))
Theorem:
(defthm evex-byte3->aaa$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (evex-byte3->aaa$inline x) (evex-byte3->aaa$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte3->aaa-of-evex-byte3 (equal (evex-byte3->aaa (evex-byte3 aaa v-prime b vl/rc z)) (3bits-fix aaa)))
Theorem:
(defthm evex-byte3->aaa-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte3-equiv-under-mask) (evex-byte3-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 7) 0)) (equal (evex-byte3->aaa x) (evex-byte3->aaa y))))
Function:
(defun evex-byte3->v-prime$inline (x) (declare (xargs :guard (evex-byte3-p x))) (mbe :logic (let ((x (evex-byte3-fix x))) (part-select x :low 3 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 5) (ash (the (unsigned-byte 8) x) -3))))))
Theorem:
(defthm bitp-of-evex-byte3->v-prime (b* ((v-prime (evex-byte3->v-prime$inline x))) (bitp v-prime)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte3->v-prime$inline-of-evex-byte3-fix-x (equal (evex-byte3->v-prime$inline (evex-byte3-fix x)) (evex-byte3->v-prime$inline x)))
Theorem:
(defthm evex-byte3->v-prime$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (evex-byte3->v-prime$inline x) (evex-byte3->v-prime$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte3->v-prime-of-evex-byte3 (equal (evex-byte3->v-prime (evex-byte3 aaa v-prime b vl/rc z)) (bfix v-prime)))
Theorem:
(defthm evex-byte3->v-prime-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte3-equiv-under-mask) (evex-byte3-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 8) 0)) (equal (evex-byte3->v-prime x) (evex-byte3->v-prime y))))
Function:
(defun evex-byte3->b$inline (x) (declare (xargs :guard (evex-byte3-p x))) (mbe :logic (let ((x (evex-byte3-fix x))) (part-select x :low 4 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 4) (ash (the (unsigned-byte 8) x) -4))))))
Theorem:
(defthm bitp-of-evex-byte3->b (b* ((b (evex-byte3->b$inline x))) (bitp b)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte3->b$inline-of-evex-byte3-fix-x (equal (evex-byte3->b$inline (evex-byte3-fix x)) (evex-byte3->b$inline x)))
Theorem:
(defthm evex-byte3->b$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (evex-byte3->b$inline x) (evex-byte3->b$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte3->b-of-evex-byte3 (equal (evex-byte3->b (evex-byte3 aaa v-prime b vl/rc z)) (bfix b)))
Theorem:
(defthm evex-byte3->b-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte3-equiv-under-mask) (evex-byte3-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 16) 0)) (equal (evex-byte3->b x) (evex-byte3->b y))))
Function:
(defun evex-byte3->vl/rc$inline (x) (declare (xargs :guard (evex-byte3-p x))) (mbe :logic (let ((x (evex-byte3-fix x))) (part-select x :low 5 :width 2)) :exec (the (unsigned-byte 2) (logand (the (unsigned-byte 2) 3) (the (unsigned-byte 3) (ash (the (unsigned-byte 8) x) -5))))))
Theorem:
(defthm 2bits-p-of-evex-byte3->vl/rc (b* ((vl/rc (evex-byte3->vl/rc$inline x))) (2bits-p vl/rc)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte3->vl/rc$inline-of-evex-byte3-fix-x (equal (evex-byte3->vl/rc$inline (evex-byte3-fix x)) (evex-byte3->vl/rc$inline x)))
Theorem:
(defthm evex-byte3->vl/rc$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (evex-byte3->vl/rc$inline x) (evex-byte3->vl/rc$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte3->vl/rc-of-evex-byte3 (equal (evex-byte3->vl/rc (evex-byte3 aaa v-prime b vl/rc z)) (2bits-fix vl/rc)))
Theorem:
(defthm evex-byte3->vl/rc-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte3-equiv-under-mask) (evex-byte3-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 96) 0)) (equal (evex-byte3->vl/rc x) (evex-byte3->vl/rc y))))
Function:
(defun evex-byte3->z$inline (x) (declare (xargs :guard (evex-byte3-p x))) (mbe :logic (let ((x (evex-byte3-fix x))) (part-select x :low 7 :width 1)) :exec (the (unsigned-byte 1) (logand (the (unsigned-byte 1) 1) (the (unsigned-byte 1) (ash (the (unsigned-byte 8) x) -7))))))
Theorem:
(defthm bitp-of-evex-byte3->z (b* ((z (evex-byte3->z$inline x))) (bitp z)) :rule-classes :rewrite)
Theorem:
(defthm evex-byte3->z$inline-of-evex-byte3-fix-x (equal (evex-byte3->z$inline (evex-byte3-fix x)) (evex-byte3->z$inline x)))
Theorem:
(defthm evex-byte3->z$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (evex-byte3->z$inline x) (evex-byte3->z$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm evex-byte3->z-of-evex-byte3 (equal (evex-byte3->z (evex-byte3 aaa v-prime b vl/rc z)) (bfix z)))
Theorem:
(defthm evex-byte3->z-of-write-with-mask (implies (and (fty::bitstruct-read-over-write-hyps x evex-byte3-equiv-under-mask) (evex-byte3-equiv-under-mask x y fty::mask) (equal (logand (lognot fty::mask) 128) 0)) (equal (evex-byte3->z x) (evex-byte3->z y))))
Theorem:
(defthm evex-byte3-fix-in-terms-of-evex-byte3 (equal (evex-byte3-fix x) (change-evex-byte3 x)))
Function:
(defun !evex-byte3->aaa$inline (aaa x) (declare (xargs :guard (and (3bits-p aaa) (evex-byte3-p x)))) (mbe :logic (b* ((aaa (mbe :logic (3bits-fix aaa) :exec aaa)) (x (evex-byte3-fix x))) (part-install aaa x :width 3 :low 0)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 4) -8))) (the (unsigned-byte 3) aaa)))))
Theorem:
(defthm evex-byte3-p-of-!evex-byte3->aaa (b* ((new-x (!evex-byte3->aaa$inline aaa x))) (evex-byte3-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte3->aaa$inline-of-3bits-fix-aaa (equal (!evex-byte3->aaa$inline (3bits-fix aaa) x) (!evex-byte3->aaa$inline aaa x)))
Theorem:
(defthm !evex-byte3->aaa$inline-3bits-equiv-congruence-on-aaa (implies (3bits-equiv aaa aaa-equiv) (equal (!evex-byte3->aaa$inline aaa x) (!evex-byte3->aaa$inline aaa-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->aaa$inline-of-evex-byte3-fix-x (equal (!evex-byte3->aaa$inline aaa (evex-byte3-fix x)) (!evex-byte3->aaa$inline aaa x)))
Theorem:
(defthm !evex-byte3->aaa$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (!evex-byte3->aaa$inline aaa x) (!evex-byte3->aaa$inline aaa x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->aaa-is-evex-byte3 (equal (!evex-byte3->aaa aaa x) (change-evex-byte3 x :aaa aaa)))
Theorem:
(defthm evex-byte3->aaa-of-!evex-byte3->aaa (b* ((?new-x (!evex-byte3->aaa$inline aaa x))) (equal (evex-byte3->aaa new-x) (3bits-fix aaa))))
Theorem:
(defthm !evex-byte3->aaa-equiv-under-mask (b* ((?new-x (!evex-byte3->aaa$inline aaa x))) (evex-byte3-equiv-under-mask new-x x -8)))
Function:
(defun !evex-byte3->v-prime$inline (v-prime x) (declare (xargs :guard (and (bitp v-prime) (evex-byte3-p x)))) (mbe :logic (b* ((v-prime (mbe :logic (bfix v-prime) :exec v-prime)) (x (evex-byte3-fix x))) (part-install v-prime x :width 1 :low 3)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 5) -9))) (the (unsigned-byte 4) (ash (the (unsigned-byte 1) v-prime) 3))))))
Theorem:
(defthm evex-byte3-p-of-!evex-byte3->v-prime (b* ((new-x (!evex-byte3->v-prime$inline v-prime x))) (evex-byte3-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte3->v-prime$inline-of-bfix-v-prime (equal (!evex-byte3->v-prime$inline (bfix v-prime) x) (!evex-byte3->v-prime$inline v-prime x)))
Theorem:
(defthm !evex-byte3->v-prime$inline-bit-equiv-congruence-on-v-prime (implies (bit-equiv v-prime v-prime-equiv) (equal (!evex-byte3->v-prime$inline v-prime x) (!evex-byte3->v-prime$inline v-prime-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->v-prime$inline-of-evex-byte3-fix-x (equal (!evex-byte3->v-prime$inline v-prime (evex-byte3-fix x)) (!evex-byte3->v-prime$inline v-prime x)))
Theorem:
(defthm !evex-byte3->v-prime$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (!evex-byte3->v-prime$inline v-prime x) (!evex-byte3->v-prime$inline v-prime x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->v-prime-is-evex-byte3 (equal (!evex-byte3->v-prime v-prime x) (change-evex-byte3 x :v-prime v-prime)))
Theorem:
(defthm evex-byte3->v-prime-of-!evex-byte3->v-prime (b* ((?new-x (!evex-byte3->v-prime$inline v-prime x))) (equal (evex-byte3->v-prime new-x) (bfix v-prime))))
Theorem:
(defthm !evex-byte3->v-prime-equiv-under-mask (b* ((?new-x (!evex-byte3->v-prime$inline v-prime x))) (evex-byte3-equiv-under-mask new-x x -9)))
Function:
(defun !evex-byte3->b$inline (b x) (declare (xargs :guard (and (bitp b) (evex-byte3-p x)))) (mbe :logic (b* ((b (mbe :logic (bfix b) :exec b)) (x (evex-byte3-fix x))) (part-install b x :width 1 :low 4)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 6) -17))) (the (unsigned-byte 5) (ash (the (unsigned-byte 1) b) 4))))))
Theorem:
(defthm evex-byte3-p-of-!evex-byte3->b (b* ((new-x (!evex-byte3->b$inline b x))) (evex-byte3-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte3->b$inline-of-bfix-b (equal (!evex-byte3->b$inline (bfix b) x) (!evex-byte3->b$inline b x)))
Theorem:
(defthm !evex-byte3->b$inline-bit-equiv-congruence-on-b (implies (bit-equiv b b-equiv) (equal (!evex-byte3->b$inline b x) (!evex-byte3->b$inline b-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->b$inline-of-evex-byte3-fix-x (equal (!evex-byte3->b$inline b (evex-byte3-fix x)) (!evex-byte3->b$inline b x)))
Theorem:
(defthm !evex-byte3->b$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (!evex-byte3->b$inline b x) (!evex-byte3->b$inline b x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->b-is-evex-byte3 (equal (!evex-byte3->b b x) (change-evex-byte3 x :b b)))
Theorem:
(defthm evex-byte3->b-of-!evex-byte3->b (b* ((?new-x (!evex-byte3->b$inline b x))) (equal (evex-byte3->b new-x) (bfix b))))
Theorem:
(defthm !evex-byte3->b-equiv-under-mask (b* ((?new-x (!evex-byte3->b$inline b x))) (evex-byte3-equiv-under-mask new-x x -17)))
Function:
(defun !evex-byte3->vl/rc$inline (vl/rc x) (declare (xargs :guard (and (2bits-p vl/rc) (evex-byte3-p x)))) (mbe :logic (b* ((vl/rc (mbe :logic (2bits-fix vl/rc) :exec vl/rc)) (x (evex-byte3-fix x))) (part-install vl/rc x :width 2 :low 5)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 8) -97))) (the (unsigned-byte 7) (ash (the (unsigned-byte 2) vl/rc) 5))))))
Theorem:
(defthm evex-byte3-p-of-!evex-byte3->vl/rc (b* ((new-x (!evex-byte3->vl/rc$inline vl/rc x))) (evex-byte3-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte3->vl/rc$inline-of-2bits-fix-vl/rc (equal (!evex-byte3->vl/rc$inline (2bits-fix vl/rc) x) (!evex-byte3->vl/rc$inline vl/rc x)))
Theorem:
(defthm !evex-byte3->vl/rc$inline-2bits-equiv-congruence-on-vl/rc (implies (2bits-equiv vl/rc vl/rc-equiv) (equal (!evex-byte3->vl/rc$inline vl/rc x) (!evex-byte3->vl/rc$inline vl/rc-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->vl/rc$inline-of-evex-byte3-fix-x (equal (!evex-byte3->vl/rc$inline vl/rc (evex-byte3-fix x)) (!evex-byte3->vl/rc$inline vl/rc x)))
Theorem:
(defthm !evex-byte3->vl/rc$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (!evex-byte3->vl/rc$inline vl/rc x) (!evex-byte3->vl/rc$inline vl/rc x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->vl/rc-is-evex-byte3 (equal (!evex-byte3->vl/rc vl/rc x) (change-evex-byte3 x :vl/rc vl/rc)))
Theorem:
(defthm evex-byte3->vl/rc-of-!evex-byte3->vl/rc (b* ((?new-x (!evex-byte3->vl/rc$inline vl/rc x))) (equal (evex-byte3->vl/rc new-x) (2bits-fix vl/rc))))
Theorem:
(defthm !evex-byte3->vl/rc-equiv-under-mask (b* ((?new-x (!evex-byte3->vl/rc$inline vl/rc x))) (evex-byte3-equiv-under-mask new-x x -97)))
Function:
(defun !evex-byte3->z$inline (z x) (declare (xargs :guard (and (bitp z) (evex-byte3-p x)))) (mbe :logic (b* ((z (mbe :logic (bfix z) :exec z)) (x (evex-byte3-fix x))) (part-install z x :width 1 :low 7)) :exec (the (unsigned-byte 8) (logior (the (unsigned-byte 8) (logand (the (unsigned-byte 8) x) (the (signed-byte 9) -129))) (the (unsigned-byte 8) (ash (the (unsigned-byte 1) z) 7))))))
Theorem:
(defthm evex-byte3-p-of-!evex-byte3->z (b* ((new-x (!evex-byte3->z$inline z x))) (evex-byte3-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !evex-byte3->z$inline-of-bfix-z (equal (!evex-byte3->z$inline (bfix z) x) (!evex-byte3->z$inline z x)))
Theorem:
(defthm !evex-byte3->z$inline-bit-equiv-congruence-on-z (implies (bit-equiv z z-equiv) (equal (!evex-byte3->z$inline z x) (!evex-byte3->z$inline z-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->z$inline-of-evex-byte3-fix-x (equal (!evex-byte3->z$inline z (evex-byte3-fix x)) (!evex-byte3->z$inline z x)))
Theorem:
(defthm !evex-byte3->z$inline-evex-byte3-equiv-congruence-on-x (implies (evex-byte3-equiv x x-equiv) (equal (!evex-byte3->z$inline z x) (!evex-byte3->z$inline z x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !evex-byte3->z-is-evex-byte3 (equal (!evex-byte3->z z x) (change-evex-byte3 x :z z)))
Theorem:
(defthm evex-byte3->z-of-!evex-byte3->z (b* ((?new-x (!evex-byte3->z$inline z x))) (equal (evex-byte3->z new-x) (bfix z))))
Theorem:
(defthm !evex-byte3->z-equiv-under-mask (b* ((?new-x (!evex-byte3->z$inline z x))) (evex-byte3-equiv-under-mask new-x x 127)))
Function:
(defun evex-byte3-debug$inline (x) (declare (xargs :guard (evex-byte3-p x))) (b* (((evex-byte3 x))) (cons (cons 'aaa x.aaa) (cons (cons 'v-prime x.v-prime) (cons (cons 'b x.b) (cons (cons 'vl/rc x.vl/rc) (cons (cons 'z x.z) nil)))))))
Function:
(defun evex->aaa$inline (evex-prefixes) (declare (xargs :guard (evex-prefixes-p evex-prefixes))) (evex-byte3->aaa (evex-prefixes->byte3 evex-prefixes)))
Theorem:
(defthm return-type-of-evex->aaa (implies (and (evex-prefixes-p$inline evex-prefixes)) (b* ((aaa (evex->aaa$inline evex-prefixes))) (unsigned-byte-p 3 aaa))) :rule-classes :rewrite)
Function:
(defun evex->z$inline (evex-prefixes) (declare (xargs :guard (evex-prefixes-p evex-prefixes))) (evex-byte3->z (evex-prefixes->byte3 evex-prefixes)))
Theorem:
(defthm return-type-of-evex->z (implies (and (evex-prefixes-p$inline evex-prefixes)) (b* ((z (evex->z$inline evex-prefixes))) (unsigned-byte-p 1 z))) :rule-classes :rewrite)
Function:
(defun evex->vvvv$inline (evex-prefixes) (declare (xargs :guard (evex-prefixes-p evex-prefixes))) (evex-byte2->vvvv (evex-prefixes->byte2 evex-prefixes)))
Theorem:
(defthm return-type-of-evex->vvvv (implies (and (evex-prefixes-p$inline evex-prefixes)) (b* ((vvvv (evex->vvvv$inline evex-prefixes))) (unsigned-byte-p 4 vvvv))) :rule-classes :rewrite)
Function:
(defun evex->v-prime$inline (evex-prefixes) (declare (xargs :guard (evex-prefixes-p evex-prefixes))) (evex-byte3->v-prime (evex-prefixes->byte3 evex-prefixes)))
Theorem:
(defthm return-type-of-evex->v-prime (implies (and (evex-prefixes-p$inline evex-prefixes)) (b* ((v-prime (evex->v-prime$inline evex-prefixes))) (unsigned-byte-p 1 v-prime))) :rule-classes :rewrite)
Function:
(defun evex->vl/rc$inline (evex-prefixes) (declare (xargs :guard (evex-prefixes-p evex-prefixes))) (evex-byte3->vl/rc (evex-prefixes->byte3 evex-prefixes)))
Theorem:
(defthm return-type-of-evex->vl/rc (implies (and (evex-prefixes-p$inline evex-prefixes)) (b* ((vl/rc (evex->vl/rc$inline evex-prefixes))) (unsigned-byte-p 2 vl/rc))) :rule-classes :rewrite)
Function:
(defun evex->pp$inline (evex-prefixes) (declare (xargs :guard (evex-prefixes-p evex-prefixes))) (evex-byte2->pp (evex-prefixes->byte2 evex-prefixes)))
Theorem:
(defthm return-type-of-evex->pp (implies (and (evex-prefixes-p$inline evex-prefixes)) (b* ((pp (evex->pp$inline evex-prefixes))) (unsigned-byte-p 2 pp))) :rule-classes :rewrite)
Function:
(defun evex->w$inline (evex-prefixes) (declare (xargs :guard (evex-prefixes-p evex-prefixes))) (evex-byte2->w (evex-prefixes->byte2 evex-prefixes)))
Theorem:
(defthm return-type-of-evex->w (implies (and (evex-prefixes-p$inline evex-prefixes)) (b* ((w (evex->w$inline evex-prefixes))) (unsigned-byte-p 1 w))) :rule-classes :rewrite)