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