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