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