Fixtype of
names of non-shift instructions with the
This is analogous to op-imm-funct,
but for the
Ideally we would like to use a fty::deftagsum here, even though there is just one summand, for uniformity with other fixtypes that have at least two summands. However, doing so triggers a (broader) issue in XDOC. Until that issue is resolved, we ``manually'' define this fixtype.
Function:
(defun op-imm-32-funct-p (x) (declare (xargs :guard t)) (let ((__function__ 'op-imm-32-funct-p)) (declare (ignorable __function__)) (and (true-listp x) (= (len x) 1) (eq (car x) :addiw))))
Theorem:
(defthm booleanp-of-op-imm-32-funct-p (b* ((yes/no (op-imm-32-funct-p x))) (booleanp yes/no)) :rule-classes :rewrite)
Function:
(defun op-imm-32-funct-addiw nil (declare (xargs :guard t)) (let ((__function__ 'op-imm-32-funct-addiw)) (declare (ignorable __function__)) '(:addiw)))
Theorem:
(defthm op-imm-32-funct-p-of-op-imm-32-funct-addiw (b* ((x (op-imm-32-funct-addiw))) (op-imm-32-funct-p x)) :rule-classes :rewrite)
Function:
(defun op-imm-32-funct-fix (x) (declare (xargs :guard (op-imm-32-funct-p x))) (mbe :logic (if (op-imm-32-funct-p x) x (op-imm-32-funct-addiw)) :exec x))
Theorem:
(defthm op-imm-32-funct-p-of-op-imm-32-funct-fix (b* ((fixed-x (op-imm-32-funct-fix x))) (op-imm-32-funct-p fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm op-imm-32-funct-fix-when-op-imm-32-funct-p (implies (op-imm-32-funct-p x) (equal (op-imm-32-funct-fix x) x)))
Function:
(defun op-imm-32-funct-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (op-imm-32-funct-p acl2::x) (op-imm-32-funct-p acl2::y)))) (equal (op-imm-32-funct-fix acl2::x) (op-imm-32-funct-fix acl2::y)))
Theorem:
(defthm op-imm-32-funct-equiv-is-an-equivalence (and (booleanp (op-imm-32-funct-equiv x y)) (op-imm-32-funct-equiv x x) (implies (op-imm-32-funct-equiv x y) (op-imm-32-funct-equiv y x)) (implies (and (op-imm-32-funct-equiv x y) (op-imm-32-funct-equiv y z)) (op-imm-32-funct-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm op-imm-32-funct-equiv-implies-equal-op-imm-32-funct-fix-1 (implies (op-imm-32-funct-equiv acl2::x x-equiv) (equal (op-imm-32-funct-fix acl2::x) (op-imm-32-funct-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm op-imm-32-funct-fix-under-op-imm-32-funct-equiv (op-imm-32-funct-equiv (op-imm-32-funct-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-op-imm-32-funct-fix-1-forward-to-op-imm-32-funct-equiv (implies (equal (op-imm-32-funct-fix acl2::x) acl2::y) (op-imm-32-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-op-imm-32-funct-fix-2-forward-to-op-imm-32-funct-equiv (implies (equal acl2::x (op-imm-32-funct-fix acl2::y)) (op-imm-32-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm op-imm-32-funct-equiv-of-op-imm-32-funct-fix-1-forward (implies (op-imm-32-funct-equiv (op-imm-32-funct-fix acl2::x) acl2::y) (op-imm-32-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm op-imm-32-funct-equiv-of-op-imm-32-funct-fix-2-forward (implies (op-imm-32-funct-equiv acl2::x (op-imm-32-funct-fix acl2::y)) (op-imm-32-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)