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