Fixing function for hex-frac-const structures.
(hex-frac-const-fix x) → new-x
Function:
(defun hex-frac-const-fix$inline (x) (declare (xargs :guard (hex-frac-constp x))) (let ((__function__ 'hex-frac-const-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((before (str::hex-digit-char-list-fix (cdr (std::da-nth 0 x)))) (after (str::hex-digit-char-list-fix (cdr (std::da-nth 1 x))))) (list (cons 'before before) (cons 'after after))) :exec x)))
Theorem:
(defthm hex-frac-constp-of-hex-frac-const-fix (b* ((new-x (hex-frac-const-fix$inline x))) (hex-frac-constp new-x)) :rule-classes :rewrite)
Theorem:
(defthm hex-frac-const-fix-when-hex-frac-constp (implies (hex-frac-constp x) (equal (hex-frac-const-fix x) x)))
Function:
(defun hex-frac-const-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (hex-frac-constp acl2::x) (hex-frac-constp acl2::y)))) (equal (hex-frac-const-fix acl2::x) (hex-frac-const-fix acl2::y)))
Theorem:
(defthm hex-frac-const-equiv-is-an-equivalence (and (booleanp (hex-frac-const-equiv x y)) (hex-frac-const-equiv x x) (implies (hex-frac-const-equiv x y) (hex-frac-const-equiv y x)) (implies (and (hex-frac-const-equiv x y) (hex-frac-const-equiv y z)) (hex-frac-const-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm hex-frac-const-equiv-implies-equal-hex-frac-const-fix-1 (implies (hex-frac-const-equiv acl2::x x-equiv) (equal (hex-frac-const-fix acl2::x) (hex-frac-const-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm hex-frac-const-fix-under-hex-frac-const-equiv (hex-frac-const-equiv (hex-frac-const-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-hex-frac-const-fix-1-forward-to-hex-frac-const-equiv (implies (equal (hex-frac-const-fix acl2::x) acl2::y) (hex-frac-const-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-hex-frac-const-fix-2-forward-to-hex-frac-const-equiv (implies (equal acl2::x (hex-frac-const-fix acl2::y)) (hex-frac-const-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hex-frac-const-equiv-of-hex-frac-const-fix-1-forward (implies (hex-frac-const-equiv (hex-frac-const-fix acl2::x) acl2::y) (hex-frac-const-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm hex-frac-const-equiv-of-hex-frac-const-fix-2-forward (implies (hex-frac-const-equiv acl2::x (hex-frac-const-fix acl2::y)) (hex-frac-const-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)