Fixing function for defstruct-info structures.
(defstruct-info-fix x) → new-x
Function:
(defun defstruct-info-fix$inline (x) (declare (xargs :guard (defstruct-infop x))) (let ((__function__ 'defstruct-info-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((tag (ident-fix (cdr (std::da-nth 0 x)))) (members (defstruct-member-info-list-fix (cdr (std::da-nth 1 x)))) (flexiblep (acl2::bool-fix (cdr (std::da-nth 2 x)))) (fixtype (symbol-fix (cdr (std::da-nth 3 x)))) (recognizer (symbol-fix (cdr (std::da-nth 4 x)))) (fixer (symbol-fix (cdr (std::da-nth 5 x)))) (fixer-recognizer-thm (symbol-fix (cdr (std::da-nth 6 x)))) (not-error-thm (symbol-fix (cdr (std::da-nth 7 x)))) (valuep-thm (symbol-fix (cdr (std::da-nth 8 x)))) (value-kind-thm (symbol-fix (cdr (std::da-nth 9 x)))) (type-of-value-thm (symbol-fix (cdr (std::da-nth 10 x)))) (flexiblep-thm (symbol-fix (cdr (std::da-nth 11 x)))) (type-to-quoted-thm (symbol-fix (cdr (std::da-nth 12 x)))) (pointer-type-to-quoted-thm (symbol-fix (cdr (std::da-nth 13 x)))) (call (acl2::pseudo-event-form-fix (cdr (std::da-nth 14 x))))) (list (cons 'tag tag) (cons 'members members) (cons 'flexiblep flexiblep) (cons 'fixtype fixtype) (cons 'recognizer recognizer) (cons 'fixer fixer) (cons 'fixer-recognizer-thm fixer-recognizer-thm) (cons 'not-error-thm not-error-thm) (cons 'valuep-thm valuep-thm) (cons 'value-kind-thm value-kind-thm) (cons 'type-of-value-thm type-of-value-thm) (cons 'flexiblep-thm flexiblep-thm) (cons 'type-to-quoted-thm type-to-quoted-thm) (cons 'pointer-type-to-quoted-thm pointer-type-to-quoted-thm) (cons 'call call))) :exec x)))
Theorem:
(defthm defstruct-infop-of-defstruct-info-fix (b* ((new-x (defstruct-info-fix$inline x))) (defstruct-infop new-x)) :rule-classes :rewrite)
Theorem:
(defthm defstruct-info-fix-when-defstruct-infop (implies (defstruct-infop x) (equal (defstruct-info-fix x) x)))
Function:
(defun defstruct-info-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (defstruct-infop acl2::x) (defstruct-infop acl2::y)))) (equal (defstruct-info-fix acl2::x) (defstruct-info-fix acl2::y)))
Theorem:
(defthm defstruct-info-equiv-is-an-equivalence (and (booleanp (defstruct-info-equiv x y)) (defstruct-info-equiv x x) (implies (defstruct-info-equiv x y) (defstruct-info-equiv y x)) (implies (and (defstruct-info-equiv x y) (defstruct-info-equiv y z)) (defstruct-info-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm defstruct-info-equiv-implies-equal-defstruct-info-fix-1 (implies (defstruct-info-equiv acl2::x x-equiv) (equal (defstruct-info-fix acl2::x) (defstruct-info-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm defstruct-info-fix-under-defstruct-info-equiv (defstruct-info-equiv (defstruct-info-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-defstruct-info-fix-1-forward-to-defstruct-info-equiv (implies (equal (defstruct-info-fix acl2::x) acl2::y) (defstruct-info-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-defstruct-info-fix-2-forward-to-defstruct-info-equiv (implies (equal acl2::x (defstruct-info-fix acl2::y)) (defstruct-info-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm defstruct-info-equiv-of-defstruct-info-fix-1-forward (implies (defstruct-info-equiv (defstruct-info-fix acl2::x) acl2::y) (defstruct-info-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm defstruct-info-equiv-of-defstruct-info-fix-2-forward (implies (defstruct-info-equiv acl2::x (defstruct-info-fix acl2::y)) (defstruct-info-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)