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