Fixing function for symbol structures.
Function:
(defun symbol-fix$inline (x) (declare (xargs :guard (symbolp x))) (let ((__function__ 'symbol-fix)) (declare (ignorable __function__)) (mbe :logic (case (symbol-kind x) (:terminal (b* ((get (nfix x))) get)) (:nonterminal (b* ((get (rulename-fix x))) get))) :exec x)))
Theorem:
(defthm symbolp-of-symbol-fix (b* ((new-x (symbol-fix$inline x))) (symbolp new-x)) :rule-classes :rewrite)
Theorem:
(defthm symbol-fix-when-symbolp (implies (symbolp x) (equal (symbol-fix x) x)))
Function:
(defun symbol-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (symbolp acl2::x) (symbolp acl2::y)))) (equal (symbol-fix acl2::x) (symbol-fix acl2::y)))
Theorem:
(defthm symbol-equiv-is-an-equivalence (and (booleanp (symbol-equiv x y)) (symbol-equiv x x) (implies (symbol-equiv x y) (symbol-equiv y x)) (implies (and (symbol-equiv x y) (symbol-equiv y z)) (symbol-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm symbol-equiv-implies-equal-symbol-fix-1 (implies (symbol-equiv acl2::x x-equiv) (equal (symbol-fix acl2::x) (symbol-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm symbol-fix-under-symbol-equiv (symbol-equiv (symbol-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-symbol-fix-1-forward-to-symbol-equiv (implies (equal (symbol-fix acl2::x) acl2::y) (symbol-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-symbol-fix-2-forward-to-symbol-equiv (implies (equal acl2::x (symbol-fix acl2::y)) (symbol-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm symbol-equiv-of-symbol-fix-1-forward (implies (symbol-equiv (symbol-fix acl2::x) acl2::y) (symbol-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm symbol-equiv-of-symbol-fix-2-forward (implies (symbol-equiv acl2::x (symbol-fix acl2::y)) (symbol-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm symbol-kind$inline-of-symbol-fix-x (equal (symbol-kind$inline (symbol-fix x)) (symbol-kind$inline x)))
Theorem:
(defthm symbol-kind$inline-symbol-equiv-congruence-on-x (implies (symbol-equiv x x-equiv) (equal (symbol-kind$inline x) (symbol-kind$inline x-equiv))) :rule-classes :congruence)