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