Fixing function for op-imm-funct structures.
(op-imm-funct-fix x) → new-x
Function:
(defun op-imm-funct-fix$inline (x) (declare (xargs :guard (op-imm-funct-p x))) (let ((__function__ 'op-imm-funct-fix)) (declare (ignorable __function__)) (mbe :logic (case (op-imm-funct-kind x) (:addi (cons :addi (list))) (:slti (cons :slti (list))) (:sltiu (cons :sltiu (list))) (:andi (cons :andi (list))) (:ori (cons :ori (list))) (:xori (cons :xori (list)))) :exec x)))
Theorem:
(defthm op-imm-funct-p-of-op-imm-funct-fix (b* ((new-x (op-imm-funct-fix$inline x))) (op-imm-funct-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm op-imm-funct-fix-when-op-imm-funct-p (implies (op-imm-funct-p x) (equal (op-imm-funct-fix x) x)))
Function:
(defun op-imm-funct-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (op-imm-funct-p acl2::x) (op-imm-funct-p acl2::y)))) (equal (op-imm-funct-fix acl2::x) (op-imm-funct-fix acl2::y)))
Theorem:
(defthm op-imm-funct-equiv-is-an-equivalence (and (booleanp (op-imm-funct-equiv x y)) (op-imm-funct-equiv x x) (implies (op-imm-funct-equiv x y) (op-imm-funct-equiv y x)) (implies (and (op-imm-funct-equiv x y) (op-imm-funct-equiv y z)) (op-imm-funct-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm op-imm-funct-equiv-implies-equal-op-imm-funct-fix-1 (implies (op-imm-funct-equiv acl2::x x-equiv) (equal (op-imm-funct-fix acl2::x) (op-imm-funct-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm op-imm-funct-fix-under-op-imm-funct-equiv (op-imm-funct-equiv (op-imm-funct-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-op-imm-funct-fix-1-forward-to-op-imm-funct-equiv (implies (equal (op-imm-funct-fix acl2::x) acl2::y) (op-imm-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-op-imm-funct-fix-2-forward-to-op-imm-funct-equiv (implies (equal acl2::x (op-imm-funct-fix acl2::y)) (op-imm-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm op-imm-funct-equiv-of-op-imm-funct-fix-1-forward (implies (op-imm-funct-equiv (op-imm-funct-fix acl2::x) acl2::y) (op-imm-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm op-imm-funct-equiv-of-op-imm-funct-fix-2-forward (implies (op-imm-funct-equiv acl2::x (op-imm-funct-fix acl2::y)) (op-imm-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm op-imm-funct-kind$inline-of-op-imm-funct-fix-x (equal (op-imm-funct-kind$inline (op-imm-funct-fix x)) (op-imm-funct-kind$inline x)))
Theorem:
(defthm op-imm-funct-kind$inline-op-imm-funct-equiv-congruence-on-x (implies (op-imm-funct-equiv x x-equiv) (equal (op-imm-funct-kind$inline x) (op-imm-funct-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-op-imm-funct-fix (consp (op-imm-funct-fix x)) :rule-classes :type-prescription)