Fixing function for op-funct structures.
(op-funct-fix x) → new-x
Function:
(defun op-funct-fix$inline (x) (declare (xargs :guard (op-funct-p x))) (let ((__function__ 'op-funct-fix)) (declare (ignorable __function__)) (mbe :logic (case (op-funct-kind x) (:add (cons :add (list))) (:sub (cons :sub (list))) (:slt (cons :slt (list))) (:sltu (cons :sltu (list))) (:and (cons :and (list))) (:or (cons :or (list))) (:xor (cons :xor (list))) (:sll (cons :sll (list))) (:srl (cons :srl (list))) (:sra (cons :sra (list))) (:mul (cons :mul (list))) (:mulh (cons :mulh (list))) (:mulhu (cons :mulhu (list))) (:mulhsu (cons :mulhsu (list))) (:div (cons :div (list))) (:divu (cons :divu (list))) (:rem (cons :rem (list))) (:remu (cons :remu (list)))) :exec x)))
Theorem:
(defthm op-funct-p-of-op-funct-fix (b* ((new-x (op-funct-fix$inline x))) (op-funct-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm op-funct-fix-when-op-funct-p (implies (op-funct-p x) (equal (op-funct-fix x) x)))
Function:
(defun op-funct-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (op-funct-p acl2::x) (op-funct-p acl2::y)))) (equal (op-funct-fix acl2::x) (op-funct-fix acl2::y)))
Theorem:
(defthm op-funct-equiv-is-an-equivalence (and (booleanp (op-funct-equiv x y)) (op-funct-equiv x x) (implies (op-funct-equiv x y) (op-funct-equiv y x)) (implies (and (op-funct-equiv x y) (op-funct-equiv y z)) (op-funct-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm op-funct-equiv-implies-equal-op-funct-fix-1 (implies (op-funct-equiv acl2::x x-equiv) (equal (op-funct-fix acl2::x) (op-funct-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm op-funct-fix-under-op-funct-equiv (op-funct-equiv (op-funct-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-op-funct-fix-1-forward-to-op-funct-equiv (implies (equal (op-funct-fix acl2::x) acl2::y) (op-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-op-funct-fix-2-forward-to-op-funct-equiv (implies (equal acl2::x (op-funct-fix acl2::y)) (op-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm op-funct-equiv-of-op-funct-fix-1-forward (implies (op-funct-equiv (op-funct-fix acl2::x) acl2::y) (op-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm op-funct-equiv-of-op-funct-fix-2-forward (implies (op-funct-equiv acl2::x (op-funct-fix acl2::y)) (op-funct-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm op-funct-kind$inline-of-op-funct-fix-x (equal (op-funct-kind$inline (op-funct-fix x)) (op-funct-kind$inline x)))
Theorem:
(defthm op-funct-kind$inline-op-funct-equiv-congruence-on-x (implies (op-funct-equiv x x-equiv) (equal (op-funct-kind$inline x) (op-funct-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-op-funct-fix (consp (op-funct-fix x)) :rule-classes :type-prescription)