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