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