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