Fixing function for unop structures.
Function:
(defun unop-fix$inline (x) (declare (xargs :guard (unopp x))) (let ((__function__ 'unop-fix)) (declare (ignorable __function__)) (mbe :logic (case (unop-kind x) (:address (cons :address (list))) (:indir (cons :indir (list))) (:plus (cons :plus (list))) (:minus (cons :minus (list))) (:bitnot (cons :bitnot (list))) (:lognot (cons :lognot (list))) (:preinc (cons :preinc (list))) (:predec (cons :predec (list))) (:postinc (cons :postinc (list))) (:postdec (cons :postdec (list))) (:sizeof (cons :sizeof (list)))) :exec x)))
Theorem:
(defthm unopp-of-unop-fix (b* ((new-x (unop-fix$inline x))) (unopp new-x)) :rule-classes :rewrite)
Theorem:
(defthm unop-fix-when-unopp (implies (unopp x) (equal (unop-fix x) x)))
Function:
(defun unop-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (unopp acl2::x) (unopp acl2::y)))) (equal (unop-fix acl2::x) (unop-fix acl2::y)))
Theorem:
(defthm unop-equiv-is-an-equivalence (and (booleanp (unop-equiv x y)) (unop-equiv x x) (implies (unop-equiv x y) (unop-equiv y x)) (implies (and (unop-equiv x y) (unop-equiv y z)) (unop-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm unop-equiv-implies-equal-unop-fix-1 (implies (unop-equiv acl2::x x-equiv) (equal (unop-fix acl2::x) (unop-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm unop-fix-under-unop-equiv (unop-equiv (unop-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-unop-fix-1-forward-to-unop-equiv (implies (equal (unop-fix acl2::x) acl2::y) (unop-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-unop-fix-2-forward-to-unop-equiv (implies (equal acl2::x (unop-fix acl2::y)) (unop-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm unop-equiv-of-unop-fix-1-forward (implies (unop-equiv (unop-fix acl2::x) acl2::y) (unop-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm unop-equiv-of-unop-fix-2-forward (implies (unop-equiv acl2::x (unop-fix acl2::y)) (unop-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm unop-kind$inline-of-unop-fix-x (equal (unop-kind$inline (unop-fix x)) (unop-kind$inline x)))
Theorem:
(defthm unop-kind$inline-unop-equiv-congruence-on-x (implies (unop-equiv x x-equiv) (equal (unop-kind$inline x) (unop-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-unop-fix (consp (unop-fix x)) :rule-classes :type-prescription)