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