Fixing function for junop structures.
Function:
(defun junop-fix$inline (x) (declare (xargs :guard (junopp x))) (let ((__function__ 'junop-fix)) (declare (ignorable __function__)) (mbe :logic (case (junop-kind x) (:preinc (cons :preinc (list))) (:predec (cons :predec (list))) (:uplus (cons :uplus (list))) (:uminus (cons :uminus (list))) (:bitcompl (cons :bitcompl (list))) (:logcompl (cons :logcompl (list)))) :exec x)))
Theorem:
(defthm junopp-of-junop-fix (b* ((new-x (junop-fix$inline x))) (junopp new-x)) :rule-classes :rewrite)
Theorem:
(defthm junop-fix-when-junopp (implies (junopp x) (equal (junop-fix x) x)))
Function:
(defun junop-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (junopp acl2::x) (junopp acl2::y)))) (equal (junop-fix acl2::x) (junop-fix acl2::y)))
Theorem:
(defthm junop-equiv-is-an-equivalence (and (booleanp (junop-equiv x y)) (junop-equiv x x) (implies (junop-equiv x y) (junop-equiv y x)) (implies (and (junop-equiv x y) (junop-equiv y z)) (junop-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm junop-equiv-implies-equal-junop-fix-1 (implies (junop-equiv acl2::x x-equiv) (equal (junop-fix acl2::x) (junop-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm junop-fix-under-junop-equiv (junop-equiv (junop-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-junop-fix-1-forward-to-junop-equiv (implies (equal (junop-fix acl2::x) acl2::y) (junop-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-junop-fix-2-forward-to-junop-equiv (implies (equal acl2::x (junop-fix acl2::y)) (junop-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm junop-equiv-of-junop-fix-1-forward (implies (junop-equiv (junop-fix acl2::x) acl2::y) (junop-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm junop-equiv-of-junop-fix-2-forward (implies (junop-equiv acl2::x (junop-fix acl2::y)) (junop-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm junop-kind$inline-of-junop-fix-x (equal (junop-kind$inline (junop-fix x)) (junop-kind$inline x)))
Theorem:
(defthm junop-kind$inline-junop-equiv-congruence-on-x (implies (junop-equiv x x-equiv) (equal (junop-kind$inline x) (junop-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-junop-fix (consp (junop-fix x)) :rule-classes :type-prescription)