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