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